From d2847ad2df6f452947158e16d38c98da5cd5953b Mon Sep 17 00:00:00 2001 From: ivelina-yordanova <56301327+ivelina-yordanova@users.noreply.github.com> Date: Mon, 10 Feb 2020 12:54:48 +0000 Subject: [PATCH 1/7] [CHR-1066] - snowowlFork to Artifactory (#2) * [CHR-1066] * [CHR-1066] * [CHR-1066] * [CHR-1066] * [CHR-1066] * [CHR-1066] * [CHR-1066] * [CHR-1066] * [CHR-1066] * [CHR-1066] * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * CHR-1066 * chr-1066 - add cache and test if javadoc in path * chr-1066 - print out some debug info * chr-1066 -fix copy/paste mistake * chr-1066 - print debug info * chr-1066 - print debug info * chr-1066 - yet another print debug info * chr-1066 - yet another print debug info * chr-1066 - extract var to control use of local artifacts * chr-1066 - extract var to control use of local artifacts * chr-1066 - extract var to control use of local artifacts * chr-1066 - print stuff * chr-1066 - change npm config, errors and skips next lines * chr-1066 - nes * chr-1066 - .. * chr-1066 - remove debug * chr-1066 - put env vars in docker and in the bash env * chr-1066 - put env vars in job as well, print debug * chr-1066 - yet another try to change path.. print debug * chr-1066 - yet another try to change path.. print debug * chr-1066 - I am doing stupid things now...fixing copy/paste error * chr-1066 - still not set...their documentation lies ... * chr-1066 - still not set completely... * chr-1066 - remove the debug echoed info Co-authored-by: Matteo Casu --- .circleci/config.yml | 58 + .circleci/settings.xml | 18 + .mvn/wrapper/MavenWrapperDownloader.java | 117 + .mvn/wrapper/maven-wrapper.jar | Bin 0 -> 50710 bytes .mvn/wrapper/maven-wrapper.properties | 2 + .../pom.xml | 540 ++--- mvnw | 310 +++ mvnw.cmd | 182 ++ pom.xml | 1892 +++++++++-------- settings.xml | 26 +- 10 files changed, 1933 insertions(+), 1212 deletions(-) create mode 100644 .circleci/config.yml create mode 100644 .circleci/settings.xml create mode 100644 .mvn/wrapper/MavenWrapperDownloader.java create mode 100644 .mvn/wrapper/maven-wrapper.jar create mode 100644 .mvn/wrapper/maven-wrapper.properties create mode 100755 mvnw create mode 100644 mvnw.cmd diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000000..28de92ce705 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,58 @@ +version: 2 +workflows: + version: 2 + flow: + jobs: + - deploy: + context: babylon + filters: + branches: + only: + - 7.x +env: &env + working_directory: ~/project + resource_class: large + docker: + - image: docker:17.03.0-ce-git + environment: + JAVA_HOME: /usr/lib/jvm/java-11-openjdk + environment: + JAVA_HOME: /usr/lib/jvm/java-11-openjdk + +jobs: + deploy: + <<: *env + steps: + - checkout + - setup_remote_docker + - restore_cache: + keys: + - snow-owl-mvn-cache-{{ checksum "pom.xml" }} + - snow-owl-mvn-cache- + paths: + - "~/.m2" + - "/root/.m2" + - run: + name: Build prerequisites + command: | + echo "${ARTIFACTORY_URL}" | sha512sum + echo "${ARTIFACTORY_USER_RW}" | sha512sum + echo "${ARTIFACTORY_PWD_RW}" | sha512sum + echo "$CIRCLE_SHA1" > .commit-keyId + docker --version + docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" quay.io + apk add --no-cache make=4.2.1-r0 nodejs openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community + npm config set unsafe-perm true + npm install -g npm + - save_cache: + key: snow-owl-mvn-cache-{{ checksum "pom.xml" }} + paths: + - "~/.m2" + - "/root/.m2" + - run: + name: Build and deploy + command: | + echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $BASH_ENV + source $BASH_ENV + ./mvnw -s .circleci/settings.xml deploy -DskipTests -Dtycho.localArtifacts=$LOCAL_ARTIFACTS + diff --git a/.circleci/settings.xml b/.circleci/settings.xml new file mode 100644 index 00000000000..232b744684e --- /dev/null +++ b/.circleci/settings.xml @@ -0,0 +1,18 @@ + + + + artifactory-releases + ${env.ARTIFACTORY_USER_RW} + ${env.ARTIFACTORY_PWD_RW} + + + artifactory-snapshots + ${env.ARTIFACTORY_USER_RW} + ${env.ARTIFACTORY_PWD_RW} + + + + \ No newline at end of file diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000000..b901097f2db --- /dev/null +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..2cc7d4a55c0cd0092912bf49ae38b3a9e3fd0054 GIT binary patch literal 50710 zcmbTd1CVCTmM+|7+wQV$+qP}n>auOywyU~q+qUhh+uxis_~*a##hm*_WW?9E7Pb7N%LRFiwbEGCJ0XP=%-6oeT$XZcYgtzC2~q zk(K08IQL8oTl}>>+hE5YRgXTB@fZ4TH9>7=79e`%%tw*SQUa9~$xKD5rS!;ZG@ocK zQdcH}JX?W|0_Afv?y`-NgLum62B&WSD$-w;O6G0Sm;SMX65z)l%m1e-g8Q$QTI;(Q z+x$xth4KFvH@Bs6(zn!iF#nenk^Y^ce;XIItAoCsow38eq?Y-Auh!1in#Rt-_D>H^ z=EjbclGGGa6VnaMGmMLj`x3NcwA43Jb(0gzl;RUIRAUDcR1~99l2SAPkVhoRMMtN} zXvC<tOmX83grD8GSo_Lo?%lNfhD#EBgPo z*nf@ppMC#B!T)Ae0RG$mlJWmGl7CkuU~B8-==5i;rS;8i6rJ=PoQxf446XDX9g|c> zU64ePyMlsI^V5Jq5A+BPe#e73+kpc_r1tv#B)~EZ;7^67F0*QiYfrk0uVW;Qb=NsG zN>gsuCwvb?s-KQIppEaeXtEMdc9dy6Dfduz-tMTms+i01{eD9JE&h?Kht*$eOl#&L zJdM_-vXs(V#$Ed;5wyNWJdPNh+Z$+;$|%qR(t`4W@kDhd*{(7-33BOS6L$UPDeE_53j${QfKN-0v-HG z(QfyvFNbwPK%^!eIo4ac1;b>c0vyf9}Xby@YY!lkz-UvNp zwj#Gg|4B~?n?G^{;(W;|{SNoJbHTMpQJ*Wq5b{l9c8(%?Kd^1?H1om1de0Da9M;Q=n zUfn{f87iVb^>Exl*nZ0hs(Yt>&V9$Pg`zX`AI%`+0SWQ4Zc(8lUDcTluS z5a_KerZWe}a-MF9#Cd^fi!y3%@RFmg&~YnYZ6<=L`UJ0v={zr)>$A;x#MCHZy1st7 ztT+N07NR+vOwSV2pvWuN1%lO!K#Pj0Fr>Q~R40{bwdL%u9i`DSM4RdtEH#cW)6}+I-eE< z&tZs+(Ogu(H_;$a$!7w`MH0r%h&@KM+<>gJL@O~2K2?VrSYUBbhCn#yy?P)uF3qWU z0o09mIik+kvzV6w>vEZy@&Mr)SgxPzUiDA&%07m17udz9usD82afQEps3$pe!7fUf z0eiidkJ)m3qhOjVHC_M(RYCBO%CZKZXFb8}s0-+}@CIn&EF(rRWUX2g^yZCvl0bI} zbP;1S)iXnRC&}5-Tl(hASKqdSnO?ASGJ*MIhOXIblmEudj(M|W!+I3eDc}7t`^mtg z)PKlaXe(OH+q-)qcQ8a@!llRrpGI8DsjhoKvw9T;TEH&?s=LH0w$EzI>%u;oD@x83 zJL7+ncjI9nn!TlS_KYu5vn%f*@qa5F;| zEFxY&B?g=IVlaF3XNm_03PA)=3|{n-UCgJoTr;|;1AU9|kPE_if8!Zvb}0q$5okF$ zHaJdmO&gg!9oN|M{!qGE=tb|3pVQ8PbL$}e;NgXz<6ZEggI}wO@aBP**2Wo=yN#ZC z4G$m^yaM9g=|&!^ft8jOLuzc3Psca*;7`;gnHm}tS0%f4{|VGEwu45KptfNmwxlE~ z^=r30gi@?cOm8kAz!EylA4G~7kbEiRlRIzwrb~{_2(x^$-?|#e6Bi_**(vyr_~9Of z!n>Gqf+Qwiu!xhi9f53=PM3`3tNF}pCOiPU|H4;pzjcsqbwg*{{kyrTxk<;mx~(;; z1NMrpaQ`57yn34>Jo3b|HROE(UNcQash!0p2-!Cz;{IRv#Vp5!3o$P8!%SgV~k&Hnqhp`5eLjTcy93cK!3Hm-$`@yGnaE=?;*2uSpiZTs_dDd51U%i z{|Zd9ou-;laGS_x=O}a+ zB||za<795A?_~Q=r=coQ+ZK@@ zId~hWQL<%)fI_WDIX#=(WNl!Dm$a&ROfLTd&B$vatq!M-2Jcs;N2vps$b6P1(N}=oI3<3luMTmC|0*{ zm1w8bt7vgX($!0@V0A}XIK)w!AzUn7vH=pZEp0RU0p?}ch2XC-7r#LK&vyc2=-#Q2 z^L%8)JbbcZ%g0Du;|8=q8B>X=mIQirpE=&Ox{TiuNDnOPd-FLI^KfEF729!!0x#Es z@>3ursjFSpu%C-8WL^Zw!7a0O-#cnf`HjI+AjVCFitK}GXO`ME&on|^=~Zc}^LBp9 zj=-vlN;Uc;IDjtK38l7}5xxQF&sRtfn4^TNtnzXv4M{r&ek*(eNbIu!u$>Ed%` z5x7+&)2P&4>0J`N&ZP8$vcR+@FS0126s6+Jx_{{`3ZrIMwaJo6jdrRwE$>IU_JTZ} z(||hyyQ)4Z1@wSlT94(-QKqkAatMmkT7pCycEB1U8KQbFX&?%|4$yyxCtm3=W`$4fiG0WU3yI@c zx{wfmkZAYE_5M%4{J-ygbpH|(|GD$2f$3o_Vti#&zfSGZMQ5_f3xt6~+{RX=$H8at z?GFG1Tmp}}lmm-R->ve*Iv+XJ@58p|1_jRvfEgz$XozU8#iJS})UM6VNI!3RUU!{5 zXB(+Eqd-E;cHQ>)`h0(HO_zLmzR3Tu-UGp;08YntWwMY-9i^w_u#wR?JxR2bky5j9 z3Sl-dQQU$xrO0xa&>vsiK`QN<$Yd%YXXM7*WOhnRdSFt5$aJux8QceC?lA0_if|s> ze{ad*opH_kb%M&~(~&UcX0nFGq^MqjxW?HJIP462v9XG>j(5Gat_)#SiNfahq2Mz2 zU`4uV8m$S~o9(W>mu*=h%Gs(Wz+%>h;R9Sg)jZ$q8vT1HxX3iQnh6&2rJ1u|j>^Qf`A76K%_ubL`Zu?h4`b=IyL>1!=*%!_K)=XC z6d}4R5L+sI50Q4P3upXQ3Z!~1ZXLlh!^UNcK6#QpYt-YC=^H=EPg3)z*wXo*024Q4b2sBCG4I# zlTFFY=kQ>xvR+LsuDUAk)q%5pEcqr(O_|^spjhtpb1#aC& zghXzGkGDC_XDa%t(X`E+kvKQ4zrQ*uuQoj>7@@ykWvF332)RO?%AA&Fsn&MNzmFa$ zWk&&^=NNjxLjrli_8ESU)}U|N{%j&TQmvY~lk!~Jh}*=^INA~&QB9em!in_X%Rl1&Kd~Z(u z9mra#<@vZQlOY+JYUwCrgoea4C8^(xv4ceCXcejq84TQ#sF~IU2V}LKc~Xlr_P=ry zl&Hh0exdCbVd^NPCqNNlxM3vA13EI8XvZ1H9#bT7y*U8Y{H8nwGpOR!e!!}*g;mJ#}T{ekSb}5zIPmye*If(}}_=PcuAW#yidAa^9-`<8Gr0 z)Fz=NiZ{)HAvw{Pl5uu)?)&i&Us$Cx4gE}cIJ}B4Xz~-q7)R_%owbP!z_V2=Aq%Rj z{V;7#kV1dNT9-6R+H}}(ED*_!F=~uz>&nR3gb^Ce%+0s#u|vWl<~JD3MvS0T9thdF zioIG3c#Sdsv;LdtRv3ml7%o$6LTVL>(H`^@TNg`2KPIk*8-IB}X!MT0`hN9Ddf7yN z?J=GxPL!uJ7lqwowsl?iRrh@#5C$%E&h~Z>XQcvFC*5%0RN-Opq|=IwX(dq(*sjs+ zqy99+v~m|6T#zR*e1AVxZ8djd5>eIeCi(b8sUk)OGjAsKSOg^-ugwl2WSL@d#?mdl zib0v*{u-?cq}dDGyZ%$XRY=UkQwt2oGu`zQneZh$=^! zj;!pCBWQNtvAcwcWIBM2y9!*W|8LmQy$H~5BEx)78J`4Z0(FJO2P^!YyQU{*Al+fs z){!4JvT1iLrJ8aU3k0t|P}{RN)_^v%$$r;+p0DY7N8CXzmS*HB*=?qaaF9D@#_$SN zSz{moAK<*RH->%r7xX~9gVW$l7?b|_SYI)gcjf0VAUJ%FcQP(TpBs; zg$25D!Ry_`8xpS_OJdeo$qh#7U+cepZ??TII7_%AXsT$B z=e)Bx#v%J0j``00Zk5hsvv6%T^*xGNx%KN-=pocSoqE5_R)OK%-Pbu^1MNzfds)mL zxz^F4lDKV9D&lEY;I+A)ui{TznB*CE$=9(wgE{m}`^<--OzV-5V4X2w9j(_!+jpTr zJvD*y6;39&T+==$F&tsRKM_lqa1HC}aGL0o`%c9mO=fts?36@8MGm7Vi{Y z^<7m$(EtdSr#22<(rm_(l_(`j!*Pu~Y>>xc>I9M#DJYDJNHO&4=HM%YLIp?;iR&$m z#_$ZWYLfGLt5FJZhr3jpYb`*%9S!zCG6ivNHYzNHcI%khtgHBliM^Ou}ZVD7ehU9 zS+W@AV=?Ro!=%AJ>Kcy9aU3%VX3|XM_K0A+ZaknKDyIS3S-Hw1C7&BSW5)sqj5Ye_ z4OSW7Yu-;bCyYKHFUk}<*<(@TH?YZPHr~~Iy%9@GR2Yd}J2!N9K&CN7Eq{Ka!jdu; zQNB*Y;i(7)OxZK%IHGt#Rt?z`I|A{q_BmoF!f^G}XVeTbe1Wnzh%1g>j}>DqFf;Rp zz7>xIs12@Ke0gr+4-!pmFP84vCIaTjqFNg{V`5}Rdt~xE^I;Bxp4)|cs8=f)1YwHz zqI`G~s2~qqDV+h02b`PQpUE#^^Aq8l%y2|ByQeXSADg5*qMprEAE3WFg0Q39`O+i1 z!J@iV!`Y~C$wJ!5Z+j5$i<1`+@)tBG$JL=!*uk=2k;T<@{|s1$YL079FvK%mPhyHV zP8^KGZnp`(hVMZ;s=n~3r2y;LTwcJwoBW-(ndU-$03{RD zh+Qn$ja_Z^OuMf3Ub|JTY74s&Am*(n{J3~@#OJNYuEVVJd9*H%)oFoRBkySGm`hx! zT3tG|+aAkXcx-2Apy)h^BkOyFTWQVeZ%e2@;*0DtlG9I3Et=PKaPt&K zw?WI7S;P)TWED7aSH$3hL@Qde?H#tzo^<(o_sv_2ci<7M?F$|oCFWc?7@KBj-;N$P zB;q!8@bW-WJY9do&y|6~mEruZAVe$!?{)N9rZZxD-|oltkhW9~nR8bLBGXw<632!l z*TYQn^NnUy%Ds}$f^=yQ+BM-a5X4^GHF=%PDrRfm_uqC zh{sKwIu|O0&jWb27;wzg4w5uA@TO_j(1X?8E>5Zfma|Ly7Bklq|s z9)H`zoAGY3n-+&JPrT!>u^qg9Evx4y@GI4$n-Uk_5wttU1_t?6><>}cZ-U+&+~JE) zPlDbO_j;MoxdLzMd~Ew|1o^a5q_1R*JZ=#XXMzg?6Zy!^hop}qoLQlJ{(%!KYt`MK z8umEN@Z4w!2=q_oe=;QttPCQy3Nm4F@x>@v4sz_jo{4m*0r%J(w1cSo;D_hQtJs7W z><$QrmG^+<$4{d2bgGo&3-FV}avg9zI|Rr(k{wTyl3!M1q+a zD9W{pCd%il*j&Ft z5H$nENf>>k$;SONGW`qo6`&qKs*T z2^RS)pXk9b@(_Fw1bkb)-oqK|v}r$L!W&aXA>IpcdNZ_vWE#XO8X`#Yp1+?RshVcd zknG%rPd*4ECEI0wD#@d+3NbHKxl}n^Sgkx==Iu%}HvNliOqVBqG?P2va zQ;kRJ$J6j;+wP9cS za#m;#GUT!qAV%+rdWolk+)6kkz4@Yh5LXP+LSvo9_T+MmiaP-eq6_k;)i6_@WSJ zlT@wK$zqHu<83U2V*yJ|XJU4farT#pAA&@qu)(PO^8PxEmPD4;Txpio+2)#!9 z>&=i7*#tc0`?!==vk>s7V+PL#S1;PwSY?NIXN2=Gu89x(cToFm))7L;< z+bhAbVD*bD=}iU`+PU+SBobTQ%S!=VL!>q$rfWsaaV}Smz>lO9JXT#`CcH_mRCSf4%YQAw`$^yY z3Y*^Nzk_g$xn7a_NO(2Eb*I=^;4f!Ra#Oo~LLjlcjke*k*o$~U#0ZXOQ5@HQ&T46l z7504MUgZkz2gNP1QFN8Y?nSEnEai^Rgyvl}xZfMUV6QrJcXp;jKGqB=D*tj{8(_pV zqyB*DK$2lgYGejmJUW)*s_Cv65sFf&pb(Yz8oWgDtQ0~k^0-wdF|tj}MOXaN@ydF8 zNr={U?=;&Z?wr^VC+`)S2xl}QFagy;$mG=TUs7Vi2wws5zEke4hTa2)>O0U?$WYsZ z<8bN2bB_N4AWd%+kncgknZ&}bM~eDtj#C5uRkp21hWW5gxWvc6b*4+dn<{c?w9Rmf zIVZKsPl{W2vQAlYO3yh}-{Os=YBnL8?uN5(RqfQ=-1cOiUnJu>KcLA*tQK3FU`_bM zM^T28w;nAj5EdAXFi&Kk1Nnl2)D!M{@+D-}bIEe+Lc4{s;YJc-{F#``iS2uk;2!Zp zF9#myUmO!wCeJIoi^A+T^e~20c+c2C}XltaR!|U-HfDA=^xF97ev}$l6#oY z&-&T{egB)&aV$3_aVA51XGiU07$s9vubh_kQG?F$FycvS6|IO!6q zq^>9|3U^*!X_C~SxX&pqUkUjz%!j=VlXDo$!2VLH!rKj@61mDpSr~7B2yy{>X~_nc zRI+7g2V&k zd**H++P9dg!-AOs3;GM`(g<+GRV$+&DdMVpUxY9I1@uK28$az=6oaa+PutlO9?6#? zf-OsgT>^@8KK>ggkUQRPPgC7zjKFR5spqQb3ojCHzj^(UH~v+!y*`Smv)VpVoPwa6 zWG18WJaPKMi*F6Zdk*kU^`i~NNTfn3BkJniC`yN98L-Awd)Z&mY? zprBW$!qL-OL7h@O#kvYnLsfff@kDIegt~?{-*5A7JrA;#TmTe?jICJqhub-G@e??D zqiV#g{)M!kW1-4SDel7TO{;@*h2=_76g3NUD@|c*WO#>MfYq6_YVUP+&8e4|%4T`w zXzhmVNziAHazWO2qXcaOu@R1MrPP{t)`N)}-1&~mq=ZH=w=;-E$IOk=y$dOls{6sRR`I5>|X zpq~XYW4sd;J^6OwOf**J>a7u$S>WTFPRkjY;BfVgQst)u4aMLR1|6%)CB^18XCz+r ztkYQ}G43j~Q&1em(_EkMv0|WEiKu;z2zhb(L%$F&xWwzOmk;VLBYAZ8lOCziNoPw1 zv2BOyXA`A8z^WH!nXhKXM`t0;6D*-uGds3TYGrm8SPnJJOQ^fJU#}@aIy@MYWz**H zvkp?7I5PE{$$|~{-ZaFxr6ZolP^nL##mHOErB^AqJqn^hFA=)HWj!m3WDaHW$C)i^ z9@6G$SzB=>jbe>4kqr#sF7#K}W*Cg-5y6kun3u&0L7BpXF9=#7IN8FOjWrWwUBZiU zT_se3ih-GBKx+Uw0N|CwP3D@-C=5(9T#BH@M`F2!Goiqx+Js5xC92|Sy0%WWWp={$(am!#l~f^W_oz78HX<0X#7 zp)p1u~M*o9W@O8P{0Qkg@Wa# z2{Heb&oX^CQSZWSFBXKOfE|tsAm#^U-WkDnU;IowZ`Ok4!mwHwH=s|AqZ^YD4!5!@ zPxJj+Bd-q6w_YG`z_+r;S86zwXb+EO&qogOq8h-Ect5(M2+>(O7n7)^dP*ws_3U6v zVsh)sk^@*c>)3EML|0<-YROho{lz@Nd4;R9gL{9|64xVL`n!m$-Jjrx?-Bacp!=^5 z1^T^eB{_)Y<9)y{-4Rz@9_>;_7h;5D+@QcbF4Wv7hu)s0&==&6u)33 zHRj+&Woq-vDvjwJCYES@$C4{$?f$Ibi4G()UeN11rgjF+^;YE^5nYprYoJNoudNj= zm1pXSeG64dcWHObUetodRn1Fw|1nI$D9z}dVEYT0lQnsf_E1x2vBLql7NrHH!n&Sq z6lc*mvU=WS6=v9Lrl}&zRiu_6u;6g%_DU{9b+R z#YHqX7`m9eydf?KlKu6Sb%j$%_jmydig`B*TN`cZL-g!R)iE?+Q5oOqBFKhx z%MW>BC^(F_JuG(ayE(MT{S3eI{cKiwOtPwLc0XO*{*|(JOx;uQOfq@lp_^cZo=FZj z4#}@e@dJ>Bn%2`2_WPeSN7si^{U#H=7N4o%Dq3NdGybrZgEU$oSm$hC)uNDC_M9xc zGzwh5Sg?mpBIE8lT2XsqTt3j3?We8}3bzLBTQd639vyg^$0#1epq8snlDJP2(BF)K zSx30RM+{f+b$g{9usIL8H!hCO117Xgv}ttPJm9wVRjPk;ePH@zxv%j9k5`TzdXLeT zFgFX`V7cYIcBls5WN0Pf6SMBN+;CrQ(|EsFd*xtwr#$R{Z9FP`OWtyNsq#mCgZ7+P z^Yn$haBJ)r96{ZJd8vlMl?IBxrgh=fdq_NF!1{jARCVz>jNdC)H^wfy?R94#MPdUjcYX>#wEx+LB#P-#4S-%YH>t-j+w zOFTI8gX$ard6fAh&g=u&56%3^-6E2tpk*wx3HSCQ+t7+*iOs zPk5ysqE}i*cQocFvA68xHfL|iX(C4h*67@3|5Qwle(8wT&!&{8*{f%0(5gH+m>$tq zp;AqrP7?XTEooYG1Dzfxc>W%*CyL16q|fQ0_jp%%Bk^k!i#Nbi(N9&T>#M{gez_Ws zYK=l}adalV(nH}I_!hNeb;tQFk3BHX7N}}R8%pek^E`X}%ou=cx8InPU1EE0|Hen- zyw8MoJqB5=)Z%JXlrdTXAE)eqLAdVE-=>wGHrkRet}>3Yu^lt$Kzu%$3#(ioY}@Gu zjk3BZuQH&~7H+C*uX^4}F*|P89JX;Hg2U!pt>rDi(n(Qe-c}tzb0#6_ItoR0->LSt zR~UT<-|@TO%O`M+_e_J4wx7^)5_%%u+J=yF_S#2Xd?C;Ss3N7KY^#-vx+|;bJX&8r zD?|MetfhdC;^2WG`7MCgs>TKKN=^=!x&Q~BzmQio_^l~LboTNT=I zC5pme^P@ER``p$2md9>4!K#vV-Fc1an7pl>_|&>aqP}+zqR?+~Z;f2^`a+-!Te%V? z;H2SbF>jP^GE(R1@%C==XQ@J=G9lKX+Z<@5}PO(EYkJh=GCv#)Nj{DkWJM2}F&oAZ6xu8&g7pn1ps2U5srwQ7CAK zN&*~@t{`31lUf`O;2w^)M3B@o)_mbRu{-`PrfNpF!R^q>yTR&ETS7^-b2*{-tZAZz zw@q5x9B5V8Qd7dZ!Ai$9hk%Q!wqbE1F1c96&zwBBaRW}(^axoPpN^4Aw}&a5dMe+*Gomky_l^54*rzXro$ z>LL)U5Ry>~FJi=*{JDc)_**c)-&faPz`6v`YU3HQa}pLtb5K)u%K+BOqXP0)rj5Au$zB zW1?vr?mDv7Fsxtsr+S6ucp2l#(4dnr9sD*v+@*>g#M4b|U?~s93>Pg{{a5|rm2xfI z`>E}?9S@|IoUX{Q1zjm5YJT|3S>&09D}|2~BiMo=z4YEjXlWh)V&qs;*C{`UMxp$9 zX)QB?G$fPD6z5_pNs>Jeh{^&U^)Wbr?2D6-q?)`*1k@!UvwQgl8eG$r+)NnFoT)L6 zg7lEh+E6J17krfYJCSjWzm67hEth24pomhz71|Qodn#oAILN)*Vwu2qpJirG)4Wnv}9GWOFrQg%Je+gNrPl8mw7ykE8{ z=|B4+uwC&bpp%eFcRU6{mxRV32VeH8XxX>v$du<$(DfinaaWxP<+Y97Z#n#U~V zVEu-GoPD=9$}P;xv+S~Ob#mmi$JQmE;Iz4(){y*9pFyW-jjgdk#oG$fl4o9E8bo|L zWjo4l%n51@Kz-n%zeSCD`uB?T%FVk+KBI}=ve zvlcS#wt`U6wrJo}6I6Rwb=1GzZfwE=I&Ne@p7*pH84XShXYJRgvK)UjQL%R9Zbm(m zxzTQsLTON$WO7vM)*vl%Pc0JH7WhP;$z@j=y#avW4X8iqy6mEYr@-}PW?H)xfP6fQ z&tI$F{NNct4rRMSHhaelo<5kTYq+(?pY)Ieh8*sa83EQfMrFupMM@nfEV@EmdHUv9 z35uzIrIuo4#WnF^_jcpC@uNNaYTQ~uZWOE6P@LFT^1@$o&q+9Qr8YR+ObBkpP9=F+$s5+B!mX2~T zAuQ6RenX?O{IlLMl1%)OK{S7oL}X%;!XUxU~xJN8xk z`xywS*naF(J#?vOpB(K=o~lE;m$zhgPWDB@=p#dQIW>xe_p1OLoWInJRKbEuoncf; zmS1!u-ycc1qWnDg5Nk2D)BY%jmOwCLC+Ny>`f&UxFowIsHnOXfR^S;&F(KXd{ODlm z$6#1ccqt-HIH9)|@fHnrKudu!6B$_R{fbCIkSIb#aUN|3RM>zuO>dpMbROZ`^hvS@ z$FU-;e4W}!ubzKrU@R*dW*($tFZ>}dd*4_mv)#O>X{U@zSzQt*83l9mI zI$8O<5AIDx`wo0}f2fsPC_l>ONx_`E7kdXu{YIZbp1$(^oBAH({T~&oQ&1{X951QW zmhHUxd)t%GQ9#ak5fTjk-cahWC;>^Rg7(`TVlvy0W@Y!Jc%QL3Ozu# zDPIqBCy&T2PWBj+d-JA-pxZlM=9ja2ce|3B(^VCF+a*MMp`(rH>Rt6W1$;r{n1(VK zLs>UtkT43LR2G$AOYHVailiqk7naz2yZGLo*xQs!T9VN5Q>eE(w zw$4&)&6xIV$IO^>1N-jrEUg>O8G4^@y+-hQv6@OmF@gy^nL_n1P1-Rtyy$Bl;|VcV zF=p*&41-qI5gG9UhKmmnjs932!6hceXa#-qfK;3d*a{)BrwNFeKU|ge?N!;zk+kB! zMD_uHJR#%b54c2tr~uGPLTRLg$`fupo}cRJeTwK;~}A>(Acy4k-Xk&Aa1&eWYS1ULWUj@fhBiWY$pdfy+F z@G{OG{*v*mYtH3OdUjwEr6%_ZPZ3P{@rfbNPQG!BZ7lRyC^xlMpWH`@YRar`tr}d> z#wz87t?#2FsH-jM6m{U=gp6WPrZ%*w0bFm(T#7m#v^;f%Z!kCeB5oiF`W33W5Srdt zdU?YeOdPG@98H7NpI{(uN{FJdu14r(URPH^F6tOpXuhU7T9a{3G3_#Ldfx_nT(Hec zo<1dyhsVsTw;ZkVcJ_0-h-T3G1W@q)_Q30LNv)W?FbMH+XJ* zy=$@39Op|kZv`Rt>X`zg&at(?PO^I=X8d9&myFEx#S`dYTg1W+iE?vt#b47QwoHI9 zNP+|3WjtXo{u}VG(lLUaW0&@yD|O?4TS4dfJI`HC-^q;M(b3r2;7|FONXphw-%7~* z&;2!X17|05+kZOpQ3~3!Nb>O94b&ZSs%p)TK)n3m=4eiblVtSx@KNFgBY_xV6ts;NF;GcGxMP8OKV^h6LmSb2E#Qnw ze!6Mnz7>lE9u{AgQ~8u2zM8CYD5US8dMDX-5iMlgpE9m*s+Lh~A#P1er*rF}GHV3h z=`STo?kIXw8I<`W0^*@mB1$}pj60R{aJ7>C2m=oghKyxMbFNq#EVLgP0cH3q7H z%0?L93-z6|+jiN|@v>ix?tRBU(v-4RV`}cQH*fp|)vd3)8i9hJ3hkuh^8dz{F5-~_ zUUr1T3cP%cCaTooM8dj|4*M=e6flH0&8ve32Q)0dyisl))XkZ7Wg~N}6y`+Qi2l+e zUd#F!nJp{#KIjbQdI`%oZ`?h=5G^kZ_uN`<(`3;a!~EMsWV|j-o>c?x#;zR2ktiB! z);5rrHl?GPtr6-o!tYd|uK;Vbsp4P{v_4??=^a>>U4_aUXPWQ$FPLE4PK$T^3Gkf$ zHo&9$U&G`d(Os6xt1r?sg14n)G8HNyWa^q8#nf0lbr4A-Fi;q6t-`pAx1T*$eKM*$ z|CX|gDrk#&1}>5H+`EjV$9Bm)Njw&7-ZR{1!CJTaXuP!$Pcg69`{w5BRHysB$(tWUes@@6aM69kb|Lx$%BRY^-o6bjH#0!7b;5~{6J+jKxU!Kmi# zndh@+?}WKSRY2gZ?Q`{(Uj|kb1%VWmRryOH0T)f3cKtG4oIF=F7RaRnH0Rc_&372={_3lRNsr95%ZO{IX{p@YJ^EI%+gvvKes5cY+PE@unghjdY5#9A!G z70u6}?zmd?v+{`vCu-53_v5@z)X{oPC@P)iA3jK$`r zSA2a7&!^zmUiZ82R2=1cumBQwOJUPz5Ay`RLfY(EiwKkrx%@YN^^XuET;tE zmr-6~I7j!R!KrHu5CWGSChO6deaLWa*9LLJbcAJsFd%Dy>a!>J`N)Z&oiU4OEP-!Ti^_!p}O?7`}i7Lsf$-gBkuY*`Zb z7=!nTT;5z$_5$=J=Ko+Cp|Q0J=%oFr>hBgnL3!tvFoLNhf#D0O=X^h+x08iB;@8pXdRHxX}6R4k@i6%vmsQwu^5z zk1ip`#^N)^#Lg#HOW3sPI33xqFB4#bOPVnY%d6prwxf;Y-w9{ky4{O6&94Ra8VN@K zb-lY;&`HtxW@sF!doT5T$2&lIvJpbKGMuDAFM#!QPXW87>}=Q4J3JeXlwHys?!1^#37q_k?N@+u&Ns20pEoBeZC*np;i;M{2C0Z4_br2gsh6eL z#8`#sn41+$iD?^GL%5?cbRcaa-Nx0vE(D=*WY%rXy3B%gNz0l?#noGJGP728RMY#q z=2&aJf@DcR?QbMmN)ItUe+VM_U!ryqA@1VVt$^*xYt~-qvW!J4Tp<-3>jT=7Zow5M z8mSKp0v4b%a8bxFr>3MwZHSWD73D@+$5?nZAqGM#>H@`)mIeC#->B)P8T$zh-Pxnc z8)~Zx?TWF4(YfKuF3WN_ckpCe5;x4V4AA3(i$pm|78{%!q?|~*eH0f=?j6i)n~Hso zmTo>vqEtB)`%hP55INf7HM@taH)v`Fw40Ayc*R!T?O{ziUpYmP)AH`euTK!zg9*6Z z!>M=$3pd0!&TzU=hc_@@^Yd3eUQpX4-33}b{?~5t5lgW=ldJ@dUAH%`l5US1y_`40 zs(X`Qk}vvMDYYq+@Rm+~IyCX;iD~pMgq^KY)T*aBz@DYEB={PxA>)mI6tM*sx-DmGQHEaHwRrAmNjO!ZLHO4b;;5mf@zzlPhkP($JeZGE7 z?^XN}Gf_feGoG~BjUgVa*)O`>lX=$BSR2)uD<9 z>o^|nb1^oVDhQbfW>>!;8-7<}nL6L^V*4pB=>wwW+RXAeRvKED(n1;R`A6v$6gy0I(;Vf?!4;&sgn7F%LpM}6PQ?0%2Z@b{It<(G1CZ|>913E0nR2r^Pa*Bp z@tFGi*CQ~@Yc-?{cwu1 zsilf=k^+Qs>&WZG(3WDixisHpR>`+ihiRwkL(3T|=xsoNP*@XX3BU8hr57l3k;pni zI``=3Nl4xh4oDj<%>Q1zYXHr%Xg_xrK3Nq?vKX3|^Hb(Bj+lONTz>4yhU-UdXt2>j z<>S4NB&!iE+ao{0Tx^N*^|EZU;0kJkx@zh}S^P{ieQjGl468CbC`SWnwLRYYiStXm zOxt~Rb3D{dz=nHMcY)#r^kF8|q8KZHVb9FCX2m^X*(|L9FZg!5a7((!J8%MjT$#Fs)M1Pb zq6hBGp%O1A+&%2>l0mpaIzbo&jc^!oN^3zxap3V2dNj3x<=TwZ&0eKX5PIso9j1;e zwUg+C&}FJ`k(M|%%}p=6RPUq4sT3-Y;k-<68ciZ~_j|bt>&9ZLHNVrp#+pk}XvM{8 z`?k}o-!if>hVlCP9j%&WI2V`5SW)BCeR5>MQhF)po=p~AYN%cNa_BbV6EEh_kk^@a zD>4&>uCGCUmyA-c)%DIcF4R6!>?6T~Mj_m{Hpq`*(wj>foHL;;%;?(((YOxGt)Bhx zuS+K{{CUsaC++%}S6~CJ=|vr(iIs-je)e9uJEU8ZJAz)w166q)R^2XI?@E2vUQ!R% zn@dxS!JcOimXkWJBz8Y?2JKQr>`~SmE2F2SL38$SyR1^yqj8_mkBp)o$@+3BQ~Mid z9U$XVqxX3P=XCKj0*W>}L0~Em`(vG<>srF8+*kPrw z20{z(=^w+ybdGe~Oo_i|hYJ@kZl*(9sHw#Chi&OIc?w`nBODp?ia$uF%Hs(X>xm?j zqZQ`Ybf@g#wli`!-al~3GWiE$K+LCe=Ndi!#CVjzUZ z!sD2O*;d28zkl))m)YN7HDi^z5IuNo3^w(zy8 zszJG#mp#Cj)Q@E@r-=NP2FVxxEAeOI2e=|KshybNB6HgE^(r>HD{*}S}mO>LuRGJT{*tfTzw_#+er-0${}%YPe@CMJ1Ng#j#)i)SnY@ss3gL;g zg2D~#Kpdfu#G;q1qz_TwSz1VJT(b3zby$Vk&;Y#1(A)|xj`_?i5YQ;TR%jice5E;0 zYHg;`zS5{S*9xI6o^j>rE8Ua*XhIw{_-*&@(R|C(am8__>+Ws&Q^ymy*X4~hR2b5r zm^p3sw}yv=tdyncy_Ui7{BQS732et~Z_@{-IhHDXAV`(Wlay<#hb>%H%WDi+K$862nA@BDtM#UCKMu+kM`!JHyWSi?&)A7_ z3{cyNG%a~nnH_!+;g&JxEMAmh-Z}rC!o7>OVzW&PoMyTA_g{hqXG)SLraA^OP**<7 zjWbr7z!o2n3hnx7A=2O=WL;`@9N{vQIM@&|G-ljrPvIuJHYtss0Er0fT5cMXNUf1B z7FAwBDixt0X7C3S)mPe5g`YtME23wAnbU)+AtV}z+e8G;0BP=bI;?(#|Ep!vVfDbK zvx+|CKF>yt0hWQ3drchU#XBU+HiuG*V^snFAPUp-5<#R&BUAzoB!aZ+e*KIxa26V}s6?nBK(U-7REa573wg-jqCg>H8~>O{ z*C0JL-?X-k_y%hpUFL?I>0WV{oV`Nb)nZbJG01R~AG>flIJf)3O*oB2i8~;!P?Wo_ z0|QEB*fifiL6E6%>tlAYHm2cjTFE@*<);#>689Z6S#BySQ@VTMhf9vYQyLeDg1*F} zjq>i1*x>5|CGKN{l9br3kB0EHY|k4{%^t7-uhjd#NVipUZa=EUuE5kS1_~qYX?>hJ z$}!jc9$O$>J&wnu0SgfYods^z?J4X;X7c77Me0kS-dO_VUQ39T(Kv(Y#s}Qqz-0AH z^?WRL(4RzpkD+T5FG_0NyPq-a-B7A5LHOCqwObRJi&oRi(<;OuIN7SV5PeHU$<@Zh zPozEV`dYmu0Z&Tqd>t>8JVde9#Pt+l95iHe$4Xwfy1AhI zDM4XJ;bBTTvRFtW>E+GzkN)9k!hA5z;xUOL2 zq4}zn-DP{qc^i|Y%rvi|^5k-*8;JZ~9a;>-+q_EOX+p1Wz;>i7c}M6Nv`^NY&{J-> z`(mzDJDM}QPu5i44**2Qbo(XzZ-ZDu%6vm8w@DUarqXj41VqP~ zs&4Y8F^Waik3y1fQo`bVUH;b=!^QrWb)3Gl=QVKr+6sxc=ygauUG|cm?|X=;Q)kQ8 zM(xrICifa2p``I7>g2R~?a{hmw@{!NS5`VhH8+;cV(F>B94M*S;5#O`YzZH1Z%yD? zZ61w(M`#aS-*~Fj;x|J!KM|^o;MI#Xkh0ULJcA?o4u~f%Z^16ViA27FxU5GM*rKq( z7cS~MrZ=f>_OWx8j#-Q3%!aEU2hVuTu(7`TQk-Bi6*!<}0WQi;_FpO;fhpL4`DcWp zGOw9vx0N~6#}lz(r+dxIGZM3ah-8qrqMmeRh%{z@dbUD2w15*_4P?I~UZr^anP}DB zU9CCrNiy9I3~d#&!$DX9e?A});BjBtQ7oGAyoI$8YQrkLBIH@2;lt4E^)|d6Jwj}z z&2_E}Y;H#6I4<10d_&P0{4|EUacwFHauvrjAnAm6yeR#}f}Rk27CN)vhgRqEyPMMS7zvunj2?`f;%?alsJ+-K+IzjJx>h8 zu~m_y$!J5RWAh|C<6+uiCNsOKu)E72M3xKK(a9Okw3e_*O&}7llNV!=P87VM2DkAk zci!YXS2&=P0}Hx|wwSc9JP%m8dMJA*q&VFB0yMI@5vWoAGraygwn){R+Cj6B1a2Px z5)u(K5{+;z2n*_XD!+Auv#LJEM)(~Hx{$Yb^ldQmcYF2zNH1V30*)CN_|1$v2|`LnFUT$%-tO0Eg|c5$BB~yDfzS zcOXJ$wpzVK0MfTjBJ0b$r#_OvAJ3WRt+YOLlJPYMx~qp>^$$$h#bc|`g0pF-Ao43? z>*A+8lx>}L{p(Tni2Vvk)dtzg$hUKjSjXRagj)$h#8=KV>5s)J4vGtRn5kP|AXIz! zPgbbVxW{2o4s-UM;c#We8P&mPN|DW7_uLF!a|^0S=wr6Esx9Z$2|c1?GaupU6$tb| zY_KU`(_29O_%k(;>^|6*pZURH3`@%EuKS;Ns z1lujmf;r{qAN&Q0&m{wJSZ8MeE7RM5+Sq;ul_ z`+ADrd_Um+G37js6tKsArNB}n{p*zTUxQr>3@wA;{EUbjNjlNd6$Mx zg0|MyU)v`sa~tEY5$en7^PkC=S<2@!nEdG6L=h(vT__0F=S8Y&eM=hal#7eM(o^Lu z2?^;05&|CNliYrq6gUv;|i!(W{0N)LWd*@{2q*u)}u*> z7MQgk6t9OqqXMln?zoMAJcc zMKaof_Up})q#DzdF?w^%tTI7STI^@8=Wk#enR*)&%8yje>+tKvUYbW8UAPg55xb70 zEn5&Ba~NmOJlgI#iS8W3-@N%>V!#z-ZRwfPO1)dQdQkaHsiqG|~we2ALqG7Ruup(DqSOft2RFg_X%3w?6VqvV1uzX_@F(diNVp z4{I|}35=11u$;?|JFBEE*gb;T`dy+8gWJ9~pNsecrO`t#V9jW-6mnfO@ff9od}b(3s4>p0i30gbGIv~1@a^F2kl7YO;DxmF3? zWi-RoXhzRJV0&XE@ACc?+@6?)LQ2XNm4KfalMtsc%4!Fn0rl zpHTrHwR>t>7W?t!Yc{*-^xN%9P0cs0kr=`?bQ5T*oOo&VRRu+1chM!qj%2I!@+1XF z4GWJ=7ix9;Wa@xoZ0RP`NCWw0*8247Y4jIZ>GEW7zuoCFXl6xIvz$ezsWgKdVMBH> z{o!A7f;R-@eK9Vj7R40xx)T<2$?F2E<>Jy3F;;=Yt}WE59J!1WN367 zA^6pu_zLoZIf*x031CcwotS{L8bJE(<_F%j_KJ2P_IusaZXwN$&^t716W{M6X2r_~ zaiMwdISX7Y&Qi&Uh0upS3TyEIXNDICQlT5fHXC`aji-c{U(J@qh-mWl-uMN|T&435 z5)a1dvB|oe%b2mefc=Vpm0C%IUYYh7HI*;3UdgNIz}R##(#{(_>82|zB0L*1i4B5j-xi9O4x10rs_J6*gdRBX=@VJ+==sWb&_Qc6tSOowM{BX@(zawtjl zdU!F4OYw2@Tk1L^%~JCwb|e#3CC>srRHQ*(N%!7$Mu_sKh@|*XtR>)BmWw!;8-mq7 zBBnbjwx8Kyv|hd*`5}84flTHR1Y@@uqjG`UG+jN_YK&RYTt7DVwfEDXDW4U+iO{>K zw1hr{_XE*S*K9TzzUlJH2rh^hUm2v7_XjwTuYap|>zeEDY$HOq3X4Tz^X}E9z)x4F zs+T?Ed+Hj<#jY-`Va~fT2C$=qFT-5q$@p9~0{G&eeL~tiIAHXA!f6C(rAlS^)&k<- zXU|ZVs}XQ>s5iONo~t!XXZgtaP$Iau;JT%h)>}v54yut~pykaNye4axEK#5@?TSsQ zE;Jvf9I$GVb|S`7$pG)4vgo9NXsKr?u=F!GnA%VS2z$@Z(!MR9?EPcAqi5ft)Iz6sNl`%kj+_H-X`R<>BFrBW=fSlD|{`D%@Rcbu2?%>t7i34k?Ujb)2@J-`j#4 zLK<69qcUuniIan-$A1+fR=?@+thwDIXtF1Tks@Br-xY zfB+zblrR(ke`U;6U~-;p1Kg8Lh6v~LjW@9l2P6s+?$2!ZRPX`(ZkRGe7~q(4&gEi<$ch`5kQ?*1=GSqkeV z{SA1EaW_A!t{@^UY2D^YO0(H@+kFVzZaAh0_`A`f(}G~EP~?B|%gtxu&g%^x{EYSz zk+T;_c@d;+n@$<>V%P=nk36?L!}?*=vK4>nJSm+1%a}9UlmTJTrfX4{Lb7smNQn@T zw9p2%(Zjl^bWGo1;DuMHN(djsEm)P8mEC2sL@KyPjwD@d%QnZ$ zMJ3cnn!_!iP{MzWk%PI&D?m?C(y2d|2VChluN^yHya(b`h>~GkI1y;}O_E57zOs!{ zt2C@M$^PR2U#(dZmA-sNreB@z-yb0Bf7j*yONhZG=onhx>t4)RB`r6&TP$n zgmN*)eCqvgriBO-abHQ8ECN0bw?z5Bxpx z=jF@?zFdVn?@gD5egM4o$m`}lV(CWrOKKq(sv*`mNcHcvw&Xryfw<{ch{O&qc#WCTXX6=#{MV@q#iHYba!OUY+MGeNTjP%Fj!WgM&`&RlI^=AWTOqy-o zHo9YFt!gQ*p7{Fl86>#-JLZo(b^O`LdFK~OsZBRR@6P?ad^Ujbqm_j^XycM4ZHFyg ziUbIFW#2tj`65~#2V!4z7DM8Z;fG0|APaQ{a2VNYpNotB7eZ5kp+tPDz&Lqs0j%Y4tA*URpcfi z_M(FD=fRGdqf430j}1z`O0I=;tLu81bwJXdYiN7_&a-?ly|-j*+=--XGvCq#32Gh(=|qj5F?kmihk{%M&$}udW5)DHK zF_>}5R8&&API}o0osZJRL3n~>76nUZ&L&iy^s>PMnNcYZ|9*1$v-bzbT3rpWsJ+y{ zPrg>5Zlery96Um?lc6L|)}&{992{_$J&=4%nRp9BAC6!IB=A&=tF>r8S*O-=!G(_( zwXbX_rGZgeiK*&n5E;f=k{ktyA1(;x_kiMEt0*gpp_4&(twlS2e5C?NoD{n>X2AT# zY@Zp?#!b1zNq96MQqeO*M1MMBin5v#RH52&Xd~DO6-BZLnA6xO1$sou(YJ1Dlc{WF zVa%2DyYm`V#81jP@70IJ;DX@y*iUt$MLm)ByAD$eUuji|5{ptFYq(q)mE(5bOpxjM z^Q`AHWq44SG3`_LxC9fwR)XRVIp=B%<(-lOC3jI#bb@dK(*vjom!=t|#<@dZql%>O z15y^{4tQoeW9Lu%G&V$90x6F)xN6y_oIn;!Q zs)8jT$;&;u%Y>=T3hg34A-+Y*na=|glcStr5D;&5*t5*DmD~x;zQAV5{}Ya`?RRGa zT*t9@$a~!co;pD^!J5bo?lDOWFx%)Y=-fJ+PDGc0>;=q=s?P4aHForSB+)v0WY2JH z?*`O;RHum6j%#LG)Vu#ciO#+jRC3!>T(9fr+XE7T2B7Z|0nR5jw@WG)kDDzTJ=o4~ zUpeyt7}_nd`t}j9BKqryOha{34erm)RmST)_9Aw)@ zHbiyg5n&E{_CQR@h<}34d7WM{s{%5wdty1l+KX8*?+-YkNK2Be*6&jc>@{Fd;Ps|| z26LqdI3#9le?;}risDq$K5G3yoqK}C^@-8z^wj%tdgw-6@F#Ju{Sg7+y)L?)U$ez> zoOaP$UFZ?y5BiFycir*pnaAaY+|%1%8&|(@VB)zweR%?IidwJyK5J!STzw&2RFx zZV@qeaCB01Hu#U9|1#=Msc8Pgz5P*4Lrp!Q+~(G!OiNR{qa7|r^H?FC6gVhkk3y7=uW#Sh;&>78bZ}aK*C#NH$9rX@M3f{nckYI+5QG?Aj1DM)@~z_ zw!UAD@gedTlePB*%4+55naJ8ak_;))#S;4ji!LOqY5VRI){GMwHR~}6t4g>5C_#U# ztYC!tjKjrKvRy=GAsJVK++~$|+s!w9z3H4G^mACv=EErXNSmH7qN}%PKcN|8%9=i)qS5+$L zu&ya~HW%RMVJi4T^pv?>mw*Gf<)-7gf#Qj|e#w2|v4#t!%Jk{&xlf;$_?jW*n!Pyx zkG$<18kiLOAUPuFfyu-EfWX%4jYnjBYc~~*9JEz6oa)_R|8wjZA|RNrAp%}14L7fW zi7A5Wym*K+V8pkqqO-X#3ft{0qs?KVt^)?kS>AicmeO&q+~J~ zp0YJ_P~_a8j= zsAs~G=8F=M{4GZL{|B__UorX@MRNQLn?*_gym4aW(~+i13knnk1P=khoC-ViMZk+x zLW(l}oAg1H`dU+Fv**;qw|ANDSRs>cGqL!Yw^`; zv;{E&8CNJcc)GHzTYM}f&NPw<6j{C3gaeelU#y!M)w-utYEHOCCJo|Vgp7K6C_$14 zqIrLUB0bsgz^D%V%fbo2f9#yb#CntTX?55Xy|Kps&Xek*4_r=KDZ z+`TQuv|$l}MWLzA5Ay6Cvsa^7xvwXpy?`w(6vx4XJ zWuf1bVSb#U8{xlY4+wlZ$9jjPk)X_;NFMqdgq>m&W=!KtP+6NL57`AMljW+es zzqjUjgz;V*kktJI?!NOg^s_)ph45>4UDA!Vo0hn>KZ+h-3=?Y3*R=#!fOX zP$Y~+14$f66ix?UWB_6r#fMcC^~X4R-<&OD1CSDNuX~y^YwJ>sW0j`T<2+3F9>cLo z#!j57$ll2K9(%$4>eA7(>FJX5e)pR5&EZK!IMQzOfik#FU*o*LGz~7u(8}XzIQRy- z!U7AlMTIe|DgQFmc%cHy_9^{o`eD%ja_L>ckU6$O4*U**o5uR7`FzqkU8k4gxtI=o z^P^oGFPm5jwZMI{;nH}$?p@uV8FT4r=|#GziKXK07bHJLtK}X%I0TON$uj(iJ`SY^ zc$b2CoxCQ>7LH@nxcdW&_C#fMYBtTxcg46dL{vf%EFCZ~eErMvZq&Z%Lhumnkn^4A zsx$ay(FnN7kYah}tZ@0?-0Niroa~13`?hVi6`ndno`G+E8;$<6^gsE-K3)TxyoJ4M zb6pj5=I8^FD5H@`^V#Qb2^0cx7wUz&cruA5g>6>qR5)O^t1(-qqP&1g=qvY#s&{bx zq8Hc%LsbK1*%n|Y=FfojpE;w~)G0-X4i*K3{o|J7`krhIOd*c*$y{WIKz2n2*EXEH zT{oml3Th5k*vkswuFXdGDlcLj15Nec5pFfZ*0?XHaF_lVuiB%Pv&p7z)%38}%$Gup zVTa~C8=cw%6BKn_|4E?bPNW4PT7}jZQLhDJhvf4z;~L)506IE0 zX!tWXX(QOQPRj-p80QG79t8T2^az4Zp2hOHziQlvT!|H)jv{Ixodabzv6lBj)6WRB z{)Kg@$~~(7$-az?lw$4@L%I&DI0Lo)PEJJziWP33a3azb?jyXt1v0N>2kxwA6b%l> zZqRpAo)Npi&loWbjFWtEV)783BbeIAhqyuc+~>i7aQ8shIXt)bjCWT6$~ro^>99G} z2XfmT0(|l!)XJb^E!#3z4oEGIsL(xd; zYX1`1I(cG|u#4R4T&C|m*9KB1`UzKvho5R@1eYtUL9B72{i(ir&ls8g!pD ztR|25xGaF!4z5M+U@@lQf(12?xGy`!|3E}7pI$k`jOIFjiDr{tqf0va&3pOn6Pu)% z@xtG2zjYuJXrV)DUrIF*y<1O1<$#54kZ#2;=X51J^F#0nZ0(;S$OZDt_U2bx{RZ=Q zMMdd$fH|!s{ zXq#l;{`xfV`gp&C>A`WrQU?d{!Ey5(1u*VLJt>i27aZ-^&2IIk=zP5p+{$q(K?2(b z8?9h)kvj9SF!Dr zoyF}?V|9;6abHxWk2cEvGs$-}Pg}D+ZzgkaN&$Snp%;5m%zh1E#?Wac-}x?BYlGN#U#Mek*}kek#I9XaHt?mz3*fDrRTQ#&#~xyeqJk1QJ~E$7qsw6 z?sV;|?*=-{M<1+hXoj?@-$y+(^BJ1H~wQ9G8C0#^aEAyhDduNX@haoa=PuPp zYsGv8UBfQaRHgBgLjmP^eh>fLMeh{8ic)?xz?#3kX-D#Z{;W#cd_`9OMFIaJg-=t`_3*!YDgtNQ2+QUEAJB9M{~AvT$H`E)IKmCR21H532+ata8_i_MR@ z2Xj<3w<`isF~Ah$W{|9;51ub*f4#9ziKrOR&jM{x7I_7()O@`F*5o$KtZ?fxU~g`t zUovNEVKYn$U~VX8eR)qb`7;D8pn*Pp$(otYTqL)5KH$lUS-jf}PGBjy$weoceAcPp z&5ZYB$r&P$MN{0H0AxCe4Qmd3T%M*5d4i%#!nmBCN-WU-4m4Tjxn-%j3HagwTxCZ9 z)j5vO-C7%s%D!&UfO>bi2oXiCw<-w{vVTK^rVbv#W=WjdADJy8$khnU!`ZWCIU`># zyjc^1W~pcu>@lDZ{zr6gv%)2X4n27~Ve+cQqcND%0?IFSP4sH#yIaXXYAq^z3|cg` z`I3$m%jra>e2W-=DiD@84T!cb%||k)nPmEE09NC%@PS_OLhkrX*U!cgD*;;&gIaA(DyVT4QD+q_xu z>r`tg{hiGY&DvD-)B*h+YEd+Zn)WylQl}<4>(_NlsKXCRV;a)Rcw!wtelM2_rWX`j zTh5A|i6=2BA(iMCnj_fob@*eA;V?oa4Z1kRBGaU07O70fb6-qmA$Hg$ps@^ka1=RO zTbE_2#)1bndC3VuK@e!Sftxq4=Uux}fDxXE#Q5_x=E1h>T5`DPHz zbH<_OjWx$wy7=%0!mo*qH*7N4tySm+R0~(rbus`7;+wGh;C0O%x~fEMkt!eV>U$`i z5>Q(o z=t$gPjgGh0&I7KY#k50V7DJRX<%^X z>6+ebc9efB3@eE2Tr){;?_w`vhgF>`-GDY(YkR{9RH(MiCnyRtd!LxXJ75z+?2 zGi@m^+2hKJ5sB1@Xi@s_@p_Kwbc<*LQ_`mr^Y%j}(sV_$`J(?_FWP)4NW*BIL~sR>t6 zM;qTJZ~GoY36&{h-Pf}L#y2UtR}>ZaI%A6VkU>vG4~}9^i$5WP2Tj?Cc}5oQxe2=q z8BeLa$hwCg_psjZyC2+?yX4*hJ58Wu^w9}}7X*+i5Rjqu5^@GzXiw#SUir1G1`jY% zOL=GE_ENYxhcyUrEt9XlMNP6kx6h&%6^u3@zB8KUCAa18T(R2J`%JjWZ z!{7cXaEW+Qu*iJPu+m>QqW}Lo$4Z+!I)0JNzZ&_M%=|B1yejFRM04bGAvu{=lNPd+ zJRI^DRQ(?FcVUD+bgEcAi@o(msqys9RTCG#)TjI!9~3-dc`>gW;HSJuQvH~d`MQs86R$|SKXHh zqS9Qy)u;T`>>a!$LuaE2keJV%;8g)tr&Nnc;EkvA-RanHXsy)D@XN0a>h}z2j81R; zsUNJf&g&rKpuD0WD@=dDrPHdBoK42WoBU|nMo17o(5^;M|dB4?|FsAGVrSyWcI`+FVw^vTVC`y}f(BwJl zrw3Sp151^9=}B})6@H*i4-dIN_o^br+BkcLa^H56|^2XsT0dESw2 zMX>(KqNl=x2K5=zIKg}2JpGAZu{I_IO}0$EQ5P{4zol**PCt3F4`GX}2@vr8#Y)~J zKb)gJeHcFnR@4SSh%b;c%J`l=W*40UPjF#q{<}ywv-=vHRFmDjv)NtmC zQx9qm)d%0zH&qG7AFa3VAU1S^(n8VFTC~Hb+HjYMjX8r#&_0MzlNR*mnLH5hi}`@{ zK$8qiDDvS_(L9_2vHgzEQ${DYSE;DqB!g*jhJghE&=LTnbgl&Xepo<*uRtV{2wDHN z)l;Kg$TA>Y|K8Lc&LjWGj<+bp4Hiye_@BfU(y#nF{fpR&|Ltbye?e^j0}8JC4#xi% zv29ZR%8%hk=3ZDvO-@1u8KmQ@6p%E|dlHuy#H1&MiC<*$YdLkHmR#F3ae;bKd;@*i z2_VfELG=B}JMLCO-6UQy^>RDE%K4b>c%9ki`f~Z2Qu8hO7C#t%Aeg8E%+}6P7Twtg z-)dj(w}_zFK&86KR@q9MHicUAucLVshUdmz_2@32(V`y3`&Kf8Q2I)+!n0mR=rrDU zXvv^$ho;yh*kNqJ#r1}b0|i|xRUF6;lhx$M*uG3SNLUTC@|htC z-=fsw^F%$qqz4%QdjBrS+ov}Qv!z00E+JWas>p?z@=t!WWU3K*?Z(0meTuTOC7OTx zU|kFLE0bLZ+WGcL$u4E}5dB0g`h|uwv3=H6f+{5z9oLv-=Q45+n~V4WwgO=CabjM% zBAN+RjM65(-}>Q2V#i1Na@a0`08g&y;W#@sBiX6Tpy8r}*+{RnyGUT`?XeHSqo#|J z^ww~c;ou|iyzpErDtlVU=`8N7JSu>4M z_pr9=tX0edVn9B}YFO2y(88j#S{w%E8vVOpAboK*27a7e4Ekjt0)hIX99*1oE;vex z7#%jhY=bPijA=Ce@9rRO(Vl_vnd00!^TAc<+wVvRM9{;hP*rqEL_(RzfK$er_^SN; z)1a8vo8~Dr5?;0X0J62Cusw$A*c^Sx1)dom`-)Pl7hsW4i(r*^Mw`z5K>!2ixB_mu z*Ddqjh}zceRFdmuX1akM1$3>G=#~|y?eYv(e-`Qy?bRHIq=fMaN~fB zUa6I8Rt=)jnplP>yuS+P&PxeWpJ#1$F`iqRl|jF$WL_aZFZl@kLo&d$VJtu&w?Q0O zzuXK>6gmygq(yXJy0C1SL}T8AplK|AGNUOhzlGeK_oo|haD@)5PxF}rV+5`-w{Aag zus45t=FU*{LguJ11Sr-28EZkq;!mJO7AQGih1L4rEyUmp>B!%X0YemsrV3QFvlgt* z5kwlPzaiJ+kZ^PMd-RRbl(Y?F*m`4*UIhIuf#8q>H_M=fM*L_Op-<_r zBZagV=4B|EW+KTja?srADTZXCd3Yv%^Chfpi)cg{ED${SI>InNpRj5!euKv?=Xn92 zsS&FH(*w`qLIy$doc>RE&A5R?u zzkl1sxX|{*fLpXvIW>9d<$ePROttn3oc6R!sN{&Y+>Jr@yeQN$sFR z;w6A<2-0%UA?c8Qf;sX7>>uKRBv3Ni)E9pI{uVzX|6Bb0U)`lhLE3hK58ivfRs1}d zNjlGK0hdq0qjV@q1qI%ZFMLgcpWSY~mB^LK)4GZ^h_@H+3?dAe_a~k*;9P_d7%NEFP6+ zgV(oGr*?W(ql?6SQ~`lUsjLb%MbfC4V$)1E0Y_b|OIYxz4?O|!kRb?BGrgiH5+(>s zoqM}v*;OBfg-D1l`M6T6{K`LG+0dJ1)!??G5g(2*vlNkm%Q(MPABT$r13q?|+kL4- zf)Mi5r$sn;u41aK(K#!m+goyd$c!KPl~-&-({j#D4^7hQkV3W|&>l_b!}!z?4($OA z5IrkfuT#F&S1(`?modY&I40%gtroig{YMvF{K{>5u^I51k8RriGd${z)=5k2tG zM|&Bp5kDTfb#vfuTTd?)a=>bX=lokw^y9+2LS?kwHQIWI~pYgy7 zb?A-RKVm_vM5!9?C%qYdfRAw& zAU7`up~%g=p@}pg#b7E)BFYx3g%(J36Nw(Dij!b>cMl@CSNbrW!DBDbTD4OXk!G4x zi}JBKc8HBYx$J~31PXH+4^x|UxK~(<@I;^3pWN$E=sYma@JP|8YL`L(zI6Y#c%Q{6 z*APf`DU$S4pr#_!60BH$FGViP14iJmbrzSrOkR;f3YZa{#E7Wpd@^4E-zH8EgPc-# zKWFPvh%WbqU_%ZEt`=Q?odKHc7@SUmY{GK`?40VuL~o)bS|is$Hn=<=KGHOsEC5tB zFb|q}gGlL97NUf$G$>^1b^3E18PZ~Pm9kX%*ftnolljiEt@2#F2R5ah$zbXd%V_Ev zyDd{1o_uuoBga$fB@Fw!V5F3jIr=a-ykqrK?WWZ#a(bglI_-8pq74RK*KfQ z0~Dzus7_l;pMJYf>Bk`)`S8gF!To-BdMnVw5M-pyu+aCiC5dwNH|6fgRsIKZcF&)g zr}1|?VOp}I3)IR@m1&HX1~#wsS!4iYqES zK}4J{Ei>;e3>LB#Oly>EZkW14^@YmpbgxCDi#0RgdM${&wxR+LiX}B+iRioOB0(pDKpVEI;ND?wNx>%e|m{RsqR_{(nmQ z3ZS}@t!p4a(BKx_-CYwrcyJ5u1TO9bcXti$8sy>xcLKqKCc#~UOZYD{llKTSFEjJ~ zyNWt>tLU}*>^`TvPxtP%F`ZJQw@W0^>x;!^@?k_)9#bF$j0)S3;mH-IR5y82l|%=F z2lR8zhP?XNP-ucZZ6A+o$xOyF!w;RaLHGh57GZ|TCXhJqY~GCh)aXEV$1O&$c}La1 zjuJxkY9SM4av^Hb;i7efiYaMwI%jGy`3NdY)+mcJhF(3XEiSlU3c|jMBi|;m-c?~T z+x0_@;SxcoY=(6xNgO$bBt~Pj8`-<1S|;Bsjrzw3@zSjt^JC3X3*$HI79i~!$RmTz zsblZsLYs7L$|=1CB$8qS!tXrWs!F@BVuh?kN(PvE5Av-*r^iYu+L^j^m9JG^#=m>@ z=1soa)H*w6KzoR$B8mBCXoU;f5^bVuwQ3~2LKg!yxomG1#XPmn(?YH@E~_ED+W6mxs%x{%Z<$pW`~ON1~2XjP5v(0{C{+6Dm$00tsd3w=f=ZENy zOgb-=f}|Hb*LQ$YdWg<(u7x3`PKF)B7ZfZ6;1FrNM63 z?O6tE%EiU@6%rVuwIQjvGtOofZBGZT1Sh(xLIYt9c4VI8`!=UJd2BfLjdRI#SbVAX ziT(f*RI^T!IL5Ac>ql7uduF#nuCRJ1)2bdvAyMxp-5^Ww5p#X{rb5)(X|fEhDHHW{ zw(Lfc$g;+Q`B0AiPGtmK%*aWfQQ$d!*U<|-@n2HZvCWSiw^I>#vh+LyC;aaVWGbmkENr z&kl*8o^_FW$T?rDYLO1Pyi%>@&kJKQoH2E0F`HjcN}Zlnx1ddoDA>G4Xu_jyp6vuT zPvC}pT&Owx+qB`zUeR|4G;OH(<<^_bzkjln0k40t`PQxc$7h(T8Ya~X+9gDc8Z9{Z z&y0RAU}#_kQGrM;__MK9vwIwK^aoqFhk~dK!ARf1zJqHMxF2?7-8|~yoO@_~Ed;_wvT%Vs{9RK$6uUQ|&@#6vyBsFK9eZW1Ft#D2)VpQRwpR(;x^ zdoTgMqfF9iBl%{`QDv7B0~8{8`8k`C4@cbZAXBu00v#kYl!#_Wug{)2PwD5cNp?K^ z9+|d-4z|gZ!L{57>!Ogfbzchm>J1)Y%?NThxIS8frAw@z>Zb9v%3_3~F@<=LG%r*U zaTov}{{^z~SeX!qgSYow`_5)ij*QtGp4lvF`aIGQ>@3ZTkDmsl#@^5*NGjOuu82}o zzLF~Q9SW+mP=>88%eSA1W4_W7-Q>rdq^?t=m6}^tDPaBRGFLg%ak93W!kOp#EO{6& zP%}Iff5HZQ9VW$~+9r=|Quj#z*=YwcnssS~9|ub2>v|u1JXP47vZ1&L1O%Z1DsOrDfSIMHU{VT>&>H=9}G3i@2rP+rx@eU@uE8rJNec zij~#FmuEBj03F1~ct@C@$>y)zB+tVyjV3*n`mtAhIM0$58vM9jOQC}JJOem|EpwqeMuYPxu3sv}oMS?S#o6GGK@8PN59)m&K4Dc&X% z(;XL_kKeYkafzS3Wn5DD>Yiw{LACy_#jY4op(>9q>>-*9@C0M+=b#bknAWZ37^(Ij zq>H%<@>o4a#6NydoF{_M4i4zB_KG)#PSye9bk0Ou8h%1Dtl7Q_y#7*n%g)?m>xF~( zjqvOwC;*qvN_3(*a+w2|ao0D?@okOvg8JskUw(l7n`0fncglavwKd?~l_ryKJ^Ky! zKCHkIC-o7%fFvPa$)YNh022lakMar^dgL=t#@XLyNHHw!b?%WlM)R@^!)I!smZL@k zBi=6wE5)2v&!UNV(&)oOYW(6Qa!nUjDKKBf-~Da=#^HE4(@mWk)LPvhyN3i4goB$3K8iV7uh zsv+a?#c4&NWeK(3AH;ETrMOIFgu{_@%XRwCZ;L=^8Ts)hix4Pf3yJRQ<8xb^CkdmC z?c_gB)XmRsk`9ch#tx4*hO=#qS7={~Vb4*tTf<5P%*-XMfUUYkI9T1cEF;ObfxxI-yNuA=I$dCtz3ey znVkctYD*`fUuZ(57+^B*R=Q}~{1z#2!ca?)+YsRQb+lt^LmEvZt_`=j^wqig+wz@n@ z`LIMQJT3bxMzuKg8EGBU+Q-6cs5(@5W?N>JpZL{$9VF)veF`L5%DSYTNQEypW%6$u zm_~}T{HeHj1bAlKl8ii92l9~$dm=UM21kLemA&b$;^!wB7#IKWGnF$TVq!!lBlG4 z{?Rjz?P(uvid+|i$VH?`-C&Gcb3{(~Vpg`w+O);Wk1|Mrjxrht0GfRUnZqz2MhrXa zqgVC9nemD5)H$to=~hp)c=l9?#~Z_7i~=U-`FZxb-|TR9@YCxx;Zjo-WpMNOn2)z) zFPGGVl%3N$f`gp$gPnWC+f4(rmts%fidpo^BJx72zAd7|*Xi{2VXmbOm)1`w^tm9% znM=0Fg4bDxH5PxPEm{P3#A(mxqlM7SIARP?|2&+c7qmU8kP&iApzL|F>Dz)Ixp_`O zP%xrP1M6@oYhgo$ZWwrAsYLa4 z|I;DAvJxno9HkQrhLPQk-8}=De{9U3U%)dJ$955?_AOms!9gia%)0E$Mp}$+0er@< zq7J&_SzvShM?e%V?_zUu{niL@gt5UFOjFJUJ}L?$f%eU%jUSoujr{^O=?=^{19`ON zlRIy8Uo_nqcPa6@yyz`CM?pMJ^^SN^Fqtt`GQ8Q#W4kE7`V9^LT}j#pMChl!j#g#J zr-=CCaV%xyFeQ9SK+mG(cTwW*)xa(eK;_Z(jy)woZp~> zA(4}-&VH+TEeLzPTqw&FOoK(ZjD~m{KW05fiGLe@E3Z2`rLukIDahE*`u!ubU)9`o zn^-lyht#E#-dt~S>}4y$-mSbR8{T@}22cn^refuQ08NjLOv?JiEWjyOnzk<^R5%gO zhUH_B{oz~u#IYwVnUg8?3P*#DqD8#X;%q%HY**=I>>-S|!X*-!x1{^l#OnR56O>iD zc;i;KS+t$koh)E3)w0OjWJl_aW2;xF=9D9Kr>)(5}4FqUbk# zI#$N8o0w;IChL49m9CJTzoC!|u{Ljd%ECgBOf$}&jA^$(V#P#~)`&g`H8E{uv52pp zwto`xUL-L&WTAVREEm$0g_gYPL(^vHq(*t1WCH_6alhkeW&GCZ3hL)|{O-jiFOBrF z!EW=Jej|dqQitT6!B-7&io2K)WIm~Q)v@yq%U|VpV+I?{y0@Yd%n8~-NuuM*pM~KA z85YB};IS~M(c<}4Hxx>qRK0cdl&e?t253N%vefkgds>Ubn8X}j6Vpgs>a#nFq$osY z1ZRwLqFv=+BTb=i%D2Wv>_yE0z}+niZ4?rE|*a3d7^kndWGwnFqt+iZ(7+aln<}jzbAQ(#Z2SS}3S$%Bd}^ zc9ghB%O)Z_mTZMRC&H#)I#fiLuIkGa^`4e~9oM5zKPx?zjkC&Xy0~r{;S?FS%c7w< zWbMpzc(xSw?9tGxG~_l}Acq}zjt5ClaB7-!vzqnlrX;}$#+PyQ9oU)_DfePh2E1<7 ztok6g6K^k^DuHR*iJ?jw?bs_whk|bx`dxu^nC6#e{1*m~z1eq7m}Cf$*^Eua(oi_I zAL+3opNhJteu&mWQ@kQWPucmiP)4|nFG`b2tpC;h{-PI@`+h?9v=9mn|0R-n8#t=+Z*FD(c5 zjj79Jxkgck*DV=wpFgRZuwr%}KTm+dx?RT@aUHJdaX-ODh~gByS?WGx&czAkvkg;x zrf92l8$Or_zOwJVwh>5rB`Q5_5}ef6DjS*$x30nZbuO3dijS*wvNEqTY5p1_A0gWr znH<(Qvb!os14|R)n2Ost>jS2;d1zyLHu`Svm|&dZD+PpP{Bh>U&`Md;gRl64q;>{8MJJM$?UNUd`aC>BiLe>*{ zJY15->yW+<3rLgYeTruFDtk1ovU<$(_y7#HgUq>)r0{^}Xbth}V#6?%5jeFYt;SG^ z3qF)=uWRU;Jj)Q}cpY8-H+l_n$2$6{ZR?&*IGr{>ek!69ZH0ZoJ*Ji+ezzlJ^%qL3 zO5a`6gwFw(moEzqxh=yJ9M1FTn!eo&qD#y5AZXErHs%22?A+JmS&GIolml!)rZTnUDM3YgzYfT#;OXn)`PWv3Ta z!-i|-Wojv*k&bC}_JJDjiAK(Ba|YZgUI{f}TdEOFT2+}nPmttytw7j%@bQZDV1vvj z^rp{gRkCDmYJHGrE1~e~AE!-&6B6`7UxVQuvRrfdFkGX8H~SNP_X4EodVd;lXd^>eV1jN+Tt4}Rsn)R0LxBz0c=NXU|pUe!MQQFkGBWbR3&(jLm z%RSLc#p}5_dO{GD=DEFr=Fc% z85CBF>*t!6ugI?soX(*JNxBp+-DdZ4X0LldiK}+WWGvXV(C(Ht|!3$psR=&c*HIM=BmX;pRIpz@Ale{9dhGe(U2|Giv;# zOc|;?p67J=Q(kamB*aus=|XP|m{jN^6@V*Bpm?ye56Njh#vyJqE=DweC;?Rv7faX~ zde03n^I~0B2vUmr;w^X37tVxUK?4}ifsSH5_kpKZIzpYu0;Kv}SBGfI2AKNp+VN#z`nI{UNDRbo-wqa4NEls zICRJpu)??cj^*WcZ^MAv+;bDbh~gpN$1Cor<{Y2oyIDws^JsfW^5AL$azE(T0p&pP z1Mv~6Q44R&RHoH95&OuGx2srIr<@zYJTOMKiVs;Bx3py89I87LOb@%mr`0)#;7_~Z zzcZj8?w=)>%5@HoCHE_&hnu(n_yQ-L(~VjpjjkbT7e)Dk5??fApg(d>vwLRJ-x{um z*Nt?DqTSxh_MIyogY!vf1mU1`Gld-&L)*43f6dilz`Q@HEz;+>MDDYv9u!s;WXeao zUq=TaL$P*IFgJzrGc>j1dDOd zed+=ZBo?w4mr$2)Ya}?vedDopomhW1`#P<%YOJ_j=WwClX0xJH-f@s?^tmzs_j7t!k zK@j^zS0Q|mM4tVP5Ram$VbS6|YDY&y?Q1r1joe9dj08#CM{RSMTU}(RCh`hp_Rkl- zGd|Cv~G@F{DLhCizAm9AN!^{rNs8hu!G@8RpnGx7e`-+K$ffN<0qjR zGq^$dj_Tv!n*?zOSyk5skI7JVKJ)3jysnjIu-@VSzQiP8r6MzudCU=~?v-U8yzo^7 zGf~SUTvEp+S*!X9uX!sq=o}lH;r{pzk~M*VA(uyQ`3C8!{C;)&6)95fv(cK!%Cuz$ z_Zal57H6kPN>25KNiI6z6F)jzEkh#%OqU#-__Xzy)KyH};81#N6OfX$$IXWzOn`Q& z4f$Z1t>)8&8PcYfEwY5UadU1yg+U*(1m2ZlHoC-!2?gB!!fLhmTl))D@dhvkx#+Yj z1O=LV{(T%{^IeCuFK>%QR!VZ4GnO5tK8a+thWE zg4VytZrwcS?7^ zuZfhYnB8dwd%VLO?DK7pV5Wi<(`~DYqOXn8#jUIL^)12*Dbhk4GmL_E2`WX&iT16o zk(t|hok(Y|v-wzn?4x34T)|+SfZP>fiq!><*%vnxGN~ypST-FtC+@TPv*vYv@iU!_ z@2gf|PrgQ?Ktf*9^CnJ(x*CtZVB8!OBfg0%!wL;Z8(tYYre0vcnPGlyCc$V(Ipl*P z_(J!a=o@vp^%Efme!K74(Ke7A>Y}|sxV+JL^aYa{~m%5#$$+R1? zGaQhZTTX!#s#=Xtpegqero$RNt&`4xn3g$)=y*;=N=Qai)}~`xtxI_N*#MMCIq#HFifT zz(-*m;pVH&+4bixL&Bbg)W5FN^bH87pAHp)zPkWNMfTFqS=l~AC$3FX3kQUSh_C?-ZftyClgM)o_D7cX$RGlEYblux0jv5 zTr|i-I3@ZPCGheCl~BGhImF)K4!9@?pC(gi3ozX=a!|r1)LFxy_8c&wY0<^{2cm|P zv6Y`QktY*;I)IUd5y3ne1CqpVanlY45z8hf4&$EUBnucDj16pDa4&GI&TArYhf*xh zdj>*%APH8(h~c>o@l#%T>R$e>rwVx_WUB|~V`p^JHsg*y12lzj&zF}w6W09HwB2yb z%Q~`es&(;7#*DUC_w-Dmt7|$*?TA_m;zB+-u{2;Bg{O}nV7G_@7~<)Bv8fH^G$XG8$(&{A zwXJK5LRK%M34(t$&NI~MHT{UQ9qN-V_yn|%PqC81EIiSzmMM=2zb`mIwiP_b)x+2M z7Gd`83h79j#SItpQ}luuf2uOU`my_rY5T{6P#BNlb%h%<#MZb=m@y5aW;#o1^2Z)SWo+b`y0gV^iRcZtz5!-05vF z7wNo=hc6h4hc&s@uL^jqRvD6thVYtbErDK9k!;+a0xoE0WL7zLixjn5;$fXvT=O3I zT6jI&^A7k6R{&5#lVjz#8%_RiAa2{di{`kx79K+j72$H(!ass|B%@l%KeeKchYLe_ z>!(JC2fxsv>XVen+Y42GeYPxMWqm`6F$(E<6^s|g(slNk!lL*6v^W2>f6hh^mE$s= z3D$)}{V5(Qm&A6bp%2Q}*GZ5Qrf}n7*Hr51?bJOyA-?B4vg6y_EX<*-e20h{=0Mxs zbuQGZ$fLyO5v$nQ&^kuH+mNq9O#MWSfThtH|0q1i!NrWj^S}_P;Q1OkYLW6U^?_7G zx2wg?CULj7))QU(n{$0JE%1t2dWrMi2g-Os{v|8^wK{@qlj%+1b^?NI z$}l2tjp0g>K3O+p%yK<9!XqmQ?E9>z&(|^Pi~aSRwI5x$jaA62GFz9%fmO3t3a>cq zK8Xbv=5Ps~4mKN5+Eqw12(!PEyedFXv~VLxMB~HwT1Vfo51pQ#D8e$e4pFZ{&RC2P z5gTIzl{3!&(tor^BwZfR8j4k{7Rq#`riKXP2O-Bh66#WWK2w=z;iD9GLl+3 zpHIaI4#lQ&S-xBK8PiQ%dwOh?%BO~DCo06pN7<^dnZCN@NzY{_Z1>rrB0U|nC&+!2 z2y!oBcTd2;@lzyk(B=TkyZ)zy0deK05*Q0zk+o$@nun`VI1Er7pjq>8V zNmlW{p7S^Btgb(TA}jL(uR>`0w8gHP^T~Sh5Tkip^spk4SBAhC{TZU}_Z)UJw-}zm zPq{KBm!k)?P{`-(9?LFt&YN4s%SIZ-9lJ!Ws~B%exHOeVFk3~}HewnnH(d)qkLQ_d z6h>O)pEE{vbOVw}E+jdYC^wM+AAhaI(YAibUc@B#_mDss0Ji&BK{WG`4 zOk>vSNq(Bq2IB@s>>Rxm6Wv?h;ZXkpb1l8u|+_qXWdC*jjcPCixq;!%BVPSp#hP zqo`%cNf&YoQXHC$D=D45RiT|5ngPlh?0T~?lUf*O)){K@*Kbh?3RW1j9-T?%lDk@y z4+~?wKI%Y!-=O|_IuKz|=)F;V7ps=5@g)RrE;;tvM$gUhG>jHcw2Hr@fS+k^Zr~>G z^JvPrZc}_&d_kEsqAEMTMJw!!CBw)u&ZVzmq+ZworuaE&TT>$pYsd9|g9O^0orAe8 z221?Va!l1|Y5X1Y?{G7rt1sX#qFA^?RLG^VjoxPf63;AS=_mVDfGJKg73L zsGdnTUD40y(>S##2l|W2Cy!H(@@5KBa(#gs`vlz}Y~$ot5VsqPQ{{YtjYFvIumZzt zA{CcxZLJR|4#{j7k~Tu*jkwz8QA|5G1$Cl895R`Zyp;irp1{KN){kB30O8P1W5;@bG znvX74roeMmQlUi=v9Y%(wl$ZC#9tKNFpvi3!C}f1m6Ct|l2g%psc{TJp)@yu)*e2> z((p0Fg*8gJ!|3WZke9;Z{8}&NRkv7iP=#_y-F}x^y?2m%-D_aj^)f04%mneyjo_;) z6qc_Zu$q37d~X``*eP~Q>I2gg%rrV8v=kDfpp$=%Vj}hF)^dsSWygoN(A$g*E=Do6FX?&(@F#7pbiJ`;c0c@Ul zDqW_90Wm#5f2L<(Lf3)3TeXtI7nhYwRm(F;*r_G6K@OPW4H(Y3O5SjUzBC}u3d|eQ8*8d@?;zUPE+i#QNMn=r(ap?2SH@vo*m z3HJ%XuG_S6;QbWy-l%qU;8x;>z>4pMW7>R}J%QLf%@1BY(4f_1iixd-6GlO7Vp*yU zp{VU^3?s?90i=!#>H`lxT!q8rk>W_$2~kbpz7eV{3wR|8E=8**5?qn8#n`*(bt1xRQrdGxyx2y%B$qmw#>ZV$c7%cO#%JM1lY$Y0q?Yuo> ze9KdJoiM)RH*SB%^;TAdX-zEjA7@%y=!0=Zg%iWK7jVI9b&Dk}0$Af&08KHo+ zOwDhFvA(E|ER%a^cdh@^wLUlmIv6?_3=BvX8jKk92L=Y}7Jf5OGMfh` zBdR1wFCi-i5@`9km{isRb0O%TX+f~)KNaEz{rXQa89`YIF;EN&gN)cigu6mNh>?Cm zAO&Im2flv6D{jwm+y<%WsPe4!89n~KN|7}Cb{Z;XweER73r}Qp2 zz}WP4j}U0&(uD&9yGy6`!+_v-S(yG*iytsTR#x_Rc>=6u^vnRDnf1gP{#2>`ffrAC% zTZ5WQ@hAK;P;>kX{D)mIXe4%a5p=LO1xXH@8T?mz7Q@d)$3pL{{B!2{-v70L*o1AO+|n5beiw~ zk@(>m?T3{2k2c;NWc^`4@P&Z?BjxXJ@;x1qhn)9Mn*IFdt_J-dIqx5#d`NfyfX~m( zIS~5)MfZ2Uy?_4W`47i}u0ZgPh<{D|w_d#;D}Q&U$Q-G}xM1A@1f{#%A$jh6Qp&0hQ<0bPOM z-{1Wm&p%%#eb_?x7i;bol EfAhh=DF6Tf literal 0 HcmV?d00001 diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000000..642d572ce90 --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/core/com.b2international.snowowl.core.rest/pom.xml b/core/com.b2international.snowowl.core.rest/pom.xml index 1d276818581..a249ed4eb7e 100644 --- a/core/com.b2international.snowowl.core.rest/pom.xml +++ b/core/com.b2international.snowowl.core.rest/pom.xml @@ -1,273 +1,273 @@ - - 4.0.0 - - com.b2international.snowowl - core-parent - 7.3.0-SNAPSHOT - + + 4.0.0 + + com.b2international.snowowl + core-parent + 7.3.0-SNAPSHOT + - com.b2international.snowowl.core.rest - eclipse-plugin - - - 5.1.9.RELEASE - 5.1.6.RELEASE - 2.9.2 - - v12.13.0 - + com.b2international.snowowl.core.rest + eclipse-plugin - - - - io.springfox - springfox-swagger2 - ${springfox.version} - provided - - - org.reflections - reflections - - - - - org.springframework - spring-webmvc - ${spring.version} - provided - - - org.springframework.security - spring-security-config - ${spring.security.version} - provided - - - org.springframework.security - spring-security-web - ${spring.security.version} - provided - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 3.1.0 - - - clean-folders - generate-sources - - clean - - - - - WEB-INF/lib - - .gitignore - - - - site - - .gitignore - - - - snow-owl-api-docs/node_modules - - - snow-owl-api-docs/build - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.1.1 - - - copy-runtime-dependencies - generate-sources - - copy-dependencies - - - - - spring-aop, - spring-beans, - spring-context, - spring-core, - spring-expression, - spring-plugin-core, - spring-plugin-metadata, - spring-security-config, - spring-security-core, - spring-security-web, - spring-web, - spring-webmvc, - springfox-core, - springfox-schema, - springfox-spi, - springfox-spring-web, - springfox-swagger-common, - springfox-swagger2, - - WEB-INF/lib - - - - - - com.github.eirslett - frontend-maven-plugin - 1.8.0 - - - install node and npm - - install-node-and-npm - - generate-resources - - - npm install - - npm - - generate-resources - - install - - - - npm build - - npm - - generate-resources - - ${basedir}/snow-owl-api-docs - run build - - - - - ${project.build.directory}/node - ${basedir}/snow-owl-api-docs - ${node.version} - - - - org.apache.maven.plugins - maven-resources-plugin - 3.1.0 - - - copy-static-resources - generate-resources - - copy-resources - - - ${basedir}/site - true - - - ${basedir}/snow-owl-api-docs/build - - - - - - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [3.0.2,) - - copy-dependencies - - - - - false - - - - - - org.apache.maven.plugins - maven-clean-plugin - [3.1.0,) - - clean - - - - - - - - - com.github.eirslett - frontend-maven-plugin - [1.8.0,) - - install-node-and-npm - npm - - - - - false - - - - - - org.apache.maven.plugins - maven-resources-plugin - [3.1.0,) - - copy-resources - - - - - false - - - - - - - - - - + + 5.1.9.RELEASE + 5.1.6.RELEASE + 2.9.2 + + v12.13.0 + + + + + + io.springfox + springfox-swagger2 + ${springfox.version} + provided + + + org.reflections + reflections + + + + + org.springframework + spring-webmvc + ${spring.version} + provided + + + org.springframework.security + spring-security-config + ${spring.security.version} + provided + + + org.springframework.security + spring-security-web + ${spring.security.version} + provided + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 3.1.0 + + + clean-folders + generate-sources + + clean + + + + + WEB-INF/lib + + .gitignore + + + + site + + .gitignore + + + + snow-owl-api-docs/node_modules + + + snow-owl-api-docs/build + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.1 + + + copy-runtime-dependencies + generate-sources + + copy-dependencies + + + + + spring-aop, + spring-beans, + spring-context, + spring-core, + spring-expression, + spring-plugin-core, + spring-plugin-metadata, + spring-security-config, + spring-security-core, + spring-security-web, + spring-web, + spring-webmvc, + springfox-core, + springfox-schema, + springfox-spi, + springfox-spring-web, + springfox-swagger-common, + springfox-swagger2, + + WEB-INF/lib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.1.0 + + + copy-static-resources + generate-resources + + copy-resources + + + ${basedir}/site + true + + + ${basedir}/snow-owl-api-docs/build + + + + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.maven.plugins + maven-dependency-plugin + [3.0.2,) + + copy-dependencies + + + + + false + + + + + + org.apache.maven.plugins + maven-clean-plugin + [3.1.0,) + + clean + + + + + + + + + com.github.eirslett + frontend-maven-plugin + [1.8.0,) + + install-node-and-npm + npm + + + + + false + + + + + + org.apache.maven.plugins + maven-resources-plugin + [3.1.0,) + + copy-resources + + + + + false + + + + + + + + + + diff --git a/mvnw b/mvnw new file mode 100755 index 00000000000..41c0f0c23db --- /dev/null +++ b/mvnw @@ -0,0 +1,310 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget "$jarUrl" -O "$wrapperJarPath" + else + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl -o "$wrapperJarPath" "$jarUrl" -f + else + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + fi + + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 00000000000..86115719e53 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,182 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + +FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/pom.xml b/pom.xml index d3924ecf378..2671543edca 100644 --- a/pom.xml +++ b/pom.xml @@ -1,935 +1,979 @@ - 4.0.0 - com.b2international.snowowl - snowowl-parent - 7.3.0-SNAPSHOT - pom + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" + xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + 4.0.0 + com.b2international.snowowl + snowowl-parent + 7.3.0-SNAPSHOT + pom - - UTF-8 - UTF-8 - - - 2.9.10 - 2.9.10.1 - 4.1.16.Final - 1.7.25 - 1.2.3 - [1.2.3,1.2.4) - 21.0 - [21.0.0,22.0.0) - 1.9.3 - 2.4.17 - 3.2.2 - [3.2.2,3.3.0) - 1.2.71 - 5.0.4-b2i - 4.5.10 - 0.4.3 - 9.4.18.v20190429 - 4.8.43 - 0.4.1 - 0.6.1 - 2.1.10 - 1.2 - 1.10 - 8.2.2 - 2.3.0 - 1.2.0 - 2.6.0 - 2.3.1 - - 1.5.0 - 1.5.0 - 2.18.0 - 0.8.4 - - - yyyyMMddHHmm - ${maven.build.timestamp} - + + UTF-8 + UTF-8 - - commons - core - fhir - net4j - snomed - cis - tests - releng - dist - + + 2.9.10 + 2.9.10.1 + 4.1.16.Final + 1.7.25 + 1.2.3 + [1.2.3,1.2.4) + 21.0 + [21.0.0,22.0.0) + 1.9.3 + 2.4.17 + 3.2.2 + [3.2.2,3.3.0) + 1.2.71 + 5.0.4-b2i + 4.5.10 + 0.4.3 + 9.4.18.v20190429 + 4.8.43 + 0.4.1 + 0.6.1 + 2.1.10 + 1.2 + 1.10 + 8.2.2 + 2.3.0 + 1.2.0 + 2.6.0 + 2.3.1 + + 1.5.0 + 1.5.0 + 2.18.0 + 0.8.4 - - - protege-mvn-repo - https://b2ihealthcare.github.io/protege/ - - true - never - - - false - never - - - - snomed-international-releases - https://maven.ihtsdotools.org/content/repositories/releases/ - - true - never - - - false - never - - - + + yyyyMMddHHmm + ${maven.build.timestamp} + - - - - com.fasterxml.jackson.core - jackson-core - ${jackson.version} - provided - - - com.fasterxml.jackson.core - jackson-annotations - ${jackson.version} - provided - - - com.fasterxml.jackson.core - jackson-databind - ${jackson.databind.version} - provided - - - com.fasterxml.jackson.dataformat - jackson-dataformat-cbor - ${jackson.version} - provided - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - ${jackson.version} - provided - - - com.fasterxml.jackson.dataformat - jackson-dataformat-smile - ${jackson.version} - provided - - - com.fasterxml.jackson.dataformat - jackson-dataformat-csv - ${jackson.version} - provided - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - ${jackson.version} - provided - - - com.fasterxml.jackson.module - jackson-module-afterburner - ${jackson.version} - provided - - - com.fasterxml.jackson.module - jackson-module-jaxb-annotations - ${jackson.version} - provided - - - com.thoughtworks.xstream - xstream - 1.4.7 - provided - - - org.eclipse.persistence - javax.persistence - 2.0.5 - provided - - - org.assertj - assertj-core - 1.7.1 - provided - - - org.yaml - snakeyaml - 1.25 - provided - - - io.reactivex.rxjava2 - rxjava - 2.0.7 - provided - - - org.reactivestreams - reactive-streams - 1.0.0 - provided - - - commons-collections - commons-collections - 3.2.2 - provided - - - com.google.guava - guava - ${guava.version} - provided - - - io.netty - netty-buffer - ${netty.version} - provided - - - io.netty - netty-codec - ${netty.version} - provided - - - io.netty - netty-codec-http - ${netty.version} - provided - - - io.netty - netty-common - ${netty.version} - provided - - - io.netty - netty-handler - ${netty.version} - provided - - - io.netty - netty-resolver - ${netty.version} - provided - - - io.netty - netty-transport - ${netty.version} - provided - - - org.jetbrains.kotlin - kotlin-osgi-bundle - ${kotlin.version} - provided - - - com.diffplug.osgi - com.diffplug.osgi.extension.sun.misc - 0.0.0 - provided - - - com.diffplug.osgi - com.diffplug.osgi.extension.sun.reflect - 0.0.0 - provided - - - ch.qos.logback - logback-classic - ${logback.version} - provided - - - ch.qos.logback - logback-core - ${logback.version} - provided - - - org.slf4j - slf4j-api - ${slf4j.version} - provided - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - provided - - - org.slf4j - jul-to-slf4j - ${slf4j.version} - provided - - - org.slf4j - log4j-over-slf4j - ${slf4j.version} - provided - - - io.github.classgraph - classgraph - ${classgraph.version} - provided - - - com.b2international.snowowl - protege-common - ${protege.version} - provided - - - - org.apache.felix - org.apache.felix.main - - - - - com.b2international.snowowl - protege-editor-core - ${protege.version} - provided - - - - org.eclipse.equinox - org.eclipse.equinox.common - - - org.eclipse.equinox - org.eclipse.equinox.registry - - - - - com.b2international.snowowl - protege-editor-owl - ${protege.version} - provided - - - - log4j - log4j - - - - - net.sourceforge.owlapi - owlapi-osgidistribution - ${owlapi.version} - provided - - - org.semanticweb.elk - elk-protege - ${elk.version} - provided - - - - log4j - log4j - - - - org.protege - protege-editor-core-application - - - org.protege - protege-editor-owl - - - - - org.eclipse.jetty - jetty-continuation - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-deploy - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-http - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-io - ${jetty.version} - provided - - - org.eclipse.jetty.osgi - jetty-osgi-boot - ${jetty.version} - provided - - - - org.eclipse.osgi - org.eclipse.osgi - - - org.eclipse.osgi - org.eclipse.osgi.services - - - org.ow2.asm - asm - - - org.ow2.asm - asm-commons - - - - - org.eclipse.jetty - jetty-security - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-servlet - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-util - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-webapp - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-xml - ${jetty.version} - provided - - - net.bytebuddy - byte-buddy - ${net.bytebuddy.version} - provided - - - com.fasterxml - classmate - 1.3.4 - provided - - - org.mapstruct - mapstruct - 1.2.0.Final - provided - - - io.swagger - swagger-annotations - 1.5.23 - provided - - - io.swagger - swagger-models - 1.5.23 - provided - - - org.apache.httpcomponents - httpclient-osgi - 4.5.3 - provided - - - org.apache.httpcomponents - httpcore-osgi - 4.4.10 - provided - - - org.apache.httpcomponents - httpasyncclient-osgi - 4.1.4 - provided - - - de.svenkubiak - jBCrypt - ${jbcrypt.version} - provided - - - net.jodah - typetools - ${typetools.version} - provided - - - org.hdrhistogram - HdrHistogram - ${hdrhistogram.version} - provided - - - commons-codec - commons-codec - ${commons.codec.version} - provided - - - commons-logging - commons-logging - ${commons.logging.version} - provided - - - it.unimi.dsi - fastutil - ${fastutil.version} - provided - - - javax.activation - javax.activation-api - 1.2.0 - provided - - - javax.xml.bind - jaxb-api - ${jaxb.api.version} - provided - - - com.sun.xml.bind - jaxb-core - ${jaxb.api.version} - provided - - - com.sun.xml.bind - jaxb-impl - ${jaxb.api.version} - provided - - - com.sun.activation - javax.activation - ${javax.activation.version} - provided - - - org.snomed.otf - snomed-owl-toolkit - ${snomed.owl.toolkit.version} - bundle - provided - - - - com.google.inject - guice - - - com.google.inject.extensions - guice-assistedinject - - - com.google.inject.extensions - guice-multibindings - - - - - net.jodah - failsafe - ${failsafe.version} - provided - - + + commons + core + fhir + net4j + snomed + cis + tests + releng + dist + - - - - org.eclipse.tycho - tycho-maven-plugin - ${tycho.version} - true - - - org.eclipse.tycho - tycho-packaging-plugin - - false - false - - - - org.eclipse.tycho - tycho-source-plugin - ${tycho.version} - - - plugin-source - - plugin-source - - - - - - org.eclipse.tycho - target-platform-configuration - ${tycho.version} - - p2 - consider - - - ${project.groupId} - target-platform - ${project.version} - - - - - eclipse-plugin - org.eclipse.osgi - - [3.13.0,3.15.0] - - - - - - p2-installable-unit - org.eclipse.equinox.servletbridge.extensionbundle - - - - eclipse-plugin - org.codehaus.groovy - - ${groovy.version} - - - - eclipse-plugin - com.google.guava - - ${guava.versionRange} - - - - - p2-installable-unit - slf4j.api - - ${slf4j.version} - - - - p2-installable-unit - ch.qos.logback.classic - - ${logback.versionRange} - - - - p2-installable-unit - ch.qos.logback.core - - ${logback.versionRange} - - - - - p2-installable-unit - com.fasterxml.jackson.core.jackson-annotations - - ${jackson.version} - - - - p2-installable-unit - com.fasterxml.jackson.core.jackson-core - - ${jackson.version} - - - - p2-installable-unit - com.fasterxml.jackson.core.jackson-databind - - ${jackson.databind.version} - - - - p2-installable-unit - com.fasterxml.jackson.dataformat.jackson-dataformat-yaml - - ${jackson.version} - - - - p2-installable-unit - com.fasterxml.jackson.dataformat.jackson-dataformat-cbor - - ${jackson.version} - - - - p2-installable-unit - com.fasterxml.jackson.dataformat.jackson-dataformat-csv - - ${jackson.version} - - - - p2-installable-unit - com.fasterxml.jackson.dataformat.jackson-dataformat-xml - - ${jackson.version} - - - - p2-installable-unit - com.fasterxml.jackson.dataformat.jackson-dataformat-afterburner - - ${jackson.version} - - - - - p2-installable-unit - org.apache.commons.collections - - ${commons.collections.versionRange} - - - - p2-installable-unit - org.slf4j.api - - - - - - linux - gtk - x86_64 - - - win32 - win32 - x86_64 - - - - - - org.eclipse.tycho - tycho-p2-director-plugin - ${tycho.version} - - - org.codehaus.plexus - plexus-archiver - 2.4.4 - - - org.codehaus.plexus - plexus-component-api - - - org.codehaus.plexus - plexus-container-default - - - - - - - org.eclipse.tycho - tycho-p2-publisher-plugin - ${tycho.version} - - true - - - - org.eclipse.tycho - tycho-versions-plugin - ${tycho.version} - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - - prepare-agent - - - - - - - - - org.eclipse.tycho - tycho-compiler-plugin - ${tycho.version} - - false - 11 - 11 - - **/*.groovy - **/*.xtend - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.0 - - 11 - 11 - - - - org.eclipse.tycho - tycho-surefire-plugin - ${tycho.version} - - false - - **/*Test*.java - - false - - - - org.eclipse.tycho - tycho-packaging-plugin - ${tycho.version} - - - org.eclipse.tycho.extras - tycho-buildtimestamp-jgit - ${tycho-extras.version} - - - - jgit - - pom.xml - - - - - org.eclipse.tycho - tycho-p2-repository-plugin - ${tycho.version} - - true - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.3 - - - - + - - - docs - - - docs - true - - - - documentation - - - + + + false + + maven-central + remote-repos + https://repo.maven.apache.org/maven2 + + + + + + + + + + + + + + + - - - ${maven.repository.id} - ${nexus.releases.url} - - - ${maven.repository.id} - ${nexus.snapshots.url} - - + + protege-mvn-repo + https://b2ihealthcare.github.io/protege/ + + true + never + + + false + never + + + + snomed-international-releases + https://maven.ihtsdotools.org/content/repositories/releases/ + + true + never + + + false + never + + + + + + + + + + + + + + + + + + + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + provided + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + provided + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.databind.version} + provided + + + com.fasterxml.jackson.dataformat + jackson-dataformat-cbor + ${jackson.version} + provided + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + ${jackson.version} + provided + + + com.fasterxml.jackson.dataformat + jackson-dataformat-smile + ${jackson.version} + provided + + + com.fasterxml.jackson.dataformat + jackson-dataformat-csv + ${jackson.version} + provided + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson.version} + provided + + + com.fasterxml.jackson.module + jackson-module-afterburner + ${jackson.version} + provided + + + com.fasterxml.jackson.module + jackson-module-jaxb-annotations + ${jackson.version} + provided + + + com.thoughtworks.xstream + xstream + 1.4.7 + provided + + + org.eclipse.persistence + javax.persistence + 2.0.5 + provided + + + org.assertj + assertj-core + 1.7.1 + provided + + + org.yaml + snakeyaml + 1.25 + provided + + + io.reactivex.rxjava2 + rxjava + 2.0.7 + provided + + + org.reactivestreams + reactive-streams + 1.0.0 + provided + + + commons-collections + commons-collections + 3.2.2 + provided + + + com.google.guava + guava + ${guava.version} + provided + + + io.netty + netty-buffer + ${netty.version} + provided + + + io.netty + netty-codec + ${netty.version} + provided + + + io.netty + netty-codec-http + ${netty.version} + provided + + + io.netty + netty-common + ${netty.version} + provided + + + io.netty + netty-handler + ${netty.version} + provided + + + io.netty + netty-resolver + ${netty.version} + provided + + + io.netty + netty-transport + ${netty.version} + provided + + + org.jetbrains.kotlin + kotlin-osgi-bundle + ${kotlin.version} + provided + + + com.diffplug.osgi + com.diffplug.osgi.extension.sun.misc + 0.0.0 + provided + + + com.diffplug.osgi + com.diffplug.osgi.extension.sun.reflect + 0.0.0 + provided + + + ch.qos.logback + logback-classic + ${logback.version} + provided + + + ch.qos.logback + logback-core + ${logback.version} + provided + + + org.slf4j + slf4j-api + ${slf4j.version} + provided + + + org.slf4j + jcl-over-slf4j + ${slf4j.version} + provided + + + org.slf4j + jul-to-slf4j + ${slf4j.version} + provided + + + org.slf4j + log4j-over-slf4j + ${slf4j.version} + provided + + + io.github.classgraph + classgraph + ${classgraph.version} + provided + + + com.b2international.snowowl + protege-common + ${protege.version} + provided + + + + org.apache.felix + org.apache.felix.main + + + + + com.b2international.snowowl + protege-editor-core + ${protege.version} + provided + + + + org.eclipse.equinox + org.eclipse.equinox.common + + + org.eclipse.equinox + org.eclipse.equinox.registry + + + + + com.b2international.snowowl + protege-editor-owl + ${protege.version} + provided + + + + log4j + log4j + + + + + net.sourceforge.owlapi + owlapi-osgidistribution + ${owlapi.version} + provided + + + org.semanticweb.elk + elk-protege + ${elk.version} + provided + + + + log4j + log4j + + + + org.protege + protege-editor-core-application + + + org.protege + protege-editor-owl + + + + + org.eclipse.jetty + jetty-continuation + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-deploy + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-http + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-io + ${jetty.version} + provided + + + org.eclipse.jetty.osgi + jetty-osgi-boot + ${jetty.version} + provided + + + + org.eclipse.osgi + org.eclipse.osgi + + + org.eclipse.osgi + org.eclipse.osgi.services + + + org.ow2.asm + asm + + + org.ow2.asm + asm-commons + + + + + org.eclipse.jetty + jetty-security + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-servlet + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-util + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-webapp + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-xml + ${jetty.version} + provided + + + net.bytebuddy + byte-buddy + ${net.bytebuddy.version} + provided + + + com.fasterxml + classmate + 1.3.4 + provided + + + org.mapstruct + mapstruct + 1.2.0.Final + provided + + + io.swagger + swagger-annotations + 1.5.23 + provided + + + io.swagger + swagger-models + 1.5.23 + provided + + + org.apache.httpcomponents + httpclient-osgi + 4.5.3 + provided + + + org.apache.httpcomponents + httpcore-osgi + 4.4.10 + provided + + + org.apache.httpcomponents + httpasyncclient-osgi + 4.1.4 + provided + + + de.svenkubiak + jBCrypt + ${jbcrypt.version} + provided + + + net.jodah + typetools + ${typetools.version} + provided + + + org.hdrhistogram + HdrHistogram + ${hdrhistogram.version} + provided + + + commons-codec + commons-codec + ${commons.codec.version} + provided + + + commons-logging + commons-logging + ${commons.logging.version} + provided + + + it.unimi.dsi + fastutil + ${fastutil.version} + provided + + + javax.activation + javax.activation-api + 1.2.0 + provided + + + javax.xml.bind + jaxb-api + ${jaxb.api.version} + provided + + + com.sun.xml.bind + jaxb-core + ${jaxb.api.version} + provided + + + com.sun.xml.bind + jaxb-impl + ${jaxb.api.version} + provided + + + com.sun.activation + javax.activation + ${javax.activation.version} + provided + + + org.snomed.otf + snomed-owl-toolkit + ${snomed.owl.toolkit.version} + bundle + provided + + + + com.google.inject + guice + + + com.google.inject.extensions + guice-assistedinject + + + com.google.inject.extensions + guice-multibindings + + + + + net.jodah + failsafe + ${failsafe.version} + provided + + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho.version} + true + + + org.eclipse.tycho + tycho-packaging-plugin + + false + false + + + + org.eclipse.tycho + tycho-source-plugin + ${tycho.version} + + + plugin-source + + plugin-source + + + + + + org.eclipse.tycho + target-platform-configuration + ${tycho.version} + + p2 + consider + + + ${project.groupId} + target-platform + ${project.version} + + + + + eclipse-plugin + org.eclipse.osgi + + [3.13.0,3.15.0] + + + + + + p2-installable-unit + org.eclipse.equinox.servletbridge.extensionbundle + + + + eclipse-plugin + org.codehaus.groovy + + ${groovy.version} + + + + eclipse-plugin + com.google.guava + + ${guava.versionRange} + + + + + p2-installable-unit + slf4j.api + + ${slf4j.version} + + + + p2-installable-unit + ch.qos.logback.classic + + ${logback.versionRange} + + + + p2-installable-unit + ch.qos.logback.core + + ${logback.versionRange} + + + + + p2-installable-unit + com.fasterxml.jackson.core.jackson-annotations + + ${jackson.version} + + + + p2-installable-unit + com.fasterxml.jackson.core.jackson-core + + ${jackson.version} + + + + p2-installable-unit + com.fasterxml.jackson.core.jackson-databind + + ${jackson.databind.version} + + + + p2-installable-unit + com.fasterxml.jackson.dataformat.jackson-dataformat-yaml + + ${jackson.version} + + + + p2-installable-unit + com.fasterxml.jackson.dataformat.jackson-dataformat-cbor + + ${jackson.version} + + + + p2-installable-unit + com.fasterxml.jackson.dataformat.jackson-dataformat-csv + + ${jackson.version} + + + + p2-installable-unit + com.fasterxml.jackson.dataformat.jackson-dataformat-xml + + ${jackson.version} + + + + p2-installable-unit + com.fasterxml.jackson.dataformat.jackson-dataformat-afterburner + + ${jackson.version} + + + + + p2-installable-unit + org.apache.commons.collections + + ${commons.collections.versionRange} + + + + p2-installable-unit + org.slf4j.api + + + + + + linux + gtk + x86_64 + + + win32 + win32 + x86_64 + + + + + + org.eclipse.tycho + tycho-p2-director-plugin + ${tycho.version} + + + org.codehaus.plexus + plexus-archiver + 2.4.4 + + + org.codehaus.plexus + plexus-component-api + + + org.codehaus.plexus + plexus-container-default + + + + + + + org.eclipse.tycho + tycho-p2-publisher-plugin + ${tycho.version} + + true + + + + org.eclipse.tycho + tycho-versions-plugin + ${tycho.version} + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + + + + + + org.eclipse.tycho + tycho-compiler-plugin + ${tycho.version} + + false + 11 + 11 + + **/*.groovy + **/*.xtend + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 11 + 11 + + + + org.eclipse.tycho + tycho-surefire-plugin + ${tycho.version} + + false + + + + false + + + + org.eclipse.tycho + tycho-packaging-plugin + ${tycho.version} + + + org.eclipse.tycho.extras + tycho-buildtimestamp-jgit + ${tycho-extras.version} + + + + jgit + + pom.xml + + + + + org.eclipse.tycho + tycho-p2-repository-plugin + ${tycho.version} + + true + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.3 + + + + + + + + + + + + + docs + + + docs + true + + + + documentation + + + + + + + artifactory-releases + https://artifactory.ops.babylontech.co.uk/artifactory/babylon-maven-releases + + + artifactory-snapshots + https://artifactory.ops.babylontech.co.uk/artifactory/babylon-maven-snapshots + + + + + https://github.com/babylonhealth/snow-owl + scm:git:ssh://github.com/babylonhealth/snow-owl.git + scm:git:ssh@github.com:babylonhealth/snow-owl.git + - - https://github.com/b2ihealthcare/snow-owl - scm:git:ssh://github.com/b2ihealthcare/snow-owl.git - scm:git:ssh@github.com:b2ihealthcare/snow-owl.git - - \ No newline at end of file diff --git a/settings.xml b/settings.xml index 4a4b8adf9a2..aa4bc11d82e 100644 --- a/settings.xml +++ b/settings.xml @@ -2,26 +2,16 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> - - - repositories - - true - - - - url/to/local/nexus/instance - ${nexus.url}/content/repositories/snapshots - ${nexus.url}/content/repositories/releases - - - - - nexus_deployment - nexus_deployment_user - nexus_deployment_pass + artifactory-releases + ${env.ARTIFACTORY_USER_RW} + ${env.ARTIFACTORY_PWD_RW} + + + artifactory-snapshots + ${env.ARTIFACTORY_USER_RW} + ${env.ARTIFACTORY_PWD_RW} From 415c2da9edf52f7db6b2186ac3ae4b5908b4b820 Mon Sep 17 00:00:00 2001 From: ivelina-yordanova <56301327+ivelina-yordanova@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:26:11 +0000 Subject: [PATCH 2/7] [chr-1066] - Update (#4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [releng] prepare 6.24.0-SNAPSHOT * SO-3845: Handle ECL expressions in attributes' concept set ... ... definitions in MRCM validation rules * Revert "[releng] prepare 6.24.0-SNAPSHOT" This reverts commit 8cbd3f83463292a8e3c6d757120c27c8943957d4. * [releng] prepare 6.23.1-SNAPSHOT * [releng] release 6.23.1 * [releng] prepare 6.24.0-SNAPSHOT * [snomed.import] Set code system shortname in import details * Added VALUE_SET, MAPPING_SET as allowed values for supportedRefSetType * Exposed the supportedRefSetType XML attribute values. * SO-3853: Register ValueSet and MappingSet to contribute * SO-3864: change cardinality of ValueSet.compose to 0..1 As of https://www.hl7.org/fhir/valueset-definitions.html#ValueSet.compose * SO-3864: return object ID from TransactionContext.add method * SO-3864: set clearResources to true by default in SnowOwlAppRule * [index] Allow setting boost on all ES QueryBuilder instances * [index] Log the number of pending cluster tasks; don't repeat messages * SO-3864: extract common repository APIs to core.rest module * SO-3864: extract common Resource search props to ResourceRestSearch Introduce SnomedReferenceSetRestSearch and `POST /:path/refsets/search` endpoint. * SO-3864: remove unused classes from snomed.core.rest plugin * SO-3864: support dynamic loading of available API docs * SO-3821 Enabled search by mapPriority. * SO-3864: extract common branch aware test infrastructure to test.commons * SO-3864: minor changes to test.commons MANIFEST.MF * SO-3864: expose Elasticsearch Base64 UUID generator as IDs.base64UUID() * SO-3864: expose core.id package * SO-3881: Remove semantic engine projects including previous ... ... implementation of SCG https://snowowl.atlassian.net/browse/SO-3881 * SO-3864: rename ChangeRequest types `core.rest.codesystem.ChangeRequest` to `core.rest.domain.ResourceRequest`. `snomed.core.rest.domain.ChangeRequest` to `snomed.core.rest.domain.SnomedResourceRequest`. * SO-3864: pull up getResourceLocationURI to AbstractRestService * SO-3864: pull up comma joiner and JSON_UTF8 constants to RestExtensions * SO-3864: fix failed SNOMED CT FHIR ValueSet API tests * SO-3881: Implement grammar, parser and tests for SCG v2.3.1 - tests cover all available examples @ https://github.com/IHTSDO/SNOMEDCT-Languages https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Add scg modules to parent pom https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Add missing pom https://snowowl.atlassian.net/browse/SO-3881 * SO-3864: minor API improvements * SO-3864: minor API improvements * SO-3864: add RestExtensions.assertCreated helper * SO-3881: Update ECL parsing tests - ECL v1.3 Brief Syntax examples as of today from https://github.com/IHTSDO/SNOMEDCT-Languages https://snowowl.atlassian.net/browse/SO-3881 * SO-3892: Change member status to active if refset already contains ... ...the inactive concept, do not duplicate members. * SO-3881: Regenerate ECL grammar - renamed the following rules to be in sync with the specification and to avoid collision when ECL is mixed with other grammars: - Refinement -> EclRefinement - FocusConcept -> EclFocusConcept - ConceptReference -> EclConceptReference - AttributeGroup -> EclAttributeGroup - AttributeSet -> EclAttributeSet - removed unused terminal '!' https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Regenerate QL grammar due to ECL changes https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Share basic parser tests for Query Language https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Remove unused files https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Regenerate SCG grammar to synchronize terminal names ... among existing grammar definitions - removed Xtend stubs https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Replace AND, OR, MINUS and COMMA with grammar terminals - this is necessary to avoid collision with other derived language terminals https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Replace AND, OR, MINUS and COMMA with grammar terminals - add 'Filter' suffix to Conjunction, Disjunction and Exclusion grammar rules to distinguish rules and terminals * SO-3881: Share initial Xtext definition of ETL https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Share parser tests for ETL https://snowowl.atlassian.net/browse/SO-3881 * SO-3892: Handle MemberChangeKind.CHANGE as added * SO-3881: Prefer upper case version of AND / OR / MINUS in case of ... ECL serialization - generated extendable Xtext serializer classes - added parsing tests https://snowowl.atlassian.net/browse/SO-3881 * [core] Allow customization of component adjustment during publication * SO-3881: Fix various issues in ETL grammar definition - allow slot name to be unquoted with certain restrictions - fix whitespace in TokenReplacementSlot - introduce custom cardinality rule compared to Ecl.Cardinality - make exclusive terminals optional in integer and decimal ranges https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Add ETL parsing tests to parent pom https://snowowl.atlassian.net/browse/SO-3881 * [history] Ignore many-valued features altogether in HistoryInfoProvider Copy scalar fields to an "empty" CDO revision instead of cloning the original and unsetting the many-valued properties (which can cause an exception, if uninitialized EAttribute lists are present on the revision). * SO-3864: report method not allowed errors properly * SO-3881: Fix issues in ETL grammar definition - rename concept replacement slots for better readability - fix slot integer and slot decimal types - simplify StringReplacementSlot values https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Implement detailed ETL parser tests - added all IHTSDO templates as well https://snowowl.atlassian.net/browse/SO-3881 * [tests] add more specific concept reactivation test cases * SO-3893 #resolve Fix incorrect parentage values when reactivating concept's relationships first then the concept in two different commits. * [export] Create general ExportResult class (filename, UUID pair) * [releng] update changelog with 6.24.0 changes * SO-3881: Remove xtend generated files https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Prevent xtend generated files to be committed https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Share current ABNF syntax for ECL, SCG and ETL https://snowowl.atlassian.net/browse/SO-3881 * [snomed] accept all SctId statuses when publishing them * [releng] update changelog with 6.24.0 changes * SO-3858: Allow specifying namespace in random id generation * [releng] release 6.24.0 * [releng] prepare 6.25.0-SNAPSHOT * SO-3858: Fix generic validation rules, tests, test setup * SO-3858: Extract language member function variable to helper method * [cis] fix config file name of CIS product * [core] support unprotected routes/requests * [snomed] Update remaining references to Rf2ExportResult * SO-3893: Relocate fix for issue to Taxonomies class (7.x, partial). Stated OWL axiom handling is still missing. * [tests] add more specific concept reactivation test cases (7.x) * SO-3853: Register ValueSet and MappingSet to contribute (7.x) * [snomed.import] Set code system shortname in import details (7.x) * [validation] Add reference set type to OWL axiom members in... (7.x) ...GenericValidationRuleTest * [export] Wrap reads into an IndexReadRequest in SnomedRf2ExportRequest * [core] allow multiple unprotected requests to execute in bulk * [core] always include responseTime metric in request log entries * SO-3881: add ETL and SCG core bundles to snomed.core.feature * SO-3864: set clearResources to true by default in SnowOwlAppRule * [core] merge IndexReadRequest functionality into RepositoryRequest * [mrcm] Remove remaining checked in source files from mrcm.model project * [documentation] Remove non-existent project references from MANIFEST.MF * [releng] update changelog with 7.3.0 changes * [releng] release 7.3.0 * [releng] release 7.3.0 * [releng] update README.md with 7.3.0 release links * [releng] prepare 7.4.0-SNAPSHOT * [core] Ensure that all TerminologyRepositoryPlugin subclasses provide... ...a terminology repository initializer instance (used for initializing a default code system entry for each tooling). * [core] Fix AccessControl subclass on RepositoryClearRequest, move... ...factory method of request builder to RepositoryRequests * [core] Implement RepositoryTransactionContext#clearContents The implementation calls stageRemove on all instances of Revision and subclasses that are visible on the context branch using a matchAll query, at the time of method invocation. * [snomed] convert NumberFormatException to BadRequestException * [oomph] Add preference settings for .* package and static imports * [snomed] add support for module() expand * [api] change type of SnomedConcept.definitionStatus to SnomedConcept Support expansion of definition status concept via definitionStatus() expand parameter. Remove DefinitionStatus enum literal. * Update core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/id/IDs.java Co-Authored-By: András Péteri * [core] update javadoc suggested in #472 https://github.com/b2ihealthcare/snow-owl/pull/472#discussion_r373996831 * [api] add `id` filter to `commits` API Related to #473. * [api] support `affectedComponentId` details() expand parameter Related to #473. * Cast to distinguish from Map parameter. * [snomed] remove unnecessary definitionStatusId field from SnomedConcept * [snomed] fix possible definitionStatus NPE when using field selection * SO-3123: Add support for "complex map with map block" type reference sets (#474) - Add SnomedRefSetType enum literal for complex block map - Handle complex block maps in SnomedRefSetUtil methods - Add new "map block" field and refset header to SnomedRf2Headers - Specify supported referenced component type for complex block maps in class RefSetSupport - Add support for complex block map import; update index format - Extend refset member create and update requests with complex block map support; ensure that class cast exceptions are translated to bad requests when inspecting member properties. - Add support for exporting complex block maps to RF2 - Add SnomedDsvExportItemType literal for "map block" field - Add SCTID of complex block map identifier parent concept - Add complex block map type test cases to SNOMED e2e tests - Update FHIR's SnomedConceptMapApiProvider - Update FHIR concept map test cases * Exchanged descriptions. * [core] remove IComponent.ID_FUNCTION * [snomed] fix definitionStatus() expansion issues * [snomed] add acceptabilities() expansion to /descriptions API * [snomed] remove CaseSignificance enum literals * [snomed] support caseSignificance() expansion on descriptions * [core] fix unauthorized issue when executing console commands * SO-3123: Convert mapBlock field to an Integer when importing * SO-3858: Add support for nested, and reverse nested aggregation * [snomed] remove CharacteristicType enum literals * [snomed] remove RelationshipModifier enum literals * [snomed] support characteristicType() and modifier() expansion... ...on relationships * [qa] fix lgtm issue https://lgtm.com/rules/1511220334423/ * Revert "[qa] fix lgtm issue https://lgtm.com/rules/1511220334423/" This reverts commit 628bad4703b82f7af6564e49e9e57fec279e4983. * [snomed] run effective time restore only in non-import scenarios * [qa] suppress lgtm warning https://lgtm.com/rules/1511220334423/ * Upgrade to Elasticsearch 7.x (#478) * [index] bump version to Elasticsearch 7.5.2 * [index] fix tokenizer/analyzer compile errors * [index] use indices level when fetching cluster health * [index] fix EsNode initialization * [index] fix client compile errors * Fix type and other warnings printed by ES API. * [index] add CMS GC config to index tests * Fixes [parent] data too large issues during tests. * [rf2] reduce RF2 exporter scroll timeout to 1m * [tests] fix negative scores in SortIndexTest * [api] remove scrollId and scrollKeepAlive from Java API * Use searchAfter + branch@timestamp for efficient data snapshot paging/scrolling. * [core] remove scrollId from core models and API * [snomed] remove scrollId from snomed models and API * [rest] remove scrollId from core REST API * [snomed] remove scrollId from snomed REST API * [rf2] use branch@timestamp for RF2 exports * [build] add CMS GC settings to all tycho surefire executions * [launch] add CMS GC settings to all test launch configs * [qa] fix lgtm issues https://lgtm.com/rules/2049510531/ * [index] use bool query with should clauses for term filters with more than the configured index.max_terms_count. * Also make it possible to configure both maxTermsCount and resultWindow values from snowowl.yml (repository.index config). * [index] fix some of the type_removal warnings reported by ES * The remaining warnings thrown by the Mapping API, but we cannot remove it yet, due to our dependency to the TCP client infrastructure. Those warnings will be eliminated once ES 8 is out and we decide to upgrade to that (which will remove the TCP client functionality entirely). Fix some java compile warnings as well. And also add some serialVersionUIDs. * [index] fix nested field name in terms queries. Also fix decimal value conversion when number of terms is less than the max_terms_count. * [index] searches should always track total hits accurately * [core] update comments in SearchResourceRequestIterator * [index] aggregations should always track total hits accurately * [index] fix typo * [docker] bump elasticsearch-oss image version to 7.5.2 * [index] prevent unnecessary mapping updates during startup * [qa] fix lgtm issue https://lgtm.com/rules/1930000368/ * [qa] fix lgtm issue https://lgtm.com/rules/9990077/ * [qa] fix lgtm issue https://lgtm.com/rules/11000068/ * [qa] fix lgtm issue https://lgtm.com/rules/9990077/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] ignore lgtm issue https://lgtm.com/rules/1954750296/ in Base64 * [qa] ignore lgtm issue https://lgtm.com/rules/1954750296/ (JavaBinCodec) * [qa] fix lgtm issue https://lgtm.com/rules/1507082716110/ * [snomed] remove InactivationIndicator and AssociationType enum literals Use new InactivationProperties object to specify indicator and association target values during component inactivation. Make processInactivation method generic in SnomedComponentUpdateRequest. * [index] Reorder classpath entries, remove source attachment paths * [dev] fix launch configurations Co-authored-by: Gábor Nagy Co-authored-by: AAAlinaaa Co-authored-by: Mark Czotter Co-authored-by: Balazs Banfai Co-authored-by: Gabriella Deak <45433791+adeakgabi@users.noreply.github.com> Co-authored-by: András Péteri --- CHANGELOG.md | 40 + README.md | 19 +- SnowOwlServer.setup | 12 + .../feature.xml | 2 +- .../pom.xml | 2 +- .../snowowl.yml} | 0 .../pom.xml | 2 +- .../snow-owl-cis.product | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../client/CisSnomedIdentifierService.java | 34 +- .../DefaultSnomedIdentifierService.java | 13 +- cis/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../com.b2international.commons.base/pom.xml | 2 +- .../commons/encoding/Base64.java | 3 +- .../META-INF/MANIFEST.MF | 2 +- .../com.b2international.commons.test/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- commons/com.b2international.commons/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../.launch/index-http-unit-tests.launch | 2 +- .../.launch/index-tcp-unit-tests.launch | 4 +- .../META-INF/MANIFEST.MF | 2 +- .../com.b2international.index.tests/pom.xml | 6 +- .../index/MaxTermsCountTest.java | 74 + .../b2international/index/SortIndexTest.java | 2 +- commons/com.b2international.index/.classpath | 82 +- .../META-INF/MANIFEST.MF | 86 +- .../build.properties | 6 +- commons/com.b2international.index/pom.xml | 8 +- .../index/IndexClientFactory.java | 15 +- .../aggregations/AggregationBuilder.java | 10 + .../index/analyzer/DelimiterTokenizer.java | 64 - .../CharMatcherTokenizer.java | 11 +- .../ComponentTermAnalyzer.java | 6 +- .../index/compat/Highlighting.java | 1 - .../index/compat/TextConstants.java | 4 +- .../index/decimal/ModuleVersion.java | 1 - .../index/es/EsDocumentSearcher.java | 84 +- .../index/es/EsDocumentWriter.java | 9 +- .../index/es/EsIndexClientFactory.java | 2 +- .../com/b2international/index/es/EsNode.java | 9 +- .../index/es/admin/EsIndexAdmin.java | 37 +- .../index/es/client/EsClient.java | 4 +- .../index/es/client/EsClientBase.java | 7 +- .../index/es/client/http/EsHttpClient.java | 12 +- .../index/es/client/tcp/EsTcpClient.java | 15 +- .../index/es/query/EsQueryBuilder.java | 88 +- .../BranchMergeConflictException.java | 4 +- .../revision/RevisionBranchChangeSet.java | 3 +- .../index/revision/RevisionBranchPoint.java | 4 +- .../hadoop/hbase/util/OrderedBytes.java | 1 + .../apache/solr/common/util/JavaBinCodec.java | 1 + .../client/RestHighLevelClientExt.java | 8 - commons/com.b2international.mapdb/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../com.b2international.scripting.api/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- commons/pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../.launch/core-e2e-tests.launch | 6 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 4 +- .../snowowl/core/rest/AllSnowOwlApiTests.java | 4 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 18 +- .../snow-owl-api-docs/src/App.js | 17 +- .../core/rest/AbstractRestService.java | 21 + .../snowowl/core/rest/BaseApiConfig.java | 8 +- .../core/rest/ControllerExceptionMapper.java | 26 +- .../snowowl/core/rest/SnowOwlApiConfig.java | 2 +- .../core/rest/SnowOwlApiRestService.java | 61 + .../core/rest/SnowOwlSecurityConfig.java | 1 + .../rest/branch}/BranchUpdateRestRequest.java | 4 +- .../rest/branch}/CreateBranchRestRequest.java | 2 +- .../rest/branch}/CreateReviewRequest.java | 4 +- .../core/rest/branch}/MergeRestRequest.java | 4 +- .../RepositoryBranchMergeRestService.java | 28 +- .../branch/RepositoryBranchRestService.java | 42 +- .../RepositoryBranchReviewRestService.java | 16 +- .../codesystem/CodeSystemRestService.java | 3 +- .../commit/RepositoryCommitRestService.java | 30 +- .../core/rest/compare/CompareRestRequest.java | 7 +- .../RepositoryBranchCompareRestService.java | 16 +- .../ResourceRequest.java} | 25 +- .../core/rest/domain/ResourceRestSearch.java | 81 + .../snowowl/core/rest/job/JobRestService.java | 12 +- .../ModelAttributeParameterExpanderExt.java | 2 +- .../validation/ValidationRestService.java | 17 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 4 +- core/com.b2international.snowowl.core/pom.xml | 2 +- .../snowowl/core/ApplicationContext.java | 6 +- .../core/authorization/Unprotected.java | 36 + .../snowowl/core/branch/Branches.java | 6 +- .../snowowl/core/domain/ExportResult.java | 10 +- .../snowowl/core/domain/IComponent.java | 10 +- .../domain/PageableCollectionResource.java | 23 +- .../core/domain/TransactionContext.java | 16 +- .../b2international/snowowl/core/id/IDs.java | 28 +- .../snowowl/core/merge/Merges.java | 8 +- .../core/monitoring/MonitoredRequest.java | 17 +- .../core/request/SearchResourceRequest.java | 29 +- .../request/SearchResourceRequestBuilder.java | 40 +- .../SearchResourceRequestIterator.java | 26 +- .../core/terminology/MapTargetTypes.java | 3 + .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 4 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../core/authorization/AuthorizedRequest.java | 5 +- .../core/commit/CommitInfoConverter.java | 40 +- .../core/commit/CommitInfoDetails.java | 5 +- .../commit/CommitInfoGetRequestBuilder.java | 6 +- .../core/commit/CommitInfoSearchRequest.java | 10 +- .../CommitInfoSearchRequestBuilder.java | 10 +- .../snowowl/core/commit/CommitInfos.java | 7 +- .../console/CommandLineAuthenticator.java | 10 +- .../core/console/CommandLineStream.java | 7 +- .../core/console/SnowOwlCommandProvider.java | 4 +- .../core/repository/RepositoryBuilder.java | 9 +- .../core/repository/RepositoryPlugin.java | 26 +- .../RepositoryTransactionContext.java | 47 +- .../TerminologyRepositoryInitializer.java | 10 +- .../TerminologyRepositoryPlugin.java | 6 +- .../core/validation/ValidationRequests.java | 8 +- .../eval/ValidationRuleEvaluator.java | 16 +- .../issue/ValidationIssueSearchRequest.java | 4 +- .../validation/issue/ValidationIssues.java | 7 +- .../rule/ValidationRuleSearchRequest.java | 4 +- .../core/validation/rule/ValidationRules.java | 7 +- .../ValidationWhiteListSearchRequest.java | 4 +- .../whitelist/ValidationWhiteLists.java | 7 +- .../snowowl/datastore/CodeSystemVersions.java | 6 +- .../snowowl/datastore/CodeSystems.java | 6 +- .../datastore/config/IndexConfiguration.java | 23 +- .../converter/BaseResourceConverter.java | 10 +- .../converter/ResourceConverter.java | 5 +- .../index/BaseRepositoryPreCommitHook.java | 12 +- .../datastore/oplock/DatastoreLocks.java | 8 +- .../oplock/DatastoreOperationLockManager.java | 2 +- .../remotejobs/RemoteJobTracker.java | 4 +- .../datastore/remotejobs/RemoteJobs.java | 6 +- .../request/BranchGetRequestBuilder.java | 4 +- .../request/BranchRequestBuilder.java | 6 +- .../request/BranchSearchRequest.java | 8 +- .../request/BranchSearchRequestBuilder.java | 4 +- .../request/CreateMergeRequestBuilder.java | 4 +- .../datastore/request/IndexReadRequest.java | 54 - .../RepositoryCommitRequestBuilder.java | 8 +- .../RepositoryIndexRequestBuilder.java | 38 - .../datastore/request/RepositoryRequest.java | 22 +- .../request/RepositoryRequestBuilder.java | 11 +- .../datastore/request/RepositoryRequests.java | 8 +- .../request/ReviewCreateRequestBuilder.java | 4 +- .../request/RevisionIndexRequestBuilder.java | 8 +- .../request/SearchIndexResourceRequest.java | 27 +- .../datastore/request/SearchMergeRequest.java | 2 +- .../compare/BranchCompareRequestBuilder.java | 6 +- .../request/job/SearchJobRequest.java | 6 +- .../repository/RepositoryClearRequest.java | 16 +- .../RepositoryClearRequestBuilder.java | 12 +- .../repository/RepositoryGetRequest.java | 2 +- .../request/system/ServerInfoGetRequest.java | 4 +- .../CodeSystemVersionCreateRequest.java | 15 +- .../core/request/CodeSystemCreateRequest.java | 6 +- .../request/CodeSystemGetRequestBuilder.java | 6 +- .../core/request/CodeSystemSearchRequest.java | 6 +- .../CodeSystemSearchRequestBuilder.java | 6 +- .../CodeSystemVersionSearchRequest.java | 6 +- ...CodeSystemVersionSearchRequestBuilder.java | 6 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../snowowl/identity/domain/Users.java | 4 +- .../identity/request/UserLoginRequest.java | 4 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- core/pom.xml | 2 +- dist/pom.xml | 2 +- docker/docker-compose.yml | 2 +- documentation/META-INF/MANIFEST.MF | 5 +- documentation/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../model/codesystem/IConceptProperty.java | 64 +- .../core/model/codesystem/LookupRequest.java | 129 +- .../fhir/core/model/valueset/ValueSet.java | 22 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../.launch/fhir-api-tests.launch | 4 +- .../.launch/fhir-unit-tests.launch | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../snowowl/fhir/tests/AllFhirRestTests.java | 7 +- .../conceptmap/SnomedConceptMapRestTest.java | 2 + .../TestMapTypeReferenceSetCreator.java | 64 +- .../TranslateSnomedConceptMapRestTest.java | 82 +- .../valueset/SnomedValueSetRestTest.java | 6 +- .../valueset/TestReferenceSetCreator.java | 21 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../snowowl/core/rest/FhirApiConfig.java | 4 +- .../fhir/rest/FhirConceptMapRestService.java | 2 +- .../fhir/rest/StructureDefinitionService.java | 6 +- fhir/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- net4j/com.b2international.snowowl.rpc/pom.xml | 2 +- net4j/pom.xml | 2 +- pom.xml | 55 +- .../category.xml | 16 +- .../pom.xml | 2 +- .../snow-owl-oss.product | 2 +- releng/pom.xml | 2 +- releng/target-platform/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../snomed/common/SnomedConstants.java | 10 +- .../snomed/common/SnomedRf2Headers.java | 20 +- .../feature.xml | 16 +- .../pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../.launch/snomed-e2e-tests (cis).launch | 6 +- .../.launch/snomed-e2e-tests.launch | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../core/io/SnomedRefSetDSVExportTest.java | 15 +- .../snomed/core/issue/EclSerializerTest.java | 2 +- ...IssueSO2503RemoteJobDynamicMappingFix.java | 2 +- .../core/rest/AbstractSnomedApiTest.java | 101 +- .../snomed/core/rest/AllSnomedApiTests.java | 7 +- ...3019FixDeletionOfReferringMembersTest.java | 4 +- .../core/rest/SnomedApiTestConstants.java | 5 +- .../rest/SnomedCompareRestRequestTest.java | 2 +- .../rest/SnomedComponentRestRequests.java | 43 +- .../snomed/core/rest/SnomedComponentType.java | 14 +- .../core/rest/SnomedExportRestRequests.java | 3 +- .../core/rest/SnomedMergingRestRequests.java | 2 +- ...edReferenceSetDeletionPerformanceTest.java | 11 +- .../snomed/core/rest/SnomedRestFixtures.java | 86 +- .../rest/branches/SnomedBranchingApiTest.java | 57 +- .../rest/branches/SnomedMergeApiTest.java | 118 +- .../branches/SnomedMergeConflictTest.java | 44 +- .../rest/branches/SnomedReviewApiTest.java | 29 +- .../SnomedClassificationApiTest.java | 26 +- .../rest/components/SnomedConceptApiTest.java | 428 +- .../components/SnomedDescriptionApiTest.java | 144 +- .../SnomedModuleDependencyRefsetTest.java | 22 +- .../rest/components/SnomedRefSetApiTest.java | 12 +- .../components/SnomedRefSetBulkApiTest.java | 2 +- .../components/SnomedRefSetMemberApiTest.java | 7 +- .../SnomedRefSetMemberParameterizedTest.java | 26 +- .../SnomedRefSetParameterizedTest.java | 3 +- .../components/SnomedRelationshipApiTest.java | 21 +- .../rest/ext/SnomedExtensionCreationTest.java | 5 +- .../ext/SnomedExtensionDowngradeTest.java | 20 +- .../rest/ext/SnomedExtensionUpgradeTest.java | 278 +- .../ext/SnomedExtensionVersioningTest.java | 4 +- .../core/rest/io/SnomedExportApiTest.java | 98 +- .../core/rest/io/SnomedImportApiTest.java | 7 +- .../rest/io/SnomedImportRowValidatorTest.java | 4 +- .../SnomedConceptCreatePerformanceTest.java | 2 +- .../rest/perf/SnomedMergePerformanceTest.java | 8 +- .../versioning/SnomedVersioningApiTest.java | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../snowowl/core/rest/SnomedApiConfig.java | 5 +- .../core/rest/AbstractSnomedRestService.java | 6 +- .../rest/SnomedClassificationRestService.java | 32 +- .../core/rest/SnomedConceptRestService.java | 18 +- .../rest/SnomedDescriptionRestService.java | 17 +- .../core/rest/SnomedExportRestService.java | 10 +- .../core/rest/SnomedImportRestService.java | 9 +- .../SnomedReferenceSetMemberRestService.java | 17 +- .../rest/SnomedReferenceSetRestService.java | 99 +- .../rest/SnomedRelationshipRestService.java | 21 +- ...medRepositoryBranchCompareRestService.java | 33 + ...omedRepositoryBranchMergeRestService.java} | 23 +- .../SnomedRepositoryBranchRestService.java} | 23 +- ...omedRepositoryBranchReviewRestService.java | 33 + .../SnomedRepositoryCommitRestService.java | 33 + .../AbstractSnomedComponentRestUpdate.java | 15 +- .../core/rest/domain/ChangeRequest.java | 63 - .../domain/ExpandableSnomedRelationship.java | 153 - .../rest/domain/SnomedConceptRestSearch.java | 79 +- .../rest/domain/SnomedConceptRestUpdate.java | 71 +- .../domain/SnomedDescriptionRestInput.java | 20 +- .../domain/SnomedDescriptionRestSearch.java | 85 +- .../domain/SnomedDescriptionRestUpdate.java | 50 +- .../domain/SnomedInboundRelationships.java | 60 - .../domain/SnomedOutboundRelationships.java | 56 - .../SnomedReferenceSetMemberRestSearch.java | 83 +- ...java => SnomedReferenceSetRestSearch.java} | 35 +- .../domain/SnomedRelationshipRestInput.java | 37 +- .../domain/SnomedRelationshipRestSearch.java | 87 +- .../domain/SnomedRelationshipRestUpdate.java | 26 +- ...equest.java => SnomedResourceRequest.java} | 38 +- .../ClassificationRunNotFoundException.java | 35 - .../ExportRunNotFoundException.java | 35 - .../FullySpecifiedNameNotFoundException.java | 35 - .../PreferredTermNotFoundException.java | 35 - .../exceptions/SnomedExportException.java | 35 - ...dImportConfigurationNotFoundException.java | 39 - .../rest/services/FsnJoinerOperation.java | 4 +- .../services/ISnomedRf2ImportService.java | 9 +- .../rest/services/SnomedRf2ImportService.java | 5 +- .../.launch/snomed-core-unit-tests.launch | 5 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 5 +- ...lationshipIndexEntrySerializationTest.java | 8 +- .../META-INF/MANIFEST.MF | 5 +- .../pom.xml | 2 +- .../snomed/core/cli/SnomedCommand.java | 6 +- .../core/domain/AcceptabilityMembership.java | 66 + .../snomed/core/domain/AssociationTarget.java | 72 + .../snomed/core/domain/AssociationType.java | 107 - .../snomed/core/domain/CaseSignificance.java | 83 - .../core/domain/CharacteristicType.java | 98 - .../domain/CharacteristicTypePredicates.java | 123 - .../snomed/core/domain/DefinitionStatus.java | 78 - .../DescriptionInactivationIndicator.java | 121 - .../core/domain/InactivationIndicator.java | 119 - .../core/domain/InactivationProperties.java | 74 + .../core/domain/InactivationReason.java | 174 - .../core/domain/RelationshipModifier.java | 77 - .../snomed/core/domain/SnomedComponent.java | 22 +- .../snomed/core/domain/SnomedConcept.java | 131 +- .../snomed/core/domain/SnomedConcepts.java | 8 +- .../core/domain/SnomedCoreComponent.java | 114 +- .../snomed/core/domain/SnomedDescription.java | 112 +- .../core/domain/SnomedDescriptions.java | 7 +- .../core/domain/SnomedRelationship.java | 39 +- .../core/domain/SnomedRelationships.java | 7 +- .../domain/constraint/SnomedConstraints.java | 7 +- .../core/domain/refset/MemberChange.java | 9 +- .../core/domain/refset/MemberChangeImpl.java | 8 +- .../core/domain/refset/SnomedRefSetType.java | 38 +- .../refset/SnomedReferenceSetMember.java | 7 + .../refset/SnomedReferenceSetMembers.java | 7 +- .../domain/refset/SnomedReferenceSets.java | 7 +- .../snomed/core/ecl/DefaultEclSerializer.java | 6 +- .../core/ecl/SnomedEclEvaluationRequest.java | 8 +- .../ecl/SnomedEclRefinementEvaluator.java | 10 +- .../snomed/core/ecl/SnomedEclRewriter.java | 24 +- .../snomed/core/mrcm/io/MrcmCommand.java | 16 +- .../core/ql/SnomedQueryEvaluationRequest.java | 6 +- ...plexBlockMapReferenceSetMemberBuilder.java | 96 + .../snomed/core/store/SnomedComponents.java | 11 +- .../core/store/SnomedConceptBuilder.java | 18 +- ...ncreteDomainReferenceSetMemberBuilder.java | 12 +- .../core/store/SnomedDescriptionBuilder.java | 14 +- .../core/store/SnomedRelationshipBuilder.java | 24 +- .../core/version/SnomedVersioningRequest.java | 4 +- .../snomed/datastore/CaseSignificance.java | 125 - .../snomed/datastore/SnomedRefSetUtil.java | 18 +- .../converter/InactivationExpander.java | 115 - .../InactivationPropertiesExpander.java | 99 + .../datastore/converter/MembersExpander.java | 4 +- .../datastore/converter/ModuleExpander.java | 67 + .../converter/SnomedConceptConverter.java | 95 +- .../converter/SnomedConstraintConverter.java | 6 +- .../converter/SnomedDescriptionConverter.java | 154 +- .../SnomedReferenceSetConverter.java | 7 +- .../SnomedReferenceSetMemberConverter.java | 9 +- .../SnomedRelationshipConverter.java | 151 +- .../change/SnomedRepositoryPreCommitHook.java | 33 +- .../index/entry/SnomedConceptDocument.java | 25 +- .../entry/SnomedDescriptionIndexEntry.java | 21 +- .../entry/SnomedRefSetMemberIndexEntry.java | 45 +- .../entry/SnomedRelationshipIndexEntry.java | 15 +- .../taxonomy/ReasonerTaxonomyBuilder.java | 20 +- .../internal/rf2/SnomedDsvExportItemType.java | 5 +- ...seSnomedComponentUpdateRequestBuilder.java | 10 +- .../EvaluateQueryRefSetMemberRequest.java | 32 +- .../QueryRefSetMemberUpdateRequest.java | 14 +- .../datastore/request/RefSetSupport.java | 3 +- .../SnomedAssociationTargetUpdateRequest.java | 49 +- ...edComplexBlockMapMemberCreateDelegate.java | 89 + ...edComplexBlockMapMemberUpdateDelegate.java | 81 + .../request/SnomedComponentUpdateRequest.java | 108 +- .../request/SnomedConceptCreateRequest.java | 26 +- .../SnomedConceptCreateRequestBuilder.java | 11 +- .../request/SnomedConceptSearchRequest.java | 4 +- .../SnomedConceptSearchRequestBuilder.java | 4 +- .../request/SnomedConceptUpdateRequest.java | 146 +- .../SnomedConceptUpdateRequestBuilder.java | 28 +- ...medConcreteDomainMemberCreateDelegate.java | 5 +- .../SnomedConstraintSearchRequest.java | 4 +- .../SnomedDescriptionCreateRequest.java | 72 +- ...SnomedDescriptionCreateRequestBuilder.java | 20 +- .../SnomedDescriptionSearchRequest.java | 4 +- ...SnomedDescriptionSearchRequestBuilder.java | 39 +- .../SnomedDescriptionUpdateRequest.java | 128 +- ...SnomedDescriptionUpdateRequestBuilder.java | 28 +- .../request/SnomedOWLAxiomHelper.java | 21 +- .../SnomedRefSetMemberCreateRequest.java | 43 +- .../SnomedRefSetMemberSearchRequest.java | 9 +- .../SnomedRefSetMemberUpdateRequest.java | 40 +- .../request/SnomedRefSetSearchRequest.java | 4 +- .../SnomedRefSetSearchRequestBuilder.java | 39 +- .../SnomedRelationshipCreateRequest.java | 32 +- ...nomedRelationshipCreateRequestBuilder.java | 21 +- .../SnomedRelationshipSearchRequest.java | 4 +- .../SnomedRelationshipUpdateRequest.java | 53 +- ...nomedRelationshipUpdateRequestBuilder.java | 21 +- .../SnomedRepositoryCommitRequestBuilder.java | 11 +- .../request/dsv/SnomedDSVExportRequest.java | 4 +- .../SnomedSimpleTypeRefSetDSVExporter.java | 14 +- .../request/rf2/SnomedRf2ExportRequest.java | 24 +- .../rf2/SnomedRf2ExportRequestBuilder.java | 10 +- .../rf2/SnomedRf2ImportRequestBuilder.java | 9 +- .../rf2/exporter/Rf2ConceptExporter.java | 12 +- .../rf2/exporter/Rf2DescriptionExporter.java | 6 +- .../request/rf2/exporter/Rf2Exporter.java | 15 +- .../exporter/Rf2LanguageRefSetExporter.java | 3 +- .../rf2/exporter/Rf2RefSetExporter.java | 9 +- .../rf2/exporter/Rf2RelationshipExporter.java | 20 +- .../Rf2ComplexBlockMapRefSetContentType.java | 85 + .../rf2/importer/Rf2ConceptContentType.java | 6 +- .../importer/Rf2DescriptionContentType.java | 5 +- .../request/rf2/importer/Rf2Format.java | 3 +- .../importer/Rf2RelationshipContentType.java | 8 +- .../rf2/importer/Rf2TransactionContext.java | 27 +- ...omedConcreteDomainImportPostProcessor.java | 18 +- .../snomed/datastore/taxonomy/Taxonomies.java | 54 +- .../.project | 28 - .../META-INF/MANIFEST.MF | 16 - .../build.properties | 7 - .../plugin.properties | 2 - .../plugin.xml | 10 - .../pom.xml | 12 - .../queryast.ecore | 53 - .../queryast.genmodel | 49 - .../dsl/query/ChainedQueryRewriter.java | 31 - .../dsl/query/GraphMLExportRewriter.java | 150 - .../dsl/query/SyntaxErrorException.java | 54 - .../snomed/dsl/query/ast/AndClause.java | 32 - .../snomed/dsl/query/ast/AttributeClause.java | 40 - .../snomed/dsl/query/ast/BinaryRValue.java | 56 - .../snomed/dsl/query/ast/ConceptRef.java | 81 - .../snomed/dsl/query/ast/NotClause.java | 35 - .../dsl/query/ast/NumericDataClause.java | 121 - .../dsl/query/ast/NumericDataGroupClause.java | 65 - .../snomed/dsl/query/ast/OrClause.java | 32 - .../snowowl/snomed/dsl/query/ast/RValue.java | 39 - .../snowowl/snomed/dsl/query/ast/RefSet.java | 40 - .../snomed/dsl/query/ast/SubExpression.java | 34 - .../snomed/dsl/query/ast/UnaryRValue.java | 35 - .../dsl/query/queryast/AttributeClause.java | 30 - .../query/queryast/AttributeClauseGroup.java | 30 - .../dsl/query/queryast/BinaryRValue.java | 89 - .../snomed/dsl/query/queryast/ConceptRef.java | 119 - .../dsl/query/queryast/NumericDataClause.java | 143 - .../queryast/NumericDataGroupClause.java | 116 - .../snomed/dsl/query/queryast/RValue.java | 34 - .../snomed/dsl/query/queryast/RefSet.java | 62 - .../dsl/query/queryast/SubExpression.java | 30 - .../query/queryast/SubsumptionQuantifier.java | 247 - .../dsl/query/queryast/UnaryRValue.java | 62 - .../dsl/query/queryast/ecoreastFactory.java | 136 - .../dsl/query/queryast/ecoreastPackage.java | 1107 - .../query/queryast/impl/AndClauseImpl.java | 56 - .../impl/AttributeClauseGroupImpl.java | 60 - .../queryast/impl/AttributeClauseImpl.java | 56 - .../query/queryast/impl/BinaryRValueImpl.java | 264 - .../query/queryast/impl/ConceptRefImpl.java | 276 - .../query/queryast/impl/NotClauseImpl.java | 59 - .../queryast/impl/NumericDataClauseImpl.java | 335 - .../impl/NumericDataGroupClauseImpl.java | 299 - .../dsl/query/queryast/impl/OrClauseImpl.java | 57 - .../dsl/query/queryast/impl/RValueImpl.java | 64 - .../dsl/query/queryast/impl/RefSetImpl.java | 162 - .../queryast/impl/SubExpressionImpl.java | 60 - .../query/queryast/impl/UnaryRValueImpl.java | 186 - .../queryast/impl/ecoreastFactoryImpl.java | 268 - .../queryast/impl/ecoreastPackageImpl.java | 624 - .../queryast/util/ecoreastAdapterFactory.java | 360 - .../query/queryast/util/ecoreastSwitch.java | 405 - .../query/walker/ESCGExpressionVisitor.java | 67 - .../query/walker/VisitingQueryRewriter.java | 35 - .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../snomed/ecl/tests/EclInjectorProvider.java | 9 +- .../snomed/ecl/tests/EclParsingTest.xtend | 431 +- .../.gitignore | 2 - .../.launch/Generate ECL.launch | 14 - .../ECL_v1.3_ABNF_brief_syntax_20170717.txt | 74 + .../META-INF/MANIFEST.MF | 2 +- .../build.properties | 3 +- .../model/generated/Ecl.ecore | 28 +- .../model/generated/Ecl.genmodel | 18 +- .../pom.xml | 2 +- .../snomed/ecl/AbstractEclRuntimeModule.java | 2 +- .../snowowl/snomed/ecl/Ecl.xtextbin | Bin 8826 -> 9175 bytes .../ecl/EclStandaloneSetupGenerated.java | 2 +- .../snowowl/snomed/ecl/ecl/AncestorOf.java | 6 +- .../snomed/ecl/ecl/AncestorOrSelfOf.java | 6 +- .../ecl/ecl/AndExpressionConstraint.java | 10 +- .../snowowl/snomed/ecl/ecl/AndRefinement.java | 24 +- .../snowowl/snomed/ecl/ecl/Any.java | 2 +- .../snomed/ecl/ecl/AttributeComparison.java | 6 +- .../snomed/ecl/ecl/AttributeConstraint.java | 20 +- .../snomed/ecl/ecl/AttributeValueEquals.java | 2 +- .../ecl/ecl/AttributeValueNotEquals.java | 2 +- .../snomed/ecl/ecl/BooleanValueEquals.java | 6 +- .../snomed/ecl/ecl/BooleanValueNotEquals.java | 6 +- .../snowowl/snomed/ecl/ecl/Cardinality.java | 10 +- .../snowowl/snomed/ecl/ecl/ChildOf.java | 6 +- .../snowowl/snomed/ecl/ecl/Comparison.java | 2 +- .../snomed/ecl/ecl/DataTypeComparison.java | 2 +- .../snomed/ecl/ecl/DecimalValueEquals.java | 6 +- .../ecl/ecl/DecimalValueGreaterThan.java | 6 +- .../ecl/DecimalValueGreaterThanEquals.java | 6 +- .../snomed/ecl/ecl/DecimalValueLessThan.java | 6 +- .../ecl/ecl/DecimalValueLessThanEquals.java | 6 +- .../snomed/ecl/ecl/DecimalValueNotEquals.java | 6 +- .../snowowl/snomed/ecl/ecl/DescendantOf.java | 6 +- .../snomed/ecl/ecl/DescendantOrSelfOf.java | 6 +- .../ecl/ecl/DottedExpressionConstraint.java | 10 +- ...ibuteGroup.java => EclAttributeGroup.java} | 34 +- ...eference.java => EclConceptReference.java} | 28 +- .../snowowl/snomed/ecl/ecl/EclFactory.java | 8 +- .../snowowl/snomed/ecl/ecl/EclPackage.java | 148 +- .../{Refinement.java => EclRefinement.java} | 8 +- .../ecl/ExclusionExpressionConstraint.java | 10 +- .../snomed/ecl/ecl/ExpressionConstraint.java | 2 +- .../snomed/ecl/ecl/IntegerValueEquals.java | 6 +- .../ecl/ecl/IntegerValueGreaterThan.java | 6 +- .../ecl/IntegerValueGreaterThanEquals.java | 6 +- .../snomed/ecl/ecl/IntegerValueLessThan.java | 6 +- .../ecl/ecl/IntegerValueLessThanEquals.java | 6 +- .../snomed/ecl/ecl/IntegerValueNotEquals.java | 6 +- .../snowowl/snomed/ecl/ecl/MemberOf.java | 6 +- .../snomed/ecl/ecl/NestedExpression.java | 6 +- .../snomed/ecl/ecl/NestedRefinement.java | 14 +- .../ecl/ecl/OrExpressionConstraint.java | 10 +- .../snowowl/snomed/ecl/ecl/OrRefinement.java | 24 +- .../snowowl/snomed/ecl/ecl/ParentOf.java | 6 +- .../ecl/ecl/RefinedExpressionConstraint.java | 16 +- .../snowowl/snomed/ecl/ecl/Script.java | 6 +- .../snomed/ecl/ecl/StringValueEquals.java | 6 +- .../snomed/ecl/ecl/StringValueNotEquals.java | 6 +- .../snomed/ecl/ecl/impl/AncestorOfImpl.java | 4 +- .../ecl/ecl/impl/AncestorOrSelfOfImpl.java | 4 +- .../ecl/impl/AndExpressionConstraintImpl.java | 6 +- .../ecl/ecl/impl/AndRefinementImpl.java | 38 +- .../snowowl/snomed/ecl/ecl/impl/AnyImpl.java | 2 +- .../ecl/ecl/impl/AttributeComparisonImpl.java | 4 +- .../ecl/ecl/impl/AttributeConstraintImpl.java | 12 +- .../ecl/impl/AttributeValueEqualsImpl.java | 2 +- .../ecl/impl/AttributeValueNotEqualsImpl.java | 2 +- .../ecl/ecl/impl/BooleanValueEqualsImpl.java | 6 +- .../ecl/impl/BooleanValueNotEqualsImpl.java | 6 +- .../snomed/ecl/ecl/impl/CardinalityImpl.java | 6 +- .../snomed/ecl/ecl/impl/ChildOfImpl.java | 4 +- .../snomed/ecl/ecl/impl/ComparisonImpl.java | 2 +- .../ecl/ecl/impl/DataTypeComparisonImpl.java | 2 +- .../ecl/ecl/impl/DecimalValueEqualsImpl.java | 4 +- .../DecimalValueGreaterThanEqualsImpl.java | 4 +- .../ecl/impl/DecimalValueGreaterThanImpl.java | 4 +- .../impl/DecimalValueLessThanEqualsImpl.java | 4 +- .../ecl/impl/DecimalValueLessThanImpl.java | 4 +- .../ecl/impl/DecimalValueNotEqualsImpl.java | 4 +- .../snomed/ecl/ecl/impl/DescendantOfImpl.java | 4 +- .../ecl/ecl/impl/DescendantOrSelfOfImpl.java | 4 +- .../impl/DottedExpressionConstraintImpl.java | 6 +- ...upImpl.java => EclAttributeGroupImpl.java} | 72 +- ...Impl.java => EclConceptReferenceImpl.java} | 40 +- .../snomed/ecl/ecl/impl/EclFactoryImpl.java | 72 +- .../snomed/ecl/ecl/impl/EclPackageImpl.java | 191 +- ...nementImpl.java => EclRefinementImpl.java} | 12 +- .../ExclusionExpressionConstraintImpl.java | 6 +- .../ecl/impl/ExpressionConstraintImpl.java | 2 +- .../ecl/ecl/impl/IntegerValueEqualsImpl.java | 4 +- .../IntegerValueGreaterThanEqualsImpl.java | 4 +- .../ecl/impl/IntegerValueGreaterThanImpl.java | 4 +- .../impl/IntegerValueLessThanEqualsImpl.java | 4 +- .../ecl/impl/IntegerValueLessThanImpl.java | 4 +- .../ecl/impl/IntegerValueNotEqualsImpl.java | 4 +- .../snomed/ecl/ecl/impl/MemberOfImpl.java | 4 +- .../ecl/ecl/impl/NestedExpressionImpl.java | 4 +- .../ecl/ecl/impl/NestedRefinementImpl.java | 22 +- .../ecl/impl/OrExpressionConstraintImpl.java | 6 +- .../snomed/ecl/ecl/impl/OrRefinementImpl.java | 38 +- .../snomed/ecl/ecl/impl/ParentOfImpl.java | 4 +- .../impl/RefinedExpressionConstraintImpl.java | 22 +- .../snomed/ecl/ecl/impl/ScriptImpl.java | 4 +- .../ecl/ecl/impl/StringValueEqualsImpl.java | 4 +- .../ecl/impl/StringValueNotEqualsImpl.java | 4 +- .../ecl/ecl/util/EclAdapterFactory.java | 32 +- .../snomed/ecl/ecl/util/EclSwitch.java | 38 +- .../antlr/EclAntlrTokenFileProvider.java | 2 +- .../snomed/ecl/parser/antlr/EclParser.java | 2 +- .../parser/antlr/internal/InternalEclParser.g | 228 +- .../antlr/internal/InternalEclParser.java | 873 +- .../antlr/internal/InternalEclParser.tokens | 53 +- .../ecl/parser/antlr/lexer/InternalEclLexer.g | 20 +- .../parser/antlr/lexer/InternalEclLexer.java | 743 +- .../antlr/lexer/InternalEclLexer.tokens | 53 +- .../ecl/scoping/AbstractEclScopeProvider.java | 2 +- ...java => AbstractEclSemanticSequencer.java} | 178 +- ...ava => AbstractEclSyntacticSequencer.java} | 88 +- .../snomed/ecl/services/EclGrammarAccess.java | 488 +- .../ecl/validation/AbstractEclValidator.java | 3 +- .../snowowl/snomed/ecl/Ecl.xtext | 82 +- .../snowowl/snomed/ecl/GenerateEcl.mwe2 | 7 +- .../converter/EclValueConverterService.java | 2 +- .../ecl/serializer/EclSemanticSequencer.java} | 10 +- .../ecl/serializer/EclSyntacticSequencer.java | 50 + .../snomed/ecl/validation/EclValidator.java | 4 +- .../.classpath | 10 + .../.project | 10 +- .../META-INF/MANIFEST.MF | 12 + .../build.properties | 4 +- .../pom.xml | 67 + .../snomed/etl/tests/EtlInjectorProvider.java | 81 + .../snomed/etl/tests/EtlParsingTest.xtend | 1962 ++ .../xtend-gen/.gitignore | 5 + .../.classpath | 1 + .../.project | 10 +- .../ETL_v1.0_ABNF_syntax_20170721.txt | 142 + .../META-INF/MANIFEST.MF | 30 + .../build.properties | 18 + .../model/generated/Etl.ecore | 132 + .../model/generated/Etl.genmodel | 113 + .../plugin.xml | 13 + .../pom.xml | 17 + .../snomed/etl/AbstractEtlRuntimeModule.java | 226 + .../snowowl/snomed/etl/Etl.xtextbin | Bin 0 -> 14786 bytes .../etl/EtlStandaloneSetupGenerated.java | 54 + .../snowowl/snomed/etl/etl/Attribute.java | 106 + .../snomed/etl/etl/AttributeGroup.java | 75 + .../snomed/etl/etl}/AttributeValue.java | 14 +- .../etl/etl/ConceptIdReplacementSlot.java} | 19 +- .../snomed/etl/etl/ConceptReference.java | 105 + .../etl/etl/ConceptReplacementSlot.java | 85 + .../etl/etl/ConcreteValueReplacementSlot.java | 59 + .../etl/etl/DecimalReplacementSlot.java | 50 + .../snowowl/snomed/etl/etl/DecimalValue.java | 60 + .../snomed/etl/etl/EtlCardinality.java | 83 + .../snowowl/snomed/etl/etl/EtlFactory.java | 326 + .../snowowl/snomed/etl/etl/EtlPackage.java | 2658 +++ .../etl/etl/ExpressionReplacementSlot.java | 31 + .../snomed/etl/etl/ExpressionTemplate.java | 106 + .../snowowl/snomed/etl/etl/FocusConcept.java | 83 + .../etl/etl/IntegerReplacementSlot.java | 50 + .../snowowl/snomed/etl/etl/IntegerValue.java | 59 + .../snowowl/snomed/etl/etl/Refinement.java | 65 + .../snowowl/snomed/etl/etl/SlotDecimal.java} | 20 +- .../etl/etl/SlotDecimalMaximumValue.java | 85 + .../etl/etl/SlotDecimalMinimumValue.java | 85 + .../snomed/etl/etl/SlotDecimalRange.java | 82 + .../snomed/etl/etl/SlotDecimalValue.java | 60 + .../snowowl/snomed/etl/etl/SlotInteger.java} | 20 +- .../etl/etl/SlotIntegerMaximumValue.java | 83 + .../etl/etl/SlotIntegerMinimumValue.java | 83 + .../snomed/etl/etl/SlotIntegerRange.java | 82 + .../snomed/etl/etl/SlotIntegerValue.java | 59 + .../snomed/etl/etl/StringReplacementSlot.java | 50 + .../snowowl/snomed/etl/etl/StringValue.java | 59 + .../snowowl/snomed/etl/etl/SubExpression.java | 73 + .../etl/etl/TemplateInformationSlot.java | 83 + .../snomed/etl/etl/TokenReplacementSlot.java | 75 + .../etl/etl/impl/AttributeGroupImpl.java | 257 + .../snomed/etl/etl/impl/AttributeImpl.java | 357 + .../etl/etl/impl/AttributeValueImpl.java | 55 + .../impl/ConceptIdReplacementSlotImpl.java | 53 + .../etl/etl/impl/ConceptReferenceImpl.java | 339 + .../etl/impl/ConceptReplacementSlotImpl.java | 283 + .../ConcreteValueReplacementSlotImpl.java | 191 + .../etl/impl/DecimalReplacementSlotImpl.java | 179 + .../snomed/etl/etl/impl/DecimalValueImpl.java | 193 + .../etl/etl/impl/EtlCardinalityImpl.java | 250 + .../snomed/etl/etl/impl/EtlFactoryImpl.java | 511 + .../snomed/etl/etl/impl/EtlPackageImpl.java | 1500 ++ .../impl/ExpressionReplacementSlotImpl.java | 53 + .../etl/etl/impl/ExpressionTemplateImpl.java | 356 + .../snomed/etl/etl/impl/FocusConceptImpl.java | 283 + .../etl/impl/IntegerReplacementSlotImpl.java | 179 + .../snomed/etl/etl/impl/IntegerValueImpl.java | 191 + .../snomed/etl/etl/impl/RefinementImpl.java | 221 + .../snomed/etl/etl/impl/SlotDecimalImpl.java | 55 + .../etl/impl/SlotDecimalMaximumValueImpl.java | 252 + .../etl/impl/SlotDecimalMinimumValueImpl.java | 252 + .../etl/etl/impl/SlotDecimalRangeImpl.java | 282 + .../etl/etl/impl/SlotDecimalValueImpl.java | 193 + .../snomed/etl/etl/impl/SlotIntegerImpl.java | 55 + .../etl/impl/SlotIntegerMaximumValueImpl.java | 250 + .../etl/impl/SlotIntegerMinimumValueImpl.java | 250 + .../etl/etl/impl/SlotIntegerRangeImpl.java | 282 + .../etl/etl/impl/SlotIntegerValueImpl.java | 191 + .../etl/impl/StringReplacementSlotImpl.java | 175 + .../snomed/etl/etl/impl/StringValueImpl.java | 191 + .../etl/etl/impl/SubExpressionImpl.java | 256 + .../etl/impl/TemplateInformationSlotImpl.java | 282 + .../etl/impl/TokenReplacementSlotImpl.java | 238 + .../etl/etl/util/EtlAdapterFactory.java | 745 + .../snomed/etl/etl/util/EtlSwitch.java | 840 + .../antlr/EtlAntlrTokenFileProvider.java} | 13 +- .../snomed/etl/parser/antlr/EtlParser.java | 52 + .../parser/antlr/internal/InternalEtlParser.g | 5786 +++++ .../antlr/internal/InternalEtlParser.java | 18001 ++++++++++++++++ .../antlr/internal/InternalEtlParser.tokens | 51 + .../etl/parser/antlr/lexer/InternalEtlLexer.g | 126 + .../parser/antlr/lexer/InternalEtlLexer.java | 2092 ++ .../antlr/lexer/InternalEtlLexer.tokens | 51 + .../etl/scoping/AbstractEtlScopeProvider.java | 21 + .../etl/serializer/EtlSemanticSequencer.java | 732 + .../etl/serializer/EtlSyntacticSequencer.java | 633 + .../snomed/etl/services/EtlGrammarAccess.java | 2769 +++ .../etl/validation/AbstractEtlValidator.java} | 21 +- .../snowowl/snomed/etl/Etl.xtext | 158 + .../snowowl/snomed/etl/EtlRuntimeModule.java} | 26 +- .../snomed/etl/EtlStandaloneSetup.java} | 18 +- .../snowowl/snomed/etl/GenerateEtl.mwe2 | 99 + .../converter/EtlValueConverterService.java} | 12 +- .../snomed/etl/generator/EtlGenerator.java | 42 + .../snomed/etl/scoping/EtlScopeProvider.java} | 14 +- .../snomed/etl/validation/EtlValidator.java | 37 + .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../fhir/SnomedCodeSystemApiProvider.java | 8 +- .../fhir/SnomedConceptMapApiProvider.java | 19 +- .../fhir/SnomedValueSetApiProvider.java | 22 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../mrcm/SingletonConceptSetDefinition.java | 61 - .../SingletonConceptSetDefinitionImpl.java | 75 - .../.classpath | 10 + .../.project | 10 +- .../META-INF/MANIFEST.MF | 12 + .../build.properties | 4 +- .../pom.xml | 71 + .../snomed/ql/tests/QLInjectorProvider.java | 81 + .../snomed/ql/tests/QLParsingTest.xtend | 157 + .../xtend-gen/.gitignore | 5 + .../.gitignore | 3 - ...ate QL (ql) Language Infrastructure.launch | 14 - .../META-INF/MANIFEST.MF | 2 +- .../build.properties | 3 +- .../model/generated/QL.ecore | 6 +- .../model/generated/QL.genmodel | 22 +- .../pom.xml | 2 +- .../snomed/ql/AbstractQLRuntimeModule.java | 2 +- .../snowowl/snomed/ql/QL.xtextbin | Bin 12356 -> 12727 bytes .../snomed/ql/QLStandaloneSetupGenerated.java | 2 +- .../antlr/QLAntlrTokenFileProvider.java | 2 +- .../snomed/ql/parser/antlr/QLParser.java | 2 +- .../parser/antlr/internal/InternalQLParser.g | 348 +- .../antlr/internal/InternalQLParser.java | 1283 +- .../antlr/internal/InternalQLParser.tokens | 65 +- .../ql/parser/antlr/lexer/InternalQLLexer.g | 20 +- .../parser/antlr/lexer/InternalQLLexer.java | 903 +- .../parser/antlr/lexer/InternalQLLexer.tokens | 65 +- .../snomed/ql/ql/AcceptableInFilter.java | 6 +- .../snowowl/snomed/ql/ql/ActiveFilter.java | 10 +- .../snomed/ql/ql/CaseSignificanceFilter.java | 6 +- ...onjunction.java => ConjunctionFilter.java} | 30 +- ...isjunction.java => DisjunctionFilter.java} | 30 +- .../snowowl/snomed/ql/ql/Domain.java | 13 +- .../snowowl/snomed/ql/ql/DomainQuery.java | 10 +- .../{Exclusion.java => ExclusionFilter.java} | 30 +- .../snowowl/snomed/ql/ql/Filter.java | 2 +- .../snomed/ql/ql/LanguageCodeFilter.java | 6 +- .../snomed/ql/ql/LanguageRefSetFilter.java | 6 +- .../snomed/ql/ql/LexicalSearchType.java | 17 +- .../snowowl/snomed/ql/ql/ModuleFilter.java | 10 +- .../snowowl/snomed/ql/ql/NestedFilter.java | 6 +- .../snowowl/snomed/ql/ql/NestedQuery.java | 6 +- .../snomed/ql/ql/PreferredInFilter.java | 6 +- .../snowowl/snomed/ql/ql/PropertyFilter.java | 2 +- .../snowowl/snomed/ql/ql/QlFactory.java | 20 +- .../snowowl/snomed/ql/ql/QlPackage.java | 158 +- .../snowowl/snomed/ql/ql/Query.java | 6 +- .../snomed/ql/ql/QueryConjunction.java | 10 +- .../snowowl/snomed/ql/ql/QueryConstraint.java | 2 +- .../snomed/ql/ql/QueryDisjunction.java | 10 +- .../snowowl/snomed/ql/ql/QueryExclusion.java | 10 +- .../snowowl/snomed/ql/ql/SubQuery.java | 2 +- .../snowowl/snomed/ql/ql/TermFilter.java | 10 +- .../snowowl/snomed/ql/ql/TypeFilter.java | 6 +- .../ql/ql/impl/AcceptableInFilterImpl.java | 4 +- .../snomed/ql/ql/impl/ActiveFilterImpl.java | 8 +- .../ql/impl/CaseSignificanceFilterImpl.java | 4 +- ...onImpl.java => ConjunctionFilterImpl.java} | 58 +- ...onImpl.java => DisjunctionFilterImpl.java} | 58 +- .../snomed/ql/ql/impl/DomainQueryImpl.java | 6 +- ...sionImpl.java => ExclusionFilterImpl.java} | 58 +- .../snowowl/snomed/ql/ql/impl/FilterImpl.java | 2 +- .../ql/ql/impl/LanguageCodeFilterImpl.java | 6 +- .../ql/ql/impl/LanguageRefSetFilterImpl.java | 4 +- .../snomed/ql/ql/impl/ModuleFilterImpl.java | 8 +- .../snomed/ql/ql/impl/NestedFilterImpl.java | 4 +- .../snomed/ql/ql/impl/NestedQueryImpl.java | 4 +- .../ql/ql/impl/PreferredInFilterImpl.java | 4 +- .../snomed/ql/ql/impl/PropertyFilterImpl.java | 2 +- .../snomed/ql/ql/impl/QlFactoryImpl.java | 50 +- .../snomed/ql/ql/impl/QlPackageImpl.java | 153 +- .../ql/ql/impl/QueryConjunctionImpl.java | 6 +- .../ql/ql/impl/QueryConstraintImpl.java | 2 +- .../ql/ql/impl/QueryDisjunctionImpl.java | 6 +- .../snomed/ql/ql/impl/QueryExclusionImpl.java | 6 +- .../snowowl/snomed/ql/ql/impl/QueryImpl.java | 4 +- .../snomed/ql/ql/impl/SubQueryImpl.java | 2 +- .../snomed/ql/ql/impl/TermFilterImpl.java | 8 +- .../snomed/ql/ql/impl/TypeFilterImpl.java | 4 +- .../snomed/ql/ql/util/QlAdapterFactory.java | 32 +- .../snowowl/snomed/ql/ql/util/QlSwitch.java | 44 +- .../ql/scoping/AbstractQLScopeProvider.java | 2 +- .../ql/serializer/QLSemanticSequencer.java | 244 +- .../ql/serializer/QLSyntacticSequencer.java | 112 +- .../snomed/ql/services/QLGrammarAccess.java | 353 +- .../ql/validation/AbstractQLValidator.java | 3 +- .../snowowl/snomed/ql/GenerateQL.mwe2 | 9 +- .../snowowl/snomed/ql/QL.xtext | 20 +- .../snowowl/snomed/ql/QLRuntimeModule.java | 24 +- .../snomed/ql/validation/QLValidator.java | 36 +- .../.launch/snomed-reasoner-unit-tests.launch | 6 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 4 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../ClassificationTaskConverter.java | 21 +- .../converter/ConceptChangeConverter.java | 7 +- .../ConcreteDomainChangeConverter.java | 11 +- .../converter/DescriptionChangeConverter.java | 15 +- .../EquivalentConceptSetConverter.java | 13 +- .../RelationshipChangeConverter.java | 28 +- .../reasoner/domain/ClassificationTasks.java | 28 +- .../reasoner/domain/ConceptChanges.java | 28 +- .../domain/ConcreteDomainChanges.java | 28 +- .../reasoner/domain/DescriptionChanges.java | 28 +- .../domain/EquivalentConceptSets.java | 30 +- .../reasoner/domain/ReasonerConcept.java | 17 +- .../reasoner/domain/ReasonerDescription.java | 17 +- .../reasoner/domain/ReasonerExtensions.java | 30 +- .../reasoner/domain/ReasonerRelationship.java | 32 +- .../reasoner/domain/RelationshipChanges.java | 28 +- .../ClassificationGetRequestBuilder.java | 6 +- .../request/ClassificationSaveRequest.java | 7 +- .../request/ClassificationSearchRequest.java | 3 +- .../ClassificationSearchRequestBuilder.java | 6 +- .../ConcreteDomainChangeSearchRequest.java | 3 +- ...creteDomainChangeSearchRequestBuilder.java | 6 +- .../EquivalentConceptSetSearchRequest.java | 3 +- ...ivalentConceptSetSearchRequestBuilder.java | 6 +- .../ReasonerExtensionSearchRequest.java | 4 +- .../RelationshipChangeSearchRequest.java | 3 +- ...elationshipChangeSearchRequestBuilder.java | 6 +- .../reasoner/request/SaveJobRequest.java | 45 +- .../.classpath | 16 +- .../.project | 10 +- .../META-INF/MANIFEST.MF | 12 + .../build.properties | 4 +- .../pom.xml | 67 + .../snomed/scg/tests/ScgInjectorProvider.java | 81 + .../snomed/scg/tests/ScgParsingTest.xtend | 706 + .../xtend-gen/.gitignore | 5 + .../.classpath | 10 +- .../.project | 16 +- .../AFTER_REGENERATION_TODO.txt | 169 - .../META-INF/MANIFEST.MF | 42 +- .../SCG_v2.3.1_ABNF_syntax_20170717.txt | 38 + .../build.properties | 20 +- .../model/generated/Scg.ecore | 46 + .../model/generated/Scg.genmodel | 43 + .../plugin.properties | 8 - .../plugin.xml | 18 +- .../pom.xml | 21 +- .../snowowl/dsl/AbstractSCGRuntimeModule.java | 154 - .../com/b2international/snowowl/dsl/SCG.ecore | 31 - .../b2international/snowowl/dsl/SCG.genmodel | 31 - .../com/b2international/snowowl/dsl/SCG.xmi | 295 - .../dsl/SCGStandaloneSetupGenerated.java | 65 - .../SCGParsetreeConstructor.java | 1239 -- .../dsl/parser/antlr/internal/InternalSCG.g | 793 - .../parser/antlr/internal/InternalSCG.tokens | 16 - .../antlr/internal/InternalSCGLexer.java | 762 - .../antlr/internal/InternalSCGParser.java | 2403 --- .../snowowl/dsl/scg/Concept.java | 108 - .../snowowl/dsl/scg/Expression.java | 88 - .../snowowl/dsl/scg/ScgPackage.java | 545 - .../snowowl/dsl/scg/impl/ExpressionImpl.java | 332 - .../snowowl/dsl/scg/impl/ScgPackageImpl.java | 385 - .../dsl/services/SCGGrammarAccess.java | 755 - .../snomed/scg/AbstractScgRuntimeModule.java | 226 + .../snowowl/snomed/scg/Scg.xtextbin | Bin 0 -> 3644 bytes .../scg/ScgStandaloneSetupGenerated.java | 68 + .../antlr/ScgAntlrTokenFileProvider.java | 19 +- .../scg/parser/antlr/ScgParser.java} | 37 +- .../parser/antlr/internal/InternalScgParser.g | 1098 + .../antlr/internal/InternalScgParser.java | 3199 +++ .../antlr/internal/InternalScgParser.tokens | 20 + .../scg/parser/antlr/lexer/InternalScgLexer.g | 64 + .../parser/antlr/lexer/InternalScgLexer.java | 955 + .../antlr/lexer/InternalScgLexer.tokens | 20 + .../{dsl => snomed/scg}/scg/Attribute.java | 42 +- .../scg/scg/AttributeGroup.java} | 30 +- .../snomed/scg/scg/AttributeValue.java | 32 + .../snomed/scg/scg/ConceptReference.java | 82 + .../snowowl/snomed/scg/scg/DecimalValue.java | 60 + .../snowowl/snomed/scg/scg/Expression.java | 83 + .../snowowl/snomed/scg/scg/IntegerValue.java | 59 + .../snowowl/snomed/scg/scg/Refinement.java | 65 + .../{dsl => snomed/scg}/scg/ScgFactory.java | 73 +- .../snowowl/snomed/scg/scg/ScgPackage.java | 880 + .../snowowl/snomed/scg/scg/StringValue.java | 59 + .../snowowl/snomed/scg/scg/SubExpression.java | 73 + .../scg/scg/impl/AttributeGroupImpl.java} | 82 +- .../scg}/scg/impl/AttributeImpl.java | 79 +- .../scg}/scg/impl/AttributeValueImpl.java | 18 +- .../scg/scg/impl/ConceptReferenceImpl.java} | 112 +- .../snomed/scg/scg/impl/DecimalValueImpl.java | 193 + .../snomed/scg/scg/impl/ExpressionImpl.java | 282 + .../snomed/scg/scg/impl/IntegerValueImpl.java | 191 + .../snomed/scg/scg/impl/RefinementImpl.java | 221 + .../scg}/scg/impl/ScgFactoryImpl.java | 103 +- .../snomed/scg/scg/impl/ScgPackageImpl.java | 583 + .../snomed/scg/scg/impl/StringValueImpl.java | 191 + .../scg/scg/impl/SubExpressionImpl.java | 256 + .../scg}/scg/util/ScgAdapterFactory.java | 148 +- .../scg}/scg/util/ScgSwitch.java | 164 +- .../scg/scoping/AbstractScgScopeProvider.java | 21 + .../scg/serializer/ScgSemanticSequencer.java | 227 + .../scg/serializer/ScgSyntacticSequencer.java | 219 + .../snomed/scg/services/ScgGrammarAccess.java | 973 + .../scg/validation/AbstractScgValidator.java} | 25 +- .../snowowl/dsl/GenerateSCG.mwe2 | 110 - .../snowowl/dsl/SCG.properties | 3 - .../com/b2international/snowowl/dsl/SCG.xtext | 64 - .../snowowl/dsl/SCGPostProcessor.ext | 8 - .../snowowl/dsl/SCGPostProcessor.java | 67 - .../snowowl/dsl/SCGRewriter.java | 133 - .../snowowl/dsl/SCGStandaloneSetup.java | 69 - .../ExtractedSCGAttributeGroup.java | 74 - .../SCGExpressionExtractor.java | 126 - .../snowowl/dsl/formatting/SCGFormatter.java | 73 - .../dsl/util/ScgAttributeFinderVisitor.java | 108 - .../dsl/util/ScgExpressionTermCompleter.java | 91 - .../dsl/validation/SCGJavaValidator.java | 246 - .../snowowl/snomed/scg/GenerateScg.mwe2 | 94 + .../snowowl/snomed/scg/Scg.xtext | 126 + .../snowowl/snomed/scg/ScgRuntimeModule.java} | 16 +- .../snomed/scg/ScgStandaloneSetup.java | 27 + .../snomed/scg/generator/ScgGenerator.java | 42 + .../snomed/scg/scoping/ScgScopeProvider.java} | 26 +- .../snomed/scg/validation/ScgValidator.java | 37 + .../META-INF/MANIFEST.MF | 23 - .../pom.xml | 12 - .../test/AttributeGroupMergerTest.java | 226 - .../test/AttributeNormalizerTest.java | 80 - ...finitionAttributeRedundancyFilterTest.java | 118 - .../test/ConceptDefinitionMergerTest.java | 90 - .../test/ConceptDefinitionNormalizerTest.java | 149 - ...ExpressionCanonicalRepresentationTest.java | 58 - .../test/FocusConceptNormalizerTest.java | 131 - ...alFormGeneratorTestFromSnomedDocument.java | 284 - .../SimpleAstNormalFormGeneratorTest.java | 133 - .../test/UngroupedAttributesMergerTest.java | 503 - .../EscgVsBinaryResourcePerformanceTest.java | 147 - .../test/SubsumptionTesterTest.java | 415 - .../test/AllNormalFormGeneratorTests.java | 56 - .../test/SemanticEngineTestPlugin.java | 45 - .../simpleast/test/SnomedConcepts.java | 68 - .../simpleast/test/utils/TestUtils.java | 182 - .../src/configuration/snowowl.yml | 13 - .../test.escg | 1 - .../META-INF/MANIFEST.MF | 16 - .../pom.xml | 12 - .../simpleast/SemanticEngineActivator.java | 45 - .../normalform/AttributeClauseList.java | 43 - .../normalform/AttributeClauseListMerger.java | 166 - .../normalform/AttributeNameMatch.java | 68 - .../normalform/AttributeNormalizer.java | 96 - .../normalform/ConceptDefinition.java | 43 - ...ptDefinitionAttributeRedundancyFilter.java | 114 - .../normalform/ConceptDefinitionMerger.java | 93 - .../ConceptDefinitionNormalizer.java | 139 - .../FocusConceptNormalizationResult.java | 41 - .../normalform/FocusConceptNormalizer.java | 229 - .../normalform/RefinementsMerger.java | 68 - ...impleAstExpressionNormalFormGenerator.java | 88 - .../normalform/UngroupedAttributesMerger.java | 220 - .../subsumption/SubsumptionTester.java | 560 - .../utils/AttributeCollectionComparator.java | 31 - .../AttributeGroupCollectionComparator.java | 37 - .../simpleast/utils/CollectionComparator.java | 135 - .../utils/ConceptDefinitionComparator.java | 42 - .../simpleast/utils/ExpressionComparator.java | 38 - .../simpleast/utils/QueryAstUtils.java | 404 - .../META-INF/MANIFEST.MF | 22 - .../build.properties | 4 - .../pom.xml | 12 - .../test/AttributeNormalizerTest.java | 80 - ...finitionAttributeRedundancyFilterTest.java | 118 - .../test/ConceptDefinitionMergerTest.java | 90 - .../test/ConceptDefinitionNormalizerTest.java | 150 - ...ExpressionCanonicalRepresentationTest.java | 58 - .../test/FocusConceptNormalizerTest.java | 117 - .../normalform/test/GroupMergerTest.java | 227 - .../test/NormalFormGeneratorTest.java | 341 - ...alFormGeneratorTestFromSnomedDocument.java | 290 - .../test/UngroupedAttributesMergerTest.java | 503 - .../test/SubsumptionTesterTest.java | 427 - .../test/AllSemanticEngineTests.java | 64 - .../test/SemanticEngineTestPlugin.java | 45 - .../semanticengine/test/SnomedConcepts.java | 77 - .../semanticengine/test/utils/TestUtils.java | 69 - .../utils/test/ContextWrapperBuilderTest.java | 149 - .../utils/test/SemanticUtilsTest.java | 92 - .../src/configuration/snowowl.yml | 13 - .../test.escg | 1 - .../.classpath | 11 - .../META-INF/MANIFEST.MF | 16 - .../pom.xml | 12 - .../semanticengine/SemanticEnginePlugin.java | 45 - .../normalform/AttributeNameMatch.java | 70 - .../normalform/AttributeNormalizer.java | 90 - .../normalform/ConceptDefinition.java | 44 - ...ptDefinitionAttributeRedundancyFilter.java | 116 - .../normalform/ConceptDefinitionMerger.java | 93 - .../ConceptDefinitionNormalizer.java | 143 - .../ExpressionNormalFormGenerator.java | 36 - .../FocusConceptNormalizationResult.java | 41 - .../normalform/FocusConceptNormalizer.java | 232 - .../normalform/GroupMerger.java | 188 - .../normalform/RefinementsMerger.java | 69 - .../ScgExpressionNormalFormGenerator.java | 225 - .../normalform/UngroupedAttributesMerger.java | 221 - .../subsumption/SubsumptionTester.java | 424 - .../AttributePresenceCheckingVisitor.java | 68 - .../AttributeValueCollectionComparator.java | 29 - .../utils/AttributeValueComparator.java | 39 - .../AttributeValueExtractingVisitor.java | 71 - ...alKernelFocusConceptExtractingVisitor.java | 79 - .../utils/CollectionComparator.java | 132 - .../utils/ConceptCollectionComparator.java | 26 - .../utils/ConceptDefinitionComparator.java | 42 - .../utils/ContextWrapperBuilder.java | 157 - .../utils/ExpressionComparator.java | 32 - .../utils/GroupCollectionComparator.java | 38 - ...dDepthAttributeValueExtractingVisitor.java | 83 - .../utils/MessageDigestUtil.java | 54 - .../utils/ObjectComparator.java | 32 - ...imitiveClinicalKernelDetectingVisitor.java | 77 - .../utils/RefinementsComparator.java | 50 - .../semanticengine/utils/ScgBuilderUtils.java | 121 - .../semanticengine/utils/SemanticUtils.java | 316 - .../.classpath | 1 + .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 4 +- .../src/main/resources/scripts/rule666.groovy | 3 +- .../scripts/rule_duplicate_members.groovy | 2 +- .../scripts/rule_mrcm_constraint.groovy | 22 +- .../scripts/rule_mrcm_constraint_type.groovy | 30 +- .../snomed/AllGenericValidationTests.java | 3 + .../snomed/BaseGenericValidationRuleTest.java | 5 +- .../snomed/GenericValidationRuleTest.java | 71 +- snomed/pom.xml | 24 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 7 +- .../pom.xml | 2 +- ...e_GB1000000_20200204_complex_block_map.zip | Bin 0 -> 4409 bytes .../snowowl/test/commons/Resources.java | 3 +- .../snowowl/test/commons/SnowOwlAppRule.java | 2 +- .../test/commons/rest/AbstractApiTest.java | 131 + .../test/commons}/rest/BranchBase.java | 2 +- .../rest/RepositoryBranchRestRequests.java | 46 +- .../test/commons/rest/RestExtensions.java | 10 + .../test/commons/snomed/DocumentBuilders.java | 5 +- .../RandomSnomedIdentiferGenerator.java | 21 +- .../commons/snomed/TestBranchContext.java | 4 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- tests/pom.xml | 2 +- 1108 files changed, 71743 insertions(+), 39642 deletions(-) rename cis/com.b2international.snowowl.snomed.cis.product/assembly/common/{snowowl_config.yml => configuration/snowowl.yml} (100%) create mode 100644 commons/com.b2international.index.tests/src/com/b2international/index/MaxTermsCountTest.java delete mode 100644 commons/com.b2international.index/src/com/b2international/index/analyzer/DelimiterTokenizer.java rename commons/com.b2international.index/src/com/b2international/index/{analyzer => compat}/CharMatcherTokenizer.java (83%) rename commons/com.b2international.index/src/com/b2international/index/{analyzer => compat}/ComponentTermAnalyzer.java (91%) create mode 100644 core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/SnowOwlApiRestService.java rename {snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain => core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch}/BranchUpdateRestRequest.java (87%) rename {snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain => core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch}/CreateBranchRestRequest.java (96%) rename {snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain => core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch}/CreateReviewRequest.java (90%) rename {snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain => core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch}/MergeRestRequest.java (91%) rename snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchMergingRestService.java => core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/RepositoryBranchMergeRestService.java (85%) rename snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchingRestService.java => core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/RepositoryBranchRestService.java (84%) rename snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchReviewRestService.java => core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/RepositoryBranchReviewRestService.java (91%) rename snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedCommitInfoRestService.java => core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/commit/RepositoryCommitRestService.java (84%) rename snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedCompareRestRequest.java => core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/compare/CompareRestRequest.java (88%) rename snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedCompareRestService.java => core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/compare/RepositoryBranchCompareRestService.java (82%) rename core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/{codesystem/ChangeRequest.java => domain/ResourceRequest.java} (63%) create mode 100644 core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/domain/ResourceRestSearch.java create mode 100644 core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/authorization/Unprotected.java rename snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/Rf2ExportResult.java => core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/ExportResult.java (86%) rename snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/ObjectComparator.java => core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/id/IDs.java (55%) delete mode 100644 core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/IndexReadRequest.java delete mode 100644 core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryIndexRequestBuilder.java create mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchCompareRestService.java rename snomed/{com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeCollectionComparator.java => com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchMergeRestService.java} (51%) rename snomed/{com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/DefinitionStatusProvider.java => com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchRestService.java} (52%) create mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchReviewRestService.java create mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryCommitRestService.java delete mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ChangeRequest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ExpandableSnomedRelationship.java delete mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedInboundRelationships.java delete mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedOutboundRelationships.java rename snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/{SnomedConceptMini.java => SnomedReferenceSetRestSearch.java} (57%) rename snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/{SnomedIdentifierRequest.java => SnomedResourceRequest.java} (50%) delete mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/ClassificationRunNotFoundException.java delete mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/ExportRunNotFoundException.java delete mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/FullySpecifiedNameNotFoundException.java delete mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/PreferredTermNotFoundException.java delete mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/SnomedExportException.java delete mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/SnomedImportConfigurationNotFoundException.java create mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/AcceptabilityMembership.java create mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/AssociationTarget.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/AssociationType.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/CaseSignificance.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/CharacteristicType.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/CharacteristicTypePredicates.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/DefinitionStatus.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/DescriptionInactivationIndicator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/InactivationIndicator.java create mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/InactivationProperties.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/InactivationReason.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/RelationshipModifier.java create mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedComplexBlockMapReferenceSetMemberBuilder.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/CaseSignificance.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/InactivationExpander.java create mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/InactivationPropertiesExpander.java create mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/ModuleExpander.java create mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComplexBlockMapMemberCreateDelegate.java create mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComplexBlockMapMemberUpdateDelegate.java create mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2ComplexBlockMapRefSetContentType.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/.project delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/META-INF/MANIFEST.MF delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/build.properties delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/plugin.properties delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/plugin.xml delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/pom.xml delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/queryast.ecore delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/queryast.genmodel delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ChainedQueryRewriter.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/GraphMLExportRewriter.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/SyntaxErrorException.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/AndClause.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/AttributeClause.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/BinaryRValue.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/ConceptRef.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/NotClause.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/NumericDataClause.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/NumericDataGroupClause.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/OrClause.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/RValue.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/RefSet.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/SubExpression.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/UnaryRValue.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/AttributeClause.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/AttributeClauseGroup.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/BinaryRValue.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/ConceptRef.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/NumericDataClause.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/NumericDataGroupClause.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/RValue.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/RefSet.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/SubExpression.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/SubsumptionQuantifier.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/UnaryRValue.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/ecoreastFactory.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/ecoreastPackage.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/AndClauseImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/AttributeClauseGroupImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/AttributeClauseImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/BinaryRValueImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/ConceptRefImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/NotClauseImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/NumericDataClauseImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/NumericDataGroupClauseImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/OrClauseImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/RValueImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/RefSetImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/SubExpressionImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/UnaryRValueImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/ecoreastFactoryImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/ecoreastPackageImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/util/ecoreastAdapterFactory.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/util/ecoreastSwitch.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/walker/ESCGExpressionVisitor.java delete mode 100644 snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/walker/VisitingQueryRewriter.java delete mode 100644 snomed/com.b2international.snowowl.snomed.ecl/.gitignore delete mode 100644 snomed/com.b2international.snowowl.snomed.ecl/.launch/Generate ECL.launch create mode 100644 snomed/com.b2international.snowowl.snomed.ecl/ECL_v1.3_ABNF_brief_syntax_20170717.txt rename snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/{AttributeGroup.java => EclAttributeGroup.java} (68%) rename snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/{ConceptReference.java => EclConceptReference.java} (71%) rename snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/{Refinement.java => EclRefinement.java} (86%) rename snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/{AttributeGroupImpl.java => EclAttributeGroupImpl.java} (73%) rename snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/{ConceptReferenceImpl.java => EclConceptReferenceImpl.java} (83%) rename snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/{RefinementImpl.java => EclRefinementImpl.java} (78%) rename snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/{EclSemanticSequencer.java => AbstractEclSemanticSequencer.java} (93%) rename snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/{EclSyntacticSequencer.java => AbstractEclSyntacticSequencer.java} (69%) rename snomed/{com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/RValue.java => com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/serializer/EclSemanticSequencer.java} (69%) create mode 100644 snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/serializer/EclSyntacticSequencer.java rename snomed/{com.b2international.snowowl.snomed.semanticengine.test => com.b2international.snowowl.snomed.etl.tests}/.classpath (67%) rename snomed/{com.b2international.snowowl.snomed.semanticengine.simpleast.test => com.b2international.snowowl.snomed.etl.tests}/.project (76%) create mode 100644 snomed/com.b2international.snowowl.snomed.etl.tests/META-INF/MANIFEST.MF rename snomed/{com.b2international.snowowl.snomed.semanticengine => com.b2international.snowowl.snomed.etl.tests}/build.properties (53%) create mode 100644 snomed/com.b2international.snowowl.snomed.etl.tests/pom.xml create mode 100644 snomed/com.b2international.snowowl.snomed.etl.tests/src-gen/com/b2international/snowowl/snomed/etl/tests/EtlInjectorProvider.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl.tests/src/com/b2international/snowowl/snomed/etl/tests/EtlParsingTest.xtend create mode 100644 snomed/com.b2international.snowowl.snomed.etl.tests/xtend-gen/.gitignore rename snomed/{com.b2international.snowowl.snomed.dsl => com.b2international.snowowl.snomed.etl}/.classpath (91%) rename snomed/{com.b2international.snowowl.snomed.semanticengine => com.b2international.snowowl.snomed.etl}/.project (77%) create mode 100644 snomed/com.b2international.snowowl.snomed.etl/ETL_v1.0_ABNF_syntax_20170721.txt create mode 100644 snomed/com.b2international.snowowl.snomed.etl/META-INF/MANIFEST.MF create mode 100644 snomed/com.b2international.snowowl.snomed.etl/build.properties create mode 100644 snomed/com.b2international.snowowl.snomed.etl/model/generated/Etl.ecore create mode 100644 snomed/com.b2international.snowowl.snomed.etl/model/generated/Etl.genmodel create mode 100644 snomed/com.b2international.snowowl.snomed.etl/plugin.xml create mode 100644 snomed/com.b2international.snowowl.snomed.etl/pom.xml create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/AbstractEtlRuntimeModule.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/Etl.xtextbin create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/EtlStandaloneSetupGenerated.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/Attribute.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/AttributeGroup.java rename snomed/{com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg => com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl}/AttributeValue.java (78%) rename snomed/{com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/AndClause.java => com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConceptIdReplacementSlot.java} (61%) create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConceptReference.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConceptReplacementSlot.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConcreteValueReplacementSlot.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/DecimalReplacementSlot.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/DecimalValue.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/EtlCardinality.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/EtlFactory.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/EtlPackage.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ExpressionReplacementSlot.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ExpressionTemplate.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/FocusConcept.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/IntegerReplacementSlot.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/IntegerValue.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/Refinement.java rename snomed/{com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/OrClause.java => com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimal.java} (63%) create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalMaximumValue.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalMinimumValue.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalRange.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalValue.java rename snomed/{com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/NotClause.java => com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotInteger.java} (63%) create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerMaximumValue.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerMinimumValue.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerRange.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerValue.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/StringReplacementSlot.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/StringValue.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SubExpression.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/TemplateInformationSlot.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/TokenReplacementSlot.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/AttributeGroupImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/AttributeImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/AttributeValueImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConceptIdReplacementSlotImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConceptReferenceImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConceptReplacementSlotImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConcreteValueReplacementSlotImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/DecimalReplacementSlotImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/DecimalValueImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/EtlCardinalityImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/EtlFactoryImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/EtlPackageImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ExpressionReplacementSlotImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ExpressionTemplateImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/FocusConceptImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/IntegerReplacementSlotImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/IntegerValueImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/RefinementImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalMaximumValueImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalMinimumValueImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalRangeImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalValueImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerMaximumValueImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerMinimumValueImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerRangeImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerValueImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/StringReplacementSlotImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/StringValueImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SubExpressionImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/TemplateInformationSlotImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/TokenReplacementSlotImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/util/EtlAdapterFactory.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/util/EtlSwitch.java rename snomed/{com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/SCGAntlrTokenFileProvider.java => com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/EtlAntlrTokenFileProvider.java} (70%) create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/EtlParser.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/internal/InternalEtlParser.g create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/internal/InternalEtlParser.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/internal/InternalEtlParser.tokens create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/lexer/InternalEtlLexer.g create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/lexer/InternalEtlLexer.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/lexer/InternalEtlLexer.tokens create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/scoping/AbstractEtlScopeProvider.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/serializer/EtlSemanticSequencer.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/serializer/EtlSyntacticSequencer.java create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/services/EtlGrammarAccess.java rename snomed/{com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/validation/AbstractSCGJavaValidator.java => com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/validation/AbstractEtlValidator.java} (57%) create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/Etl.xtext rename snomed/{com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGRuntimeModule.java => com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/EtlRuntimeModule.java} (55%) rename snomed/{com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/QueryRewriter.java => com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/EtlStandaloneSetup.java} (60%) create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/GenerateEtl.mwe2 rename snomed/{com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/QueryParser.java => com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/converter/EtlValueConverterService.java} (65%) create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/generator/EtlGenerator.java rename snomed/{com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/scoping/SCGScopeProvider.java => com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/scoping/EtlScopeProvider.java} (63%) create mode 100644 snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/validation/EtlValidator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.mrcm.model/src/com/b2international/snowowl/snomed/mrcm/SingletonConceptSetDefinition.java delete mode 100644 snomed/com.b2international.snowowl.snomed.mrcm.model/src/com/b2international/snowowl/snomed/mrcm/impl/SingletonConceptSetDefinitionImpl.java rename snomed/{com.b2international.snowowl.snomed.semanticengine.simpleast.test => com.b2international.snowowl.snomed.ql.tests}/.classpath (67%) rename snomed/{com.b2international.snowowl.snomed.semanticengine.simpleast => com.b2international.snowowl.snomed.ql.tests}/.project (76%) create mode 100644 snomed/com.b2international.snowowl.snomed.ql.tests/META-INF/MANIFEST.MF rename snomed/{com.b2international.snowowl.snomed.semanticengine.simpleast.test => com.b2international.snowowl.snomed.ql.tests}/build.properties (53%) create mode 100644 snomed/com.b2international.snowowl.snomed.ql.tests/pom.xml create mode 100644 snomed/com.b2international.snowowl.snomed.ql.tests/src-gen/com/b2international/snowowl/snomed/ql/tests/QLInjectorProvider.java create mode 100644 snomed/com.b2international.snowowl.snomed.ql.tests/src/com/b2international/snowowl/snomed/ql/tests/QLParsingTest.xtend create mode 100644 snomed/com.b2international.snowowl.snomed.ql.tests/xtend-gen/.gitignore delete mode 100644 snomed/com.b2international.snowowl.snomed.ql/.gitignore delete mode 100644 snomed/com.b2international.snowowl.snomed.ql/.launch/Generate QL (ql) Language Infrastructure.launch rename snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/{Conjunction.java => ConjunctionFilter.java} (75%) rename snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/{Disjunction.java => DisjunctionFilter.java} (75%) rename snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/{Exclusion.java => ExclusionFilter.java} (75%) rename snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/{ConjunctionImpl.java => ConjunctionFilterImpl.java} (78%) rename snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/{DisjunctionImpl.java => DisjunctionFilterImpl.java} (78%) rename snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/{ExclusionImpl.java => ExclusionFilterImpl.java} (79%) rename snomed/{com.b2international.snowowl.snomed.semanticengine.simpleast => com.b2international.snowowl.snomed.scg.tests}/.classpath (51%) rename snomed/{com.b2international.snowowl.snomed.semanticengine.test => com.b2international.snowowl.snomed.scg.tests}/.project (76%) create mode 100644 snomed/com.b2international.snowowl.snomed.scg.tests/META-INF/MANIFEST.MF rename snomed/{com.b2international.snowowl.snomed.semanticengine.simpleast => com.b2international.snowowl.snomed.scg.tests}/build.properties (53%) create mode 100644 snomed/com.b2international.snowowl.snomed.scg.tests/pom.xml create mode 100644 snomed/com.b2international.snowowl.snomed.scg.tests/src-gen/com/b2international/snowowl/snomed/scg/tests/ScgInjectorProvider.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg.tests/src/com/b2international/snowowl/snomed/scg/tests/ScgParsingTest.xtend create mode 100644 snomed/com.b2international.snowowl.snomed.scg.tests/xtend-gen/.gitignore delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/AFTER_REGENERATION_TODO.txt create mode 100644 snomed/com.b2international.snowowl.snomed.scg/SCG_v2.3.1_ABNF_syntax_20170717.txt create mode 100644 snomed/com.b2international.snowowl.snomed.scg/model/generated/Scg.ecore create mode 100644 snomed/com.b2international.snowowl.snomed.scg/model/generated/Scg.genmodel delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/plugin.properties delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/AbstractSCGRuntimeModule.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCG.ecore delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCG.genmodel delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCG.xmi delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCGStandaloneSetupGenerated.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parseTreeConstruction/SCGParsetreeConstructor.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.tokens delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCGLexer.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCGParser.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/Concept.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/Expression.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/ScgPackage.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ExpressionImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ScgPackageImpl.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/services/SCGGrammarAccess.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/AbstractScgRuntimeModule.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/Scg.xtextbin create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/ScgStandaloneSetupGenerated.java rename commons/com.b2international.index/src/com/b2international/index/analyzer/DelimiterAnalyzer.java => snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/ScgAntlrTokenFileProvider.java (53%) rename snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/{dsl/parser/antlr/SCGParser.java => snomed/scg/parser/antlr/ScgParser.java} (54%) create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/internal/InternalScgParser.g create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/internal/InternalScgParser.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/internal/InternalScgParser.tokens create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/lexer/InternalScgLexer.g create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/lexer/InternalScgLexer.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/lexer/InternalScgLexer.tokens rename snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/{dsl => snomed/scg}/scg/Attribute.java (61%) rename snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/{dsl/scg/Group.java => snomed/scg/scg/AttributeGroup.java} (64%) create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/AttributeValue.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/ConceptReference.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/DecimalValue.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/Expression.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/IntegerValue.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/Refinement.java rename snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/{dsl => snomed/scg}/scg/ScgFactory.java (52%) create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/ScgPackage.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/StringValue.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/SubExpression.java rename snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/{dsl/scg/impl/GroupImpl.java => snomed/scg/scg/impl/AttributeGroupImpl.java} (67%) rename snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/{dsl => snomed/scg}/scg/impl/AttributeImpl.java (81%) rename snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/{dsl => snomed/scg}/scg/impl/AttributeValueImpl.java (81%) rename snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/{dsl/scg/impl/ConceptImpl.java => snomed/scg/scg/impl/ConceptReferenceImpl.java} (64%) create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/DecimalValueImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ExpressionImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/IntegerValueImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/RefinementImpl.java rename snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/{dsl => snomed/scg}/scg/impl/ScgFactoryImpl.java (59%) create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ScgPackageImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/StringValueImpl.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/SubExpressionImpl.java rename snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/{dsl => snomed/scg}/scg/util/ScgAdapterFactory.java (53%) rename snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/{dsl => snomed/scg}/scg/util/ScgSwitch.java (54%) create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scoping/AbstractScgScopeProvider.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/serializer/ScgSemanticSequencer.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/serializer/ScgSyntacticSequencer.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/services/ScgGrammarAccess.java rename snomed/com.b2international.snowowl.snomed.scg/{src/com/b2international/snowowl/dsl/ParseException.java => src-gen/com/b2international/snowowl/snomed/scg/validation/AbstractScgValidator.java} (55%) delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/GenerateSCG.mwe2 delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCG.properties delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCG.xtext delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGPostProcessor.ext delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGPostProcessor.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGRewriter.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGStandaloneSetup.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/expressionextractor/ExtractedSCGAttributeGroup.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/expressionextractor/SCGExpressionExtractor.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/formatting/SCGFormatter.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/util/ScgAttributeFinderVisitor.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/util/ScgExpressionTermCompleter.java delete mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/validation/SCGJavaValidator.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/GenerateScg.mwe2 create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/Scg.xtext rename snomed/{com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/RefinementsMergerTest.java => com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/ScgRuntimeModule.java} (65%) create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/ScgStandaloneSetup.java create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/generator/ScgGenerator.java rename snomed/{com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedIdentifierResponse.java => com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/scoping/ScgScopeProvider.java} (61%) create mode 100644 snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/validation/ScgValidator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/META-INF/MANIFEST.MF delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/pom.xml delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/AttributeGroupMergerTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/AttributeNormalizerTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ConceptDefinitionAttributeRedundancyFilterTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ConceptDefinitionMergerTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ConceptDefinitionNormalizerTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ExpressionCanonicalRepresentationTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/FocusConceptNormalizerTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/NormalFormGeneratorTestFromSnomedDocument.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/SimpleAstNormalFormGeneratorTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/UngroupedAttributesMergerTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/subsumption/test/EscgVsBinaryResourcePerformanceTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/subsumption/test/SubsumptionTesterTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/AllNormalFormGeneratorTests.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/SemanticEngineTestPlugin.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/SnomedConcepts.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/utils/TestUtils.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/configuration/snowowl.yml delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/test.escg delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/META-INF/MANIFEST.MF delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/pom.xml delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/SemanticEngineActivator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeClauseList.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeClauseListMerger.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeNameMatch.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeNormalizer.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinition.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinitionAttributeRedundancyFilter.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinitionMerger.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinitionNormalizer.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/FocusConceptNormalizationResult.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/FocusConceptNormalizer.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/RefinementsMerger.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/SimpleAstExpressionNormalFormGenerator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/UngroupedAttributesMerger.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/subsumption/SubsumptionTester.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/AttributeCollectionComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/AttributeGroupCollectionComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/CollectionComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/ConceptDefinitionComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/ExpressionComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/QueryAstUtils.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/META-INF/MANIFEST.MF delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/build.properties delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/pom.xml delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/AttributeNormalizerTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ConceptDefinitionAttributeRedundancyFilterTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ConceptDefinitionMergerTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ConceptDefinitionNormalizerTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ExpressionCanonicalRepresentationTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/FocusConceptNormalizerTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/GroupMergerTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/NormalFormGeneratorTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/NormalFormGeneratorTestFromSnomedDocument.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/UngroupedAttributesMergerTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/subsumption/test/SubsumptionTesterTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/test/AllSemanticEngineTests.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/test/SemanticEngineTestPlugin.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/test/SnomedConcepts.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/test/utils/TestUtils.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/utils/test/ContextWrapperBuilderTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/utils/test/SemanticUtilsTest.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/src/configuration/snowowl.yml delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine.test/test.escg delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/.classpath delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/META-INF/MANIFEST.MF delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/pom.xml delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/SemanticEnginePlugin.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/AttributeNameMatch.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/AttributeNormalizer.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinition.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinitionAttributeRedundancyFilter.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinitionMerger.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinitionNormalizer.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ExpressionNormalFormGenerator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/FocusConceptNormalizationResult.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/FocusConceptNormalizer.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/GroupMerger.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/RefinementsMerger.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ScgExpressionNormalFormGenerator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/UngroupedAttributesMerger.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/subsumption/SubsumptionTester.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributePresenceCheckingVisitor.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeValueCollectionComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeValueComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeValueExtractingVisitor.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ClinicalKernelFocusConceptExtractingVisitor.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/CollectionComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ConceptCollectionComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ConceptDefinitionComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ContextWrapperBuilder.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ExpressionComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/GroupCollectionComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/LimitedDepthAttributeValueExtractingVisitor.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/MessageDigestUtil.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ObjectComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/PrimitiveClinicalKernelDetectingVisitor.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/RefinementsComparator.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ScgBuilderUtils.java delete mode 100644 snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/SemanticUtils.java create mode 100644 tests/com.b2international.snowowl.test.commons/resources/snomed/SnomedCT_RF2Release_GB1000000_20200204_complex_block_map.zip create mode 100644 tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/AbstractApiTest.java rename {snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core => tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons}/rest/BranchBase.java (94%) rename snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchingRestRequests.java => tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/RepositoryBranchRestRequests.java (67%) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed3cb9ddbef..5e50a1d45a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,30 @@ # Change Log All notable changes to this project will be documented in this file. +## 7.3.0 + +### Changes from 6.x stream since 7.2.0 release + +All changes from the `6.x` stream (the 6.24.0 release) have been merged into the `7.3.0` release. See changelog entry `6.24.0` for details. + +### Core +- Support unprotected API routes/requests (d07e6c2, 2e5166a) + * `GET /admin/info` and `POST /admin/login` are unprotected routes +- Add back `responseTime` property (unit is milliseconds) to request log (57b913d) + +### SNOMED CT +- SNOMED CT computable languages are now supported (#470) + * [ETL 1.0](http://snomed.org/etl) + * [SCG 2.3.1](http://snomed.org/scg) + +### FHIR +- Exclude mapping members by default from ConceptMap responses (0ed6b1c, 14a1ad5, 67d1e03, 376391a, ) + +### Bugs/Improvements +- [core] simplify raw index read requests in Java API (5214922) +- [jobs] reduce memory requirements of job clean up (b43d658) +- [log] improve error logging from failed API requests, omit Broken pipe errors (edbc7f9) + ## 7.2.0 ### Changes from 6.x stream since 7.1.0 release @@ -206,6 +230,22 @@ The new improved and shiny Snow Owl 7.x documentation is available at `https://d * Removed `database` configuration options from `repository` node * Removed `revisionCache` configuration option from `repository` node +## 6.24.0 + +### API +- Support filtering refset members by `mapPriority` (a0bff3d) + +### Bugs/Improvements +- [index] Log the number of pending cluster tasks (959a088) +- [index] fix query boosting issue (2de4841) +- [core] Allow customization of component adjustment during publication (a0e6820) +- [history] Ignore many-valued features altogether in HistoryInfoProvider (526d3e7) +- [snomed] Fix incorrectly categorized query refset evaluation changes (#467) +- [snomed] Fix incorrect parentage values when reactivating concept's relationships first then the concept in two different commits (5298252) +- [cis] accept all SNOMED CT ID statuses when publishing them (c914c05) +- [mrcm] Handle ECL expressions in attributes' concept set definitions in MRCM validation rules (0cc7b61) +- [export] Create general ExportResult class (filename, UUID pair) (8265617) + ## 6.23.0 ### API diff --git a/README.md b/README.md index 6856cb700d2..dcc24a24281 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Snow Owl® is a highly scalable, open source terminology server with revision-control capabilities and collaborative authoring platform features. It allows you to store, search and author high volumes of terminology artifacts quickly and efficiently. [![build status](https://img.shields.io/travis/b2ihealthcare/snow-owl/7.x.svg?style=flat-square)](https://travis-ci.org/b2ihealthcare/snow-owl) -[![latest release](https://img.shields.io/github/tag/b2ihealthcare/snow-owl.svg?style=flat-square)](https://github.com/b2ihealthcare/snow-owl/releases/tag/v7.2.0) +[![latest release](https://img.shields.io/github/tag/b2ihealthcare/snow-owl.svg?style=flat-square)](https://github.com/b2ihealthcare/snow-owl/releases/tag/v7.3.0) [![downloads](https://img.shields.io/github/downloads/b2ihealthcare/snow-owl/total.svg?style=flat-square)](https://github.com/b2ihealthcare/snow-owl/releases/) [![Docker](https://img.shields.io/docker/pulls/b2ihealthcare/snow-owl-oss?style=flat-square)](https://hub.docker.com/r/b2ihealthcare/snow-owl-oss) [![GitHub](https://img.shields.io/github/license/b2ihealthcare/snow-owl.svg?style=flat-square)](https://github.com/b2ihealthcare/snow-owl/blob/7.x/LICENSE) @@ -18,10 +18,10 @@ Features include: * Maintains multiple versions (including unpublished and published) for each terminology artifact and provides APIs to access them all * Independent work branches offer work-in-process isolation, external business workflow integration and team collaboration * SNOMED CT and others - * Full SNOMED CT terminology support (full RF2 support, ECL v1.3, Reference Sets, OWL 2 EL/DL support, experimental Query Language) + * Full SNOMED CT terminology support (full RF2 support, ECL v1.3, SCG 2.3.1, ETL 1.0, Reference Sets, OWL Axioms, OWL 2 EL/DL support, experimental Query Language) * With its modular design, the server can maintain multiple terminologies (including local codes, mapping sets, value sets) * Various set of APIs - * SNOMED CT API (RESTful and native JAVA API) + * SNOMED CT API (RESTful and native Java API) * FHIR API * CIS API * Highly extensible and configurable @@ -32,16 +32,16 @@ Features include: # Download -* [WINDOWS](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.2.0/snow-owl-oss-7.2.0.zip) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.2.0/snow-owl-oss-7.2.0.zip.sha512) -* [MACOS/LINUX](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.2.0/snow-owl-oss-7.2.0.tar.gz) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.2.0/snow-owl-oss-7.2.0.tar.gz.sha512) -* [RPM](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.2.0/snow-owl-oss-7.2.0.rpm) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.2.0/snow-owl-oss-7.2.0.rpm.sha512) -* [DEB](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.2.0/snow-owl-oss-7.2.0.deb) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.2.0/snow-owl-oss-7.2.0.deb.sha512) +* [WINDOWS](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.zip) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.zip.sha512) +* [MACOS/LINUX](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.tar.gz) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.tar.gz.sha512) +* [RPM](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.rpm) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.rpm.sha512) +* [DEB](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.deb) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.deb.sha512) {% hint style="info" %} This distribution only includes features licensed under the Apache 2.0 license. To get access to the full set of features, please contact [B2i Healthcare](mailto:info@b2i.sg). {% endhint %} -View the detailed release notes [here](https://github.com/b2ihealthcare/snow-owl/releases/tag/v7.2.0). +View the detailed release notes [here](https://github.com/b2ihealthcare/snow-owl/releases/tag/v7.3.0). Not the version you're looking for? View [past releases](https://github.com/b2ihealthcare/snow-owl/releases). @@ -53,6 +53,7 @@ Once you have downloaded the appropriate package: * Run `bin/snowowl.sh` on unix, or `bin/snowowl.bat` on windows * Run `curl http://localhost:8080/snowowl/admin/info` +* Navigate to `http://localhost:8080/snowowl` * See [SNOMED CT API docs](https://docs.b2i.sg/snow-owl/api/snomed), [FHIR API docs](https://docs.b2i.sg/snow-owl/api/fhir) # Learn Snow Owl @@ -115,7 +116,7 @@ Make sure you have the following preferences enabled/disabled. 4. Wait until Eclipse resolves the target platform (click on the `Resolve` button if it refuses to do so) and then click on `Set as Active Target platform` 5. Wait until the build is complete and you have no compile errors 6. Launch `snow-owl-oss` launch configuration in the Run Configurations menu -7. Navigate to `http://localhost:8080/snowowl/snomed-ct/v3` +7. Navigate to `http://localhost:8080/snowowl` # Contributing diff --git a/SnowOwlServer.setup b/SnowOwlServer.setup index 91d2007fab3..34035f4604a 100644 --- a/SnowOwlServer.setup +++ b/SnowOwlServer.setup @@ -122,6 +122,18 @@ key="/instance/org.eclipse.egit.core/core_defaultRepositoryDir" value="${installation.location}/git"/> + + + + diff --git a/cis/com.b2international.snowowl.snomed.cis.feature/pom.xml b/cis/com.b2international.snowowl.snomed.cis.feature/pom.xml index 6046a40cb37..b3591bc91bf 100644 --- a/cis/com.b2international.snowowl.snomed.cis.feature/pom.xml +++ b/cis/com.b2international.snowowl.snomed.cis.feature/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl cis-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.snomed.cis.feature eclipse-feature diff --git a/cis/com.b2international.snowowl.snomed.cis.product/assembly/common/snowowl_config.yml b/cis/com.b2international.snowowl.snomed.cis.product/assembly/common/configuration/snowowl.yml similarity index 100% rename from cis/com.b2international.snowowl.snomed.cis.product/assembly/common/snowowl_config.yml rename to cis/com.b2international.snowowl.snomed.cis.product/assembly/common/configuration/snowowl.yml diff --git a/cis/com.b2international.snowowl.snomed.cis.product/pom.xml b/cis/com.b2international.snowowl.snomed.cis.product/pom.xml index f21221360aa..f048c7a5704 100644 --- a/cis/com.b2international.snowowl.snomed.cis.product/pom.xml +++ b/cis/com.b2international.snowowl.snomed.cis.product/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl cis-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/cis/com.b2international.snowowl.snomed.cis.product/snow-owl-cis.product b/cis/com.b2international.snowowl.snomed.cis.product/snow-owl-cis.product index 38d2274e950..8f0f9c74357 100644 --- a/cis/com.b2international.snowowl.snomed.cis.product/snow-owl-cis.product +++ b/cis/com.b2international.snowowl.snomed.cis.product/snow-owl-cis.product @@ -1,7 +1,7 @@ - + diff --git a/cis/com.b2international.snowowl.snomed.cis.rest/META-INF/MANIFEST.MF b/cis/com.b2international.snowowl.snomed.cis.rest/META-INF/MANIFEST.MF index 1f508e2db60..407e9a0a51d 100644 --- a/cis/com.b2international.snowowl.snomed.cis.rest/META-INF/MANIFEST.MF +++ b/cis/com.b2international.snowowl.snomed.cis.rest/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Component Identifier Service Bundle-SymbolicName: com.b2international.snowowl.snomed.cis.rest;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Automatic-Module-Name: com.b2international.snowowl.snomed.cis.rest Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/cis/com.b2international.snowowl.snomed.cis.rest/pom.xml b/cis/com.b2international.snowowl.snomed.cis.rest/pom.xml index 82c696ae515..528845980a7 100644 --- a/cis/com.b2international.snowowl.snomed.cis.rest/pom.xml +++ b/cis/com.b2international.snowowl.snomed.cis.rest/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl cis-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.snomed.cis.rest diff --git a/cis/com.b2international.snowowl.snomed.cis/META-INF/MANIFEST.MF b/cis/com.b2international.snowowl.snomed.cis/META-INF/MANIFEST.MF index f7eb652a840..c217dcac6db 100644 --- a/cis/com.b2international.snowowl.snomed.cis/META-INF/MANIFEST.MF +++ b/cis/com.b2international.snowowl.snomed.cis/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT CIS Bundle-SymbolicName: com.b2international.snowowl.snomed.cis;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Automatic-Module-Name: com.b2international.snowowl.snomed.cis Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/cis/com.b2international.snowowl.snomed.cis/pom.xml b/cis/com.b2international.snowowl.snomed.cis/pom.xml index 60f07fd7f90..ec7c7b4fedc 100644 --- a/cis/com.b2international.snowowl.snomed.cis/pom.xml +++ b/cis/com.b2international.snowowl.snomed.cis/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl cis-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.snomed.cis eclipse-plugin diff --git a/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/client/CisSnomedIdentifierService.java b/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/client/CisSnomedIdentifierService.java index 5923473df93..21c220f7240 100644 --- a/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/client/CisSnomedIdentifierService.java +++ b/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/client/CisSnomedIdentifierService.java @@ -377,48 +377,40 @@ public Map publish(final Set componentIds) { LOGGER.debug("Publishing {} component IDs.", componentIds.size()); final Map sctIds = getSctIds(componentIds); - final Map problemSctIds = ImmutableMap.copyOf(Maps.filterValues(sctIds, Predicates.not(Predicates.or( - SctId::isAssigned, - SctId::isPublished)))); - - HttpPut deprecateRequest = null; + + HttpPut publishRequest = null; String currentNamespace = null; try { - final Map assignedSctIds = ImmutableMap.copyOf(Maps.filterValues(sctIds, SctId::isAssigned)); - if (!assignedSctIds.isEmpty()) { - if (assignedSctIds.size() > 1) { - final Multimap componentIdsByNamespace = toNamespaceMultimap(assignedSctIds.keySet()); + final Map sctIdsToPublish = ImmutableMap.copyOf(Maps.filterValues(sctIds, Predicates.not(SctId::isPublished))); + if (!sctIdsToPublish.isEmpty()) { + if (sctIdsToPublish.size() > 1) { + final Multimap componentIdsByNamespace = toNamespaceMultimap(sctIdsToPublish.keySet()); for (final Entry> entry : componentIdsByNamespace.asMap().entrySet()) { currentNamespace = entry.getKey(); for (final Collection bulkIds : Iterables.partition(entry.getValue(), requestBulkLimit)) { LOGGER.debug("Sending bulk publication request for namespace {} with size {}.", currentNamespace, bulkIds.size()); - deprecateRequest = httpPut(String.format("sct/bulk/publish?token=%s", getToken()), createBulkPublishData(currentNamespace, bulkIds)); - execute(deprecateRequest); + publishRequest = httpPut(String.format("sct/bulk/publish?token=%s", getToken()), createBulkPublishData(currentNamespace, bulkIds)); + execute(publishRequest); } } } else { - final String componentId = Iterables.getOnlyElement(assignedSctIds.keySet()); + final String componentId = Iterables.getOnlyElement(sctIdsToPublish.keySet()); currentNamespace = SnomedIdentifiers.getNamespace(componentId); - deprecateRequest = httpPut(String.format("sct/publish?token=%s", getToken()), createPublishData(componentId)); - execute(deprecateRequest); + publishRequest = httpPut(String.format("sct/publish?token=%s", getToken()), createPublishData(componentId)); + execute(publishRequest); } } - if (!problemSctIds.isEmpty()) { - throw new SctIdStatusException("Cannot publish %s component IDs because they are not assigned or already published.", problemSctIds); - } - - return ImmutableMap.copyOf(assignedSctIds); - + return ImmutableMap.copyOf(sctIdsToPublish); } catch (IOException e) { throw new SnowowlRuntimeException(String.format("Exception while publishing IDs for namespace %s.", currentNamespace), e); } finally { - release(deprecateRequest); + release(publishRequest); } } diff --git a/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/memory/DefaultSnomedIdentifierService.java b/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/memory/DefaultSnomedIdentifierService.java index 3e930a1d9c4..4c1a76a2e73 100644 --- a/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/memory/DefaultSnomedIdentifierService.java +++ b/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/memory/DefaultSnomedIdentifierService.java @@ -210,21 +210,14 @@ public Map publish(final Set componentIds) { LOGGER.debug("Publishing {} component IDs.", componentIds.size()); final Map sctIds = getSctIds(componentIds); - final Map problemSctIds = ImmutableMap.copyOf(Maps.filterValues(sctIds, Predicates.not(Predicates.or( - SctId::isAssigned, - SctId::isPublished)))); - final Map assignedSctIds = ImmutableMap.copyOf(Maps.filterValues(sctIds, SctId::isAssigned)); + final Map sctIdsToPublish = ImmutableMap.copyOf(Maps.filterValues(sctIds, Predicates.not(SctId::isPublished))); - for (final SctId sctId : assignedSctIds.values()) { + for (final SctId sctId : sctIdsToPublish.values()) { sctId.setStatus(IdentifierStatus.PUBLISHED.getSerializedName()); } - putSctIds(assignedSctIds); - - if (!problemSctIds.isEmpty()) { - LOGGER.warn("Cannot publish the following component IDs because they are not assigned or already published: {}", problemSctIds); - } + putSctIds(sctIdsToPublish); return ImmutableMap.copyOf(sctIds); } diff --git a/cis/pom.xml b/cis/pom.xml index 090b127a37d..0bd7121fd0a 100644 --- a/cis/pom.xml +++ b/cis/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/commons/com.b2international.collections.api/META-INF/MANIFEST.MF b/commons/com.b2international.collections.api/META-INF/MANIFEST.MF index 4363dd4c337..f1c1b811dfb 100644 --- a/commons/com.b2international.collections.api/META-INF/MANIFEST.MF +++ b/commons/com.b2international.collections.api/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Collections API Bundle-SymbolicName: com.b2international.collections.api;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy diff --git a/commons/com.b2international.collections.api/pom.xml b/commons/com.b2international.collections.api/pom.xml index af556fb7910..bf675d62680 100644 --- a/commons/com.b2international.collections.api/pom.xml +++ b/commons/com.b2international.collections.api/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.collections.api eclipse-plugin diff --git a/commons/com.b2international.collections.fastutil/META-INF/MANIFEST.MF b/commons/com.b2international.collections.fastutil/META-INF/MANIFEST.MF index f63f71b0d23..83a24d12f50 100644 --- a/commons/com.b2international.collections.fastutil/META-INF/MANIFEST.MF +++ b/commons/com.b2international.collections.fastutil/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Fastutil based implementation of Collections API Bundle-SymbolicName: com.b2international.collections.fastutil;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 Fragment-Host: com.b2international.collections.api Export-Package: com.b2international.collections, diff --git a/commons/com.b2international.collections.fastutil/pom.xml b/commons/com.b2international.collections.fastutil/pom.xml index 2d1c8f5e59a..d70278d60ad 100644 --- a/commons/com.b2international.collections.fastutil/pom.xml +++ b/commons/com.b2international.collections.fastutil/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.collections.fastutil eclipse-plugin diff --git a/commons/com.b2international.collections.jackson/META-INF/MANIFEST.MF b/commons/com.b2international.collections.jackson/META-INF/MANIFEST.MF index e1c257e7014..9aef0555bcc 100644 --- a/commons/com.b2international.collections.jackson/META-INF/MANIFEST.MF +++ b/commons/com.b2international.collections.jackson/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Jackson Module for Primitive Collections API Bundle-SymbolicName: com.b2international.collections.jackson;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Require-Bundle: com.b2international.collections.api, diff --git a/commons/com.b2international.collections.jackson/pom.xml b/commons/com.b2international.collections.jackson/pom.xml index 77c0d07084e..ea318335ad1 100644 --- a/commons/com.b2international.collections.jackson/pom.xml +++ b/commons/com.b2international.collections.jackson/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.collections.jackson eclipse-plugin diff --git a/commons/com.b2international.commons.base/META-INF/MANIFEST.MF b/commons/com.b2international.commons.base/META-INF/MANIFEST.MF index 0cb333ff132..7654bcca86c 100644 --- a/commons/com.b2international.commons.base/META-INF/MANIFEST.MF +++ b/commons/com.b2international.commons.base/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: B2i Commons Base Bundle-SymbolicName: com.b2international.commons.base;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Export-Package: com.b2international.commons, diff --git a/commons/com.b2international.commons.base/pom.xml b/commons/com.b2international.commons.base/pom.xml index 51929ff486b..b045e91eade 100644 --- a/commons/com.b2international.commons.base/pom.xml +++ b/commons/com.b2international.commons.base/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.commons.base eclipse-plugin diff --git a/commons/com.b2international.commons.base/src/com/b2international/commons/encoding/Base64.java b/commons/com.b2international.commons.base/src/com/b2international/commons/encoding/Base64.java index ab6dd1e7959..77a99c8413d 100644 --- a/commons/com.b2international.commons.base/src/com/b2international/commons/encoding/Base64.java +++ b/commons/com.b2international.commons.base/src/com/b2international/commons/encoding/Base64.java @@ -7,6 +7,7 @@ /** * Base64 Encoder/Decoder */ +@SuppressWarnings({"lgtm[java/constant-comparison]", "lgtm[java/dereferenced-value-may-be-null]"}) public class Base64 { @@ -1402,7 +1403,7 @@ public static String encodeFromFile( String filename ) { // Set up some useful variables java.io.File file = new java.io.File( filename ); - byte[] buffer = new byte[ Math.max((int)(file.length() * 1.4+1),40) ]; // Need max() for math on small files (v2.2.1); Need +1 for a few corner cases (v2.3.5) + byte[] buffer = new byte[ Math.max((int)((file.length() * 1.4) + 1), 40) ]; // Need max() for math on small files (v2.2.1); Need +1 for a few corner cases (v2.3.5) int length = 0; int numBytes = 0; diff --git a/commons/com.b2international.commons.test/META-INF/MANIFEST.MF b/commons/com.b2international.commons.test/META-INF/MANIFEST.MF index 414999cc4bd..b84225152ea 100644 --- a/commons/com.b2international.commons.test/META-INF/MANIFEST.MF +++ b/commons/com.b2international.commons.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: B2i Commons Test Bundle-SymbolicName: com.b2international.commons.test -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Fragment-Host: com.b2international.commons;bundle-version="3.9.0" diff --git a/commons/com.b2international.commons.test/pom.xml b/commons/com.b2international.commons.test/pom.xml index 4583a315737..8087f4681e6 100644 --- a/commons/com.b2international.commons.test/pom.xml +++ b/commons/com.b2international.commons.test/pom.xml @@ -6,7 +6,7 @@ com.b2international.snowowl commons-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.commons.test eclipse-test-plugin diff --git a/commons/com.b2international.commons/META-INF/MANIFEST.MF b/commons/com.b2international.commons/META-INF/MANIFEST.MF index 72111114e72..cdfc96f54d3 100644 --- a/commons/com.b2international.commons/META-INF/MANIFEST.MF +++ b/commons/com.b2international.commons/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: B2i Commons Bundle-SymbolicName: com.b2international.commons;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Export-Package: com.b2international.commons, diff --git a/commons/com.b2international.commons/pom.xml b/commons/com.b2international.commons/pom.xml index 97a7fd54063..7903b85177b 100644 --- a/commons/com.b2international.commons/pom.xml +++ b/commons/com.b2international.commons/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl commons-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.commons eclipse-plugin diff --git a/commons/com.b2international.index.tests.tools/META-INF/MANIFEST.MF b/commons/com.b2international.index.tests.tools/META-INF/MANIFEST.MF index eb1b5041686..91365bf0bc4 100644 --- a/commons/com.b2international.index.tests.tools/META-INF/MANIFEST.MF +++ b/commons/com.b2international.index.tests.tools/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Test tools for tests based on Index API Bundle-SymbolicName: com.b2international.index.tests.tools;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Require-Bundle: com.b2international.index, diff --git a/commons/com.b2international.index.tests.tools/pom.xml b/commons/com.b2international.index.tests.tools/pom.xml index 3311831282f..cddb7666bbf 100644 --- a/commons/com.b2international.index.tests.tools/pom.xml +++ b/commons/com.b2international.index.tests.tools/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.index.tests.tools eclipse-plugin diff --git a/commons/com.b2international.index.tests/.launch/index-http-unit-tests.launch b/commons/com.b2international.index.tests/.launch/index-http-unit-tests.launch index 7e8777f3646..b85bdf92e0f 100644 --- a/commons/com.b2international.index.tests/.launch/index-http-unit-tests.launch +++ b/commons/com.b2international.index.tests/.launch/index-http-unit-tests.launch @@ -29,7 +29,7 @@ - + diff --git a/commons/com.b2international.index.tests/.launch/index-tcp-unit-tests.launch b/commons/com.b2international.index.tests/.launch/index-tcp-unit-tests.launch index 2b4c84d5836..8a0fb87f7d8 100644 --- a/commons/com.b2international.index.tests/.launch/index-tcp-unit-tests.launch +++ b/commons/com.b2international.index.tests/.launch/index-tcp-unit-tests.launch @@ -29,12 +29,12 @@ - + - + diff --git a/commons/com.b2international.index.tests/META-INF/MANIFEST.MF b/commons/com.b2international.index.tests/META-INF/MANIFEST.MF index d3a1fe2600d..5983a0057a0 100644 --- a/commons/com.b2international.index.tests/META-INF/MANIFEST.MF +++ b/commons/com.b2international.index.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Generic Index API Test Suite Bundle-SymbolicName: com.b2international.index.tests;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy diff --git a/commons/com.b2international.index.tests/pom.xml b/commons/com.b2international.index.tests/pom.xml index 8e641286fbe..93e0007c40f 100644 --- a/commons/com.b2international.index.tests/pom.xml +++ b/commons/com.b2international.index.tests/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.index.tests eclipse-test-plugin @@ -49,7 +49,7 @@ test - ${tycho.testArgLine} -Dlogback.configurationFile=${basedir}/src/configuration/logback-maven.xml + ${tycho.testArgLine} -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Dlogback.configurationFile=${basedir}/src/configuration/logback-maven.xml @@ -59,7 +59,7 @@ test - ${tycho.testArgLine} -Dlogback.configurationFile=${basedir}/src/configuration/logback-maven.xml -Dso.index.es.useHttp + ${tycho.testArgLine} -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Dlogback.configurationFile=${basedir}/src/configuration/logback-maven.xml -Dso.index.es.useHttp diff --git a/commons/com.b2international.index.tests/src/com/b2international/index/MaxTermsCountTest.java b/commons/com.b2international.index.tests/src/com/b2international/index/MaxTermsCountTest.java new file mode 100644 index 00000000000..bafda1e3dd4 --- /dev/null +++ b/commons/com.b2international.index.tests/src/com/b2international/index/MaxTermsCountTest.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.index; + +import static com.google.common.collect.Sets.newHashSetWithExpectedSize; +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.Collection; +import java.util.Collections; +import java.util.Set; +import java.util.UUID; + +import org.junit.Test; + +import com.b2international.index.Fixtures.Data; +import com.b2international.index.es.query.EsQueryBuilder; +import com.b2international.index.query.Expressions; +import com.b2international.index.query.Query; +import com.b2international.index.query.SetPredicate; +import com.google.common.collect.ImmutableMap; + +/** + * This test should fail without the partitioning code for {@link SetPredicate}s in {@link EsQueryBuilder}, + * Elasticsearch prevents running queries with more than the configured index.max_terms_count. + * + * @since 7.4 + */ +public class MaxTermsCountTest extends BaseIndexTest { + + @Override + protected Collection> getTypes() { + return Collections.singleton(Data.class); + } + + @Test + public void queryWithMoreThanMaxTermsCount() throws Exception { + final int numberOfTerms = 2 * IndexClientFactory.DEFAULT_MAX_TERMS_COUNT; + final Set moreThanMaxTermsCount = newHashSetWithExpectedSize(numberOfTerms); + for (int i = 0; i < numberOfTerms; i++) { + moreThanMaxTermsCount.add(""+i); + } + + indexDocuments(ImmutableMap.of( + UUID.randomUUID().toString(), createData("1"), + UUID.randomUUID().toString(), createData("2"), + UUID.randomUUID().toString(), createData(""+(numberOfTerms + 1)) + )); + + // two matches + assertThat( + search(Query.select(Data.class).where(Expressions.matchAny("field1", moreThanMaxTermsCount)).build()).getTotal() + ).isEqualTo(2); + } + + private Data createData(String field1Value) { + final Data data = new Data(); + data.setField1(field1Value); + return data; + } + +} diff --git a/commons/com.b2international.index.tests/src/com/b2international/index/SortIndexTest.java b/commons/com.b2international.index.tests/src/com/b2international/index/SortIndexTest.java index 4158b0ea13e..85db6293236 100644 --- a/commons/com.b2international.index.tests/src/com/b2international/index/SortIndexTest.java +++ b/commons/com.b2international.index.tests/src/com/b2international/index/SortIndexTest.java @@ -327,7 +327,7 @@ public void sortScore() throws Exception { final Data data = new Data(); data.setField1(item); - data.setFloatField(100.0f - i); + data.setFloatField(NUM_DOCS - i); documents.put(Integer.toString(i), data); } diff --git a/commons/com.b2international.index/.classpath b/commons/com.b2international.index/.classpath index 3be072c85ae..9ae446cedd6 100644 --- a/commons/com.b2international.index/.classpath +++ b/commons/com.b2international.index/.classpath @@ -7,51 +7,55 @@ - - + + - - - - - - - - - - + + + + + + + + + + + + - + - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - + + + diff --git a/commons/com.b2international.index/META-INF/MANIFEST.MF b/commons/com.b2international.index/META-INF/MANIFEST.MF index d36c355ac0d..fabb32834f1 100644 --- a/commons/com.b2international.index/META-INF/MANIFEST.MF +++ b/commons/com.b2international.index/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Search Indexing Bundle-SymbolicName: com.b2international.index;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", @@ -27,7 +27,6 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", Export-Package: com.b2international.index, com.b2international.index.admin, com.b2international.index.aggregations, - com.b2international.index.analyzer, com.b2international.index.compat, com.b2international.index.decimal, com.b2international.index.es, @@ -47,6 +46,7 @@ Export-Package: com.b2international.index, org.apache.lucene.search, org.apache.solr.common.util, org.elasticsearch.cluster.health, + org.elasticsearch.common, org.tartarus.snowball, org.tartarus.snowball.ext Import-Package: javax.management, @@ -56,50 +56,54 @@ Import-Package: javax.management, org.slf4j.helpers;version="1.7.2", org.slf4j.spi;version="1.7.2" Bundle-ClassPath: ., - lib/aggs-matrix-stats-client-6.8.2.jar, - lib/analysis-common-6.8.2.jar, + lib/aggs-matrix-stats-client-7.5.2.jar, + lib/analysis-common-7.5.2.jar, lib/antlr4-runtime-4.5.3.jar, lib/asm-debug-all-5.1.jar, - lib/compiler-0.9.3.jar, - lib/elasticsearch-6.8.2.jar, - lib/elasticsearch-cli-6.8.2.jar, - lib/elasticsearch-core-6.8.2.jar, - lib/elasticsearch-rest-client-6.8.2.jar, - lib/elasticsearch-rest-high-level-client-6.8.2.jar, - lib/elasticsearch-secure-sm-6.8.2.jar, - lib/elasticsearch-ssl-config-6.8.2.jar, - lib/elasticsearch-x-content-6.8.2.jar, - lib/hppc-0.7.1.jar, + lib/compiler-0.9.6.jar, + lib/elasticsearch-7.5.2.jar, + lib/elasticsearch-cli-7.5.2.jar, + lib/elasticsearch-core-7.5.2.jar, + lib/elasticsearch-geo-7.5.2.jar, + lib/elasticsearch-rest-client-7.5.2.jar, + lib/elasticsearch-rest-high-level-client-7.5.2.jar, + lib/elasticsearch-secure-sm-7.5.2.jar, + lib/elasticsearch-ssl-config-7.5.2.jar, + lib/elasticsearch-x-content-7.5.2.jar, + lib/hppc-0.8.1.jar, + lib/hppcrt-0.7.5.jar, lib/jna-4.5.1.jar, - lib/joda-time-2.10.1.jar, + lib/joda-time-2.10.3.jar, lib/jopt-simple-5.0.2.jar, - lib/lang-mustache-client-6.8.2.jar, - lib/lang-painless-6.8.2.jar, + lib/lang-mustache-client-7.5.2.jar, + lib/lang-painless-7.5.2.jar, lib/log4j-api-2.11.1.jar, lib/log4j-core-2.11.1.jar, - lib/lucene-analyzers-common-7.7.0.jar, - lib/lucene-backward-codecs-7.7.0.jar, - lib/lucene-core-7.7.0.jar, - lib/lucene-grouping-7.7.0.jar, - lib/lucene-highlighter-7.7.0.jar, - lib/lucene-join-7.7.0.jar, - lib/lucene-memory-7.7.0.jar, - lib/lucene-misc-7.7.0.jar, - lib/lucene-queries-7.7.0.jar, - lib/lucene-queryparser-7.7.0.jar, - lib/lucene-sandbox-7.7.0.jar, - lib/lucene-spatial-7.7.0.jar, - lib/lucene-spatial-extras-7.7.0.jar, - lib/lucene-spatial3d-7.7.0.jar, - lib/lucene-suggest-7.7.0.jar, - lib/parent-join-client-6.8.2.jar, - lib/percolator-client-6.8.2.jar, - lib/rank-eval-client-6.8.2.jar, - lib/reindex-6.8.2.jar, - lib/reindex-client-6.8.2.jar, - lib/scripting-painless-spi-6.8.2.jar, + lib/lucene-analyzers-common-8.3.0.jar, + lib/lucene-backward-codecs-8.3.0.jar, + lib/lucene-core-8.3.0.jar, + lib/lucene-grouping-8.3.0.jar, + lib/lucene-highlighter-8.3.0.jar, + lib/lucene-join-8.3.0.jar, + lib/lucene-memory-8.3.0.jar, + lib/lucene-misc-8.3.0.jar, + lib/lucene-queries-8.3.0.jar, + lib/lucene-queryparser-8.3.0.jar, + lib/lucene-sandbox-8.3.0.jar, + lib/lucene-spatial-8.3.0.jar, + lib/lucene-spatial-extras-8.3.0.jar, + lib/lucene-spatial3d-8.3.0.jar, + lib/lucene-suggest-8.3.0.jar, + lib/mapper-extras-client-7.5.2.jar, + lib/parent-join-client-7.5.2.jar, + lib/percolator-client-7.5.2.jar, + lib/rank-eval-client-7.5.2.jar, + lib/reindex-7.5.2.jar, + lib/reindex-client-7.5.2.jar, + lib/scripting-painless-spi-7.5.2.jar, + lib/ssl-config-7.5.2.jar, lib/t-digest-3.2.jar, - lib/transport-6.8.2.jar, - lib/transport-netty4-6.8.2.jar, - lib/transport-netty4-client-6.8.2.jar + lib/transport-7.5.2.jar, + lib/transport-netty4-7.5.2.jar, + lib/transport-netty4-client-7.5.2.jar Bundle-Activator: com.b2international.index.Activator diff --git a/commons/com.b2international.index/build.properties b/commons/com.b2international.index/build.properties index f2f3e44d035..3e78378c73c 100644 --- a/commons/com.b2international.index/build.properties +++ b/commons/com.b2international.index/build.properties @@ -2,5 +2,9 @@ source.. = src/ output.. = target/classes/ bin.includes = META-INF/,\ .,\ - lib/ + lib/,\ + lib/elasticsearch-geo-7.5.2.jar,\ + lib/hppcrt-0.7.5.jar,\ + lib/mapper-extras-client-7.5.2.jar,\ + lib/ssl-config-7.5.2.jar bin.excludes = lib/.gitignore diff --git a/commons/com.b2international.index/pom.xml b/commons/com.b2international.index/pom.xml index 003b5e3f1d6..51c06aea870 100644 --- a/commons/com.b2international.index/pom.xml +++ b/commons/com.b2international.index/pom.xml @@ -4,13 +4,13 @@ com.b2international.snowowl commons-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.index eclipse-plugin - 6.8.2 + 7.5.2 2.11.1 @@ -96,12 +96,14 @@ elasticsearch, elasticsearch-cli, elasticsearch-core, + elasticsearch-geo, elasticsearch-rest-client, elasticsearch-rest-high-level-client, elasticsearch-secure-sm, elasticsearch-ssl-config, elasticsearch-x-content, hppc, + hppcrt, jna, joda-time, jopt-simple, @@ -124,12 +126,14 @@ lucene-spatial-extras, lucene-spatial3d, lucene-suggest, + mapper-extras-client, parent-join-client, percolator-client, rank-eval-client, reindex, reindex-client, scripting-painless-spi, + ssl-config, t-digest, transport, transport-netty4, diff --git a/commons/com.b2international.index/src/com/b2international/index/IndexClientFactory.java b/commons/com.b2international.index/src/com/b2international/index/IndexClientFactory.java index 4194f836616..4c3d1a727c1 100644 --- a/commons/com.b2international.index/src/com/b2international/index/IndexClientFactory.java +++ b/commons/com.b2international.index/src/com/b2international/index/IndexClientFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,6 +51,11 @@ public interface IndexClientFactory { */ String RESULT_WINDOW_KEY = "max_result_window"; + /** + * Configuration key to specify the maximum number of term values in a terms query. By default it is set to {@value #DEFAULT_MAX_TERMS_COUNT}. + */ + String MAX_TERMS_COUNT_KEY = "max_terms_count"; + /** * Configuration key to specify the number of shards for the index. * Currently only the index.es fragment supports. @@ -117,6 +122,12 @@ public interface IndexClientFactory { */ int DEFAULT_RESULT_WINDOW = 100_099; + /** + * The default max terms count (from Elasticsearch default), + * more details + */ + int DEFAULT_MAX_TERMS_COUNT = 65_536; + /** * The default concurrency level for the bulk operations depends on the number of cores you have max(1, cores / 4). * Elasticsearch module only configuration key. @@ -147,7 +158,7 @@ public interface IndexClientFactory { * The default cluster.name value for embedded nodes and tcp based clients. */ String DEFAULT_CLUSTER_NAME = "elastic-snowowl"; - + /** * Create a new {@link IndexClient} with the given name. * diff --git a/commons/com.b2international.index/src/com/b2international/index/aggregations/AggregationBuilder.java b/commons/com.b2international.index/src/com/b2international/index/aggregations/AggregationBuilder.java index 771bdef0ace..7bf2d54397f 100644 --- a/commons/com.b2international.index/src/com/b2international/index/aggregations/AggregationBuilder.java +++ b/commons/com.b2international.index/src/com/b2international/index/aggregations/AggregationBuilder.java @@ -38,6 +38,7 @@ public final class AggregationBuilder implements ScriptExpression { private String groupByScript; private int minBucketSize = 1; private int bucketHitsLimit = 10; + private String path; AggregationBuilder(String name, Class select, Class from) { this.name = name; @@ -55,6 +56,11 @@ public AggregationBuilder onFieldValue(String field) { return this; } + public AggregationBuilder nested(String path) { + this.path = path; + return this; + } + public AggregationBuilder fields(String...fields) { return fields(ImmutableList.copyOf(fields)); } @@ -91,6 +97,10 @@ public String getName() { return name; } + public String getPath() { + return path; + } + public String getGroupByField() { return groupByField; } diff --git a/commons/com.b2international.index/src/com/b2international/index/analyzer/DelimiterTokenizer.java b/commons/com.b2international.index/src/com/b2international/index/analyzer/DelimiterTokenizer.java deleted file mode 100644 index 7a9c31194a8..00000000000 --- a/commons/com.b2international.index/src/com/b2international/index/analyzer/DelimiterTokenizer.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.index.analyzer; - -import org.apache.lucene.analysis.util.CharTokenizer; - -import com.b2international.index.compat.TextConstants; -import com.google.common.base.CharMatcher; - -/** - * A character-oriented tokenizer which splits tokens on whitespace and delimiters enumerated in - * {@link IndexUtils#DELIMITERS}, and also converts characters to lower case in the normalization phase. - * - */ -public class DelimiterTokenizer extends CharTokenizer { - - // Excludes 2000-2000a, which is handled as a range - private static final String BREAKING_WHITESPACE_CHARS = "\t\n\013\f\r \u0085\u1680\u2028\u2029\u205f\u3000"; - - // Excludes 2007, which is handled as a gap in a pair of ranges - private static final String NON_BREAKING_WHITESPACE_CHARS = "\u00a0\u180e\u202f"; - - /** - * @see TextConstants#WHITESPACE_OR_DELIMITER_MATCHER - */ - private static final CharMatcher TOKEN_CHARS; - - static { - TOKEN_CHARS = CharMatcher.ANY - .and(CharMatcher.anyOf(BREAKING_WHITESPACE_CHARS)) - .and(CharMatcher.anyOf(NON_BREAKING_WHITESPACE_CHARS)) - .and(CharMatcher.anyOf(TextConstants.DELIMITERS)) - .and(CharMatcher.inRange('\u2000', '\u200a')) - .precomputed(); - } - - public DelimiterTokenizer() { - super(); - } - - @Override - protected int normalize(int c) { - return Character.toLowerCase(c); - } - - @Override - protected boolean isTokenChar(int c) { - // We don't have whitespace characters to match in the supplementary code point range - return c >= Character.MIN_SUPPLEMENTARY_CODE_POINT || !TOKEN_CHARS.matches((char) c); - } -} diff --git a/commons/com.b2international.index/src/com/b2international/index/analyzer/CharMatcherTokenizer.java b/commons/com.b2international.index/src/com/b2international/index/compat/CharMatcherTokenizer.java similarity index 83% rename from commons/com.b2international.index/src/com/b2international/index/analyzer/CharMatcherTokenizer.java rename to commons/com.b2international.index/src/com/b2international/index/compat/CharMatcherTokenizer.java index a94013913a1..da985ea2fdc 100644 --- a/commons/com.b2international.index/src/com/b2international/index/analyzer/CharMatcherTokenizer.java +++ b/commons/com.b2international.index/src/com/b2international/index/compat/CharMatcherTokenizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.index.analyzer; +package com.b2international.index.compat; import org.apache.lucene.analysis.util.CharTokenizer; @@ -23,7 +23,7 @@ * A variant of {@link CharTokenizer} which splits tokens according to the specified {@link CharMatcher}, * converting characters to lower case in the normalization step. */ -public class CharMatcherTokenizer extends CharTokenizer { +final class CharMatcherTokenizer extends CharTokenizer { private final CharMatcher tokenBoundaryMatcher; @@ -32,11 +32,6 @@ public CharMatcherTokenizer(final CharMatcher tokenBoundaryMatcher) { this.tokenBoundaryMatcher = tokenBoundaryMatcher; } - @Override - protected int normalize(final int c) { - return Character.toLowerCase(c); - } - @Override protected boolean isTokenChar(final int c) { // CharMatcher can't be applied to the supplementary code point range diff --git a/commons/com.b2international.index/src/com/b2international/index/analyzer/ComponentTermAnalyzer.java b/commons/com.b2international.index/src/com/b2international/index/compat/ComponentTermAnalyzer.java similarity index 91% rename from commons/com.b2international.index/src/com/b2international/index/analyzer/ComponentTermAnalyzer.java rename to commons/com.b2international.index/src/com/b2international/index/compat/ComponentTermAnalyzer.java index f6310b2239c..7bfdb96501d 100644 --- a/commons/com.b2international.index/src/com/b2international/index/analyzer/ComponentTermAnalyzer.java +++ b/commons/com.b2international.index/src/com/b2international/index/compat/ComponentTermAnalyzer.java @@ -13,20 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.index.analyzer; +package com.b2international.index.compat; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.miscellaneous.ASCIIFoldingFilter; -import com.b2international.index.compat.TextConstants; - /** * A variant of {@link Analyzer} that uses {@link CharMatcherTokenizer} to tokenize incoming text and convert it to lower case, * then passes tokens through {@link ASCIIFoldingFilter} to convert any non-ASCII characters to their closest ASCII alternative. */ -public class ComponentTermAnalyzer extends Analyzer { +final class ComponentTermAnalyzer extends Analyzer { @Override protected TokenStreamComponents createComponents(final String fieldName) { diff --git a/commons/com.b2international.index/src/com/b2international/index/compat/Highlighting.java b/commons/com.b2international.index/src/com/b2international/index/compat/Highlighting.java index 870363b9d2d..031334f915c 100644 --- a/commons/com.b2international.index/src/com/b2international/index/compat/Highlighting.java +++ b/commons/com.b2international.index/src/com/b2international/index/compat/Highlighting.java @@ -26,7 +26,6 @@ import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; -import com.b2international.index.analyzer.ComponentTermAnalyzer; import com.google.common.base.Splitter; import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; diff --git a/commons/com.b2international.index/src/com/b2international/index/compat/TextConstants.java b/commons/com.b2international.index/src/com/b2international/index/compat/TextConstants.java index 97a1f064ace..42c01edcefa 100644 --- a/commons/com.b2international.index/src/com/b2international/index/compat/TextConstants.java +++ b/commons/com.b2international.index/src/com/b2international/index/compat/TextConstants.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ public abstract class TextConstants { /** * A {@link CharMatcher} that matches all characters in {@link #DELIMITERS} as well as all whitespace characters. */ - public static final CharMatcher WHITESPACE_OR_DELIMITER_MATCHER = INTERNAL_DELIMITER_MATCHER.or(CharMatcher.WHITESPACE).precomputed(); + public static final CharMatcher WHITESPACE_OR_DELIMITER_MATCHER = INTERNAL_DELIMITER_MATCHER.or(CharMatcher.whitespace()).precomputed(); private TextConstants() { throw new UnsupportedOperationException("This class is not supposed to be instantiated."); diff --git a/commons/com.b2international.index/src/com/b2international/index/decimal/ModuleVersion.java b/commons/com.b2international.index/src/com/b2international/index/decimal/ModuleVersion.java index 508709022db..d1f26018e69 100644 --- a/commons/com.b2international.index/src/com/b2international/index/decimal/ModuleVersion.java +++ b/commons/com.b2international.index/src/com/b2international/index/decimal/ModuleVersion.java @@ -15,7 +15,6 @@ */ package com.b2international.index.decimal; -import com.fasterxml.jackson.core.Version; import com.fasterxml.jackson.core.util.VersionUtil; /** diff --git a/commons/com.b2international.index/src/com/b2international/index/es/EsDocumentSearcher.java b/commons/com.b2international.index/src/com/b2international/index/es/EsDocumentSearcher.java index 2c37b70e75d..59d0da28cb8 100644 --- a/commons/com.b2international.index/src/com/b2international/index/es/EsDocumentSearcher.java +++ b/commons/com.b2international.index/src/com/b2international/index/es/EsDocumentSearcher.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ package com.b2international.index.es; import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.Lists.newArrayList; import java.io.ByteArrayInputStream; @@ -28,6 +29,8 @@ import java.util.List; import java.util.Optional; +import org.apache.lucene.search.TotalHits; +import org.apache.lucene.search.TotalHits.Relation; import org.apache.solr.common.util.JavaBinCodec; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ElasticsearchStatusException; @@ -41,10 +44,13 @@ import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.aggregations.AggregationBuilders; +import org.elasticsearch.search.aggregations.Aggregations; +import org.elasticsearch.search.aggregations.bucket.nested.Nested; +import org.elasticsearch.search.aggregations.bucket.nested.ReverseNested; import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder; -import org.elasticsearch.search.aggregations.metrics.tophits.TopHits; -import org.elasticsearch.search.aggregations.metrics.tophits.TopHitsAggregationBuilder; +import org.elasticsearch.search.aggregations.metrics.TopHits; +import org.elasticsearch.search.aggregations.metrics.TopHitsAggregationBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.fetch.subphase.FetchSourceContext; import org.elasticsearch.search.sort.ScriptSortBuilder.ScriptSortType; @@ -107,7 +113,7 @@ public EsDocumentSearcher(EsIndexAdmin admin, ObjectMapper mapper) { public T get(Class type, String key) throws IOException { checkArgument(!Strings.isNullOrEmpty(key), "Key cannot be empty"); final DocumentMapping mapping = admin.mappings().getMapping(type); - final GetRequest req = new GetRequest(admin.getTypeIndex(mapping), mapping.typeAsString(), key) + final GetRequest req = new GetRequest(admin.getTypeIndex(mapping), key) .fetchSourceContext(FetchSourceContext.FETCH_SOURCE); final GetResponse res = admin.client().get(req); @@ -133,16 +139,16 @@ public Hits search(Query query) throws IOException { final int limit = query.getLimit(); final int toRead = Ints.min(limit, resultWindow); - final EsQueryBuilder esQueryBuilder = new EsQueryBuilder(mapping); + final EsQueryBuilder esQueryBuilder = new EsQueryBuilder(mapping, admin.settings()); final QueryBuilder esQuery = esQueryBuilder.build(query.getWhere()); - final SearchRequest req = new SearchRequest(admin.getTypeIndex(mapping)) - .types(mapping.typeAsString()); + final SearchRequest req = new SearchRequest(admin.getTypeIndex(mapping)); final SearchSourceBuilder reqSource = req.source() .size(toRead) .query(esQuery) - .trackScores(esQueryBuilder.needsScoring()); + .trackScores(esQueryBuilder.needsScoring()) + .trackTotalHitsUpTo(Integer.MAX_VALUE); // field selection final boolean fetchSource = applySourceFiltering(query.getFields(), query.isDocIdOnly(), mapping, reqSource); @@ -190,8 +196,10 @@ public Hits search(Query query) throws IOException { throw new IndexException("Couldn't execute query: " + e.getMessage(), null); } - final int totalHits = (int) response.getHits().getTotalHits(); - int numDocsToFetch = Math.min(limit, totalHits) - response.getHits().getHits().length; + TotalHits totalHits = response.getHits().getTotalHits(); + checkState(totalHits.relation == Relation.EQUAL_TO, "Searches should always track total hits accurately"); + final int totalHitCount = (int) totalHits.value; + int numDocsToFetch = Math.min(limit, totalHitCount) - response.getHits().getHits().length; final ImmutableList.Builder allHits = ImmutableList.builder(); allHits.add(response.getHits().getHits()); @@ -219,7 +227,7 @@ public Hits search(Query query) throws IOException { final Class select = query.getSelect(); final Class from = query.getFrom(); - return toHits(select, from, query.getFields(), fetchSource, limit, totalHits, response.getScrollId(), query.getSortBy(), allHits.build()); + return toHits(select, from, query.getFields(), fetchSource, limit, totalHitCount, response.getScrollId(), query.getSortBy(), allHits.build()); } private boolean applySourceFiltering(List fields, boolean isDocIdOnly, final DocumentMapping mapping, final SearchSourceBuilder reqSource) { @@ -242,7 +250,7 @@ private boolean applySourceFiltering(List fields, boolean isDocIdOnl } // Use docValues otherwise for field retrieval - fields.stream().forEach(field -> reqSource.docValueField(field, "use_field_mapping")); + fields.stream().forEach(field -> reqSource.docValueField(field)); reqSource.fetchSource(false); return false; } @@ -274,7 +282,7 @@ public Hits scroll(Scroll scroll) throws IOException { final DocumentMapping mapping = admin.mappings().getMapping(scroll.getFrom()); final boolean fetchSource = scroll.getFields().isEmpty() || requiresDocumentSourceField(mapping, scroll.getFields()); - return toHits(scroll.getSelect(), scroll.getFrom(), scroll.getFields(), fetchSource, response.getHits().getHits().length, (int) response.getHits().getTotalHits(), response.getScrollId(), null, response.getHits()); + return toHits(scroll.getSelect(), scroll.getFrom(), scroll.getFields(), fetchSource, response.getHits().getHits().length, (int) response.getHits().getTotalHits().value, response.getScrollId(), null, response.getHits()); } catch (IOException | ElasticsearchStatusException e) { final Throwable rootCause = Throwables.getRootCause(e); @@ -430,16 +438,16 @@ public Aggregation aggregate(AggregationBuilder aggregation) throws IO final EsClient client = admin.client(); final DocumentMapping mapping = admin.mappings().getMapping(aggregation.getFrom()); - final EsQueryBuilder esQueryBuilder = new EsQueryBuilder(mapping); + final EsQueryBuilder esQueryBuilder = new EsQueryBuilder(mapping, admin.settings()); final QueryBuilder esQuery = esQueryBuilder.build(aggregation.getQuery()); - final SearchRequest req = new SearchRequest(admin.getTypeIndex(mapping)) - .types(mapping.typeAsString()); + final SearchRequest req = new SearchRequest(admin.getTypeIndex(mapping)); final SearchSourceBuilder reqSource = req.source() .query(esQuery) .size(0) - .trackScores(false); + .trackScores(false) + .trackTotalHitsUpTo(Integer.MAX_VALUE); // field selection final boolean fetchSource = applySourceFiltering(aggregation.getFields(), false, mapping, reqSource); @@ -455,9 +463,24 @@ public Aggregation aggregate(AggregationBuilder aggregation) throws IO ImmutableMap.Builder> buckets = ImmutableMap.builder(); - Terms aggregationResult = response.getAggregations().get(aggregationName); + Aggregations topLevelAggregations = response.getAggregations(); + Nested nested = topLevelAggregations.get(nestedAggName(aggregation)); + Terms aggregationResult; + + if (nested != null) { + aggregationResult = nested.getAggregations().get(aggregationName); + } else { + aggregationResult = topLevelAggregations.get(aggregationName); + } + for (org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket bucket : aggregationResult.getBuckets()) { - final TopHits topHits = bucket.getAggregations().get(topHitsAggName(aggregation)); + final TopHits topHits; + if (nested != null) { + final ReverseNested reverseNested = bucket.getAggregations().get(reverseNestedAggName(aggregation)); + topHits = reverseNested.getAggregations().get(topHitsAggName(aggregation)); + } else { + topHits = bucket.getAggregations().get(topHitsAggName(aggregation)); + } Hits hits; if (topHits != null) { hits = toHits(aggregation.getSelect(), aggregation.getFrom(), aggregation.getFields(), fetchSource, aggregation.getBucketHitsLimit(), (int) bucket.getDocCount(), null, null, topHits.getHits()); @@ -486,6 +509,7 @@ private org.elasticsearch.search.aggregations.AggregationBuilder toEsAggregation throw new IllegalArgumentException("Specify either field or script parameter"); } + boolean isNested = !Strings.isNullOrEmpty(aggregation.getPath()); // add top hits agg to get the top N items for each bucket if (aggregation.getBucketHitsLimit() > 0) { TopHitsAggregationBuilder topHitsAgg = AggregationBuilders.topHits(topHitsAggName(aggregation)) @@ -500,11 +524,21 @@ private org.elasticsearch.search.aggregations.AggregationBuilder toEsAggregation .storedFields(STORED_FIELDS_NONE) .fetchSource(false); - aggregation.getFields().forEach(field -> topHitsAgg.docValueField(field, "use_field_mapping")); + aggregation.getFields().forEach(field -> topHitsAgg.docValueField(field)); } - termsAgg.subAggregation(topHitsAgg); + if (isNested) { + termsAgg.subAggregation(AggregationBuilders.reverseNested(reverseNestedAggName(aggregation)).subAggregation(topHitsAgg)); + } else { + termsAgg.subAggregation(topHitsAgg); + } + } + + if (isNested) { + return AggregationBuilders + .nested(nestedAggName(aggregation), aggregation.getPath()) + .subAggregation(termsAgg); } return termsAgg; @@ -513,5 +547,13 @@ private org.elasticsearch.search.aggregations.AggregationBuilder toEsAggregation private String topHitsAggName(AggregationBuilder aggregation) { return aggregation.getName() + "-top-hits"; } + + private String nestedAggName(AggregationBuilder aggregation) { + return aggregation.getName() + "-nested"; + } + + private String reverseNestedAggName(AggregationBuilder aggregation) { + return aggregation.getName() + "-reverse-nested"; + } } diff --git a/commons/com.b2international.index/src/com/b2international/index/es/EsDocumentWriter.java b/commons/com.b2international.index/src/com/b2international/index/es/EsDocumentWriter.java index 535e3ed77b1..5afbdcbf151 100644 --- a/commons/com.b2international.index/src/com/b2international/index/es/EsDocumentWriter.java +++ b/commons/com.b2international.index/src/com/b2international/index/es/EsDocumentWriter.java @@ -185,7 +185,6 @@ public void afterBulk(long executionId, BulkRequest request, BulkResponse respon final Map indexOperationsForType = indexOperations.row(type); final DocumentMapping mapping = admin.mappings().getMapping(type); - final String typeString = mapping.typeAsString(); final String typeIndex = admin.getTypeIndex(mapping); mappingsToRefresh.add(mapping); @@ -220,14 +219,16 @@ public void afterBulk(long executionId, BulkRequest request, BulkResponse respon _source = mapper.writeValueAsBytes(obj); } - processor.add(new IndexRequest(typeIndex, typeString, id) + processor.add(new IndexRequest() + .index(typeIndex) + .id(id) .opType(OpType.INDEX) .source(_source, XContentType.JSON)); } } for (String id : deleteOperations.removeAll(type)) { - processor.add(new DeleteRequest(typeIndex, typeString, id)); + processor.add(new DeleteRequest(typeIndex, id)); } // Flush processor between index boundaries @@ -243,7 +244,7 @@ public void afterBulk(long executionId, BulkRequest request, BulkResponse respon mappingsToRefresh.add(mapping); for (String id : deleteOperations.removeAll(type)) { - processor.add(new DeleteRequest(typeIndex, typeString, id)); + processor.add(new DeleteRequest(typeIndex, id)); } // Flush processor between index boundaries diff --git a/commons/com.b2international.index/src/com/b2international/index/es/EsIndexClientFactory.java b/commons/com.b2international.index/src/com/b2international/index/es/EsIndexClientFactory.java index 3d5d18e860b..8f1dc0ae82f 100644 --- a/commons/com.b2international.index/src/com/b2international/index/es/EsIndexClientFactory.java +++ b/commons/com.b2international.index/src/com/b2international/index/es/EsIndexClientFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/commons/com.b2international.index/src/com/b2international/index/es/EsNode.java b/commons/com.b2international.index/src/com/b2international/index/es/EsNode.java index 26b17385822..3273a802574 100644 --- a/commons/com.b2international.index/src/com/b2international/index/es/EsNode.java +++ b/commons/com.b2international.index/src/com/b2international/index/es/EsNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.time.temporal.ChronoUnit; +import java.util.Collections; import java.util.Comparator; import org.elasticsearch.analysis.common.CommonAnalysisPlugin; @@ -145,7 +146,7 @@ private static void putSettingIfAbsent(Settings.Builder settings, String key, bo } protected EsNode(Settings settings, Path dataPath, boolean persistent) { - super(InternalSettingsPreparer.prepareEnvironment(settings, null), ImmutableList.>builder() + super(InternalSettingsPreparer.prepareEnvironment(settings, Collections.emptyMap(), null, null), ImmutableList.>builder() .add(CommonAnalysisPlugin.class) .add(MatrixAggregationPlugin.class) .add(Netty4Plugin.class) @@ -159,10 +160,6 @@ protected EsNode(Settings settings, Path dataPath, boolean persistent) { this.persistent = persistent; } - @Override - protected void registerDerivedNodeNameWithLogger(String nodeName) { - } - private static void waitForPendingTasks(Client client) { RetryPolicy retryPolicy = new RetryPolicy(); retryPolicy diff --git a/commons/com.b2international.index/src/com/b2international/index/es/admin/EsIndexAdmin.java b/commons/com.b2international.index/src/com/b2international/index/es/admin/EsIndexAdmin.java index df0a713c38e..d3189d50de6 100644 --- a/commons/com.b2international.index/src/com/b2international/index/es/admin/EsIndexAdmin.java +++ b/commons/com.b2international.index/src/com/b2international/index/es/admin/EsIndexAdmin.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -86,7 +86,7 @@ public final class EsIndexAdmin implements IndexAdmin { private static final EnumSet DIFF_FLAGS = EnumSet.of(DiffFlags.ADD_ORIGINAL_VALUE_ON_REPLACE); private static final int DEFAULT_MAX_NUMBER_OF_VERSION_CONFLICT_RETRIES = 5; - private static final int BATCHS_SIZE = 10_000; + private static final int BATCH_SIZE = 10_000; private final Random random = new Random(); private final EsClient client; @@ -109,6 +109,7 @@ public EsIndexAdmin(EsClient client, ObjectMapper mapper, String name, Mappings this.settings.putIfAbsent(IndexClientFactory.COMMIT_CONCURRENCY_LEVEL, IndexClientFactory.DEFAULT_COMMIT_CONCURRENCY_LEVEL); this.settings.putIfAbsent(IndexClientFactory.RESULT_WINDOW_KEY, ""+IndexClientFactory.DEFAULT_RESULT_WINDOW); + this.settings.putIfAbsent(IndexClientFactory.MAX_TERMS_COUNT_KEY, ""+IndexClientFactory.DEFAULT_MAX_TERMS_COUNT); this.settings.putIfAbsent(IndexClientFactory.TRANSLOG_SYNC_INTERVAL_KEY, IndexClientFactory.DEFAULT_TRANSLOG_SYNC_INTERVAL); final String prefix = (String) settings.getOrDefault(IndexClientFactory.INDEX_PREFIX, IndexClientFactory.DEFAULT_INDEX_PREFIX); @@ -145,24 +146,23 @@ public void create() { for (DocumentMapping mapping : mappings.getMappings()) { final String index = getTypeIndex(mapping); final String type = mapping.typeAsString(); - final Map typeMapping = ImmutableMap.of(type, - ImmutableMap.builder() + final Map typeMapping = ImmutableMap.builder() .put("date_detection", false) .put("numeric_detection", false) .putAll(toProperties(mapping)) - .build()); + .build(); if (exists(mapping)) { // update mapping if required ImmutableOpenMap currentIndexMapping; try { - currentIndexMapping = client.indices().getMapping(new GetMappingsRequest().indices(index).types(type)).mappings().get(index); + currentIndexMapping = client.indices().getMapping(new GetMappingsRequest().types(type).indices(index)).mappings().get(index); } catch (Exception e) { throw new IndexException(String.format("Failed to get mapping of '%s' for type '%s'", name, mapping.typeAsString()), e); } try { - final ObjectNode newTypeMapping = mapper.valueToTree(typeMapping.get(type)); + final ObjectNode newTypeMapping = mapper.valueToTree(typeMapping); final ObjectNode currentTypeMapping = mapper.valueToTree(currentIndexMapping.get(type).getSourceAsMap()); final JsonNode diff = JsonDiff.asJson(currentTypeMapping, newTypeMapping, DIFF_FLAGS); final ArrayNode diffNode = ClassUtils.checkAndCast(diff, ArrayNode.class); @@ -236,10 +236,13 @@ private Map createIndexSettings() throws IOException { .put("number_of_replicas", "0") // disable es refresh, we will do it manually on each commit .put("refresh_interval", "-1") - .put(IndexClientFactory.RESULT_WINDOW_KEY, settings().get(IndexClientFactory.RESULT_WINDOW_KEY)) - .put(IndexClientFactory.TRANSLOG_SYNC_INTERVAL_KEY, settings().get(IndexClientFactory.TRANSLOG_SYNC_INTERVAL_KEY)) + // use async durability for the translog .put("translog.durability", "async") + // wait all shards during writes .put("write.wait_for_active_shards", "all") + .put(IndexClientFactory.RESULT_WINDOW_KEY, settings().get(IndexClientFactory.RESULT_WINDOW_KEY)) + .put(IndexClientFactory.MAX_TERMS_COUNT_KEY, settings().get(IndexClientFactory.MAX_TERMS_COUNT_KEY)) + .put(IndexClientFactory.TRANSLOG_SYNC_INTERVAL_KEY, settings().get(IndexClientFactory.TRANSLOG_SYNC_INTERVAL_KEY)) .build(); } @@ -306,8 +309,14 @@ private Map toProperties(DocumentMapping mapping) { Doc annotation = fieldType.getAnnotation(Doc.class); // this is a nested document type create a nested mapping final Map prop = newHashMap(); - prop.put("type", annotation.nested() ? "nested" : "object"); - prop.put("enabled", annotation.index() ? true : false); + // XXX type: object is the default for nested objects, ES won't store it in the mapping and will default to object even if explicitly set, which would cause unnecessary mapping update during boot + if (annotation.nested()) { + prop.put("type", "nested"); + } + // XXX enabled: true is the default, ES won't store it in the mapping and will default to true even if explicitly set, which would cause unnecessary mapping update during boot + if (!annotation.index()) { + prop.put("enabled", false); + } prop.putAll(toProperties(new DocumentMapping(fieldType))); properties.put(property, prop); } else { @@ -542,7 +551,7 @@ private void bulkIndexByScroll(final EsClient client, final Set mappingsToRefresh) { final DocumentMapping mapping = mappings().getMapping(op.getType()); - final QueryBuilder query = new EsQueryBuilder(mapping).build(op.getFilter()); + final QueryBuilder query = new EsQueryBuilder(mapping, settings).build(op.getFilter()); long versionConflicts = 0; int attempts = DEFAULT_MAX_NUMBER_OF_VERSION_CONFLICT_RETRIES; @@ -553,9 +562,9 @@ private void bulkIndexByScroll(final EsClient client, final BulkByScrollResponse response; if ("update".equals(command)) { - response = client.updateByQuery(getTypeIndex(mapping), mapping.typeAsString(), BATCHS_SIZE, script, getConcurrencyLevel(), query); + response = client.updateByQuery(getTypeIndex(mapping), BATCH_SIZE, script, getConcurrencyLevel(), query); } else if ("delete".equals(command)) { - response = client.deleteByQuery(getTypeIndex(mapping), mapping.typeAsString(), BATCHS_SIZE, getConcurrencyLevel(), query); + response = client.deleteByQuery(getTypeIndex(mapping), BATCH_SIZE, getConcurrencyLevel(), query); } else { throw new UnsupportedOperationException("Not implemented command: " + command); } diff --git a/commons/com.b2international.index/src/com/b2international/index/es/client/EsClient.java b/commons/com.b2international.index/src/com/b2international/index/es/client/EsClient.java index 398fff29180..231b2ef3470 100644 --- a/commons/com.b2international.index/src/com/b2international/index/es/client/EsClient.java +++ b/commons/com.b2international.index/src/com/b2international/index/es/client/EsClient.java @@ -71,9 +71,9 @@ public interface EsClient extends AutoCloseable { BulkProcessor.Builder bulk(BulkProcessor.Listener listener); - BulkByScrollResponse updateByQuery(String index, String type, int batchSize, Script script, int numberOfSlices, QueryBuilder query) throws IOException; + BulkByScrollResponse updateByQuery(String index, int batchSize, Script script, int numberOfSlices, QueryBuilder query) throws IOException; - BulkByScrollResponse deleteByQuery(String index, String type, int batchSize, int numberOfSlices, QueryBuilder query) throws IOException; + BulkByScrollResponse deleteByQuery(String index, int batchSize, int numberOfSlices, QueryBuilder query) throws IOException; static EsClient create(final EsClientConfiguration configuration) { return ClientPool.create(configuration); diff --git a/commons/com.b2international.index/src/com/b2international/index/es/client/EsClientBase.java b/commons/com.b2international.index/src/com/b2international/index/es/client/EsClientBase.java index f0e0e4da7eb..28fcf9ca4f0 100644 --- a/commons/com.b2international.index/src/com/b2international/index/es/client/EsClientBase.java +++ b/commons/com.b2international.index/src/com/b2international/index/es/client/EsClientBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,7 @@ import org.apache.http.HttpHost; import org.elasticsearch.ElasticsearchStatusException; import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest; +import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest.Level; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.action.admin.indices.settings.get.GetSettingsRequest; import org.elasticsearch.action.admin.indices.settings.get.GetSettingsResponse; @@ -134,7 +135,9 @@ private String checkClusterAvailable(String previousAvailability) { private ClusterHealthResponse checkClusterHealth(ClusterHealthResponse previousHealth) { try { log.trace("Checking cluster health at '{}'...", host.toURI()); - return cluster().health(new ClusterHealthRequest()); + ClusterHealthRequest req = new ClusterHealthRequest(); + req.level(Level.INDICES); + return cluster().health(req); } catch (IOException e) { throw new IndexException("Failed to get cluster health", e); } diff --git a/commons/com.b2international.index/src/com/b2international/index/es/client/http/EsHttpClient.java b/commons/com.b2international.index/src/com/b2international/index/es/client/http/EsHttpClient.java index 3ad233df162..95da2d92971 100644 --- a/commons/com.b2international.index/src/com/b2international/index/es/client/http/EsHttpClient.java +++ b/commons/com.b2international.index/src/com/b2international/index/es/client/http/EsHttpClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,8 +75,7 @@ public EsHttpClient(final EsClientConfiguration configuration) { .setSocketTimeout(configuration.getSocketTimeout()); final RestClientBuilder restClientBuilder = RestClient.builder(host()) - .setRequestConfigCallback(requestConfigCallback) - .setMaxRetryTimeoutMillis(configuration.getSocketTimeout()); // retry timeout should match socket timeout + .setRequestConfigCallback(requestConfigCallback); if (configuration.isProtected()) { @@ -150,15 +149,15 @@ public SearchResponse scroll(SearchScrollRequest req) throws IOException { @Override public final ClearScrollResponse clearScroll(ClearScrollRequest req) throws IOException { checkAvailable(); + // XXX use special client to handle 404 Bad Request on missing search context errors return clientExt.clearScroll(req, RequestOptions.DEFAULT); } @Override - public BulkByScrollResponse updateByQuery(String index, String type, int batchSize, Script script, int numberOfSlices, + public BulkByScrollResponse updateByQuery(String index, int batchSize, Script script, int numberOfSlices, QueryBuilder query) throws IOException { checkHealthy(index); UpdateByQueryRequest updateByQueryRequest = new UpdateByQueryRequest(index) - .setDocTypes(type) .setBatchSize(batchSize) .setQuery(query) .setScript(script) @@ -169,11 +168,10 @@ public BulkByScrollResponse updateByQuery(String index, String type, int batchSi } @Override - public BulkByScrollResponse deleteByQuery(String index, String type, int batchSize, int numberOfSlices, + public BulkByScrollResponse deleteByQuery(String index, int batchSize, int numberOfSlices, QueryBuilder query) throws IOException { checkHealthy(index); DeleteByQueryRequest deleteByQueryRequest = new DeleteByQueryRequest(index) - .setDocTypes(type) .setBatchSize(batchSize) .setQuery(query) .setSlices(numberOfSlices) diff --git a/commons/com.b2international.index/src/com/b2international/index/es/client/tcp/EsTcpClient.java b/commons/com.b2international.index/src/com/b2international/index/es/client/tcp/EsTcpClient.java index a5683f5fc68..c39b0e7b535 100644 --- a/commons/com.b2international.index/src/com/b2international/index/es/client/tcp/EsTcpClient.java +++ b/commons/com.b2international.index/src/com/b2international/index/es/client/tcp/EsTcpClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,6 +46,7 @@ /** * @since 6.11 + * @deprecated */ public final class EsTcpClient extends EsClientBase { @@ -102,17 +103,16 @@ public ClearScrollResponse clearScroll(ClearScrollRequest req) throws IOExceptio @Override public Builder bulk(Listener listener) { - return BulkProcessor.builder(client, listener); + return BulkProcessor.builder(client::bulk, listener); } @Override - public BulkByScrollResponse updateByQuery(String index, String type, int batchSize, Script script, int numberOfSlices, + public BulkByScrollResponse updateByQuery(String index, int batchSize, Script script, int numberOfSlices, QueryBuilder query) throws IOException { - UpdateByQueryRequestBuilder ubqrb = UpdateByQueryAction.INSTANCE.newRequestBuilder(client); + UpdateByQueryRequestBuilder ubqrb = new UpdateByQueryRequestBuilder(client, UpdateByQueryAction.INSTANCE); ubqrb.source() .setIndices(index) - .setTypes(type) .setSize(batchSize) .setQuery(query); @@ -123,13 +123,12 @@ public BulkByScrollResponse updateByQuery(String index, String type, int batchSi } @Override - public BulkByScrollResponse deleteByQuery(String index, String type, int batchSize, int numberOfSlices, + public BulkByScrollResponse deleteByQuery(String index, int batchSize, int numberOfSlices, QueryBuilder query) throws IOException { - DeleteByQueryRequestBuilder dbqrb = DeleteByQueryAction.INSTANCE.newRequestBuilder(client); + DeleteByQueryRequestBuilder dbqrb = new DeleteByQueryRequestBuilder(client, DeleteByQueryAction.INSTANCE); dbqrb.source() .setIndices(index) - .setTypes(type) .setSize(batchSize) .setQuery(query); diff --git a/commons/com.b2international.index/src/com/b2international/index/es/query/EsQueryBuilder.java b/commons/com.b2international.index/src/com/b2international/index/es/query/EsQueryBuilder.java index 5416ac0a503..b228be11b7e 100644 --- a/commons/com.b2international.index/src/com/b2international/index/es/query/EsQueryBuilder.java +++ b/commons/com.b2international.index/src/com/b2international/index/es/query/EsQueryBuilder.java @@ -16,11 +16,11 @@ package com.b2international.index.es.query; import static com.google.common.base.Preconditions.checkNotNull; -import static com.google.common.collect.Sets.newHashSetWithExpectedSize; -import java.math.BigDecimal; -import java.util.Collection; import java.util.Deque; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; import org.apache.lucene.search.join.ScoreMode; import org.elasticsearch.common.lucene.search.function.CombineFunction; @@ -33,39 +33,14 @@ import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders; import com.b2international.commons.exceptions.FormattedRuntimeException; +import com.b2international.index.IndexClientFactory; import com.b2international.index.compat.TextConstants; import com.b2international.index.mapping.DocumentMapping; -import com.b2international.index.query.BoolExpression; -import com.b2international.index.query.BooleanPredicate; -import com.b2international.index.query.BoostPredicate; -import com.b2international.index.query.DecimalPredicate; -import com.b2international.index.query.DecimalRangePredicate; -import com.b2international.index.query.DecimalSetPredicate; -import com.b2international.index.query.DisMaxPredicate; -import com.b2international.index.query.Expression; -import com.b2international.index.query.HasParentPredicate; -import com.b2international.index.query.IntPredicate; -import com.b2international.index.query.IntRangePredicate; -import com.b2international.index.query.IntSetPredicate; -import com.b2international.index.query.LongPredicate; -import com.b2international.index.query.LongRangePredicate; -import com.b2international.index.query.LongSetPredicate; -import com.b2international.index.query.MatchAll; -import com.b2international.index.query.MatchNone; -import com.b2international.index.query.NestedPredicate; -import com.b2international.index.query.Predicate; -import com.b2international.index.query.PrefixPredicate; -import com.b2international.index.query.RangePredicate; -import com.b2international.index.query.ScriptQueryExpression; -import com.b2international.index.query.ScriptScoreExpression; -import com.b2international.index.query.SetPredicate; -import com.b2international.index.query.SingleArgumentPredicate; -import com.b2international.index.query.StringPredicate; -import com.b2international.index.query.StringRangePredicate; -import com.b2international.index.query.StringSetPredicate; -import com.b2international.index.query.TextPredicate; +import com.b2international.index.query.*; import com.b2international.index.query.TextPredicate.MatchType; import com.b2international.index.util.DecimalUtils; +import com.google.common.base.Function; +import com.google.common.collect.Iterables; import com.google.common.collect.Queues; /** @@ -77,17 +52,19 @@ public final class EsQueryBuilder { private static String ILLEGAL_STACK_STATE_MESSAGE = "Illegal internal stack state: %s"; private final Deque deque = Queues.newLinkedBlockingDeque(); + private final Map settings; private final DocumentMapping mapping; private final String path; private boolean needsScoring; - public EsQueryBuilder(DocumentMapping mapping) { - this(mapping, ""); + public EsQueryBuilder(DocumentMapping mapping, Map settings) { + this(mapping, settings, ""); } - private EsQueryBuilder(DocumentMapping mapping, String path) { + private EsQueryBuilder(DocumentMapping mapping, Map settings, String path) { this.mapping = mapping; + this.settings = settings; this.path = path; } @@ -191,7 +168,7 @@ private void visit(BoolExpression bool) { final BoolQueryBuilder query = QueryBuilders.boolQuery(); for (Expression must : bool.mustClauses()) { // visit the item and immediately pop the deque item back - final EsQueryBuilder innerQueryBuilder = new EsQueryBuilder(mapping); + final EsQueryBuilder innerQueryBuilder = new EsQueryBuilder(mapping, settings); innerQueryBuilder.visit(must); if (innerQueryBuilder.needsScoring) { needsScoring = innerQueryBuilder.needsScoring; @@ -226,7 +203,7 @@ private void visit(BoolExpression bool) { private void visit(NestedPredicate predicate) { final String nestedPath = toFieldPath(predicate); final DocumentMapping nestedMapping = mapping.getNestedMapping(predicate.getField()); - final EsQueryBuilder nestedQueryBuilder = new EsQueryBuilder(nestedMapping, nestedPath); + final EsQueryBuilder nestedQueryBuilder = new EsQueryBuilder(nestedMapping, settings, nestedPath); nestedQueryBuilder.visit(predicate.getExpression()); needsScoring = nestedQueryBuilder.needsScoring; final QueryBuilder nestedQuery = nestedQueryBuilder.deque.pop(); @@ -271,7 +248,6 @@ private void visit(TextPredicate predicate) { query = QueryBuilders.queryStringQuery(TextConstants.escape(term)) .field(field) .escape(false) - .useDisMax(true) .allowLeadingWildcard(true) .defaultOperator(Operator.AND); break; @@ -292,20 +268,40 @@ private void visit(SingleArgumentPredicate predicate) { deque.push(QueryBuilders.termQuery(toFieldPath(predicate), predicate.getArgument())); } - private void visit(SetPredicate predicate) { - deque.push(QueryBuilders.termsQuery(toFieldPath(predicate), predicate.values())); - } - private void visit(DecimalPredicate predicate) { deque.push(QueryBuilders.termQuery(toFieldPath(predicate), DecimalUtils.encode(predicate.getArgument()))); } + private void visit(SetPredicate predicate) { + toTermsQuery(predicate, predicate.values(), null); + } + private void visit(DecimalSetPredicate predicate) { - final Collection terms = newHashSetWithExpectedSize(predicate.values().size()); - for (BigDecimal decimal : predicate.values()) { - terms.add(DecimalUtils.encode(decimal)); + toTermsQuery(predicate, predicate.values(), DecimalUtils::encode); + } + + // consider max terms count and break into multiple terms queries if number of terms are greater than that value + private void toTermsQuery(SetPredicate predicate, final Set terms, final Function valueConverter) { + final int maxTermsCount = Integer.parseInt((String) settings.get(IndexClientFactory.MAX_TERMS_COUNT_KEY)); + if (terms.size() > maxTermsCount) { + final BoolQueryBuilder bool = QueryBuilders.boolQuery().minimumShouldMatch(1); + Iterables.partition(terms, maxTermsCount).forEach(partition -> { + if (valueConverter != null) { + bool.should(QueryBuilders.termsQuery(toFieldPath(predicate), partition.stream().map(valueConverter).collect(Collectors.toSet()))); + } else { + bool.should(QueryBuilders.termsQuery(toFieldPath(predicate), partition)); + } + + }); + deque.push(bool); + } else { + // push the terms query directly + if (valueConverter != null) { + deque.push(QueryBuilders.termsQuery(toFieldPath(predicate), terms.stream().map(valueConverter).collect(Collectors.toSet()))); + } else { + deque.push(QueryBuilders.termsQuery(toFieldPath(predicate), terms)); + } } - deque.push(QueryBuilders.termsQuery(toFieldPath(predicate), terms)); } private void visit(PrefixPredicate predicate) { diff --git a/commons/com.b2international.index/src/com/b2international/index/revision/BranchMergeConflictException.java b/commons/com.b2international.index/src/com/b2international/index/revision/BranchMergeConflictException.java index c774f3e6ede..d1c2ebd40a6 100644 --- a/commons/com.b2international.index/src/com/b2international/index/revision/BranchMergeConflictException.java +++ b/commons/com.b2international.index/src/com/b2international/index/revision/BranchMergeConflictException.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,8 @@ */ public final class BranchMergeConflictException extends RuntimeException { + private static final long serialVersionUID = 1L; + private final List conflicts; public BranchMergeConflictException(List conflicts) { diff --git a/commons/com.b2international.index/src/com/b2international/index/revision/RevisionBranchChangeSet.java b/commons/com.b2international.index/src/com/b2international/index/revision/RevisionBranchChangeSet.java index 668c2de65e8..a69100ded36 100644 --- a/commons/com.b2international.index/src/com/b2international/index/revision/RevisionBranchChangeSet.java +++ b/commons/com.b2international.index/src/com/b2international/index/revision/RevisionBranchChangeSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ import java.util.Map; import java.util.Set; -import com.b2international.index.IndexRead; import com.b2international.index.mapping.DocumentMapping; import com.google.common.collect.HashMultimap; import com.google.common.collect.ImmutableSet; diff --git a/commons/com.b2international.index/src/com/b2international/index/revision/RevisionBranchPoint.java b/commons/com.b2international.index/src/com/b2international/index/revision/RevisionBranchPoint.java index 382788ba83b..968392fb33d 100644 --- a/commons/com.b2international.index/src/com/b2international/index/revision/RevisionBranchPoint.java +++ b/commons/com.b2international.index/src/com/b2international/index/revision/RevisionBranchPoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,8 @@ @IP public final class RevisionBranchPoint implements Comparable, Serializable { + private static final long serialVersionUID = 1L; + private final long branchId; private final long timestamp; diff --git a/commons/com.b2international.index/src/org/apache/hadoop/hbase/util/OrderedBytes.java b/commons/com.b2international.index/src/org/apache/hadoop/hbase/util/OrderedBytes.java index c6525dedfbf..64dae987ead 100644 --- a/commons/com.b2international.index/src/org/apache/hadoop/hbase/util/OrderedBytes.java +++ b/commons/com.b2international.index/src/org/apache/hadoop/hbase/util/OrderedBytes.java @@ -266,6 +266,7 @@ * Orderly library. *

*/ +@SuppressWarnings({"lgtm[java/constant-comparison]"}) public class OrderedBytes { /* diff --git a/commons/com.b2international.index/src/org/apache/solr/common/util/JavaBinCodec.java b/commons/com.b2international.index/src/org/apache/solr/common/util/JavaBinCodec.java index e2d6d92052a..97e07ebcd9c 100644 --- a/commons/com.b2international.index/src/org/apache/solr/common/util/JavaBinCodec.java +++ b/commons/com.b2international.index/src/org/apache/solr/common/util/JavaBinCodec.java @@ -65,6 +65,7 @@ * - Converted internal streams into a regular DataInputStream/DataOutputStream * - Converted Solr Cache and hashing methods to use Guava counterparts */ +@SuppressWarnings({"lgtm[java/dereferenced-value-may-be-null]"}) public class JavaBinCodec { public static final byte diff --git a/commons/com.b2international.index/src/org/elasticsearch/client/RestHighLevelClientExt.java b/commons/com.b2international.index/src/org/elasticsearch/client/RestHighLevelClientExt.java index fb357396f6b..9d68beef9e7 100644 --- a/commons/com.b2international.index/src/org/elasticsearch/client/RestHighLevelClientExt.java +++ b/commons/com.b2international.index/src/org/elasticsearch/client/RestHighLevelClientExt.java @@ -143,18 +143,12 @@ static Request bulk(BulkRequest bulkRequest) throws IOException { if (Strings.hasLength(writeRequest.index())) { metadata.field("_index", writeRequest.index()); } - if (Strings.hasLength(writeRequest.type())) { - metadata.field("_type", writeRequest.type()); - } if (Strings.hasLength(writeRequest.id())) { metadata.field("_id", writeRequest.id()); } if (Strings.hasLength(writeRequest.routing())) { metadata.field("routing", writeRequest.routing()); } - if (Strings.hasLength(writeRequest.parent())) { - metadata.field("parent", writeRequest.parent()); - } if (writeRequest.version() != Versions.MATCH_ANY) { metadata.field("version", writeRequest.version()); } @@ -165,8 +159,6 @@ static Request bulk(BulkRequest bulkRequest) throws IOException { metadata.field("version_type", "external"); } else if (versionType == VersionType.EXTERNAL_GTE) { metadata.field("version_type", "external_gte"); - } else if (versionType == VersionType.FORCE) { - metadata.field("version_type", "force"); } } diff --git a/commons/com.b2international.mapdb/pom.xml b/commons/com.b2international.mapdb/pom.xml index abbd28bab32..7adb4b7ad2e 100644 --- a/commons/com.b2international.mapdb/pom.xml +++ b/commons/com.b2international.mapdb/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.mapdb eclipse-plugin diff --git a/commons/com.b2international.scripting.api/META-INF/MANIFEST.MF b/commons/com.b2international.scripting.api/META-INF/MANIFEST.MF index 96f1bddeb3f..358d98dcba1 100644 --- a/commons/com.b2international.scripting.api/META-INF/MANIFEST.MF +++ b/commons/com.b2international.scripting.api/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Scripting Module Bundle-SymbolicName: com.b2international.scripting.api;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy diff --git a/commons/com.b2international.scripting.api/pom.xml b/commons/com.b2international.scripting.api/pom.xml index 12e80cdb833..2e9e5f3f45e 100644 --- a/commons/com.b2international.scripting.api/pom.xml +++ b/commons/com.b2international.scripting.api/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.scripting.api eclipse-plugin diff --git a/commons/com.b2international.scripting.groovy/META-INF/MANIFEST.MF b/commons/com.b2international.scripting.groovy/META-INF/MANIFEST.MF index 8d4d1c7dcd8..fa359b7ddf4 100644 --- a/commons/com.b2international.scripting.groovy/META-INF/MANIFEST.MF +++ b/commons/com.b2international.scripting.groovy/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Scripting Groovy Module Bundle-SymbolicName: com.b2international.scripting.groovy;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.scripting.api;bundle-version="6.1.0" Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/commons/com.b2international.scripting.groovy/pom.xml b/commons/com.b2international.scripting.groovy/pom.xml index 688a75deb2a..49b71b65d43 100644 --- a/commons/com.b2international.scripting.groovy/pom.xml +++ b/commons/com.b2international.scripting.groovy/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.scripting.groovy eclipse-plugin diff --git a/commons/pom.xml b/commons/pom.xml index 686dcc95365..453e34d0432 100644 --- a/commons/pom.xml +++ b/commons/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/core/com.b2international.snowowl.core.rest.feature/feature.xml b/core/com.b2international.snowowl.core.rest.feature/feature.xml index a17984abe2b..212ea1ef3ae 100644 --- a/core/com.b2international.snowowl.core.rest.feature/feature.xml +++ b/core/com.b2international.snowowl.core.rest.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/core/com.b2international.snowowl.core.rest.feature/pom.xml b/core/com.b2international.snowowl.core.rest.feature/pom.xml index e1e57a666fa..9bb973c6ae3 100644 --- a/core/com.b2international.snowowl.core.rest.feature/pom.xml +++ b/core/com.b2international.snowowl.core.rest.feature/pom.xml @@ -4,7 +4,7 @@ 4.0.0 core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl com.b2international.snowowl.core.rest.feature diff --git a/core/com.b2international.snowowl.core.rest.tests/.launch/core-e2e-tests.launch b/core/com.b2international.snowowl.core.rest.tests/.launch/core-e2e-tests.launch index 7c4bd5b754b..42dff82117b 100644 --- a/core/com.b2international.snowowl.core.rest.tests/.launch/core-e2e-tests.launch +++ b/core/com.b2international.snowowl.core.rest.tests/.launch/core-e2e-tests.launch @@ -29,12 +29,12 @@ - + - - + + diff --git a/core/com.b2international.snowowl.core.rest.tests/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.core.rest.tests/META-INF/MANIFEST.MF index 740d3251f93..c8df3f1194f 100644 --- a/core/com.b2international.snowowl.core.rest.tests/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.core.rest.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Administrative RESTful API Tests Bundle-SymbolicName: com.b2international.snowowl.core.rest.tests -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.junit;bundle-version="4.12.0", diff --git a/core/com.b2international.snowowl.core.rest.tests/pom.xml b/core/com.b2international.snowowl.core.rest.tests/pom.xml index 544a50b12a4..678e769631e 100644 --- a/core/com.b2international.snowowl.core.rest.tests/pom.xml +++ b/core/com.b2international.snowowl.core.rest.tests/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT @@ -59,7 +59,7 @@ tycho-surefire-plugin false - ${tycho.testArgLine} -Xms1g -Xmx1g -XX:+AlwaysLockClassLoader -Dosgi.classloader.type=nonparallel -Djetty.home.bundle=org.eclipse.jetty.osgi.boot -Djetty.port=9090 -Dlogback.configurationFile=${basedir}/src/configuration/logback-maven.xml + ${tycho.testArgLine} -Xms1g -Xmx1g -XX:+AlwaysLockClassLoader -Dosgi.classloader.type=nonparallel -Djetty.home.bundle=org.eclipse.jetty.osgi.boot -Djetty.port=9090 -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Dlogback.configurationFile=${basedir}/src/configuration/logback-maven.xml **/AllSnowOwlApiTests.java diff --git a/core/com.b2international.snowowl.core.rest.tests/src/com/b2international/snowowl/core/rest/AllSnowOwlApiTests.java b/core/com.b2international.snowowl.core.rest.tests/src/com/b2international/snowowl/core/rest/AllSnowOwlApiTests.java index dd7c3ebc1ea..0ae58af8f20 100644 --- a/core/com.b2international.snowowl.core.rest.tests/src/com/b2international/snowowl/core/rest/AllSnowOwlApiTests.java +++ b/core/com.b2international.snowowl.core.rest.tests/src/com/b2international/snowowl/core/rest/AllSnowOwlApiTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,7 +49,7 @@ public class AllSnowOwlApiTests { @ClassRule public static final RuleChain appRule = RuleChain - .outerRule(SnowOwlAppRule.snowOwl(AllSnowOwlApiTests.class).clearResources(true)) + .outerRule(SnowOwlAppRule.snowOwl(AllSnowOwlApiTests.class)) .around(new BundleStartRule("org.eclipse.jetty.osgi.boot")) .around(new BundleStartRule("com.b2international.snowowl.core.rest")) .around(new SnomedContentRule(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, Branch.MAIN_PATH, Resources.Snomed.MINI_RF2_INT, Rf2ReleaseType.FULL)); diff --git a/core/com.b2international.snowowl.core.rest/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.core.rest/META-INF/MANIFEST.MF index d05a2263db2..4d3a45bd8ed 100644 --- a/core/com.b2international.snowowl.core.rest/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.core.rest/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl REST API Module Bundle-SymbolicName: com.b2international.snowowl.core.rest;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Automatic-Module-Name: com.b2international.snowowl.rest Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/core/com.b2international.snowowl.core.rest/pom.xml b/core/com.b2international.snowowl.core.rest/pom.xml index a249ed4eb7e..cc9f09b7ee7 100644 --- a/core/com.b2international.snowowl.core.rest/pom.xml +++ b/core/com.b2international.snowowl.core.rest/pom.xml @@ -1,12 +1,12 @@ - - 4.0.0 - - com.b2international.snowowl - core-parent - 7.3.0-SNAPSHOT - + + 4.0.0 + + com.b2international.snowowl + core-parent + 7.4.0-SNAPSHOT + com.b2international.snowowl.core.rest eclipse-plugin diff --git a/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/src/App.js b/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/src/App.js index 5773640189f..511bf40c034 100644 --- a/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/src/App.js +++ b/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/src/App.js @@ -10,7 +10,14 @@ const { Content, Sider } = Layout; class App extends React.Component { state = { - selectedKey: 'admin' + selectedKey: 'admin', + apis: [] + } + + componentDidMount() { + fetch(`${process.env.REACT_APP_SO_BASE_URL}/admin/apis`) + .then(response => response.json()) + .then(data => this.setState({ apis: data.items })); } onMenuSelect = (e) => { @@ -20,6 +27,7 @@ class App extends React.Component { } render() { + const apis = this.state.apis return ( <> @@ -41,10 +49,9 @@ class App extends React.Component { mode="inline" theme="dark" > - Admin API - SNOMED CT API - FHIR API - CIS API + { + apis.map(api => {api.title}) + } diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/AbstractRestService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/AbstractRestService.java index df914aca1ea..ed3223ae556 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/AbstractRestService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/AbstractRestService.java @@ -17,6 +17,7 @@ import java.io.IOException; import java.io.StringReader; +import java.net.URI; import java.util.Collections; import java.util.List; import java.util.Set; @@ -25,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; +import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; import com.b2international.commons.CompareUtils; import com.b2international.commons.collections.Collections3; @@ -162,5 +164,24 @@ protected final List getExtendedLocales(final String acceptLangu throw new BadRequestException(e.getMessage()); } } + + /** + * Creates a Location header URI that should be returned from all POST resource create endpoints. + * @param resourceId - the identifier of the resource + * @return a URI to be added as Location header value + */ + protected final URI getResourceLocationURI(String resourceId) { + return MvcUriComponentsBuilder.fromController(getClass()).pathSegment(resourceId).build().toUri(); + } + + /** + * Creates a Location header URI that should be returned from all POST resource create endpoints. + * @param branch - the branch where the resource has been created + * @param resourceId - the identifier of the resource + * @return a URI to be added as Location header value + */ + protected final URI getResourceLocationURI(String branch, String resourceId) { + return MvcUriComponentsBuilder.fromController(getClass()).pathSegment(branch, resourceId).build().toUri(); + } } diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/BaseApiConfig.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/BaseApiConfig.java index 171dcba5dc7..00766f1112e 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/BaseApiConfig.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/BaseApiConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -94,7 +94,7 @@ protected final Docket docs( new SecurityReference("basic", new AuthorizationScope[0]), new SecurityReference("bearer", new AuthorizationScope[0]) )) - .build() + .build() )) .useDefaultResponseMessages(false) .ignoredParameterTypes(Principal.class) @@ -110,7 +110,9 @@ protected final Docket docs( ) ) .groupName(apiGroup) - .select().paths(paths).build() + .select() + .paths(paths) + .build() .apiInfo(new ApiInfo(apiTitle, apiDescription, apiVersion, apiTermsOfServiceUrl, new Contact("B2i Healthcare", apiLicenseUrl, apiContact), apiLicense, apiLicenseUrl, Collections.emptyList())); } diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/ControllerExceptionMapper.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/ControllerExceptionMapper.java index dc688277b84..ff4742554dc 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/ControllerExceptionMapper.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/ControllerExceptionMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,13 +20,16 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.http.converter.HttpMessageNotReadableException; +import org.springframework.web.HttpRequestMethodNotSupportedException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; import com.b2international.commons.exceptions.*; +import com.b2international.commons.platform.PlatformUtil; import com.fasterxml.jackson.databind.JsonMappingException; +import com.google.common.base.Strings; import com.google.common.base.Throwables; /** @@ -47,14 +50,25 @@ public class ControllerExceptionMapper { @ExceptionHandler @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) public @ResponseBody RestApiError handle(final Exception ex) { - if (Throwables.getRootCause(ex).getMessage().toLowerCase().contains("broken pipe")) { + final String message = Throwables.getRootCause(ex).getMessage(); + if (!Strings.isNullOrEmpty(message) && message.toLowerCase().contains("broken pipe")) { return null; // socket is closed, cannot return any response } else { - LOG.trace("Exception during request processing", ex); + if (PlatformUtil.isDevVersion()) { + LOG.error("Exception during request processing", ex); + } else { + LOG.trace("Exception during request processing", ex); + } return RestApiError.of(ApiError.Builder.of(GENERIC_USER_MESSAGE).build()).build(HttpStatus.INTERNAL_SERVER_ERROR.value()); } } + @ExceptionHandler + @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) + public @ResponseBody RestApiError handle(final HttpRequestMethodNotSupportedException e) { + return RestApiError.of(ApiError.Builder.of("Method " + e.getMethod() + " is not allowed").build()).build(HttpStatus.METHOD_NOT_ALLOWED.value()); + } + @ExceptionHandler @ResponseStatus(HttpStatus.UNAUTHORIZED) public @ResponseBody RestApiError handle(final UnauthorizedException ex) { @@ -72,7 +86,11 @@ public class ControllerExceptionMapper { @ExceptionHandler @ResponseStatus(HttpStatus.REQUEST_TIMEOUT) public @ResponseBody RestApiError handle(RequestTimeoutException ex) { - LOG.trace("Timeout during request processing", ex); + if (PlatformUtil.isDevVersion()) { + LOG.error("Timeout during request processing", ex); + } else { + LOG.trace("Timeout during request processing", ex); + } return RestApiError.of(ApiError.Builder.of(GENERIC_USER_MESSAGE).build()).build(HttpStatus.REQUEST_TIMEOUT.value()); } diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/SnowOwlApiConfig.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/SnowOwlApiConfig.java index 32eae362a80..60690283ce5 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/SnowOwlApiConfig.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/SnowOwlApiConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/SnowOwlApiRestService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/SnowOwlApiRestService.java new file mode 100644 index 00000000000..e5ceab373d0 --- /dev/null +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/SnowOwlApiRestService.java @@ -0,0 +1,61 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.core.rest; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.b2international.snowowl.core.domain.CollectionResource; +import com.google.common.collect.ImmutableMap; + +import springfox.documentation.annotations.ApiIgnore; +import springfox.documentation.service.Documentation; +import springfox.documentation.spring.web.DocumentationCache; + +/** + * @since 7.3 + */ +@ApiIgnore +@RestController +@RequestMapping(value = "/apis", produces = { AbstractRestService.JSON_MEDIA_TYPE }) +public class SnowOwlApiRestService extends AbstractRestService { + + @Autowired + private DocumentationCache documentCache; + + @GetMapping + public CollectionResource> get() { + List> items = documentCache.all().values().stream() + .sorted((d1, d2) -> d1.getResourceListing().getInfo().getTitle().compareTo(d2.getResourceListing().getInfo().getTitle())) + .map(this::toApiDoc) + .collect(Collectors.toList()); + return CollectionResource.of(items); + } + + private Map toApiDoc(Documentation doc) { + return ImmutableMap.of( + "id", doc.getGroupName(), + "title", doc.getResourceListing().getInfo().getTitle() + ); + } + +} diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/SnowOwlSecurityConfig.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/SnowOwlSecurityConfig.java index 4cf00535e4f..e1eccf6c70a 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/SnowOwlSecurityConfig.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/SnowOwlSecurityConfig.java @@ -43,6 +43,7 @@ public HttpFirewall allowUrlEncodedSlashHttpFirewall() { return firewall; } + @SuppressWarnings({"lgtm[java/spring-disabled-csrf-protection]"}) @Override protected void configure(final HttpSecurity http) throws Exception { http diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/BranchUpdateRestRequest.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/BranchUpdateRestRequest.java similarity index 87% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/BranchUpdateRestRequest.java rename to core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/BranchUpdateRestRequest.java index 4c0cfef9492..373637e0db4 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/BranchUpdateRestRequest.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/BranchUpdateRestRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.rest.domain; +package com.b2international.snowowl.core.rest.branch; import com.b2international.commons.options.Metadata; diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/CreateBranchRestRequest.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/CreateBranchRestRequest.java similarity index 96% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/CreateBranchRestRequest.java rename to core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/CreateBranchRestRequest.java index aba489ec722..c40b26d14fc 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/CreateBranchRestRequest.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/CreateBranchRestRequest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.rest.domain; +package com.b2international.snowowl.core.rest.branch; import org.hibernate.validator.constraints.NotEmpty; diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/CreateReviewRequest.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/CreateReviewRequest.java similarity index 90% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/CreateReviewRequest.java rename to core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/CreateReviewRequest.java index 78cc6cdf82d..638f868e33c 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/CreateReviewRequest.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/CreateReviewRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.rest.domain; +package com.b2international.snowowl.core.rest.branch; import org.hibernate.validator.constraints.NotEmpty; diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/MergeRestRequest.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/MergeRestRequest.java similarity index 91% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/MergeRestRequest.java rename to core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/MergeRestRequest.java index aa7fdd68fea..e88785928f1 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/MergeRestRequest.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/MergeRestRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.rest.domain; +package com.b2international.snowowl.core.rest.branch; import org.hibernate.validator.constraints.NotEmpty; diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchMergingRestService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/RepositoryBranchMergeRestService.java similarity index 85% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchMergingRestService.java rename to core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/RepositoryBranchMergeRestService.java index 79338ebc21f..d00f601c630 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchMergingRestService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/RepositoryBranchMergeRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,16 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.rest; +package com.b2international.snowowl.core.rest.branch; -import java.net.URI; import java.util.Collections; import java.util.UUID; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; import com.b2international.commons.validation.ApiValidation; import com.b2international.snowowl.core.ServiceProvider; @@ -34,7 +40,6 @@ import com.b2international.snowowl.core.rest.RestApiError; import com.b2international.snowowl.datastore.request.RepositoryRequests; import com.b2international.snowowl.datastore.request.job.JobRequests; -import com.b2international.snowowl.snomed.core.rest.domain.MergeRestRequest; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -46,12 +51,14 @@ * @since 4.1 */ @Api(value = "Branches", description = "Branches", tags = "branches") -@RestController @RequestMapping(value="/merges", produces={AbstractRestService.JSON_MEDIA_TYPE}) -public class SnomedBranchMergingRestService extends AbstractSnomedRestService { +public abstract class RepositoryBranchMergeRestService extends AbstractRestService { - public SnomedBranchMergingRestService() { + private final String repositoryId; + + public RepositoryBranchMergeRestService(String repositoryId) { super(Collections.emptySet()); + this.repositoryId = repositoryId; } @ApiOperation( @@ -96,8 +103,7 @@ public ResponseEntity createMerge( .buildAsync() .execute(getBus()); - final URI linkUri = MvcUriComponentsBuilder.fromController(SnomedBranchMergingRestService.class).pathSegment(jobId).build().toUri(); - return ResponseEntity.accepted().location(linkUri).build(); + return ResponseEntity.accepted().location(getResourceLocationURI(jobId)).build(); } @ApiOperation( diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchingRestService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/RepositoryBranchRestService.java similarity index 84% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchingRestService.java rename to core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/RepositoryBranchRestService.java index c533a74f9fb..bbec6cf8fae 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchingRestService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/RepositoryBranchRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.rest; +package com.b2international.snowowl.core.rest.branch; import java.net.URI; import java.util.List; @@ -21,19 +21,23 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseStatus; import com.b2international.commons.validation.ApiValidation; import com.b2international.snowowl.core.branch.Branch; import com.b2international.snowowl.core.branch.Branches; -import com.b2international.snowowl.core.domain.CollectionResource; import com.b2international.snowowl.core.events.util.Promise; import com.b2international.snowowl.core.rest.AbstractRestService; import com.b2international.snowowl.core.rest.RestApiError; import com.b2international.snowowl.datastore.request.RepositoryRequests; -import com.b2international.snowowl.snomed.core.rest.domain.BranchUpdateRestRequest; -import com.b2international.snowowl.snomed.core.rest.domain.CreateBranchRestRequest; import com.google.common.collect.ImmutableList; import io.swagger.annotations.Api; @@ -46,12 +50,14 @@ * @since 4.1 */ @Api(value = "Branches", description = "Branches", tags = "branches") -@RestController @RequestMapping(value="/branches", produces={AbstractRestService.JSON_MEDIA_TYPE}) -public class SnomedBranchingRestService extends AbstractSnomedRestService { +public abstract class RepositoryBranchRestService extends AbstractRestService { - public SnomedBranchingRestService() { + private final String repositoryId; + + public RepositoryBranchRestService(String repositoryId) { super(Branch.Fields.ALL); + this.repositoryId = repositoryId; } @ApiOperation( @@ -66,7 +72,7 @@ public SnomedBranchingRestService() { @ResponseStatus(HttpStatus.CREATED) public Promise> createBranch(@RequestBody CreateBranchRestRequest request) { ApiValidation.checkInput(request); - final URI location = getBranchLocationHeader(request.path()); + final URI location = getResourceLocationURI(request.path()); return RepositoryRequests .branching() .prepareCreate() @@ -93,14 +99,6 @@ public Promise searchBranches( @RequestParam(value="name", required=false) final String[] names, - @ApiParam(value = "The scrollKeepAlive to start a scroll using this query") - @RequestParam(value="scrollKeepAlive", required=false) - final String scrollKeepAlive, - - @ApiParam(value = "A scrollId to continue scrolling a previous query") - @RequestParam(value="scrollId", required=false) - final String scrollId, - @ApiParam(value = "The search key to use for retrieving the next page of results") @RequestParam(value="searchAfter", required=false) final String searchAfter, @@ -119,8 +117,6 @@ public Promise searchBranches( .filterByName(names == null ? null : ImmutableList.copyOf(names)) .sortBy(extractSortFields(sort)) .setSearchAfter(searchAfter) - .setScrollId(scrollId) - .setScroll(scrollKeepAlive) .setLimit(limit) .build(repositoryId) .execute(getBus()); @@ -209,8 +205,4 @@ public Promise> updateBranch( .then(success -> ResponseEntity.noContent().build()); } - private URI getBranchLocationHeader(String branchPath) { - return MvcUriComponentsBuilder.fromController(SnomedBranchingRestService.class).pathSegment(branchPath).build().toUri(); - } - } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchReviewRestService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/RepositoryBranchReviewRestService.java similarity index 91% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchReviewRestService.java rename to core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/RepositoryBranchReviewRestService.java index 3d68faef410..140f3ae18f2 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchReviewRestService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/branch/RepositoryBranchReviewRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.rest; +package com.b2international.snowowl.core.rest.branch; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -23,7 +23,6 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; import org.springframework.web.util.UriComponentsBuilder; @@ -34,7 +33,6 @@ import com.b2international.snowowl.datastore.request.RepositoryRequests; import com.b2international.snowowl.datastore.review.ConceptChanges; import com.b2international.snowowl.datastore.review.Review; -import com.b2international.snowowl.snomed.core.rest.domain.CreateReviewRequest; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -47,12 +45,14 @@ * @since 4.2 */ @Api(value = "Branches", description = "Branches", tags = "branches") -@RestController @RequestMapping(value="/reviews", produces={AbstractRestService.JSON_MEDIA_TYPE}) -public class SnomedBranchReviewRestService extends AbstractSnomedRestService { +public abstract class RepositoryBranchReviewRestService extends AbstractRestService { - public SnomedBranchReviewRestService() { + private final String repositoryId; + + public RepositoryBranchReviewRestService(String repositoryId) { super(Review.Fields.ALL); + this.repositoryId = repositoryId; } @ApiOperation( @@ -67,7 +67,7 @@ public SnomedBranchReviewRestService() { @ResponseStatus(HttpStatus.CREATED) public Promise> createReview(@RequestBody final CreateReviewRequest request) { ApiValidation.checkInput(request); - final UriComponentsBuilder linkTo = MvcUriComponentsBuilder.fromController(SnomedBranchReviewRestService.class); + final UriComponentsBuilder linkTo = MvcUriComponentsBuilder.fromController(RepositoryBranchReviewRestService.class); return RepositoryRequests .reviews() .prepareCreate() diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemRestService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemRestService.java index 2e50007c3ac..86c51bebef9 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemRestService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemRestService.java @@ -27,7 +27,6 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; import com.b2international.commons.StringUtils; import com.b2international.commons.exceptions.BadRequestException; @@ -120,7 +119,7 @@ public ResponseEntity createCodeSystem( .execute(getBus()) .getSync().getResultAs(String.class); - return ResponseEntity.created(MvcUriComponentsBuilder.fromController(CodeSystemRestService.class).pathSegment(shortName).build().toUri()).build(); + return ResponseEntity.created(getResourceLocationURI(shortName)).build(); } @ApiOperation( diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedCommitInfoRestService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/commit/RepositoryCommitRestService.java similarity index 84% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedCommitInfoRestService.java rename to core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/commit/RepositoryCommitRestService.java index d74e6b5df4d..cec2a4dbada 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedCommitInfoRestService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/commit/RepositoryCommitRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,20 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.rest; +package com.b2international.snowowl.core.rest.commit; import java.util.List; +import java.util.Set; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; import com.b2international.index.revision.Commit; import com.b2international.snowowl.core.commit.CommitInfo; import com.b2international.snowowl.core.commit.CommitInfos; -import com.b2international.snowowl.core.domain.CollectionResource; import com.b2international.snowowl.core.events.util.Promise; import com.b2international.snowowl.core.rest.AbstractRestService; import com.b2international.snowowl.datastore.request.RepositoryRequests; @@ -41,12 +40,14 @@ * @since 7.0 */ @Api(value = "Commits", description = "Commits", tags = "commits") -@RestController @RequestMapping(value="/commits") -public class SnomedCommitInfoRestService extends AbstractSnomedRestService { +public abstract class RepositoryCommitRestService extends AbstractRestService { - public SnomedCommitInfoRestService() { + private final String repositoryId; + + public RepositoryCommitRestService(String repositoryId) { super(Commit.Fields.ALL); + this.repositoryId = repositoryId; } @ApiOperation( @@ -62,6 +63,10 @@ public Promise search( @RequestParam(value="author", required=false) final String author, + @ApiParam(value = "The identifier(s) to match") + @RequestParam(value="id", required=false) + final Set id, + @ApiParam(value = "Affected component identifier to match") @RequestParam(value="affectedComponentId", required=false) final String affectedComponentId, @@ -82,14 +87,6 @@ public Promise search( @RequestParam(value="expand", required=false) final String expand, - @ApiParam(value = "The scrollKeepAlive to start a scroll using this query") - @RequestParam(value="scrollKeepAlive", required=false) - final String scrollKeepAlive, - - @ApiParam(value = "A scrollId to continue scrolling a previous query") - @RequestParam(value="scrollId", required=false) - final String scrollId, - @ApiParam(value = "The search key to use for retrieving the next page of results") @RequestParam(value="searchAfter", required=false) final String searchAfter, @@ -104,14 +101,13 @@ public Promise search( return RepositoryRequests .commitInfos() .prepareSearchCommitInfo() + .filterByIds(id) .filterByAuthor(author) .filterByAffectedComponent(affectedComponentId) .filterByComment(comment) .filterByBranches(branch) .filterByTimestamp(timestamp) .setExpand(expand) - .setScroll(scrollKeepAlive) - .setScrollId(scrollId) .setSearchAfter(searchAfter) .setLimit(limit) .sortBy(extractSortFields(sort)) diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedCompareRestRequest.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/compare/CompareRestRequest.java similarity index 88% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedCompareRestRequest.java rename to core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/compare/CompareRestRequest.java index af6eda5a3af..d2333a9f532 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedCompareRestRequest.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/compare/CompareRestRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,15 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.rest.domain; +package com.b2international.snowowl.core.rest.compare; import org.hibernate.validator.constraints.NotEmpty; import io.swagger.annotations.ApiParam; + /** * @since 7.0 */ -public final class SnomedCompareRestRequest { +public final class CompareRestRequest { @ApiParam(required = true) @NotEmpty diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedCompareRestService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/compare/RepositoryBranchCompareRestService.java similarity index 82% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedCompareRestService.java rename to core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/compare/RepositoryBranchCompareRestService.java index 03163c3c3fb..b50aacc6fd1 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedCompareRestService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/compare/RepositoryBranchCompareRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.rest; +package com.b2international.snowowl.core.rest.compare; import java.util.Collections; @@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestController; import com.b2international.commons.validation.ApiValidation; import com.b2international.snowowl.core.events.util.Promise; @@ -30,7 +29,6 @@ import com.b2international.snowowl.core.rest.RestApiError; import com.b2international.snowowl.datastore.request.RepositoryRequests; import com.b2international.snowowl.datastore.request.compare.CompareResult; -import com.b2international.snowowl.snomed.core.rest.domain.SnomedCompareRestRequest; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -41,12 +39,14 @@ * @since 7.0 */ @Api(value = "Compare", description = "Compare", tags = "compare") -@RestController @RequestMapping(value = "/compare") -public class SnomedCompareRestService extends AbstractSnomedRestService { +public abstract class RepositoryBranchCompareRestService extends AbstractRestService { - public SnomedCompareRestService() { + private final String repositoryId; + + public RepositoryBranchCompareRestService(String repositoryId) { super(Collections.emptySet()); + this.repositoryId = repositoryId; } @ApiOperation( @@ -59,7 +59,7 @@ public SnomedCompareRestService() { }) @PostMapping(consumes = { AbstractRestService.JSON_MEDIA_TYPE }, produces = { AbstractRestService.JSON_MEDIA_TYPE }) @ResponseStatus(HttpStatus.OK) - public Promise compareBranches(@RequestBody SnomedCompareRestRequest request) { + public Promise compareBranches(@RequestBody CompareRestRequest request) { ApiValidation.checkInput(request); return RepositoryRequests.branching().prepareCompare() .setBase(request.getBaseBranch()) diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/ChangeRequest.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/domain/ResourceRequest.java similarity index 63% rename from core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/ChangeRequest.java rename to core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/domain/ResourceRequest.java index 6650e2de0ba..144fdd236d8 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/ChangeRequest.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/domain/ResourceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,13 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.core.rest.codesystem; +package com.b2international.snowowl.core.rest.domain; import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.google.common.base.MoreObjects; +import com.google.common.base.MoreObjects.ToStringHelper; /** + * @since 1.0 */ -public class ChangeRequest { +public class ResourceRequest { private T change; private String commitComment; @@ -42,13 +45,13 @@ public void setCommitComment(final String commitComment) { } @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("ChangeRequest [change="); - builder.append(change); - builder.append(", commitComment="); - builder.append(commitComment); - builder.append("]"); - return builder.toString(); + public final String toString() { + ToStringHelper toStringHelper = MoreObjects.toStringHelper(getClass()).add("change", change).add("commitComment", commitComment); + doToString(toStringHelper); + return toStringHelper.toString(); } + + protected void doToString(ToStringHelper toStringHelper) { + } + } \ No newline at end of file diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/domain/ResourceRestSearch.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/domain/ResourceRestSearch.java new file mode 100644 index 00000000000..31503980576 --- /dev/null +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/domain/ResourceRestSearch.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.core.rest.domain; + +import java.util.List; +import java.util.Set; + +import io.swagger.annotations.ApiParam; + +/** + * @since 7.3 + */ +public abstract class ResourceRestSearch { + + @ApiParam(value = "The identifier(s) to match") + private Set id; + + // scrolling/paging/expansion/sorting + @ApiParam(value = "Expansion parameters") + private String expand; + @ApiParam(value = "The search key to use for retrieving the next page of results") + private String searchAfter; + @ApiParam(value = "Sort keys") + private List sort; + @ApiParam(value = "The maximum number of items to return", defaultValue = "50") + private int limit = 50; + + public final Set getId() { + return id; + } + + public final void setId(Set id) { + this.id = id; + } + + public final String getExpand() { + return expand; + } + + public final void setExpand(String expand) { + this.expand = expand; + } + + public final String getSearchAfter() { + return searchAfter; + } + + public final void setSearchAfter(String searchAfter) { + this.searchAfter = searchAfter; + } + + public final List getSort() { + return sort; + } + + public final void setSort(List sort) { + this.sort = sort; + } + + public final int getLimit() { + return limit; + } + + public final void setLimit(int limit) { + this.limit = limit; + } + +} diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/job/JobRestService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/job/JobRestService.java index d25884fccef..b3c8cef56b7 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/job/JobRestService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/job/JobRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -66,14 +66,6 @@ public Promise searchJobs( @RequestParam(value = "user", required = false) final String user, - @ApiParam(value="The scrollKeepAlive to start a scroll using this query") - @RequestParam(value="scrollKeepAlive", required=false) - final String scrollKeepAlive, - - @ApiParam(value="A scrollId to continue scrolling a previous query") - @RequestParam(value="scrollId", required=false) - final String scrollId, - @ApiParam(value="The search key to use for retrieving the next page of results") @RequestParam(value="searchAfter", required=false) final String searchAfter, @@ -88,8 +80,6 @@ public Promise searchJobs( return JobRequests.prepareSearch() .filterByIds(ids) .filterByUser(user) - .setScroll(scrollKeepAlive) - .setScrollId(scrollId) .setSearchAfter(searchAfter) .setLimit(limit) .sortBy(extractSortFields(sort)) diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/util/ModelAttributeParameterExpanderExt.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/util/ModelAttributeParameterExpanderExt.java index ff79f521843..891f82b5208 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/util/ModelAttributeParameterExpanderExt.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/util/ModelAttributeParameterExpanderExt.java @@ -145,7 +145,7 @@ private Parameter simpleFields(String parentName, DocumentationContext documenta LOG.debug("Attempting to expand field: {}", each); String dataTypeName = Optional.fromNullable(typeNameFor(each.getFieldType().getErasedType())) .or(each.getFieldType().getErasedType().getSimpleName()); - LOG.debug("Building parameter for field: {}, with type: ", each, each.getFieldType()); + LOG.debug("Building parameter for field: {}, with type: {}", each, each.getFieldType()); ParameterExpansionContext parameterExpansionContext = new ParameterExpansionContext( dataTypeName, parentName, diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/validation/ValidationRestService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/validation/ValidationRestService.java index b975e5b6989..a8509eac6cf 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/validation/ValidationRestService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/validation/ValidationRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,6 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; import com.b2international.commons.exceptions.BadRequestException; import com.b2international.commons.exceptions.NotFoundException; @@ -96,7 +95,7 @@ public class ValidationRestService extends AbstractRestService { .filter(ValidationRequests::isValidationJob) .map(entry -> RemoteJobEntry.from(entry).id(getHash(entry.getId())).build()) .collect(Collectors.toList()); - return new RemoteJobs(validationJobs, null, null, jobs.getLimit(), validationJobs.size()); + return new RemoteJobs(validationJobs, null, jobs.getLimit(), validationJobs.size()); }); } @@ -172,7 +171,7 @@ public ResponseEntity beginValidation( .getSync(); final String encodedId = Hashing.sha1().hashString(uniqueJobId, Charsets.UTF_8).toString().substring(0, 7); - return ResponseEntity.created(MvcUriComponentsBuilder.fromController(ValidationRestService.class).pathSegment(encodedId).build().toUri()).build(); + return ResponseEntity.created(getResourceLocationURI(encodedId)).build(); } @ApiOperation( @@ -208,14 +207,6 @@ public ResponseEntity beginValidation( @PathVariable(value="validationId") final String validationId, - @ApiParam(value="The scrollKeepAlive to start a scroll using this query") - @RequestParam(value="scrollKeepAlive", required=false) - final String scrollKeepAlive, - - @ApiParam(value="A scrollId to continue scrolling a previous query") - @RequestParam(value="scrollId", required=false) - final String scrollId, - @ApiParam(value="The search key to use for retrieving the next page of results") @RequestParam(value="searchAfter", required=false) final String searchAfter, @@ -270,8 +261,6 @@ public ResponseEntity beginValidation( return ValidationRequests.issues().prepareSearch() .isWhitelisted(false) .setLimit(limit) - .setScrollId(scrollId) - .setScroll(scrollKeepAlive) .setSearchAfter(searchAfter) .filterByBranchPath(branchPath) .buildAsync() diff --git a/core/com.b2international.snowowl.core.tests/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.core.tests/META-INF/MANIFEST.MF index ef1007c342d..e4af7c8b148 100644 --- a/core/com.b2international.snowowl.core.tests/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.core.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Core Tests Bundle-SymbolicName: com.b2international.snowowl.core.tests -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.core;bundle-version="4.1.0" Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/core/com.b2international.snowowl.core.tests/pom.xml b/core/com.b2international.snowowl.core.tests/pom.xml index d288a68bf39..b3580025cbe 100644 --- a/core/com.b2international.snowowl.core.tests/pom.xml +++ b/core/com.b2international.snowowl.core.tests/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.core.tests eclipse-test-plugin diff --git a/core/com.b2international.snowowl.core/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.core/META-INF/MANIFEST.MF index 1f47d22ecbc..2879d1cd177 100644 --- a/core/com.b2international.snowowl.core/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Core Bundle-SymbolicName: com.b2international.snowowl.core;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Activator: com.b2international.snowowl.core.CoreActivator Bundle-Vendor: B2i Healthcare Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", @@ -24,6 +24,7 @@ Bundle-ActivationPolicy: lazy Export-Package: com.b2international.snowowl.core, com.b2international.snowowl.core.api, com.b2international.snowowl.core.api.component, + com.b2international.snowowl.core.authorization, com.b2international.snowowl.core.branch, com.b2international.snowowl.core.config, com.b2international.snowowl.core.date, @@ -34,6 +35,7 @@ Export-Package: com.b2international.snowowl.core, com.b2international.snowowl.core.events.util, com.b2international.snowowl.core.exceptions, com.b2international.snowowl.core.ft, + com.b2international.snowowl.core.id, com.b2international.snowowl.core.inject, com.b2international.snowowl.core.merge, com.b2international.snowowl.core.monitoring, diff --git a/core/com.b2international.snowowl.core/pom.xml b/core/com.b2international.snowowl.core/pom.xml index da02e9b0665..ef9d96760ab 100644 --- a/core/com.b2international.snowowl.core/pom.xml +++ b/core/com.b2international.snowowl.core/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.core eclipse-plugin diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/ApplicationContext.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/ApplicationContext.java index 1da7d6d31fd..1450c931e13 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/ApplicationContext.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/ApplicationContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -84,7 +84,7 @@ public String toString() { } } - private static ApplicationContext instance; + private static volatile ApplicationContext instance; private final LoadingCache, ServiceRegistryEntry> serviceMap; @@ -102,7 +102,7 @@ public static ApplicationContext getInstance() { if (instance == null) { synchronized (ApplicationContext.class) { if (instance == null) { - instance = new ApplicationContext(); // lgtm[java/unsafe-double-checked-locking] + instance = new ApplicationContext(); } } } diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/authorization/Unprotected.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/authorization/Unprotected.java new file mode 100644 index 00000000000..c465603cc06 --- /dev/null +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/authorization/Unprotected.java @@ -0,0 +1,36 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.core.authorization; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import com.b2international.snowowl.core.events.Request; + +/** + * Annotation to let {@link Request} implementations to be executed with proper authorization. Should be used for unprotected routes. + * + * @since 7.3 + */ +@Documented +@Retention(RUNTIME) +@Target(TYPE) +public @interface Unprotected { +} diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/branch/Branches.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/branch/Branches.java index 334f6841696..0af789cfd14 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/branch/Branches.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/branch/Branches.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ */ public final class Branches extends PageableCollectionResource { - public Branches(List items, String scrollId, String searchAfter, int limit, int total) { - super(items, scrollId, searchAfter, limit, total); + public Branches(List items, String searchAfter, int limit, int total) { + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/Rf2ExportResult.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/ExportResult.java similarity index 86% rename from snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/Rf2ExportResult.java rename to core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/ExportResult.java index c129ba9ea9e..c57b78a3db5 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/Rf2ExportResult.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/ExportResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.domain; +package com.b2international.snowowl.core.domain; import java.util.UUID; @@ -23,14 +23,16 @@ /** * Holds the suggested filename for an export result, along with the identifier * in the file registry. + * + * @since */ -public final class Rf2ExportResult { +public final class ExportResult { private final String name; private final UUID registryId; @JsonCreator - public Rf2ExportResult( + public ExportResult( @JsonProperty("name") final String name, @JsonProperty("registryId") final UUID registryId) { diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/IComponent.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/IComponent.java index 5ac301c1c30..47c61df787c 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/IComponent.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/IComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,6 @@ import com.b2international.snowowl.core.ComponentIdentifier; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.google.common.base.Function; /** * Represents an identifiable component of a code system. @@ -36,13 +35,6 @@ public interface IComponent extends Serializable { */ long ROOT_IDL = Long.parseLong(ROOT_ID); - /** - * Function to extract the ID from an {@link IComponent} instance. - * - * @since 4.6 - */ - Function ID_FUNCTION = IComponent::getId; - /** * Returns the component identifier. * diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/PageableCollectionResource.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/PageableCollectionResource.java index 12c073df94f..55fe6367ebd 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/PageableCollectionResource.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/PageableCollectionResource.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,8 +31,6 @@ //@ApiModel("Pageable Collection") public class PageableCollectionResource extends CollectionResource { - private final String scrollId; - private final String searchAfter; // @ApiModelProperty("The number of requested maximum items") @@ -41,9 +39,8 @@ public class PageableCollectionResource extends CollectionResource { // @ApiModelProperty("Total number of results available") private final int total; - protected PageableCollectionResource(List items, String scrollId, String searchAfter, int limit, int total) { + protected PageableCollectionResource(List items, String searchAfter, int limit, int total) { super(items); - this.scrollId = scrollId; this.searchAfter = searchAfter; this.limit = limit; this.total = total; @@ -58,17 +55,6 @@ public String getSearchAfter() { return searchAfter; } - /** - * Returns the scrollId associated with this pageable result set. It can be used to fetch the next batch of {@link #getLimit()} items from the - * repository. - * - * @return - * @see SearchResourceRequestBuilder#setScrollId(String) - */ - public String getScrollId() { - return scrollId; - } - /** * Returns the limit of this collection resource. * @@ -92,7 +78,6 @@ public int getTotal() { public String toString() { return MoreObjects.toStringHelper(PageableCollectionResource.class) .add("items", StringUtils.limitedToString(getItems(), 10)) - .add("scrollId", scrollId) .add("searchAfter", searchAfter) .add("limit", limit) .add("total", total).toString(); @@ -102,7 +87,6 @@ public String toString() { * Creates a new {@link PageableCollectionResource} from the given items, scrollId, searchAfter, limit and total arguments. * * @param items - * @param scrollId * @param searchAfter * @param limit * @param total @@ -110,11 +94,10 @@ public String toString() { */ @JsonCreator public static PageableCollectionResource of(@JsonProperty("items") List items, - @JsonProperty("scrollId") String scrollId, @JsonProperty("searchAfter") String searchAfter, @JsonProperty("limit") int limit, @JsonProperty("total") int total) { - return new PageableCollectionResource(items, scrollId, searchAfter, limit, total); + return new PageableCollectionResource(items, searchAfter, limit, total); } } diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/TransactionContext.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/TransactionContext.java index c6bd27a1a16..605079bdfff 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/TransactionContext.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/TransactionContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import com.b2international.index.Doc; import com.b2international.index.revision.Revision; +import com.b2international.index.revision.RevisionIndex; import com.b2international.snowowl.core.domain.DelegatingContext.Builder; import com.b2international.snowowl.core.exceptions.ComponentNotFoundException; @@ -27,7 +28,7 @@ * Represents an ongoing transaction to the underlying repository. The transaction can commit all aggregated changes up to a given point using the {@link #commit() commit method}. * The changes can be new, changed and deleted objects. * An object is basically a POJO with a {@link Doc} annotation, so the underlying repository will recognize and treat them properly during {@link #commit()}. - * If the given Object is an instance of {@link Revision} then it will be treated as a {@link Revision} will be persisted on the branch available via {@link #branch()}. + * If the given Object is an instance of {@link Revision} then it will be treated as a {@link Revision} and it will be persisted on the branch available via {@link #branch()}. * * @since 4.5 */ @@ -43,8 +44,9 @@ public interface TransactionContext extends BranchContext, AutoCloseable { * Adds the given {@link Object} to this transaction context as a completely new object. * * @param obj - the object to persist and add to the repository + * @return the identifier of the object if it is an instanceof of any of the following classes: {@link Revision} / {@link CodeSystemEntry} / {@link CodeSystemVersionEntry} or null in any other cases. */ - void add(Object obj); + String add(Object obj); /** * @param oldVersion @@ -135,7 +137,13 @@ public interface TransactionContext extends BranchContext, AutoCloseable { Map lookup(Collection componentIds, Class type); /** - * Clears the entire content of the repository this context belongs to. + * Stages all indexed instances of {@link Revision} and subclasses for deletion + * that are currently returned by a "match all" query using + * {@link RevisionIndex}. + *

+ * Documents not under revision control should be removed separately, along with + * any code system versions and corresponding version branches, if a complete + * clear operation is needed. */ void clearContents(); diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/ObjectComparator.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/id/IDs.java similarity index 55% rename from snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/ObjectComparator.java rename to core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/id/IDs.java index d5e9f2bd2fb..b9904482e15 100644 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/ObjectComparator.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/id/IDs.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,20 +13,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.semanticengine.simpleast.utils; +package com.b2international.snowowl.core.id; + +import org.elasticsearch.common.UUIDs; /** - * Generic superclass of object comparators. + * Class to use to generate decentralized random UUIDs. * - * - * @param + * @since 7.3 */ -public abstract class ObjectComparator { - +public class IDs { + /** - * @param expected - * @param actual - * @return true if the two objects are found to be equal, false otherwise + * Generates a time-based UUID (similar to Flake IDs), which is preferred when generating an ID to be indexed into a Lucene index as primary key. + * @return + * @see UUIDs */ - abstract public boolean equal(T expected, T actual); -} \ No newline at end of file + public static final String base64UUID() { + return UUIDs.base64UUID(); + } + +} diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/merge/Merges.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/merge/Merges.java index 616b76f29c2..1744aa4f3eb 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/merge/Merges.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/merge/Merges.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,13 +33,12 @@ public final class Merges extends PageableCollectionResource { * @param total - total number of items in the resultset */ public Merges(int limit, int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } /** * Instantiates a pageable collection of Merge objects. * @param items - list of {@link Merge}s - * @param scrollId - scrollId for paging the result set continuously * @param searchAfter - searchAfter for paging the result set with a live cursor * @param limit - limit of items for a single page * @param total - total number of items in the result set @@ -47,11 +46,10 @@ public Merges(int limit, int total) { @JsonCreator public Merges( @JsonProperty("items") List items, - @JsonProperty("scrollId") String scrollId, @JsonProperty("searchAfter") String searchAfter, @JsonProperty("limit") int limit, @JsonProperty("total") int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/monitoring/MonitoredRequest.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/monitoring/MonitoredRequest.java index 6371dddf075..6ed2139df7c 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/monitoring/MonitoredRequest.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/monitoring/MonitoredRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,9 @@ */ package com.b2international.snowowl.core.monitoring; +import java.util.Map; +import java.util.concurrent.TimeUnit; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -22,6 +25,7 @@ import com.b2international.snowowl.core.events.DelegatingRequest; import com.b2international.snowowl.core.events.Request; import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.collect.ImmutableMap; import io.micrometer.core.instrument.MeterRegistry; import io.micrometer.core.instrument.Tags; @@ -48,15 +52,18 @@ public R execute(ServiceProvider context) { } finally { final Tags tags = Tags.of("context", getContextId()); tags.and("context", DEFAULT_CONTEXT_ID); - responseTimeSample.stop(registry.timer("request_time", tags)); - LOG.info(getMessage(context)); + final long responseTime = responseTimeSample.stop(registry.timer("response_time", tags)); + final Map additionalInfo = ImmutableMap.of("metrics", ImmutableMap.of("responseTime", TimeUnit.NANOSECONDS.toMillis(responseTime))); + LOG.info(getMessage(context, additionalInfo)); } } - private String getMessage(ServiceProvider context) { + private String getMessage(ServiceProvider context, final Map additionalInfo) { try { final ObjectMapper mapper = context.service(ObjectMapper.class); - return mapper.writeValueAsString(next()); + final Map body = mapper.convertValue(next(), Map.class); + body.putAll(additionalInfo); + return mapper.writeValueAsString(body); } catch (Throwable e) { return "Unable to get request description: " + e.getMessage(); } diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/request/SearchResourceRequest.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/request/SearchResourceRequest.java index efbe28db012..37a184aa4be 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/request/SearchResourceRequest.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/request/SearchResourceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,9 +31,7 @@ import com.b2international.commons.options.Options; import com.b2international.snowowl.core.ServiceProvider; import com.b2international.snowowl.core.api.SnowowlRuntimeException; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.base.Strings; /** * @since 5.2 @@ -172,8 +170,6 @@ public enum Operator { LESS_THAN_EQUALS, } - private String scrollId; - private String scrollKeepAlive; private String searchAfter; /** @@ -189,19 +185,6 @@ public enum Operator { protected SearchResourceRequest() {} - @JsonIgnore - protected final boolean isScrolled() { - return !Strings.isNullOrEmpty(scrollId()); - } - - void setScrollId(String scrollId) { - this.scrollId = scrollId; - } - - void setScrollKeepAlive(String scrollKeepAlive) { - this.scrollKeepAlive = scrollKeepAlive; - } - void setSearchAfter(String searchAfter) { this.searchAfter = searchAfter; } @@ -210,16 +193,6 @@ void setComponentIds(Set componentIds) { this.componentIds = componentIds; } - @JsonProperty - protected final String scrollId() { - return scrollId; - } - - @JsonProperty - protected final String scrollKeepAlive() { - return scrollKeepAlive; - } - @JsonProperty protected final String searchAfter() { return searchAfter; diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/request/SearchResourceRequestBuilder.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/request/SearchResourceRequestBuilder.java index 892f648e534..220945c7b22 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/request/SearchResourceRequestBuilder.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/request/SearchResourceRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,8 +38,6 @@ public abstract class SearchResourceRequestBuilder componentIds; - private String scrollKeepAlive; - private String scrollId; private String searchAfter; private int limit = 50; @@ -62,36 +60,6 @@ public B setSearchAfter(String searchAfter) { return getSelf(); } - /** - * Sets the scroll keep alive value to the specified value to start a scroll based on the query of this request. - * - * @param scrollKeepAlive - * @return this builder instance - */ - public final B setScroll(String scrollKeepAlive) { - this.scrollKeepAlive = scrollKeepAlive; - return getSelf(); - } - - /* - * Used by SearchResourceRequestIterator - */ - final String getScrollKeepAlive() { - return scrollKeepAlive; - } - - /** - * Sets the scroll Id to continue a previously started scroll. - * - * @param scrollId - * @return - * @see PageableCollectionResource#getScrollId() - */ - public final B setScrollId(String scrollId) { - this.scrollId = scrollId; - return getSelf(); - } - /** * Sets the limit of the result set returned * @param limit - limit of the result set @@ -162,7 +130,7 @@ public final B sortBy(List sorts) { * @return this builder instance */ public final B all() { - return setScroll(null).setLimit(MAX_LIMIT); + return setLimit(MAX_LIMIT); } /** @@ -170,7 +138,7 @@ public final B all() { * @return this builder instance */ public final B one() { - return setScroll(null).setLimit(1); + return setLimit(1); } // XXX: Does not allow null values or collections with null values @@ -196,8 +164,6 @@ protected final B addOption(Enum key, Object value) { protected ResourceRequest create() { final SearchResourceRequest req = createSearch(); req.setComponentIds(componentIds); - req.setScrollId(scrollId); - req.setScrollKeepAlive(scrollKeepAlive); req.setSearchAfter(searchAfter); req.setLimit(Math.min(limit, MAX_LIMIT)); req.setOptions(optionsBuilder.build()); diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/request/SearchResourceRequestIterator.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/request/SearchResourceRequestIterator.java index 999c5640b2f..5e6765e6825 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/request/SearchResourceRequestIterator.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/request/SearchResourceRequestIterator.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,31 +18,23 @@ import java.util.function.Function; import com.b2international.snowowl.core.domain.PageableCollectionResource; -import com.google.common.base.Strings; import com.google.common.collect.AbstractIterator; /** * @since 6.4 * - * @param the search resource request builder type; an instance of this will be configured for scrolling + * @param the search resource request builder type; an instance of this will be configured for paging * @param the collection resource response type; the iterator will return results as instances of this type */ public final class SearchResourceRequestIterator< B extends SearchResourceRequestBuilder, R extends PageableCollectionResource> extends AbstractIterator { - /** - * The default scroll timeout value if none given on the initial search request builder. - * - * @see com.b2international.index.query.Query.DEFAULT_SCROLL_KEEP_ALIVE - */ - private static final String DEFAULT_SCROLL_KEEP_ALIVE = "60s"; - private final B searchRequestBuilder; private final Function executeHandler; private boolean firstRun = true; - private String scrollId; + private String searchAfter; private int visited; private int total; @@ -56,10 +48,6 @@ public final class SearchResourceRequestIterator< public SearchResourceRequestIterator(B searchRequestBuilder, Function executeHandler) { this.searchRequestBuilder = searchRequestBuilder; this.executeHandler = executeHandler; - - if (Strings.isNullOrEmpty(this.searchRequestBuilder.getScrollKeepAlive())) { - this.searchRequestBuilder.setScroll(DEFAULT_SCROLL_KEEP_ALIVE); - } } @Override @@ -69,8 +57,8 @@ protected R computeNext() { return endOfData(); } - // Execute the request with the last recorded scrollId (can be null on first run) - searchRequestBuilder.setScrollId(scrollId); + // Execute the request with the last recorded searchAfter value (can be null on first run) + searchRequestBuilder.setSearchAfter(searchAfter); R hits = executeHandler.apply(searchRequestBuilder); // Initialize total counter on first run @@ -83,8 +71,8 @@ protected R computeNext() { } } - // Update scrollId and visited counter - scrollId = hits.getScrollId(); + // Update searchAfter and visited counter + searchAfter = hits.getSearchAfter(); visited += hits.getItems().size(); return hits; diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/terminology/MapTargetTypes.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/terminology/MapTargetTypes.java index 1dea8300ac5..10f372aeaa7 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/terminology/MapTargetTypes.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/terminology/MapTargetTypes.java @@ -33,4 +33,7 @@ private MapTargetTypes() { public static final String EXTENDED_MAP = "EXTENDED_MAP"; public static final String QUERY = "QUERY"; + // XXX: Not really SNOMED CT reference set types + public static final String VALUE_SET = "VALUE_SET"; + public static final String MAPPING_SET = "MAPPING_SET"; } diff --git a/core/com.b2international.snowowl.datastore.server.tests/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.datastore.server.tests/META-INF/MANIFEST.MF index 45fc6a3a51f..d73a4d8ada1 100644 --- a/core/com.b2international.snowowl.datastore.server.tests/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.datastore.server.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Datastore Tests Bundle-SymbolicName: com.b2international.snowowl.datastore.server.tests -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.datastore;bundle-version="4.1.0" Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/core/com.b2international.snowowl.datastore.server.tests/pom.xml b/core/com.b2international.snowowl.datastore.server.tests/pom.xml index ad66cd77469..a07d17ea6ad 100644 --- a/core/com.b2international.snowowl.datastore.server.tests/pom.xml +++ b/core/com.b2international.snowowl.datastore.server.tests/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.datastore.server.tests eclipse-test-plugin @@ -50,7 +50,7 @@ tycho-surefire-plugin false - ${tycho.testArgLine} + ${tycho.testArgLine} -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch **/AllCoreTests.java diff --git a/core/com.b2international.snowowl.datastore/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.datastore/META-INF/MANIFEST.MF index d8a9f994b83..4c122694f4a 100644 --- a/core/com.b2international.snowowl.datastore/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.datastore/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Terminology Datastore Bundle-SymbolicName: com.b2international.snowowl.datastore;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Activator: com.b2international.snowowl.datastore.DatastoreActivator Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/core/com.b2international.snowowl.datastore/pom.xml b/core/com.b2international.snowowl.datastore/pom.xml index f08f45115ff..ee3f728ebda 100644 --- a/core/com.b2international.snowowl.datastore/pom.xml +++ b/core/com.b2international.snowowl.datastore/pom.xml @@ -6,7 +6,7 @@ com.b2international.snowowl core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.datastore eclipse-plugin diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/authorization/AuthorizedRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/authorization/AuthorizedRequest.java index 8ae94f22516..5a4b70fc114 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/authorization/AuthorizedRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/authorization/AuthorizedRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,6 @@ import com.b2international.snowowl.identity.IdentityProvider; import com.b2international.snowowl.identity.domain.Permission; import com.b2international.snowowl.identity.domain.User; -import com.b2international.snowowl.identity.request.UserLoginRequest; import com.google.common.base.Strings; import com.google.common.collect.Iterables; @@ -63,7 +62,7 @@ public R execute(ServiceProvider context) { user = User.SYSTEM; } else if (Strings.isNullOrEmpty(authorizationToken)) { // allow login requests in - if (requests.size() == 1 && Iterables.getOnlyElement(requests) instanceof UserLoginRequest) { + if (requests.stream().allMatch(req -> req.getClass().isAnnotationPresent(Unprotected.class))) { user = User.SYSTEM; } else { // if there is authentication configured, but no authorization token found prevent execution and throw UnauthorizedException diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoConverter.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoConverter.java index 091dd9ba3e3..7653bbbdb81 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoConverter.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ */ package com.b2international.snowowl.core.commit; +import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Lists.newArrayListWithExpectedSize; import java.util.Collection; @@ -29,9 +30,9 @@ import com.b2international.index.revision.Commit; import com.b2international.index.revision.CommitDetail; import com.b2international.snowowl.core.commit.CommitInfo.Builder; -import com.b2international.snowowl.core.commit.CommitInfoSearchRequest.OptionKey; import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.datastore.converter.BaseResourceConverter; +import com.google.common.base.Strings; /** * @since 5.2 @@ -46,8 +47,8 @@ public CommitInfoConverter(final RepositoryContext context, final Options expand } @Override - protected CommitInfos createCollectionResource(final List results, final String scrollId, String searchAfter, final int limit, final int total) { - return new CommitInfos(results, scrollId, searchAfter, limit, total); + protected CommitInfos createCollectionResource(final List results, String searchAfter, final int limit, final int total) { + return new CommitInfos(results, searchAfter, limit, total); } @Override @@ -56,32 +57,37 @@ protected CommitInfo toResource(final Commit doc) { // expand details if requested if (expand().containsKey(CommitInfo.Expand.DETAILS)) { - final Collection commitDetails = getCommitDetails(doc); + final Options detailsExpandOptions = expand().get(CommitInfo.Expand.DETAILS, Options.class); + final Collection commitDetails = getCommitDetails(doc, detailsExpandOptions); final List commitInfoDetails = commitDetails.stream() .flatMap(info -> toCommitInfoDetail(info)) .collect(Collectors.toList()); - builder.details(new CommitInfoDetails(commitInfoDetails, null, null, commitInfoDetails.size(), commitInfoDetails.size())); + builder.details(new CommitInfoDetails(commitInfoDetails, null, commitInfoDetails.size(), commitInfoDetails.size())); } return builder.build(); } - private Collection getCommitDetails(final Commit commit) { - if (filterContainsKey(CommitInfoSearchRequest.OptionKey.AFFECTED_COMPONENT)) { - final String affectedComponentId = filterGetString(CommitInfoSearchRequest.OptionKey.AFFECTED_COMPONENT); + private Collection getCommitDetails(final Commit commit, Options detailsExpandOptions) { + // use the filter defined affectedComponentId if present + final String affectedComponentId = getDetailsAffectedComponentId(filters, detailsExpandOptions); + if (!Strings.isNullOrEmpty(affectedComponentId)) { return commit.getDetailsByObject(affectedComponentId); + } else { + return commit.getDetails(); } - - return commit.getDetails(); - } - - private boolean filterContainsKey(OptionKey key) { - return filters.containsKey(key.name()); } - private String filterGetString(OptionKey key) { - return filters.getString(key.name()); + private String getDetailsAffectedComponentId(Options filters, Options expandOptions) { + checkNotNull(filters, "At least one filter source must be defined"); + if (filters.containsKey(CommitInfoSearchRequest.OptionKey.AFFECTED_COMPONENT_ID)) { + return filters.getString(CommitInfoSearchRequest.OptionKey.AFFECTED_COMPONENT_ID.name()); + } else if (expandOptions.containsKey("affectedComponentId")) { + return expandOptions.getString("affectedComponentId"); + } else { + return null; + } } private Stream toCommitInfoDetail(CommitDetail detail) { diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoDetails.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoDetails.java index a8a03bd5438..391af573452 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoDetails.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoDetails.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,10 +29,9 @@ public final class CommitInfoDetails extends PageableCollectionResource items, - @JsonProperty("scrollId") final String scrollId, @JsonProperty("searchAfter") final String searchAfter, @JsonProperty("limit") final int limit, @JsonProperty("total") final int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoGetRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoGetRequestBuilder.java index c56d53d20e6..cfb0ffd2829 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoGetRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoGetRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,14 +17,14 @@ import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.request.GetResourceRequestBuilder; -import com.b2international.snowowl.datastore.request.RepositoryIndexRequestBuilder; +import com.b2international.snowowl.datastore.request.RepositoryRequestBuilder; /** * @since 5.2 */ public final class CommitInfoGetRequestBuilder extends GetResourceRequestBuilder - implements RepositoryIndexRequestBuilder { + implements RepositoryRequestBuilder { CommitInfoGetRequestBuilder(String commitId) { super(new CommitInfoGetRequest(commitId)); diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoSearchRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoSearchRequest.java index 3ceabb6a94f..89b7458d8e3 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoSearchRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ enum OptionKey { COMMENT, TIME_STAMP_FROM, TIME_STAMP_TO, - AFFECTED_COMPONENT + AFFECTED_COMPONENT_ID } @@ -83,7 +83,7 @@ protected CommitInfos toCollectionResource(RepositoryContext context, Hits - implements RepositoryIndexRequestBuilder { + implements RepositoryRequestBuilder { CommitInfoSearchRequestBuilder() {} @@ -62,7 +62,7 @@ public CommitInfoSearchRequestBuilder filterByTimestamp(final Long timestampFrom } public CommitInfoSearchRequestBuilder filterByAffectedComponent(final String affectedComponentId) { - return addOption(AFFECTED_COMPONENT, affectedComponentId); + return addOption(AFFECTED_COMPONENT_ID, affectedComponentId); } @Override diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfos.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfos.java index 00939cd1de5..f568e99ff11 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfos.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfos.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,16 +30,15 @@ public final class CommitInfos extends PageableCollectionResource { private static final long serialVersionUID = 1L; public CommitInfos(int limit, int total) { - this(Collections.emptyList(), null, null, limit, total); + this(Collections.emptyList(), null, limit, total); } @JsonCreator public CommitInfos( @JsonProperty("items") final List items, - @JsonProperty("scrollId") final String scrollId, @JsonProperty("searchAfter") final String searchAfter, @JsonProperty("limit") final int limit, @JsonProperty("total") final int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/CommandLineAuthenticator.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/CommandLineAuthenticator.java index 1cf3e82a59c..bd1613d8c38 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/CommandLineAuthenticator.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/CommandLineAuthenticator.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ import java.util.concurrent.TimeUnit; import com.b2international.commons.exceptions.NotFoundException; -import com.b2international.snowowl.core.ApplicationContext; import com.b2international.snowowl.eventbus.IEventBus; import com.b2international.snowowl.identity.domain.User; import com.b2international.snowowl.identity.request.UserRequests; @@ -33,8 +32,13 @@ */ public class CommandLineAuthenticator { + private final IEventBus bus; private User user; + public CommandLineAuthenticator(IEventBus bus) { + this.bus = bus; + } + public boolean authenticate(final CommandLineStream out) { out.print("Impersonate operation as: "); @@ -45,7 +49,7 @@ public boolean authenticate(final CommandLineStream out) { return false; } else { try { - user = UserRequests.prepareGet(username).buildAsync().execute(ApplicationContext.getServiceForClass(IEventBus.class)).getSync(1, TimeUnit.MINUTES); + user = UserRequests.prepareGet(username).buildAsync().execute(bus).getSync(1, TimeUnit.MINUTES); return true; } catch (NotFoundException e) { out.println("Cannot impersonate non-existing user '%s'.", username); diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/CommandLineStream.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/CommandLineStream.java index 9b15afccb81..cd524253c46 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/CommandLineStream.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/CommandLineStream.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ */ package com.b2international.snowowl.core.console; +import com.b2international.snowowl.eventbus.IEventBus; import com.b2international.snowowl.identity.domain.User; /** @@ -28,8 +29,8 @@ public interface CommandLineStream { void println(Object o); - default User authenticate() { - final CommandLineAuthenticator authenticator = new CommandLineAuthenticator(); + default User authenticate(IEventBus bus) { + final CommandLineAuthenticator authenticator = new CommandLineAuthenticator(bus); if (!authenticator.authenticate(this)) { return null; diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/SnowOwlCommandProvider.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/SnowOwlCommandProvider.java index 834219ef571..eb1b69c50a4 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/SnowOwlCommandProvider.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/SnowOwlCommandProvider.java @@ -123,10 +123,10 @@ private CommandLine cli() { ) private final class SnowOwlCommand extends BaseCommand { - @Option(names = {"-v", "--version"}, versionHelp = true, description = "Show this help message and exit.") + @Option(names = {"-v", "--version"}, versionHelp = true, description = "Print version information and exit.") boolean versionInfoRequested; - @Option(names = {"-h", "--help"}, usageHelp = true, description = "Print version information and exit.") + @Option(names = {"-h", "--help"}, usageHelp = true, description = "Show this help message and exit.") boolean usageHelpRequested; @Override diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryBuilder.java index 0321331a1d2..1fdf527e9fd 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ import com.b2international.snowowl.core.terminology.TerminologyComponent; import com.b2international.snowowl.datastore.CodeSystemEntry; import com.b2international.snowowl.datastore.CodeSystemVersionEntry; -import com.b2international.snowowl.datastore.request.IndexReadRequest; +import com.b2international.snowowl.datastore.request.RepositoryRequest; import com.b2international.snowowl.datastore.review.ConceptChanges; import com.b2international.snowowl.datastore.review.Review; import com.b2international.snowowl.datastore.version.VersioningRequestBuilder; @@ -156,10 +156,7 @@ public Repository build(Environment env) { // execute initialization steps repository.waitForHealth(Health.GREEN, 3 * 60L /*wait 3 minutes for GREEN repository status*/); - new IndexReadRequest((context) -> { - initializer.initialize(context); - return null; - }).execute(manager.getContext(repositoryId)); + new RepositoryRequest<>(repositoryId, initializer).execute(env); return repository; } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryPlugin.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryPlugin.java index fdce046b563..ba698ddf399 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryPlugin.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryPlugin.java @@ -106,16 +106,23 @@ public void init(SnowOwlConfiguration configuration, Environment env) throws Exc } private Map initIndexSettings(Environment env) { + final RepositoryConfiguration repositoryConfig = env.service(SnowOwlConfiguration.class) + .getModuleConfig(RepositoryConfiguration.class); + final IndexConfiguration indexConfig = repositoryConfig.getIndexConfiguration(); + + if (indexConfig.getClusterHealthTimeout() <= indexConfig.getSocketTimeout()) { + throw new IllegalStateException(String.format("Cluster health timeout (%s ms) must be greater than the socket timeout (%s ms).", + indexConfig.getClusterHealthTimeout(), + indexConfig.getSocketTimeout())); + } + + final ImmutableMap.Builder builder = ImmutableMap.builder(); builder.put(IndexClientFactory.DATA_DIRECTORY, env.getDataPath().resolve("indexes").toString()); builder.put(IndexClientFactory.CONFIG_DIRECTORY, env.getConfigPath().toString()); - - final RepositoryConfiguration repositoryConfig = env.service(SnowOwlConfiguration.class) - .getModuleConfig(RepositoryConfiguration.class); builder.put(IndexClientFactory.INDEX_PREFIX, repositoryConfig.getDeploymentId()); - - final IndexConfiguration indexConfig = repositoryConfig.getIndexConfiguration(); builder.put(IndexClientFactory.CLUSTER_NAME, indexConfig.getClusterName()); + // remove cluster configuration if (indexConfig.getClusterUrl() != null) { builder.put(IndexClientFactory.CLUSTER_URL, indexConfig.getClusterUrl()); if (indexConfig.getClusterUsername() != null) { @@ -126,16 +133,11 @@ private Map initIndexSettings(Environment env) { } } + builder.put(IndexClientFactory.RESULT_WINDOW_KEY, ""+indexConfig.getResultWindow()); + builder.put(IndexClientFactory.MAX_TERMS_COUNT_KEY, ""+indexConfig.getMaxTermsCount()); builder.put(IndexClientFactory.TRANSLOG_SYNC_INTERVAL_KEY, indexConfig.getCommitInterval()); builder.put(IndexClientFactory.COMMIT_CONCURRENCY_LEVEL, indexConfig.getCommitConcurrencyLevel()); builder.put(IndexClientFactory.CONNECT_TIMEOUT, indexConfig.getConnectTimeout()); - - if (indexConfig.getClusterHealthTimeout() <= indexConfig.getSocketTimeout()) { - throw new IllegalStateException(String.format("Cluster health timeout (%s ms) must be greater than the socket timeout (%s ms).", - indexConfig.getClusterHealthTimeout(), - indexConfig.getSocketTimeout())); - } - builder.put(IndexClientFactory.SOCKET_TIMEOUT, indexConfig.getSocketTimeout()); builder.put(IndexClientFactory.CLUSTER_HEALTH_TIMEOUT, indexConfig.getClusterHealthTimeout()); diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryTransactionContext.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryTransactionContext.java index 561281dd3d5..4dd557c4d80 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryTransactionContext.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryTransactionContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; +import java.util.stream.Stream; import org.eclipse.xtext.util.Pair; import org.eclipse.xtext.util.Tuples; @@ -34,9 +35,15 @@ import com.b2international.commons.exceptions.ConflictException; import com.b2international.commons.exceptions.CycleDetectedException; import com.b2international.commons.exceptions.LockedException; +import com.b2international.index.Hits; +import com.b2international.index.Index; import com.b2international.index.IndexException; import com.b2international.index.Searcher; +import com.b2international.index.admin.IndexAdmin; import com.b2international.index.mapping.DocumentMapping; +import com.b2international.index.mapping.Mappings; +import com.b2international.index.query.Expressions; +import com.b2international.index.query.Query; import com.b2international.index.revision.Commit; import com.b2international.index.revision.Operation; import com.b2international.index.revision.Revision; @@ -153,6 +160,8 @@ public Map lookup(Collection componentIds, Class type) private String getObjectId(Object component) { if (component instanceof CodeSystemEntry) { return ((CodeSystemEntry) component).getShortName(); + } else if (component instanceof CodeSystemVersionEntry) { + return ((CodeSystemVersionEntry) component).getVersionId(); } else if (component instanceof Revision) { return ((Revision) component).getId(); } @@ -163,7 +172,7 @@ private Pair> createComponentKey(final String componentId, return Tuples.>pair(componentId, type); } - private Iterable fetchComponents(Set componentIds, Class type) { + private Iterable fetchComponents(Collection componentIds, Class type) { try { if (Revision.class.isAssignableFrom(type)) { return service(RevisionSearcher.class).get(type, componentIds); @@ -176,19 +185,22 @@ private Iterable fetchComponents(Set componentIds, Class type) } @Override - public void add(Object o) { + public String add(Object o) { if (o instanceof CodeSystemEntry) { final CodeSystemEntry cs = (CodeSystemEntry) o; staging.stageNew(cs.getShortName(), cs); resolvedObjectsById.put(createComponentKey(cs.getShortName(), cs.getClass()), cs); + return cs.getShortName(); } else if (o instanceof CodeSystemVersionEntry) { final CodeSystemVersionEntry cs = (CodeSystemVersionEntry) o; staging.stageNew(cs.getVersionId(), cs); resolvedObjectsById.put(createComponentKey(cs.getVersionId(), cs.getClass()), cs); + return cs.getVersionId(); } else if (o instanceof Revision) { Revision rev = (Revision) o; staging.stageNew(rev); resolvedObjectsById.put(createComponentKey(rev.getId(), rev.getClass()), rev); + return rev.getId(); } else { throw new UnsupportedOperationException("Cannot add object to this repository: " + o); } @@ -338,7 +350,34 @@ public void setNotificationEnabled(boolean isNotificationEnabled) { @Override public void clearContents() { - throw new UnsupportedOperationException("Not implemented yet"); + final Index index = service(Index.class); + final IndexAdmin indexAdmin = index.admin(); + final Mappings mappings = indexAdmin.mappings(); + + final Stream> revisionTypes = mappings.getTypes() + .stream() + .filter(t -> Revision.class.isAssignableFrom(t)); + + revisionTypes.forEach(type -> { + + final Query idQuery = Query.select(String.class) + .from(type) + .fields(Revision.Fields.ID) + .where(Expressions.matchAll()) + .scroll() + .build(); + + final RevisionSearcher revisionSearcher = service(RevisionSearcher.class); + final Iterable> batches = revisionSearcher.scroll(idQuery); + + for (final Hits ids : batches) { + final Iterable revisions = fetchComponents(ids.getHits(), type); + revisions.forEach(rev -> { + final String revisionId = ((Revision) rev).getId(); + staging.stageRemove(revisionId, rev); + }); + } + }); } private static DatastoreLockContext createLockContext(String userId, String parentContextDescription) { diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/TerminologyRepositoryInitializer.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/TerminologyRepositoryInitializer.java index 8e9a8bb1167..627d2678a30 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/TerminologyRepositoryInitializer.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/TerminologyRepositoryInitializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,9 @@ import com.b2international.snowowl.core.branch.Branch; import com.b2international.snowowl.core.domain.RepositoryContext; +import com.b2international.snowowl.core.events.Request; import com.b2international.snowowl.datastore.CodeSystemEntry; import com.b2international.snowowl.datastore.CodeSystems; -import com.b2international.snowowl.eventbus.IEventBus; import com.b2international.snowowl.identity.domain.User; import com.b2international.snowowl.terminologyregistry.core.request.CodeSystemRequests; @@ -34,14 +34,15 @@ * *

*/ -public abstract class TerminologyRepositoryInitializer { +public abstract class TerminologyRepositoryInitializer implements Request { /** * Executes initialization steps for the corresponding repository. * * @param context - the repository context to use for the repository initialization */ - public void initialize(RepositoryContext context) { + @Override + public final Void execute(RepositoryContext context) { CodeSystemEntry primaryCodeSystem = createPrimaryCodeSystem(); if (primaryCodeSystem != null) { @@ -68,6 +69,7 @@ public void initialize(RepositoryContext context) { .execute(context); } } + return null; } /** diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/TerminologyRepositoryPlugin.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/TerminologyRepositoryPlugin.java index c91002dd77f..7dbbf64e0f1 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/TerminologyRepositoryPlugin.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/TerminologyRepositoryPlugin.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -111,9 +111,7 @@ protected Map, TerminologyComponent> getAdditionalTerminologyComponents protected void afterRun(SnowOwlConfiguration configuration, Environment env) throws Exception { } - protected TerminologyRepositoryInitializer getTerminologyRepositoryInitializer() { - return null; - } + protected abstract TerminologyRepositoryInitializer getTerminologyRepositoryInitializer(); /** * Subclasses may override and provide a custom precommit hook to be installed on the underlying repository. {@link BaseRepositoryPreCommitHook} diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/ValidationRequests.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/ValidationRequests.java index d0f06f3a46b..20758f4f37d 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/ValidationRequests.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/ValidationRequests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,9 +47,11 @@ public static ValidateRequestBuilder prepareValidate() { } /** - * Creates a unique validation id + * Creates a unique validation id for the given codesystem on the given branch. + * + * @param shortName + * @param branch * - * @param codeSystemEntry * @return the unique id. */ public static String createUniqueValidationId(String shortName, String branch) { diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/eval/ValidationRuleEvaluator.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/eval/ValidationRuleEvaluator.java index 5b50e597653..a73940b2c01 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/eval/ValidationRuleEvaluator.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/eval/ValidationRuleEvaluator.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ public static void register(ValidationRuleEvaluator evaluator) { checkArgument(!INSTANCE.evaluators.containsKey(evaluator.type()), "Rule Evaluator '%s' is already registered", evaluator.type()); INSTANCE.evaluators.put(evaluator.type(), evaluator); } - + /** * Returns the available evaluator for the given type or null if there is not evaluator registered for that type. * @@ -75,13 +75,17 @@ public static Set types() { /** * Evaluate the given rule - * @param - * @param rule - the rule to evaluate - * @param params contains parameters for the rule evaluators (BranchContext should always be included) + * + * @param context + * - the branch context where the evaluation should run + * @param rule + * - the rule to evaluate + * @param params + * - parameters for the rule evaluators * @return * @throws Exception */ - List eval(BranchContext context, ValidationRule rule, Map params) throws Exception; + List eval(BranchContext context, ValidationRule rule, Map params) throws Exception; /** * Unique type identifier of this validation rule evaluator. The type should represent the kind of rules that this evaluator can evaluate using diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/issue/ValidationIssueSearchRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/issue/ValidationIssueSearchRequest.java index 93a7bd2b8f3..6df63c59794 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/issue/ValidationIssueSearchRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/issue/ValidationIssueSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -192,7 +192,7 @@ protected Class getDocumentType() { @Override protected ValidationIssues toCollectionResource(ServiceProvider context, Hits hits) { - return new ValidationIssues(hits.getHits(), hits.getScrollId(), hits.getSearchAfter(), hits.getLimit(), hits.getTotal()); + return new ValidationIssues(hits.getHits(), hits.getSearchAfter(), hits.getLimit(), hits.getTotal()); } @Override diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/issue/ValidationIssues.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/issue/ValidationIssues.java index 1bd6740ea51..216fa9a0c55 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/issue/ValidationIssues.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/issue/ValidationIssues.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,16 +28,15 @@ public final class ValidationIssues extends PageableCollectionResource { public ValidationIssues(int limit, int total) { - this(Collections.emptyList(), null, null, limit, total); + this(Collections.emptyList(), null, limit, total); } @JsonCreator public ValidationIssues( @JsonProperty("items") List items, - @JsonProperty("scrollId") String scrollId, @JsonProperty("searchAfter") String searchAfter, @JsonProperty("limit") int limit, @JsonProperty("total") int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/rule/ValidationRuleSearchRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/rule/ValidationRuleSearchRequest.java index 34989f632bd..61a057d93a5 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/rule/ValidationRuleSearchRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/rule/ValidationRuleSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -77,7 +77,7 @@ protected Class getDocumentType() { @Override protected ValidationRules toCollectionResource(ServiceProvider context, Hits hits) { - return new ValidationRules(hits.getHits(), hits.getScrollId(), hits.getSearchAfter(), hits.getLimit(), hits.getTotal()); + return new ValidationRules(hits.getHits(), hits.getSearchAfter(), hits.getLimit(), hits.getTotal()); } @Override diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/rule/ValidationRules.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/rule/ValidationRules.java index f1fe61a0aa4..690af3602ed 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/rule/ValidationRules.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/rule/ValidationRules.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,16 +28,15 @@ public final class ValidationRules extends PageableCollectionResource { public ValidationRules(int limit, int total) { - this(Collections.emptyList(), null, null, limit, total); + this(Collections.emptyList(), null, limit, total); } @JsonCreator public ValidationRules( @JsonProperty("items") List items, - @JsonProperty("scrollId") String scrollId, @JsonProperty("searchAfter") String searchAfter, @JsonProperty("limit") int limit, @JsonProperty("total") int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/whitelist/ValidationWhiteListSearchRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/whitelist/ValidationWhiteListSearchRequest.java index 9168e187a0f..774782d6fa9 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/whitelist/ValidationWhiteListSearchRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/whitelist/ValidationWhiteListSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -138,7 +138,7 @@ protected Class getDocumentType() { @Override protected ValidationWhiteLists toCollectionResource(ServiceProvider context, Hits hits) { - return new ValidationWhiteLists(hits.getHits(), hits.getScrollId(), hits.getSearchAfter(), hits.getLimit(), hits.getTotal()); + return new ValidationWhiteLists(hits.getHits(), hits.getSearchAfter(), hits.getLimit(), hits.getTotal()); } @Override diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/whitelist/ValidationWhiteLists.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/whitelist/ValidationWhiteLists.java index 6ab53d4136c..9add321a192 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/whitelist/ValidationWhiteLists.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/whitelist/ValidationWhiteLists.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,16 +28,15 @@ public final class ValidationWhiteLists extends PageableCollectionResource{ public ValidationWhiteLists(int limit, int total) { - this(Collections.emptyList(), null, null, limit, total); + this(Collections.emptyList(), null, limit, total); } @JsonCreator public ValidationWhiteLists( @JsonProperty("items") List items, - @JsonProperty("scrollId") String scrollId, @JsonProperty("searchAfter") String searchAfter, @JsonProperty("limit") int limit, @JsonProperty("total") int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/CodeSystemVersions.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/CodeSystemVersions.java index a100c5098d9..f96e70f3c2e 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/CodeSystemVersions.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/CodeSystemVersions.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ public final class CodeSystemVersions extends PageableCollectionResource items, String scrollId, String searchAfter, int limit, int total) { - super(items, scrollId, searchAfter, limit, total); + public CodeSystemVersions(final List items, String searchAfter, int limit, int total) { + super(items, searchAfter, limit, total); } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/CodeSystems.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/CodeSystems.java index 3373f866781..f6fb89a7ce6 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/CodeSystems.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/CodeSystems.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ public final class CodeSystems extends PageableCollectionResource items, String scrollId, String searchAfter, int limit, int total) { - super(items, scrollId, searchAfter, limit, total); + public CodeSystems(List items, String searchAfter, int limit, int total) { + super(items, searchAfter, limit, total); } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/config/IndexConfiguration.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/config/IndexConfiguration.java index e737a63d94f..e6f97b6c3cb 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/config/IndexConfiguration.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/config/IndexConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,6 +49,10 @@ public class IndexConfiguration { private int socketTimeout = IndexClientFactory.DEFAULT_SOCKET_TIMEOUT; @Min(2_001) private int clusterHealthTimeout = IndexClientFactory.DEFAULT_CLUSTER_HEALTH_TIMEOUT; + + private int maxTermsCount = IndexClientFactory.DEFAULT_MAX_TERMS_COUNT; + + private int resultWindow = IndexClientFactory.DEFAULT_RESULT_WINDOW; @JsonProperty public String getCommitInterval() { @@ -149,4 +153,21 @@ public int getClusterHealthTimeout() { public void setClusterHealthTimeout(int clusterHealthTimeout) { this.clusterHealthTimeout = clusterHealthTimeout; } + + public int getMaxTermsCount() { + return maxTermsCount; + } + + public int getResultWindow() { + return resultWindow; + } + + public void setMaxTermsCount(int maxTermsCount) { + this.maxTermsCount = maxTermsCount; + } + + public void setResultWindow(int resultWindow) { + this.resultWindow = resultWindow; + } + } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/converter/BaseResourceConverter.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/converter/BaseResourceConverter.java index 4e0ae8e5db2..bbf1ce9d478 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/converter/BaseResourceConverter.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/converter/BaseResourceConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -63,11 +63,11 @@ protected final List locales() { @Override public final R convert(T component) { - return Iterables.getOnlyElement(convert(Collections.singleton(component), null, null, 1, 1)); + return Iterables.getOnlyElement(convert(Collections.singleton(component), null, 1, 1)); } @Override - public final CR convert(Collection components, String scrollId, String searchAfter, int limit, int total) { + public final CR convert(Collection components, String searchAfter, int limit, int total) { final List results = components .stream() .map(this::toResource) @@ -77,10 +77,10 @@ public final CR convert(Collection components, String scrollId, String search expand(results); } - return createCollectionResource(results, scrollId, searchAfter, limit, total); + return createCollectionResource(results, searchAfter, limit, total); } - protected abstract CR createCollectionResource(List results, String scrollId, String searchAfter, int limit, int total); + protected abstract CR createCollectionResource(List results, String searchAfter, int limit, int total); /** * Subclasses may override to expand resources based on the {@link #expand()} list. diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/converter/ResourceConverter.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/converter/ResourceConverter.java index 0dcf2773ba9..63fb07f64e7 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/converter/ResourceConverter.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/converter/ResourceConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,11 +36,10 @@ public interface ResourceConverter> { * Convert multiple internal index based entities to resource based representations. * * @param components - * @param scrollId * @param searchAfter * @param limit * @param total * @return */ - CR convert(Collection components, String scrollId, String searchAfter, int limit, int total); + CR convert(Collection components, String searchAfter, int limit, int total); } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/index/BaseRepositoryPreCommitHook.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/index/BaseRepositoryPreCommitHook.java index 46f50555d11..b2e2c6a99f8 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/index/BaseRepositoryPreCommitHook.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/index/BaseRepositoryPreCommitHook.java @@ -90,7 +90,7 @@ private final void updateDocuments(StagingArea staging, RevisionSearcher index) preUpdateDocuments(staging, index); doProcess(getChangeSetProcessors(staging, index), staging, index); - postUpdateDocuments(staging); + postUpdateDocuments(staging, index); log.info("Processing changes successfully finished."); } @@ -118,6 +118,7 @@ protected final void doProcess(Collection changeSetProcessor * Subclasses may override this method to execute additional logic before the processing of the changeset. * * @param staging - the staging area before committing it to the repository + * @param index * @throws IOException */ protected void preUpdateDocuments(StagingArea staging, RevisionSearcher index) throws IOException { @@ -126,9 +127,12 @@ protected void preUpdateDocuments(StagingArea staging, RevisionSearcher index) t /** * Return a list of {@link ChangeSetProcessor}s to process the commit changeset. * + * @param staging - the staging area before committing it to the repository + * @param index * @return + * @throws IOException */ - protected Collection getChangeSetProcessors(StagingArea stagingArea, RevisionSearcher index) throws IOException { + protected Collection getChangeSetProcessors(StagingArea staging, RevisionSearcher index) throws IOException { return Collections.emptySet(); } @@ -136,8 +140,10 @@ protected Collection getChangeSetProcessors(StagingArea stag * Subclasses may override this method to execute additional logic after the processing of the changeset, but before committing it. * * @param staging - the staging area before committing it to the repository + * @param index + * @throws IOException */ - protected void postUpdateDocuments(StagingArea staging) { + protected void postUpdateDocuments(StagingArea staging, RevisionSearcher index) throws IOException { } // @SuppressWarnings("restriction") diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/oplock/DatastoreLocks.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/oplock/DatastoreLocks.java index 3ec24815cc9..9daf194f21d 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/oplock/DatastoreLocks.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/oplock/DatastoreLocks.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,12 +22,12 @@ /** * @since 7.1.0 */ -public class DatastoreLocks extends PageableCollectionResource { +public final class DatastoreLocks extends PageableCollectionResource { private static final long serialVersionUID = 1L; - public DatastoreLocks(List items, String scrollId, String searchAfter, int limit, int total) { - super(items, scrollId, searchAfter, limit, total); + public DatastoreLocks(List items, String searchAfter, int limit, int total) { + super(items, searchAfter, limit, total); } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/oplock/DatastoreOperationLockManager.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/oplock/DatastoreOperationLockManager.java index 6d804e2ced4..5acaf658751 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/oplock/DatastoreOperationLockManager.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/oplock/DatastoreOperationLockManager.java @@ -389,7 +389,7 @@ private DatastoreLocks search(Expression query, int limit) { private DatastoreLocks search(Expression query, List fields, SortBy sortBy, int limit) { final Hits hits = searchHits(query, fields, sortBy, limit); - return new DatastoreLocks(hits.getHits(), null, null, hits.getLimit(), hits.getTotal()); + return new DatastoreLocks(hits.getHits(), null, hits.getLimit(), hits.getTotal()); } private Hits searchHits(Expression query, List fields, SortBy sortBy, int limit) { diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/remotejobs/RemoteJobTracker.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/remotejobs/RemoteJobTracker.java index e22debac887..50b9cb3f7c5 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/remotejobs/RemoteJobTracker.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/remotejobs/RemoteJobTracker.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -135,7 +135,7 @@ public RemoteJobs search(Expression query, int limit) { private RemoteJobs search(Expression query, List fields, SortBy sortBy, int limit) { final Hits hits = searchHits(query, fields, sortBy, limit); - return new RemoteJobs(hits.getHits(), null, null, hits.getLimit(), hits.getTotal()); + return new RemoteJobs(hits.getHits(), null, hits.getLimit(), hits.getTotal()); } private Hits searchHits(Expression query, List fields, SortBy sortBy, int limit) { diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/remotejobs/RemoteJobs.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/remotejobs/RemoteJobs.java index 4de8ff7563a..60186ba2063 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/remotejobs/RemoteJobs.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/remotejobs/RemoteJobs.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ public final class RemoteJobs extends PageableCollectionResource private static final long serialVersionUID = 1L; - public RemoteJobs(List items, String scrollId, String searchAfter, int limit, int total) { - super(items, scrollId, searchAfter, limit, total); + public RemoteJobs(List items, String searchAfter, int limit, int total) { + super(items, searchAfter, limit, total); } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchGetRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchGetRequestBuilder.java index a943335a8d7..585b7e5b0f1 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchGetRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchGetRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ */ public final class BranchGetRequestBuilder extends GetResourceRequestBuilder - implements RepositoryIndexRequestBuilder { + implements RepositoryRequestBuilder { BranchGetRequestBuilder(String path) { super(new BranchGetRequest(path)); diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchRequestBuilder.java index 2caff99aa61..b9a837d9e31 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,9 +33,7 @@ default AsyncRequest build(String repositoryId, String branch) { return new AsyncRequest<>( new RepositoryRequest<>(repositoryId, new HealthCheckingRequest<>( - new IndexReadRequest<>( - new BranchRequest<>(branch, build()) - ), + new BranchRequest<>(branch, build()), allowedHealthstates() ) ) diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchSearchRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchSearchRequest.java index 2b760c36218..1ec714b6392 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchSearchRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -63,7 +63,7 @@ enum OptionKey { @Override protected Branches createEmptyResult(int limit) { - return new Branches(Collections.emptyList(), null, null, limit, 0); + return new Branches(Collections.emptyList(), null, limit, 0); } @Override @@ -99,7 +99,7 @@ protected Branches toCollectionResource(RepositoryContext context, Hits toBranchData(final BaseRevisionBranching branching, final Iterable hits) { @@ -129,7 +129,7 @@ private void expand(RepositoryContext context, List branchHits) { final BaseRevisionBranching branching = context.service(BaseRevisionBranching.class); for (Branch branchHit : branchHits) { final List children = toBranchData(branching, branching.getChildren(branchHit.path())); - branchHit.setChildren(new Branches(children, null, null, children.size(), children.size())); + branchHit.setChildren(new Branches(children, null, children.size(), children.size())); } } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchSearchRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchSearchRequestBuilder.java index adf0fbbb894..3f6ac102887 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchSearchRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/BranchSearchRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ /** * @since 4.5 */ -public final class BranchSearchRequestBuilder extends SearchResourceRequestBuilder implements RepositoryIndexRequestBuilder { +public final class BranchSearchRequestBuilder extends SearchResourceRequestBuilder implements RepositoryRequestBuilder { BranchSearchRequestBuilder() { super(); diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/CreateMergeRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/CreateMergeRequestBuilder.java index 0436210c023..84ec273ff64 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/CreateMergeRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/CreateMergeRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ /** * @since 4.5 */ -public final class CreateMergeRequestBuilder extends BaseRequestBuilder implements RepositoryIndexRequestBuilder { +public final class CreateMergeRequestBuilder extends BaseRequestBuilder implements RepositoryRequestBuilder { private String source; private String target; diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/IndexReadRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/IndexReadRequest.java deleted file mode 100644 index 10b74110537..00000000000 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/IndexReadRequest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.datastore.request; - -import com.b2international.commons.exceptions.IllegalQueryParameterException; -import com.b2international.index.Index; -import com.b2international.index.Searcher; -import com.b2international.index.query.QueryParseException; -import com.b2international.snowowl.core.domain.RepositoryContext; -import com.b2international.snowowl.core.events.DelegatingRequest; -import com.b2international.snowowl.core.events.Request; - -/** - * A subclass of {@link DelegatingRequest} that: - *

    - *
  • opens an index read transaction using {@link Index}; - *
  • executes the delegate with a {@link RepositoryContext} that allows access to {@link Searcher} from the read transaction. - *
- * - * @since 5.2 - */ -public final class IndexReadRequest extends DelegatingRequest { - - public IndexReadRequest(final Request next) { - super(next); - } - - @Override - public R execute(final RepositoryContext context) { - return context.service(Index.class).read(index -> { - try { - return next(context.inject() - .bind(Searcher.class, index) - .build()); - } catch (QueryParseException e) { - throw new IllegalQueryParameterException(e.getMessage()); - } - }); - } - -} diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryCommitRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryCommitRequestBuilder.java index d3433292494..1e73763a659 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryCommitRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryCommitRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,10 +89,8 @@ public AsyncRequest build(String repositoryId, String branch) { return new AsyncRequest<>( new RepositoryRequest<>(repositoryId, new HealthCheckingRequest<>( - new IndexReadRequest<>( - new BranchRequest<>(branch, - new RevisionIndexReadRequest(build()) - ) + new BranchRequest<>(branch, + new RevisionIndexReadRequest(build()) ), allowedHealthstates() ) diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryIndexRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryIndexRequestBuilder.java deleted file mode 100644 index 6e3180dfc5a..00000000000 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryIndexRequestBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.datastore.request; - -import com.b2international.snowowl.core.domain.RepositoryContext; -import com.b2international.snowowl.core.events.AsyncRequest; -import com.b2international.snowowl.core.events.RequestBuilder; - -/** - * @since 5.7 - */ -public interface RepositoryIndexRequestBuilder extends RequestBuilder, AllowedHealthStates { - - default AsyncRequest build(String repositoryId) { - return new AsyncRequest<>( - new RepositoryRequest<>(repositoryId, - new HealthCheckingRequest<>( - new IndexReadRequest<>(build()), - allowedHealthstates() - ) - ) - ); - } - -} diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryRequest.java index 5c903d32318..e7f52d678da 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,10 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; +import com.b2international.commons.exceptions.IllegalQueryParameterException; +import com.b2international.index.Index; +import com.b2international.index.Searcher; +import com.b2international.index.query.QueryParseException; import com.b2international.snowowl.core.ServiceProvider; import com.b2international.snowowl.core.domain.Bindable; import com.b2international.snowowl.core.domain.DelegatingContext; @@ -49,7 +53,8 @@ public String getContextId() { @Override public B execute(final ServiceProvider context) { - DelegatingContext.Builder repositoryContext = context.service(RepositoryContextProvider.class).getContext(repositoryId).inject(); + RepositoryContext originalRepositoryContext = context.service(RepositoryContextProvider.class).getContext(repositoryId); + DelegatingContext.Builder repositoryContext = originalRepositoryContext.inject(); // by default add a NullProgressMonitor binding to the context // if the previous context is a delegate context, injecting all services can override this safely @@ -58,7 +63,16 @@ public B execute(final ServiceProvider context) { if (context instanceof Bindable) { repositoryContext.bindAll((Bindable) context); } - - return next(repositoryContext.build()); + + // always "open" an index read context when executing requests inside a repository + return originalRepositoryContext.service(Index.class).read(index -> { + try { + return next(repositoryContext + .bind(Searcher.class, index) + .build()); + } catch (QueryParseException e) { + throw new IllegalQueryParameterException(e.getMessage()); + } + }); } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryRequestBuilder.java index 8ab2c209f79..db469feac38 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryRequestBuilder.java @@ -31,10 +31,13 @@ public interface RepositoryRequestBuilder extends RequestBuilder build(String repositoryId) { return new AsyncRequest( - new RepositoryRequest(repositoryId, - new HealthCheckingRequest<>(build(), allowedHealthstates()) - ) - ); + new RepositoryRequest(repositoryId, + new HealthCheckingRequest<>( + build(), + allowedHealthstates() + ) + ) + ); } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryRequests.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryRequests.java index 4fcaff7ec79..d77b04d43f4 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryRequests.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RepositoryRequests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ package com.b2international.snowowl.datastore.request; import com.b2international.snowowl.core.commit.CommitInfoRequests; +import com.b2international.snowowl.datastore.request.repository.RepositoryClearRequestBuilder; import com.b2international.snowowl.datastore.request.repository.RepositoryGetRequestBuilder; import com.b2international.snowowl.datastore.request.repository.RepositorySearchRequestBuilder; import com.b2international.snowowl.datastore.request.system.ServerInfoGetRequestBuilder; @@ -72,5 +73,8 @@ public static RepositoryGetRequestBuilder prepareGet(String repositoryId) { public static ServerInfoGetRequestBuilder prepareGetServerInfo() { return new ServerInfoGetRequestBuilder(); } - + + public static RepositoryClearRequestBuilder prepareClear() { + return new RepositoryClearRequestBuilder(); + } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/ReviewCreateRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/ReviewCreateRequestBuilder.java index 10f995def68..417430f8666 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/ReviewCreateRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/ReviewCreateRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ /** * @since 4.5 */ -public final class ReviewCreateRequestBuilder extends BaseRequestBuilder implements RepositoryIndexRequestBuilder { +public final class ReviewCreateRequestBuilder extends BaseRequestBuilder implements RepositoryRequestBuilder { private String sourceBranch; private String targetBranch; diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RevisionIndexRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RevisionIndexRequestBuilder.java index 1e5fbe0fb8a..8af460560bf 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RevisionIndexRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/RevisionIndexRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,10 +34,8 @@ public interface RevisionIndexRequestBuilder extends RequestBuilder build(String repositoryId, String branch) { return new AsyncRequest<>( new RepositoryRequest<>(repositoryId, - new IndexReadRequest<>( - new BranchRequest<>(branch, - new RevisionIndexReadRequest<>(build()) - ) + new BranchRequest<>(branch, + new RevisionIndexReadRequest<>(build()) ) ) ); diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/SearchIndexResourceRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/SearchIndexResourceRequest.java index 05db85b25d9..1856e7cf204 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/SearchIndexResourceRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/SearchIndexResourceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ import java.util.function.Function; import com.b2international.index.Hits; -import com.b2international.index.Scroll; import com.b2international.index.Searcher; import com.b2international.index.mapping.DocumentMapping; import com.b2international.index.query.Expression; @@ -58,21 +57,15 @@ public abstract class SearchIndexResourceRequest docType = getDocumentType(); final Searcher searcher = searcher(context); - final Hits hits; - if (isScrolled()) { - hits = searcher.scroll(new Scroll<>(docType, docType, fields(), scrollId(), scrollKeepAlive())); - } else { - final Expression where = prepareQuery(context); - hits = searcher.search(Query.select(docType) - .fields(fields()) - .where(where) - .scroll(scrollKeepAlive()) - .searchAfter(searchAfter()) - .limit(limit()) - .sortBy(sortBy()) - .withScores(trackScores()) - .build()); - } + final Expression where = prepareQuery(context); + final Hits hits = searcher.search(Query.select(docType) + .fields(fields()) + .where(where) + .searchAfter(searchAfter()) + .limit(limit()) + .sortBy(sortBy()) + .withScores(trackScores()) + .build()); return toCollectionResource(context, hits); } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/SearchMergeRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/SearchMergeRequest.java index ea7b7246fd2..ce65c686c44 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/SearchMergeRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/SearchMergeRequest.java @@ -82,7 +82,7 @@ public Merges doExecute(RepositoryContext context) { final RemoteJobs jobs = context.service(RemoteJobTracker.class).search(queryBuilder.build(), Integer.MAX_VALUE); final ObjectMapper mapper = context.service(ObjectMapper.class); final List items = jobs.stream().map(job -> createMergefromJobEntry(job, mapper)).collect(Collectors.toList()); - return new Merges(items, jobs.getScrollId(), jobs.getSearchAfter(), jobs.getLimit(), jobs.getTotal()); + return new Merges(items, jobs.getSearchAfter(), jobs.getLimit(), jobs.getTotal()); } @Override diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/compare/BranchCompareRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/compare/BranchCompareRequestBuilder.java index 4c81dd49721..92bdb18aaff 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/compare/BranchCompareRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/compare/BranchCompareRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,13 +18,13 @@ import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.events.BaseRequestBuilder; import com.b2international.snowowl.core.events.Request; -import com.b2international.snowowl.datastore.request.RepositoryIndexRequestBuilder; +import com.b2international.snowowl.datastore.request.RepositoryRequestBuilder; /** * @since 5.9 */ public final class BranchCompareRequestBuilder extends BaseRequestBuilder - implements RepositoryIndexRequestBuilder { + implements RepositoryRequestBuilder { private String base; private String compare; diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/job/SearchJobRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/job/SearchJobRequest.java index eeb9c333ed0..47302081902 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/job/SearchJobRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/job/SearchJobRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -77,7 +77,7 @@ protected Expression prepareQuery(ServiceProvider context) { @Override protected RemoteJobs toCollectionResource(ServiceProvider context, Hits hits) { - return new RemoteJobs(hits.getHits(), hits.getScrollId(), hits.getSearchAfter(), hits.getLimit(), hits.getTotal()); + return new RemoteJobs(hits.getHits(), hits.getSearchAfter(), hits.getLimit(), hits.getTotal()); } @Override @@ -92,7 +92,7 @@ protected Class getDocumentType() { @Override protected RemoteJobs createEmptyResult(int limit) { - return new RemoteJobs(Collections.emptyList(), null, null, limit, 0); + return new RemoteJobs(Collections.emptyList(), null, limit, 0); } } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/repository/RepositoryClearRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/repository/RepositoryClearRequest.java index de5fce72580..3845edeb9d2 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/repository/RepositoryClearRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/repository/RepositoryClearRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,32 +15,28 @@ */ package com.b2international.snowowl.datastore.request.repository; -import com.b2international.snowowl.core.authorization.RepositoryAccessControl; +import com.b2international.snowowl.core.authorization.BranchAccessControl; import com.b2international.snowowl.core.domain.TransactionContext; import com.b2international.snowowl.core.events.Request; import com.b2international.snowowl.identity.domain.Permission; /** - * Request to clear a repository. Mostly used during the import process as an option. + * Deletes all current revisions from a single branch. + * * @since 5.12 */ -public class RepositoryClearRequest implements Request, RepositoryAccessControl { +public class RepositoryClearRequest implements Request, BranchAccessControl { private static final long serialVersionUID = 1L; @Override - public Boolean execute(TransactionContext context) { + public Boolean execute(final TransactionContext context) { context.clearContents(); return true; } - - public static RepositoryClearRequestBuilder builder() { - return new RepositoryClearRequestBuilder(); - } @Override public String getOperation() { return Permission.EDIT; } - } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/repository/RepositoryClearRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/repository/RepositoryClearRequestBuilder.java index f4d8eb81461..e344f0190e5 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/repository/RepositoryClearRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/repository/RepositoryClearRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,16 +22,16 @@ /** * Builder for request that clear the repository content. + * * @since 5.12 */ -public final class RepositoryClearRequestBuilder extends BaseRequestBuilder implements TransactionalRequestBuilder{ - - RepositoryClearRequestBuilder() {} +public final class RepositoryClearRequestBuilder + extends BaseRequestBuilder + implements TransactionalRequestBuilder{ @Override protected Request doBuild() { final RepositoryClearRequest req = new RepositoryClearRequest(); return req; } - -} \ No newline at end of file +} diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/repository/RepositoryGetRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/repository/RepositoryGetRequest.java index 6462341dba4..dfc38d421a1 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/repository/RepositoryGetRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/repository/RepositoryGetRequest.java @@ -22,7 +22,7 @@ /** * @since 5.8 */ -class RepositoryGetRequest extends GetResourceRequest { +final class RepositoryGetRequest extends GetResourceRequest { RepositoryGetRequest(String id) { super(id); diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/system/ServerInfoGetRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/system/ServerInfoGetRequest.java index 7c619aac2d1..2ed4c423808 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/system/ServerInfoGetRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/system/ServerInfoGetRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ import com.b2international.snowowl.core.RepositoryInfo; import com.b2international.snowowl.core.ServerInfo; import com.b2international.snowowl.core.ServiceProvider; +import com.b2international.snowowl.core.authorization.Unprotected; import com.b2international.snowowl.core.config.SnowOwlConfiguration; import com.b2international.snowowl.core.events.Request; import com.b2international.snowowl.datastore.DatastoreActivator; @@ -37,6 +38,7 @@ /** * @since 5.8 */ +@Unprotected class ServerInfoGetRequest implements Request { private static final long serialVersionUID = 1L; diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/version/CodeSystemVersionCreateRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/version/CodeSystemVersionCreateRequest.java index 4cf18126066..919d654fc7a 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/version/CodeSystemVersionCreateRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/version/CodeSystemVersionCreateRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,7 +55,6 @@ import com.b2international.snowowl.datastore.remotejobs.RemoteJob; import com.b2international.snowowl.datastore.request.BranchRequest; import com.b2international.snowowl.datastore.request.CommitResult; -import com.b2international.snowowl.datastore.request.IndexReadRequest; import com.b2international.snowowl.datastore.request.RepositoryRequest; import com.b2international.snowowl.datastore.request.RepositoryRequests; import com.b2international.snowowl.datastore.request.RevisionIndexReadRequest; @@ -141,13 +140,11 @@ public Boolean execute(ServiceProvider context) { // check that the specified effective time is valid in this code system validateEffectiveTime(context, codeSystem); new RepositoryRequest<>(repositoryId, - new IndexReadRequest<>( - new BranchRequest<>(codeSystem.getBranchPath(), - new RevisionIndexReadRequest( - context.service(RepositoryManager.class).get(codeSystemToVersion.getRepositoryUuid()) - .service(VersioningRequestBuilder.class) - .build(new VersioningConfiguration(user, codeSystemToVersion.getShortName(), versionId, description, effectiveTime)) - ) + new BranchRequest<>(codeSystem.getBranchPath(), + new RevisionIndexReadRequest( + context.service(RepositoryManager.class).get(codeSystemToVersion.getRepositoryUuid()) + .service(VersioningRequestBuilder.class) + .build(new VersioningConfiguration(user, codeSystemToVersion.getShortName(), versionId, description, effectiveTime)) ) ) ).execute(context); diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemCreateRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemCreateRequest.java index e2c6f60e2f4..34613e90e01 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemCreateRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemCreateRequest.java @@ -94,11 +94,7 @@ void setExtensionOf(final String extensionOf) { @Override public String execute(final TransactionContext context) { checkCodeSystem(context); - - final CodeSystemEntry codeSystem = createCodeSystem(context); - context.add(codeSystem); - - return codeSystem.getShortName(); + return context.add(createCodeSystem(context)); } private void checkCodeSystem(final TransactionContext context) { diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemGetRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemGetRequestBuilder.java index b7a152ee92d..7c3e177629a 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemGetRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemGetRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,14 +18,14 @@ import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.request.GetResourceRequestBuilder; import com.b2international.snowowl.datastore.CodeSystemEntry; -import com.b2international.snowowl.datastore.request.RepositoryIndexRequestBuilder; +import com.b2international.snowowl.datastore.request.RepositoryRequestBuilder; /** * @since 4.7 */ public final class CodeSystemGetRequestBuilder extends GetResourceRequestBuilder - implements RepositoryIndexRequestBuilder { + implements RepositoryRequestBuilder { CodeSystemGetRequestBuilder(String uniqueId) { super(new CodeSystemGetRequest(uniqueId)); diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemSearchRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemSearchRequest.java index 4856844252a..4b7e8ac485d 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemSearchRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,12 +55,12 @@ protected Expression prepareQuery(RepositoryContext context) { @Override protected CodeSystems toCollectionResource(RepositoryContext context, Hits hits) { - return new CodeSystems(hits.getHits(), hits.getScrollId(), hits.getSearchAfter(), limit(), hits.getTotal()); + return new CodeSystems(hits.getHits(), hits.getSearchAfter(), limit(), hits.getTotal()); } @Override protected CodeSystems createEmptyResult(int limit) { - return new CodeSystems(Collections.emptyList(), null, null, limit, 0); + return new CodeSystems(Collections.emptyList(), null, limit, 0); } @Override diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemSearchRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemSearchRequestBuilder.java index b0826109291..8302209d00c 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemSearchRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemSearchRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,14 +19,14 @@ import com.b2international.snowowl.core.request.SearchResourceRequest; import com.b2international.snowowl.core.request.SearchResourceRequestBuilder; import com.b2international.snowowl.datastore.CodeSystems; -import com.b2international.snowowl.datastore.request.RepositoryIndexRequestBuilder; +import com.b2international.snowowl.datastore.request.RepositoryRequestBuilder; /** * @since 4.7 */ public final class CodeSystemSearchRequestBuilder extends SearchResourceRequestBuilder - implements RepositoryIndexRequestBuilder { + implements RepositoryRequestBuilder { CodeSystemSearchRequestBuilder() { super(); diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemVersionSearchRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemVersionSearchRequest.java index 5fa7be5086d..b3a0762d68f 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemVersionSearchRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemVersionSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -117,12 +117,12 @@ protected Class getDocumentType() { @Override protected CodeSystemVersions toCollectionResource(RepositoryContext context, Hits hits) { - return new CodeSystemVersions(hits.getHits(), hits.getScrollId(), hits.getSearchAfter(), limit(), hits.getTotal()); + return new CodeSystemVersions(hits.getHits(), hits.getSearchAfter(), limit(), hits.getTotal()); } @Override protected CodeSystemVersions createEmptyResult(int limit) { - return new CodeSystemVersions(Collections.emptyList(), null, null, limit, 0); + return new CodeSystemVersions(Collections.emptyList(), null, limit, 0); } @Override diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemVersionSearchRequestBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemVersionSearchRequestBuilder.java index d93591558f5..3ff14e073e2 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemVersionSearchRequestBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/terminologyregistry/core/request/CodeSystemVersionSearchRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ import com.b2international.snowowl.core.request.SearchResourceRequest; import com.b2international.snowowl.core.request.SearchResourceRequestBuilder; import com.b2international.snowowl.datastore.CodeSystemVersions; -import com.b2international.snowowl.datastore.request.RepositoryIndexRequestBuilder; +import com.b2international.snowowl.datastore.request.RepositoryRequestBuilder; import com.b2international.snowowl.terminologyregistry.core.request.CodeSystemVersionSearchRequest.OptionKey; /** @@ -31,7 +31,7 @@ */ public final class CodeSystemVersionSearchRequestBuilder extends SearchResourceRequestBuilder - implements RepositoryIndexRequestBuilder { + implements RepositoryRequestBuilder { private String codeSystemShortName; private String versionId; diff --git a/core/com.b2international.snowowl.identity.file/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.identity.file/META-INF/MANIFEST.MF index 9101301de13..6228424f38d 100644 --- a/core/com.b2international.snowowl.identity.file/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.identity.file/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl File Identity Module Bundle-SymbolicName: com.b2international.snowowl.identity.file;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Fragment-Host: com.b2international.snowowl.identity Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ClassPath: . diff --git a/core/com.b2international.snowowl.identity.file/pom.xml b/core/com.b2international.snowowl.identity.file/pom.xml index 2fe8da90677..8b7ed8a8fc2 100644 --- a/core/com.b2international.snowowl.identity.file/pom.xml +++ b/core/com.b2international.snowowl.identity.file/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.identity.file eclipse-plugin diff --git a/core/com.b2international.snowowl.identity.ldap/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.identity.ldap/META-INF/MANIFEST.MF index 21d88a7be3b..fac5b7f3167 100644 --- a/core/com.b2international.snowowl.identity.ldap/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.identity.ldap/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl LDAP Identity Module Bundle-SymbolicName: com.b2international.snowowl.identity.ldap -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Fragment-Host: com.b2international.snowowl.identity Bundle-RequiredExecutionEnvironment: JavaSE-11 Import-Package: com.fasterxml.jackson.annotation;version="2.9.9", diff --git a/core/com.b2international.snowowl.identity.ldap/pom.xml b/core/com.b2international.snowowl.identity.ldap/pom.xml index 533a358bb94..bd6e5eb337c 100644 --- a/core/com.b2international.snowowl.identity.ldap/pom.xml +++ b/core/com.b2international.snowowl.identity.ldap/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.identity.ldap eclipse-plugin diff --git a/core/com.b2international.snowowl.identity/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.identity/META-INF/MANIFEST.MF index 725b65e171e..d5559d4450e 100644 --- a/core/com.b2international.snowowl.identity/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.identity/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Identity Management Bundle-SymbolicName: com.b2international.snowowl.identity;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy diff --git a/core/com.b2international.snowowl.identity/pom.xml b/core/com.b2international.snowowl.identity/pom.xml index e5e21af5ca5..b0983154109 100644 --- a/core/com.b2international.snowowl.identity/pom.xml +++ b/core/com.b2international.snowowl.identity/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.identity eclipse-plugin diff --git a/core/com.b2international.snowowl.identity/src/com/b2international/snowowl/identity/domain/Users.java b/core/com.b2international.snowowl.identity/src/com/b2international/snowowl/identity/domain/Users.java index bd09805aa75..42b2f999e93 100644 --- a/core/com.b2international.snowowl.identity/src/com/b2international/snowowl/identity/domain/Users.java +++ b/core/com.b2international.snowowl.identity/src/com/b2international/snowowl/identity/domain/Users.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,6 @@ public Users(int limit, int total) { } public Users(List items, int limit, int total) { - super(items, null, null, limit, total); + super(items, null, limit, total); } } diff --git a/core/com.b2international.snowowl.identity/src/com/b2international/snowowl/identity/request/UserLoginRequest.java b/core/com.b2international.snowowl.identity/src/com/b2international/snowowl/identity/request/UserLoginRequest.java index 69e9ddfdee7..47aad4d8123 100644 --- a/core/com.b2international.snowowl.identity/src/com/b2international/snowowl/identity/request/UserLoginRequest.java +++ b/core/com.b2international.snowowl.identity/src/com/b2international/snowowl/identity/request/UserLoginRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ import com.b2international.commons.exceptions.UnauthorizedException; import com.b2international.snowowl.core.ServiceProvider; +import com.b2international.snowowl.core.authorization.Unprotected; import com.b2international.snowowl.core.events.Request; import com.b2international.snowowl.identity.IdentityProvider; import com.b2international.snowowl.identity.JWTGenerator; @@ -29,6 +30,7 @@ /** * @since 7.2 */ +@Unprotected public final class UserLoginRequest implements Request { @NotEmpty diff --git a/core/com.b2international.snowowl.logback.config/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.logback.config/META-INF/MANIFEST.MF index 8920a6b4499..de737c40237 100644 --- a/core/com.b2international.snowowl.logback.config/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.logback.config/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl's Logback Configuration Bundle-SymbolicName: com.b2international.snowowl.logback.config;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Fragment-Host: ch.qos.logback.classic;bundle-version="[1.1.3,2.0.0)" Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-Vendor: B2i Healthcare diff --git a/core/com.b2international.snowowl.logback.config/pom.xml b/core/com.b2international.snowowl.logback.config/pom.xml index b9a784d1517..4d18125d184 100644 --- a/core/com.b2international.snowowl.logback.config/pom.xml +++ b/core/com.b2international.snowowl.logback.config/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.logback.config eclipse-plugin diff --git a/core/com.b2international.snowowl.server.core.feature/feature.xml b/core/com.b2international.snowowl.server.core.feature/feature.xml index bd8e3c03b0c..e5624a8def5 100644 --- a/core/com.b2international.snowowl.server.core.feature/feature.xml +++ b/core/com.b2international.snowowl.server.core.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/core/com.b2international.snowowl.server.core.feature/pom.xml b/core/com.b2international.snowowl.server.core.feature/pom.xml index f081f939977..b6e95a0d36a 100644 --- a/core/com.b2international.snowowl.server.core.feature/pom.xml +++ b/core/com.b2international.snowowl.server.core.feature/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.server.core.feature eclipse-feature diff --git a/core/com.b2international.snowowl.server.dependencies.feature/feature.xml b/core/com.b2international.snowowl.server.dependencies.feature/feature.xml index 035e7df43e9..20a83d30a22 100644 --- a/core/com.b2international.snowowl.server.dependencies.feature/feature.xml +++ b/core/com.b2international.snowowl.server.dependencies.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/core/com.b2international.snowowl.server.dependencies.feature/pom.xml b/core/com.b2international.snowowl.server.dependencies.feature/pom.xml index a0a8e14f2d3..cc32d371aaa 100644 --- a/core/com.b2international.snowowl.server.dependencies.feature/pom.xml +++ b/core/com.b2international.snowowl.server.dependencies.feature/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.server.dependencies.feature eclipse-feature diff --git a/core/com.b2international.snowowl.server.product.feature/feature.xml b/core/com.b2international.snowowl.server.product.feature/feature.xml index 9e3c9c75861..99a50069a07 100644 --- a/core/com.b2international.snowowl.server.product.feature/feature.xml +++ b/core/com.b2international.snowowl.server.product.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/core/com.b2international.snowowl.server.product.feature/pom.xml b/core/com.b2international.snowowl.server.product.feature/pom.xml index e42166605ee..4689f5499fd 100644 --- a/core/com.b2international.snowowl.server.product.feature/pom.xml +++ b/core/com.b2international.snowowl.server.product.feature/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.server.product.feature eclipse-feature diff --git a/core/com.b2international.snowowl.server.product/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.server.product/META-INF/MANIFEST.MF index d407a182ac0..25c13a5e58c 100644 --- a/core/com.b2international.snowowl.server.product/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.server.product/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Server Product Bundle-SymbolicName: com.b2international.snowowl.server.product;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.eclipse.osgi;bundle-version="3.6.1", diff --git a/core/com.b2international.snowowl.server.product/pom.xml b/core/com.b2international.snowowl.server.product/pom.xml index 49634cf557e..e5db1410107 100644 --- a/core/com.b2international.snowowl.server.product/pom.xml +++ b/core/com.b2international.snowowl.server.product/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.server.product eclipse-plugin diff --git a/core/pom.xml b/core/pom.xml index 7be955f6b75..e869d69a21e 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/dist/pom.xml b/dist/pom.xml index 9a858f5e73e..2ab4fc0724c 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 457df652546..1672f74a3d4 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.2 + image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.5.2 container_name: elasticsearch environment: cluster.name: "elastic-snowowl" diff --git a/documentation/META-INF/MANIFEST.MF b/documentation/META-INF/MANIFEST.MF index 87be5c68c15..5e6b49bb785 100644 --- a/documentation/META-INF/MANIFEST.MF +++ b/documentation/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Documentation Bundle-SymbolicName: documentation;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-11 @@ -14,7 +14,4 @@ Require-Bundle: com.b2international.commons, com.b2international.snowowl.core.rest, com.b2international.snowowl.snomed.common, com.b2international.snowowl.snomed.datastore, - com.b2international.snowowl.snomed.dsl, - com.b2international.snowowl.snomed.semanticengine, - com.b2international.snowowl.snomed.semanticengine.simpleast, com.b2international.snowowl.snomed.reasoner diff --git a/documentation/pom.xml b/documentation/pom.xml index d703e887597..837ac77ed07 100644 --- a/documentation/pom.xml +++ b/documentation/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl snowowl-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT documentation diff --git a/fhir/com.b2international.snowowl.fhir.core/META-INF/MANIFEST.MF b/fhir/com.b2international.snowowl.fhir.core/META-INF/MANIFEST.MF index 0724d286a6f..03827ec06a6 100644 --- a/fhir/com.b2international.snowowl.fhir.core/META-INF/MANIFEST.MF +++ b/fhir/com.b2international.snowowl.fhir.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl FHIR API Core Bundle-SymbolicName: com.b2international.snowowl.fhir.core;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Export-Package: com.b2international.snowowl.fhir.core, diff --git a/fhir/com.b2international.snowowl.fhir.core/pom.xml b/fhir/com.b2international.snowowl.fhir.core/pom.xml index 8ffa31d3324..d2adf00f1e0 100644 --- a/fhir/com.b2international.snowowl.fhir.core/pom.xml +++ b/fhir/com.b2international.snowowl.fhir.core/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl fhir-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.fhir.core diff --git a/fhir/com.b2international.snowowl.fhir.core/src/com/b2international/snowowl/fhir/core/model/codesystem/IConceptProperty.java b/fhir/com.b2international.snowowl.fhir.core/src/com/b2international/snowowl/fhir/core/model/codesystem/IConceptProperty.java index 7d0628ad10a..7037f7da08e 100644 --- a/fhir/com.b2international.snowowl.fhir.core/src/com/b2international/snowowl/fhir/core/model/codesystem/IConceptProperty.java +++ b/fhir/com.b2international.snowowl.fhir.core/src/com/b2international/snowowl/fhir/core/model/codesystem/IConceptProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,24 +28,20 @@ public interface IConceptProperty extends FhirCodeSystem { /** - * Returns the FHIR type of the property. - * @return + * @return the FHIR type of the property. */ ConceptPropertyType getConceptPropertyType(); - + /** - * Returns the ID of the property. - * @return + * @return the ID of the property. */ default Code getType() { return getConceptPropertyType().getCode(); } - + default Property propertyOf(Object value, String description) { - Builder prop = Property.builder() - .code(getCodeValue()) - .description(description); - + Builder prop = Property.builder().code(getCodeValue()).description(description); + switch (getConceptPropertyType()) { case CODE: prop.valueCode((String) value); @@ -56,22 +52,22 @@ default Property propertyOf(Object value, String description) { case STRING: prop.valueString((String) value); break; - default: + default: throw new UnsupportedOperationException("Unsupported property type " + getConceptPropertyType()); } - + return prop.build(); } - + /** - * Creates a property for the value without description + * Creates a property for the value without description and returns it. + * * @param value * @return */ default Property propertyOf(Object value) { - Builder prop = Property.builder() - .code(getCodeValue()); - + Builder prop = Property.builder().code(getCodeValue()); + switch (getConceptPropertyType()) { case CODE: prop.valueCode((String) value); @@ -82,22 +78,22 @@ default Property propertyOf(Object value) { case STRING: prop.valueString((String) value); break; - default: + default: throw new UnsupportedOperationException("Unsupported property type " + getConceptPropertyType()); } return prop.build(); } - + /** * Creates a property for the supplier's value without description - * @param value + * + * @param function * @return */ default Property propertyOf(Supplier function) { - - Builder prop = Property.builder() - .code(getCodeValue()); - + + Builder prop = Property.builder().code(getCodeValue()); + switch (getConceptPropertyType()) { case CODE: prop.valueCode((String) function.get()); @@ -108,12 +104,12 @@ default Property propertyOf(Supplier function) { case STRING: prop.valueString((String) function.get()); break; - default: + default: throw new UnsupportedOperationException("Unsupported property type " + getConceptPropertyType()); } return prop.build(); } - + /** * Class that represents {@link IConceptProperty} computed dynamically from certain data sources, code systems, etc.. * @@ -132,7 +128,7 @@ private Dynamic(String codeSystemUri, String displayName, String code, ConceptPr this.code = code; this.propertyType = propertyType; } - + @Override public String getCodeSystemUri() { return codeSystemUri; @@ -147,24 +143,24 @@ public String getDisplayName() { public String getCodeValue() { return code; } - + @Override public ConceptPropertyType getConceptPropertyType() { return propertyType; } - + public static IConceptProperty valueCode(String codeSystemUri, String displayName, String code) { return new Dynamic(codeSystemUri, displayName, code, ConceptPropertyType.CODE); } - + public static IConceptProperty valueBoolean(String codeSystemUri, String displayName, String code) { return new Dynamic(codeSystemUri, displayName, code, ConceptPropertyType.BOOLEAN); } - + public static IConceptProperty valueString(String codeSystemUri, String displayName, String code) { return new Dynamic(codeSystemUri, displayName, code, ConceptPropertyType.STRING); } - + } - + } diff --git a/fhir/com.b2international.snowowl.fhir.core/src/com/b2international/snowowl/fhir/core/model/codesystem/LookupRequest.java b/fhir/com.b2international.snowowl.fhir.core/src/com/b2international/snowowl/fhir/core/model/codesystem/LookupRequest.java index d89814e4f05..e0019587627 100644 --- a/fhir/com.b2international.snowowl.fhir.core/src/com/b2international/snowowl/fhir/core/model/codesystem/LookupRequest.java +++ b/fhir/com.b2international.snowowl.fhir.core/src/com/b2international/snowowl/fhir/core/model/codesystem/LookupRequest.java @@ -47,56 +47,42 @@ * @since 6.4 */ @JsonDeserialize(builder = LookupRequest.Builder.class) -@JsonPropertyOrder({"code", "system", "version", "coding", "date", "displayLanguage", "property"}) +@JsonPropertyOrder({ "code", "system", "version", "coding", "date", "displayLanguage", "property" }) public class LookupRequest { - + // The code that is to be located. If a code is provided, a system must be provided (0..1) private final Code code; // The system for the code that is to be located (0..1) private final Uri system; - + // The version that these details are based on (0..1) private final String version; // The coding to look up (0..1) private final Coding coding; - + /* - * The date for which the information should be returned. Normally, this is the - * current conditions (which is the default value) but under some circumstances, - * systems need to acccess this information as it would have been in the past. A - * typical example of this would be where code selection is constrained to the - * set of codes that were available when the patient was treated, not when the - * record is being edited. Note that which date is appropriate is a matter for - * implementation policy. + * The date for which the information should be returned. Normally, this is the current conditions (which is the default value) but under some + * circumstances, systems need to acccess this information as it would have been in the past. A typical example of this would be where code + * selection is constrained to the set of codes that were available when the patient was treated, not when the record is being edited. Note that + * which date is appropriate is a matter for implementation policy. */ private final Date date; - - //The requested language for display (see ExpansionProfile.displayLanguage) + + // The requested language for display (see ExpansionProfile.displayLanguage) private final Code displayLanguage; - + /* - * A property that the client wishes to be returned in the output. If no - * properties are specified, the server chooses what to return. The following - * properties are defined for all code systems: url, name, version (code system - * info) and code information: display, definition, designation, parent and - * child, and for designations, lang.X where X is a designation language code. - * Some of the properties are returned explicit in named parameters (when the - * names match), and the rest (except for lang.X) in the property parameter - * group + * A property that the client wishes to be returned in the output. If no properties are specified, the server chooses what to return. The + * following properties are defined for all code systems: url, name, version (code system info) and code information: display, definition, + * designation, parent and child, and for designations, lang.X where X is a designation language code. Some of the properties are returned + * explicit in named parameters (when the names match), and the rest (except for lang.X) in the property parameter group */ @FhirType(FhirDataType.PART) private final Collection property; - - LookupRequest( - Code code, - Uri system, - String version, - Coding coding, - Date date, - Code displayLanguage, - Collection properties) { + + LookupRequest(Code code, Uri system, String version, Coding coding, Date date, Code displayLanguage, Collection properties) { this.code = code; this.system = system; this.version = version; @@ -105,7 +91,7 @@ public class LookupRequest { this.displayLanguage = displayLanguage; this.property = properties; } - + public String getCode() { if (code != null) { return code.getCodeValue(); @@ -143,83 +129,81 @@ public Code getDisplayLanguage() { public Collection getProperties() { return property; } - + public Collection getPropertyCodes() { return property.stream().map(p -> p.getCodeValue()).collect(Collectors.toSet()); } /** - * Returns true if the given code is present in the given collection of properties, returns false otherwise. - * @param property - * @return + * @param propertyCode + * @return true if the given code is present in the given collection of properties, returns false otherwise. */ public final boolean containsProperty(Code propertyCode) { return property.contains(propertyCode); } - + /** - * Returns true if the property is requested - * @param conceptProperty - the property to check - * @return + * @param conceptProperty + * - the property to check + * @return true if the property is requested, false otherwise. */ public boolean isPropertyRequested(IConceptProperty conceptProperty) { return containsProperty(conceptProperty.getCode()); } - + /** - * Returns true if the version property is requested to be returned. - * @return + * @return true if the version property is requested to be returned, false otherwise. */ public final boolean isVersionPropertyRequested() { return containsProperty(SupportedCodeSystemRequestProperties.VERSION.getCode()); } - + /** * Returns true if the designation property is requested to be returned. + * * @return */ public final boolean isDesignationPropertyRequested() { return containsProperty(SupportedCodeSystemRequestProperties.DESIGNATION.getCode()); } - + public static Builder builder() { return new Builder(); } - + @AssertTrue(message = "Source needs to be set either via code/system or code or codeable concept") private boolean isSourceValid() { return true; - } - + } + @AssertTrue(message = "Code is not provided for the system") private boolean isCodeMissing() { if (system != null && code == null) { return false; } - + if (coding != null && coding.getCodeValue() == null) { return false; } - + return true; } - + @AssertTrue(message = "System is missing for provided code") private boolean isSystemMissing() { if (system == null && code != null) { return false; } - + if (coding != null && coding.getSystem() == null) { return false; } - + return true; } - - + @AssertTrue(message = "Code/system/version and Coding do not match. Probably would make sense to specify only one of them.") private boolean isCodeOrCodingInvalid() { @@ -227,33 +211,31 @@ private boolean isCodeOrCodingInvalid() { if (!coding.getCode().getCodeValue().equals(code.getCodeValue())) { return false; } - + if (!coding.getSystem().getUriValue().equals(system.getUriValue())) { return false; } - + if (!Objects.equals(coding.getVersion(), version)) { return false; } } return true; } - + @AssertTrue(message = "Both system URI and version tag identifies a version.") private boolean isUriVersionInvalid() { - //SNOMED CT specific, both the URI and version identifies the version + // SNOMED CT specific, both the URI and version identifies the version if (system != null) { - if (system.isSnomedUri() - && system.getUriValue().contains("version") - && version != null) { + if (system.isSnomedUri() && system.getUriValue().contains("version") && version != null) { return false; } } return true; } - @JsonPOJOBuilder(withPrefix="") + @JsonPOJOBuilder(withPrefix = "") public static final class Builder extends ValidatingBuilder { private Code code; @@ -263,9 +245,10 @@ public static final class Builder extends ValidatingBuilder { private Date date; private Code displayLanguage; private Set properties = Sets.newHashSet(); - - Builder() {} - + + Builder() { + } + public Builder code(final String code) { this.code = new Code(code); return this; @@ -275,7 +258,7 @@ public Builder system(final String system) { this.system = new Uri(system); return this; } - + public Builder version(final String version) { this.version = version; return this; @@ -285,7 +268,7 @@ public Builder coding(Coding coding) { this.coding = coding; return this; } - + public Builder date(String date) { try { this.date = Dates.parse(date, FhirConstants.DATE_TIME_FORMAT); @@ -294,7 +277,7 @@ public Builder date(String date) { } return this; } - + public Builder displayLanguage(final String displayLanguage) { this.displayLanguage = new Code(displayLanguage); return this; @@ -308,17 +291,17 @@ Builder property(Collection props) { properties = Collections3.toImmutableSet(props); return this; } - + public Builder properties(Collection properties) { this.properties = properties.stream().map(p -> new Code(p)).collect(Collectors.toSet()); return this; } - + public Builder codeProperties(Collection properties) { this.properties = Collections3.toImmutableSet(properties); return this; } - + public Builder addProperty(String property) { this.properties.add(new Code(property)); return this; @@ -330,5 +313,5 @@ protected LookupRequest doBuild() { } } - + } diff --git a/fhir/com.b2international.snowowl.fhir.core/src/com/b2international/snowowl/fhir/core/model/valueset/ValueSet.java b/fhir/com.b2international.snowowl.fhir.core/src/com/b2international/snowowl/fhir/core/model/valueset/ValueSet.java index a3e548d73e0..9c1b064bf48 100644 --- a/fhir/com.b2international.snowowl.fhir.core/src/com/b2international/snowowl/fhir/core/model/valueset/ValueSet.java +++ b/fhir/com.b2international.snowowl.fhir.core/src/com/b2international/snowowl/fhir/core/model/valueset/ValueSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +36,6 @@ import com.b2international.snowowl.fhir.core.search.Summary; import com.fasterxml.jackson.annotation.JsonFilter; import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.collect.Lists; import io.swagger.annotations.ApiModel; @@ -67,8 +66,7 @@ public class ValueSet extends MetadataResource { //at least one compose or expansion should exist @Valid - @JsonProperty("compose") - private final Collection composeParts; + private final Compose compose; @Valid @JsonProperty @@ -80,18 +78,18 @@ public ValueSet(Id id, final Meta meta, final Uri impliciteRules, Code language, final Uri url, final Identifier identifier, final String version, final String name, final String title, Code status, final Date date, String publisher, final Collection contacts, String description, final Collection usageContexts, final Collection jurisdictions, final Boolean immutable, final String purpose, final String copyright, - final Collection composeParts, final Expansion expansion) { + final Compose compose, final Expansion expansion) { super(id, meta, impliciteRules, language, text, url, identifier, version, name, title, status, date, publisher, contacts, description, usageContexts, jurisdictions, purpose, copyright); this.immutable = immutable; - this.composeParts = composeParts; + this.compose = compose; this.expansion = expansion; } - public Collection getComposeParts() { - return composeParts; + public Compose getCompose() { + return compose; } public static Builder builder(String valueSetId) { @@ -101,7 +99,7 @@ public static Builder builder(String valueSetId) { public static class Builder extends MetadataResource.Builder { private Boolean immutable; - private Collection composeParts = Lists.newArrayList(); + private Compose compose; private Expansion expansion; public Builder(String valueSetId) { @@ -113,8 +111,8 @@ public Builder immutable(Boolean immutable) { return getSelf(); } - public Builder addCompose(final Compose compose) { - this.composeParts.add(compose); + public Builder compose(final Compose compose) { + this.compose = compose; return getSelf(); } @@ -138,7 +136,7 @@ protected ValueSet doBuild() { return new ValueSet(id, meta, implicitRules, language, text, url, identifier, version, name, title, status, date, publisher, contacts, description, usageContexts, jurisdictions, immutable, - purpose, copyright, composeParts, expansion); + purpose, copyright, compose, expansion); } } diff --git a/fhir/com.b2international.snowowl.fhir.rest.feature/feature.xml b/fhir/com.b2international.snowowl.fhir.rest.feature/feature.xml index ba8d8ea9c39..0bba3a0d30d 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.feature/feature.xml +++ b/fhir/com.b2international.snowowl.fhir.rest.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/fhir/com.b2international.snowowl.fhir.rest.feature/pom.xml b/fhir/com.b2international.snowowl.fhir.rest.feature/pom.xml index 13300d28f44..b5ec154be91 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.feature/pom.xml +++ b/fhir/com.b2international.snowowl.fhir.rest.feature/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl fhir-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.fhir.rest.feature diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/.launch/fhir-api-tests.launch b/fhir/com.b2international.snowowl.fhir.rest.tests/.launch/fhir-api-tests.launch index dcdf65f736f..09f539d28d2 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/.launch/fhir-api-tests.launch +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/.launch/fhir-api-tests.launch @@ -35,8 +35,8 @@ - - + + diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/.launch/fhir-unit-tests.launch b/fhir/com.b2international.snowowl.fhir.rest.tests/.launch/fhir-unit-tests.launch index c5d11f74371..0d80f03841b 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/.launch/fhir-unit-tests.launch +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/.launch/fhir-unit-tests.launch @@ -33,7 +33,7 @@ - + diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/META-INF/MANIFEST.MF b/fhir/com.b2international.snowowl.fhir.rest.tests/META-INF/MANIFEST.MF index c6a5dd92c51..1f98def1a60 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/META-INF/MANIFEST.MF +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl FHIR API Tests Bundle-SymbolicName: com.b2international.snowowl.fhir.rest.tests -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.junit;bundle-version="4.12.0", diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/pom.xml b/fhir/com.b2international.snowowl.fhir.rest.tests/pom.xml index e82dad660b6..33afe030e21 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/pom.xml +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl fhir-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.fhir.rest.tests diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/AllFhirRestTests.java b/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/AllFhirRestTests.java index e87a2f2aa47..e72811b866b 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/AllFhirRestTests.java +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/AllFhirRestTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -64,9 +64,10 @@ public class AllFhirRestTests { */ @ClassRule public static final RuleChain appRule = RuleChain - .outerRule(SnowOwlAppRule.snowOwl(AllFhirRestTests.class).clearResources(true)) + .outerRule(SnowOwlAppRule.snowOwl(AllFhirRestTests.class)) .around(new BundleStartRule("org.eclipse.jetty.osgi.boot")) .around(new BundleStartRule("com.b2international.snowowl.core.rest")) - .around(new SnomedContentRule(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, Branch.MAIN_PATH, Resources.Snomed.MINI_RF2_INT, Rf2ReleaseType.FULL)); + .around(new SnomedContentRule(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, Branch.MAIN_PATH, Resources.Snomed.MINI_RF2_INT, Rf2ReleaseType.FULL)) + .around(new SnomedContentRule(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, Branch.MAIN_PATH, Resources.Snomed.MINI_RF2_COMPLEX_BLOCK_MAP, Rf2ReleaseType.DELTA)); } diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/conceptmap/SnomedConceptMapRestTest.java b/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/conceptmap/SnomedConceptMapRestTest.java index dbc2df1ca8f..d4be8f4ea2c 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/conceptmap/SnomedConceptMapRestTest.java +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/conceptmap/SnomedConceptMapRestTest.java @@ -39,6 +39,7 @@ public class SnomedConceptMapRestTest extends FhirRestTest { private static final String SIMPLE_MAP_TYPE_REFSET_NAME = "FHIR Automated Test Map Type Reference Sets"; private static final String COMPLEX_MAP_TYPE_REFSET_NAME = "FHIR Automated Test Complex Map Type Reference Sets"; + private static final String COMPLEX_BLOCK_MAP_TYPE_REFSET_NAME = "FHIR Automated Test Complex Map With Map Block Type Reference Sets"; private static final String EXTENDED_MAP_TYPE_REFSET_NAME = "FHIR Automated Test Extended Map Type Reference Sets"; private static final String FHIR_MAP_TYPE_REFSET_VERSION = "FHIR_MAP_TYPE_REFSET_VERSION"; @@ -51,6 +52,7 @@ public static void setupMaps() { mapTypeRefSetIds = TestMapTypeReferenceSetCreator.createSimpleMapTypeReferenceSets(mainBranch, SIMPLE_MAP_TYPE_REFSET_NAME, COMPLEX_MAP_TYPE_REFSET_NAME, + COMPLEX_BLOCK_MAP_TYPE_REFSET_NAME, EXTENDED_MAP_TYPE_REFSET_NAME, FHIR_MAP_TYPE_REFSET_VERSION); } diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/conceptmap/TestMapTypeReferenceSetCreator.java b/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/conceptmap/TestMapTypeReferenceSetCreator.java index 7b8e2ebc5fe..42292b6ba0b 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/conceptmap/TestMapTypeReferenceSetCreator.java +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/conceptmap/TestMapTypeReferenceSetCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,9 +31,6 @@ import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; @@ -58,7 +55,12 @@ public class TestMapTypeReferenceSetCreator extends TestArtifactCreator { * @param version * @return */ - public static List createSimpleMapTypeReferenceSets(String branchPath, String simpleMapName, String complexMapName, String extendedMapName, String version) { + public static List createSimpleMapTypeReferenceSets(String branchPath, + String simpleMapName, + String complexMapName, + String complexBlockMapName, + String extendedMapName, + String version) { List refsetIds = Lists.newArrayList(); @@ -66,22 +68,28 @@ public static List createSimpleMapTypeReferenceSets(String branchPath, S if (!refsetDescription.isPresent()) { - System.out.println("Creating test map type reference set..."); + System.out.println("Creating simple map type reference set..."); String refsetId = createRefsetConcept(branchPath, simpleMapName, SnomedRefSetType.SIMPLE_MAP); System.out.println("Creating reference set members for map type refset: " + simpleMapName); createSimpleMapping(branchPath, refsetId, FhirTestConcepts.BACTERIA, "Bacteria Target"); createSimpleMapping(branchPath, refsetId, FhirTestConcepts.MICROORGANISM, "MO"); refsetIds.add(refsetId); - - System.out.println("Creating test map type reference set..."); + System.out.println("Creating complex map type reference set..."); refsetId = createRefsetConcept(branchPath, complexMapName, SnomedRefSetType.COMPLEX_MAP); System.out.println("Creating reference set members for complex map type refset: " + complexMapName); createComplexMapping(branchPath, refsetId, FhirTestConcepts.BACTERIA, "Bacteria Target"); createComplexMapping(branchPath, refsetId, FhirTestConcepts.MICROORGANISM, "MO"); refsetIds.add(refsetId); - System.out.println("Creating test map type reference set..."); + System.out.println("Creating complex map with map block type reference set..."); + refsetId = createRefsetConcept(branchPath, complexBlockMapName, SnomedRefSetType.COMPLEX_BLOCK_MAP); + System.out.println("Creating reference set members for complex block map type refset: " + complexBlockMapName); + createComplexBlockMapping(branchPath, refsetId, FhirTestConcepts.BACTERIA, "Bacteria Target"); + createComplexBlockMapping(branchPath, refsetId, FhirTestConcepts.MICROORGANISM, "MO"); + refsetIds.add(refsetId); + + System.out.println("Creating extended map type reference set..."); refsetId = createRefsetConcept(branchPath, extendedMapName, SnomedRefSetType.EXTENDED_MAP); System.out.println("Creating reference set members for extended map type refset: " + extendedMapName); createExtendedMapping(branchPath, refsetId, FhirTestConcepts.BACTERIA, "Bacteria Target"); @@ -98,6 +106,8 @@ public static List createSimpleMapTypeReferenceSets(String branchPath, S refsetIds.add(simpleConcept.get().getConceptId()); Optional complexConcept = getRefsetConcept(branchPath, complexMapName); refsetIds.add(complexConcept.get().getConceptId()); + Optional complexBlockConcept = getRefsetConcept(branchPath, complexBlockMapName); + refsetIds.add(complexBlockConcept.get().getConceptId()); Optional extendedConcept = getRefsetConcept(branchPath, extendedMapName); refsetIds.add(extendedConcept.get().getConceptId()); return refsetIds; @@ -145,6 +155,30 @@ private static void createComplexMapping(String branchPath, String refsetId, Str } + private static void createComplexBlockMapping(String branchPath, String refsetId, String referencedConceptId, String mappingTarget) { + + Map properties = Maps.newHashMap(); + properties.put(SnomedRf2Headers.FIELD_MAP_TARGET, mappingTarget); + properties.put(SnomedRf2Headers.FIELD_MAP_ADVICE, "If microorganism then use something else"); + properties.put(SnomedRf2Headers.FIELD_MAP_GROUP, 1); + properties.put(SnomedRf2Headers.FIELD_MAP_PRIORITY, 1); + properties.put(SnomedRf2Headers.FIELD_MAP_RULE, "OTHERWISE TRUE"); + properties.put(SnomedRf2Headers.FIELD_CORRELATION_ID, "447561005"); //correlation not specified + properties.put(SnomedRf2Headers.FIELD_MAP_BLOCK, 1); + + SnomedRequests.prepareNewMember() + .setId(UUID.randomUUID().toString()) + .setModuleId(Concepts.MODULE_SCT_CORE) + .setActive(true) + .setReferenceSetId(refsetId) + .setProperties(properties) + .setReferencedComponentId(referencedConceptId) + .build(SnomedDatastoreActivator.REPOSITORY_UUID, branchPath, "info@b2international.com", "FHIR Automated Test Complex Block Map Type Refset Member") + .execute(getEventBus()) + .getSync(); + + } + private static void createExtendedMapping(String branchPath, String refsetId, String referencedConceptId, String mappingTarget) { Map properties = Maps.newHashMap(); @@ -202,8 +236,8 @@ private static String createRefsetConcept(String branchPath, String refsetName, .setModuleId(Concepts.MODULE_SCT_CORE) .addDescription(createDescription(refsetName + " (foundation metadata concept)", FULLY_SPECIFIED_NAME)) .addDescription(createDescription(refsetName, SYNONYM)) - .addRelationship(createIsaRelationship(CharacteristicType.STATED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(refsetType))) - .addRelationship(createIsaRelationship(CharacteristicType.INFERRED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(refsetType))) + .addRelationship(createIsaRelationship(Concepts.STATED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(refsetType))) + .addRelationship(createIsaRelationship(Concepts.INFERRED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(refsetType))) .setRefSet(SnomedRequests.prepareNewRefSet() .setReferencedComponentType(SnomedTerminologyComponentConstants.CONCEPT) .setMapTargetComponentType(SnomedTerminologyComponentConstants.CONCEPT) @@ -223,19 +257,19 @@ private static SnomedDescriptionCreateRequestBuilder createDescription(final Str .setLanguageCode("en") .setTypeId(type) .setTerm(term) - .setCaseSignificance(CaseSignificance.CASE_INSENSITIVE) + .setCaseSignificanceId(Concepts.ENTIRE_TERM_CASE_INSENSITIVE) .setAcceptability(ImmutableMap.of(SnomedConstants.Concepts.REFSET_LANGUAGE_TYPE_US, Acceptability.PREFERRED)); } - private static SnomedRelationshipCreateRequestBuilder createIsaRelationship(final CharacteristicType characteristicType, String destinationId) { + private static SnomedRelationshipCreateRequestBuilder createIsaRelationship(final String characteristicTypeId, String destinationId) { return SnomedRequests.prepareNewRelationship() .setIdFromNamespace(Concepts.B2I_NAMESPACE) .setActive(true) .setModuleId(Concepts.MODULE_SCT_CORE) .setDestinationId(destinationId) .setTypeId(IS_A) - .setCharacteristicType(characteristicType) - .setModifier(RelationshipModifier.EXISTENTIAL); + .setCharacteristicTypeId(characteristicTypeId) + .setModifierId(Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); } } diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/conceptmap/TranslateSnomedConceptMapRestTest.java b/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/conceptmap/TranslateSnomedConceptMapRestTest.java index d456bc1b930..0944a86a73d 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/conceptmap/TranslateSnomedConceptMapRestTest.java +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/conceptmap/TranslateSnomedConceptMapRestTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,6 +46,7 @@ public class TranslateSnomedConceptMapRestTest extends FhirRestTest { private static final String SIMPLE_MAP_TYPE_REFSET_NAME = "FHIR Automated Test Map Type Reference Sets"; private static final String COMPLEX_MAP_TYPE_REFSET_NAME = "FHIR Automated Test Complex Map Type Reference Sets"; + private static final String COMPLEX_BLOCK_MAP_TYPE_REFSET_NAME = "FHIR Automated Test Complex Map With Map Block Type Reference Sets"; private static final String EXTENDED_MAP_TYPE_REFSET_NAME = "FHIR Automated Test Extended Map Type Reference Sets"; private static final String FHIR_MAP_TYPE_REFSET_VERSION = "FHIR_MAP_TYPE_REFSET_VERSION"; @@ -58,6 +59,7 @@ public static void setupMaps() { mapTypeRefSetIds = TestMapTypeReferenceSetCreator.createSimpleMapTypeReferenceSets(mainBranch, SIMPLE_MAP_TYPE_REFSET_NAME, COMPLEX_MAP_TYPE_REFSET_NAME, + COMPLEX_BLOCK_MAP_TYPE_REFSET_NAME, EXTENDED_MAP_TYPE_REFSET_NAME, FHIR_MAP_TYPE_REFSET_VERSION); } @@ -79,43 +81,29 @@ public void translateMappingTest() throws Exception { TranslateResult result = objectMapper.convertValue(json, TranslateResult.class); assertTrue(result.getResult()); - assertEquals("3 match(es).", result.getMessage()); + assertEquals("4 match(es).", result.getMessage()); Collection matches = result.getMatches(); - assertEquals(3, matches.size()); + assertEquals(4, matches.size()); + assertMatchExists(matches, 0, "equivalent"); + assertMatchExists(matches, 1, "unmatched"); + assertMatchExists(matches, 2, "unmatched"); + assertMatchExists(matches, 3, "unmatched"); + } + + private void assertMatchExists(Collection matches, int refSetIndex, String equivalenceValue) { Optional optionalMatch = matches.stream() - .filter(m -> m.getSource().getUriValue().equals("http://snomed.info/sct/id/" + mapTypeRefSetIds.get(0))) - .findFirst(); - - assertTrue(optionalMatch.isPresent()); - - Match match = optionalMatch.get(); - assertEquals("equivalent", match.getEquivalence().getCodeValue()); - assertEquals("MO", match.getConcept().getCodeValue()); - - optionalMatch = matches.stream() - .filter(m -> m.getSource().getUriValue().equals("http://snomed.info/sct/id/" + mapTypeRefSetIds.get(1))) + .filter(m -> m.getSource().getUriValue().equals("http://snomed.info/sct/id/" + mapTypeRefSetIds.get(refSetIndex))) .findFirst(); assertTrue(optionalMatch.isPresent()); - - match = optionalMatch.get(); - assertEquals("unmatched", match.getEquivalence().getCodeValue()); - assertEquals("MO", match.getConcept().getCodeValue()); - - optionalMatch = matches.stream() - .filter(m -> m.getSource().getUriValue().equals("http://snomed.info/sct/id/" + mapTypeRefSetIds.get(2))) - .findFirst(); - - assertTrue(optionalMatch.isPresent()); - match = optionalMatch.get(); - assertEquals("unmatched", match.getEquivalence().getCodeValue()); + Match match = optionalMatch.get(); + assertEquals(equivalenceValue, match.getEquivalence().getCodeValue()); assertEquals("MO", match.getConcept().getCodeValue()); - } - + @Test public void reverseTranslateMappingTest() throws Exception { @@ -136,41 +124,15 @@ public void reverseTranslateMappingTest() throws Exception { TranslateResult result = objectMapper.convertValue(json, TranslateResult.class); assertTrue(result.getResult()); - assertEquals("3 match(es).", result.getMessage()); + assertEquals("4 match(es).", result.getMessage()); Collection matches = result.getMatches(); - assertEquals(3, matches.size()); - - Optional optionalMatch = matches.stream() - .filter(m -> m.getSource().getUriValue().equals("http://snomed.info/sct/id/" + mapTypeRefSetIds.get(0))) - .findFirst(); - - assertTrue(optionalMatch.isPresent()); - - Match match = optionalMatch.get(); - assertEquals("equivalent", match.getEquivalence().getCodeValue()); - assertEquals("MO", match.getConcept().getCodeValue()); - - optionalMatch = matches.stream() - .filter(m -> m.getSource().getUriValue().equals("http://snomed.info/sct/id/" + mapTypeRefSetIds.get(1))) - .findFirst(); - - assertTrue(optionalMatch.isPresent()); - - match = optionalMatch.get(); - assertEquals("unmatched", match.getEquivalence().getCodeValue()); - assertEquals("MO", match.getConcept().getCodeValue()); - - optionalMatch = matches.stream() - .filter(m -> m.getSource().getUriValue().equals("http://snomed.info/sct/id/" + mapTypeRefSetIds.get(2))) - .findFirst(); - - assertTrue(optionalMatch.isPresent()); - - match = optionalMatch.get(); - assertEquals("unmatched", match.getEquivalence().getCodeValue()); - assertEquals("MO", match.getConcept().getCodeValue()); + assertEquals(4, matches.size()); + assertMatchExists(matches, 0, "equivalent"); + assertMatchExists(matches, 1, "unmatched"); + assertMatchExists(matches, 2, "unmatched"); + assertMatchExists(matches, 3, "unmatched"); } //From a specific Map type reference set diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/valueset/SnomedValueSetRestTest.java b/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/valueset/SnomedValueSetRestTest.java index fa80d426a7b..57a6b2756f4 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/valueset/SnomedValueSetRestTest.java +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/valueset/SnomedValueSetRestTest.java @@ -61,7 +61,7 @@ public void valueSetsTest() throws Exception { .body("resource.title", equalTo(SIMPLE_TYPE_REFSET_NAME)) .body("resource.name", equalTo(SIMPLE_TYPE_REFSET_NAME)) .body("resource.status", equalTo("active")) - .root("entry.find { it.fullUrl == 'http://localhost:"+RestExtensions.getPort()+"/snowowl/fhir/ValueSet/snomedStore:MAIN/FHIR_SIMPLE_TYPE_REFSET_VERSION:" + simpleTypeRefSetId+ "'}.resource.compose[0].include[0]") + .root("entry.find { it.fullUrl == 'http://localhost:"+RestExtensions.getPort()+"/snowowl/fhir/ValueSet/snomedStore:MAIN/FHIR_SIMPLE_TYPE_REFSET_VERSION:" + simpleTypeRefSetId+ "'}.resource.compose.include[0]") .body("system", equalTo(SnomedUri.SNOMED_BASE_URI_STRING)) .body("filter.size()", equalTo(1)) .body("filter[0].property", equalTo("expression")) @@ -110,7 +110,7 @@ public void getSingleQueryTypeValueSetTest() { .body("version", equalTo("FHIR_QUERY_TYPE_REFSET_VERSION")) .body("name", equalTo("FHIR Automated Test Simple Type Refset")) .body("status", equalTo("active")) - .root("compose[0].include[0]") + .root("compose.include[0]") .body("system", equalTo("http://snomed.info/sct")) .body("filter[0].property", equalTo("expression")) .body("filter[0].value", equalTo("<<410607006")) @@ -138,7 +138,7 @@ public void getSingleSnomedValueSetTest() { .body("name", equalTo("FHIR Automated Test Simple Type Reference Set")) .body("title", equalTo("FHIR Automated Test Simple Type Reference Set")) .body("status", equalTo("active")) - .root("compose[0].include[0]") + .root("compose.include[0]") .body("system", equalTo("http://snomed.info/sct")) .body("filter[0].property", equalTo("expression")) .body("filter[0].value", equalTo("^" + simpleTypeRefSetId)) diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/valueset/TestReferenceSetCreator.java b/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/valueset/TestReferenceSetCreator.java index 7cfc361fdb8..173721f46fe 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/valueset/TestReferenceSetCreator.java +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/src/com/b2international/snowowl/fhir/tests/endpoints/valueset/TestReferenceSetCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,9 +31,6 @@ import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; @@ -148,8 +145,8 @@ private static String createQueryTypeReferenceset(String branchPath, String refs .setModuleId(Concepts.MODULE_SCT_CORE) .addDescription(createDescription(refsetName + "FHIR Automated Test Query Type Refset (foundation metadata concept)", FULLY_SPECIFIED_NAME)) .addDescription(createDescription(refsetName, SYNONYM)) - .addRelationship(createIsaRelationship(CharacteristicType.STATED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(SnomedRefSetType.QUERY))) - .addRelationship(createIsaRelationship(CharacteristicType.INFERRED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(SnomedRefSetType.QUERY))) + .addRelationship(createIsaRelationship(Concepts.STATED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(SnomedRefSetType.QUERY))) + .addRelationship(createIsaRelationship(Concepts.INFERRED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(SnomedRefSetType.QUERY))) .setRefSet(SnomedRequests.prepareNewRefSet() .setReferencedComponentType(SnomedTerminologyComponentConstants.CONCEPT) .setType(SnomedRefSetType.QUERY)) @@ -189,8 +186,8 @@ private static String createSimpleTypeRefsetConcept(String branchPath, String re .setModuleId(Concepts.MODULE_SCT_CORE) .addDescription(createDescription(refsetName +" (foundation metadata concept)", FULLY_SPECIFIED_NAME)) .addDescription(createDescription(refsetName, SYNONYM)) - .addRelationship(createIsaRelationship(CharacteristicType.STATED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(SnomedRefSetType.SIMPLE))) - .addRelationship(createIsaRelationship(CharacteristicType.INFERRED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(SnomedRefSetType.SIMPLE))) + .addRelationship(createIsaRelationship(Concepts.STATED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(SnomedRefSetType.SIMPLE))) + .addRelationship(createIsaRelationship(Concepts.INFERRED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(SnomedRefSetType.SIMPLE))) .setRefSet(SnomedRequests.prepareNewRefSet() .setReferencedComponentType(SnomedTerminologyComponentConstants.CONCEPT) .setType(SnomedRefSetType.SIMPLE)) @@ -209,19 +206,19 @@ private static SnomedDescriptionCreateRequestBuilder createDescription(final Str .setLanguageCode("en") .setTypeId(type) .setTerm(term) - .setCaseSignificance(CaseSignificance.CASE_INSENSITIVE) + .setCaseSignificanceId(Concepts.ENTIRE_TERM_CASE_INSENSITIVE) .setAcceptability(ImmutableMap.of(SnomedConstants.Concepts.REFSET_LANGUAGE_TYPE_US, Acceptability.PREFERRED)); } - private static SnomedRelationshipCreateRequestBuilder createIsaRelationship(final CharacteristicType characteristicType, String destinationId) { + private static SnomedRelationshipCreateRequestBuilder createIsaRelationship(final String characteristicTypeId, String destinationId) { return SnomedRequests.prepareNewRelationship() .setIdFromNamespace(Concepts.B2I_NAMESPACE) .setActive(true) .setModuleId(Concepts.MODULE_SCT_CORE) .setDestinationId(destinationId) .setTypeId(IS_A) - .setCharacteristicType(characteristicType) - .setModifier(RelationshipModifier.EXISTENTIAL); + .setCharacteristicTypeId(characteristicTypeId) + .setModifierId(Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); } } diff --git a/fhir/com.b2international.snowowl.fhir.rest/META-INF/MANIFEST.MF b/fhir/com.b2international.snowowl.fhir.rest/META-INF/MANIFEST.MF index e09b34d2f3c..fc06d315e2b 100644 --- a/fhir/com.b2international.snowowl.fhir.rest/META-INF/MANIFEST.MF +++ b/fhir/com.b2international.snowowl.fhir.rest/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl FHIR REST API Bundle-SymbolicName: com.b2international.snowowl.fhir.rest -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.core.rest Automatic-Module-Name: com.b2international.snowowl.fhir.rest diff --git a/fhir/com.b2international.snowowl.fhir.rest/pom.xml b/fhir/com.b2international.snowowl.fhir.rest/pom.xml index 5da3c650d0e..8bd9c734f04 100644 --- a/fhir/com.b2international.snowowl.fhir.rest/pom.xml +++ b/fhir/com.b2international.snowowl.fhir.rest/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl fhir-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.fhir.rest diff --git a/fhir/com.b2international.snowowl.fhir.rest/src/com/b2international/snowowl/core/rest/FhirApiConfig.java b/fhir/com.b2international.snowowl.fhir.rest/src/com/b2international/snowowl/core/rest/FhirApiConfig.java index e5c74fd8ee4..22423600ef2 100644 --- a/fhir/com.b2international.snowowl.fhir.rest/src/com/b2international/snowowl/core/rest/FhirApiConfig.java +++ b/fhir/com.b2international.snowowl.fhir.rest/src/com/b2international/snowowl/core/rest/FhirApiConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ public Docket fhirDocs() { getApiBaseUrl(), "fhir", "1.0", - "Snow Owl® FHIR API", + "FHIR API", "https://b2i.sg/", "support@b2i.sg", "API License", diff --git a/fhir/com.b2international.snowowl.fhir.rest/src/com/b2international/snowowl/fhir/rest/FhirConceptMapRestService.java b/fhir/com.b2international.snowowl.fhir.rest/src/com/b2international/snowowl/fhir/rest/FhirConceptMapRestService.java index 279c7c08f7f..6ee63b8d8bb 100644 --- a/fhir/com.b2international.snowowl.fhir.rest/src/com/b2international/snowowl/fhir/rest/FhirConceptMapRestService.java +++ b/fhir/com.b2international.snowowl.fhir.rest/src/com/b2international/snowowl/fhir/rest/FhirConceptMapRestService.java @@ -272,7 +272,7 @@ public Parameters.Fhir translate( /** * HTTP POST request to translate a code that belongs to any {@link ConceptMap} in the system. - * @param {@link TranslateRequest} + * @param in - {@link TranslateRequest}} * @return translation of the code */ @ApiOperation( diff --git a/fhir/com.b2international.snowowl.fhir.rest/src/com/b2international/snowowl/fhir/rest/StructureDefinitionService.java b/fhir/com.b2international.snowowl.fhir.rest/src/com/b2international/snowowl/fhir/rest/StructureDefinitionService.java index 66f97462828..a02c4f074d4 100644 --- a/fhir/com.b2international.snowowl.fhir.rest/src/com/b2international/snowowl/fhir/rest/StructureDefinitionService.java +++ b/fhir/com.b2international.snowowl.fhir.rest/src/com/b2international/snowowl/fhir/rest/StructureDefinitionService.java @@ -59,7 +59,7 @@ public class StructureDefinitionService extends BaseFhirResourceRestService com.b2international.snowowl snowowl-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/net4j/com.b2international.snowowl.eventbus.tests/META-INF/MANIFEST.MF b/net4j/com.b2international.snowowl.eventbus.tests/META-INF/MANIFEST.MF index d205c3de340..0f616c0d71c 100644 --- a/net4j/com.b2international.snowowl.eventbus.tests/META-INF/MANIFEST.MF +++ b/net4j/com.b2international.snowowl.eventbus.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: EventBus Tests Bundle-SymbolicName: com.b2international.snowowl.eventbus.tests -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.eventbus;bundle-version="3.1.0" Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/net4j/com.b2international.snowowl.eventbus.tests/pom.xml b/net4j/com.b2international.snowowl.eventbus.tests/pom.xml index 11a4980b2fc..82750d9e8c9 100644 --- a/net4j/com.b2international.snowowl.eventbus.tests/pom.xml +++ b/net4j/com.b2international.snowowl.eventbus.tests/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl net4j-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/net4j/com.b2international.snowowl.eventbus/META-INF/MANIFEST.MF b/net4j/com.b2international.snowowl.eventbus/META-INF/MANIFEST.MF index 56131768725..844ebb93793 100644 --- a/net4j/com.b2international.snowowl.eventbus/META-INF/MANIFEST.MF +++ b/net4j/com.b2international.snowowl.eventbus/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Net4J Eventbus Bundle-SymbolicName: com.b2international.snowowl.eventbus;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.eclipse.net4j;bundle-version="4.1.2", diff --git a/net4j/com.b2international.snowowl.eventbus/pom.xml b/net4j/com.b2international.snowowl.eventbus/pom.xml index 721d36b74d0..4e70935edc0 100644 --- a/net4j/com.b2international.snowowl.eventbus/pom.xml +++ b/net4j/com.b2international.snowowl.eventbus/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl net4j-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT
\ No newline at end of file diff --git a/net4j/com.b2international.snowowl.rpc.test/META-INF/MANIFEST.MF b/net4j/com.b2international.snowowl.rpc.test/META-INF/MANIFEST.MF index 7c91724b95f..5c5cd234abf 100644 --- a/net4j/com.b2international.snowowl.rpc.test/META-INF/MANIFEST.MF +++ b/net4j/com.b2international.snowowl.rpc.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Remote Procedure Call Tests Bundle-SymbolicName: com.b2international.snowowl.rpc.test;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy diff --git a/net4j/com.b2international.snowowl.rpc.test/pom.xml b/net4j/com.b2international.snowowl.rpc.test/pom.xml index 4147694780b..a95fc3e681e 100644 --- a/net4j/com.b2international.snowowl.rpc.test/pom.xml +++ b/net4j/com.b2international.snowowl.rpc.test/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl net4j-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.rpc.test eclipse-test-plugin diff --git a/net4j/com.b2international.snowowl.rpc/META-INF/MANIFEST.MF b/net4j/com.b2international.snowowl.rpc/META-INF/MANIFEST.MF index 23130f33160..77c31904cce 100644 --- a/net4j/com.b2international.snowowl.rpc/META-INF/MANIFEST.MF +++ b/net4j/com.b2international.snowowl.rpc/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Remote Procedure Call Bundle-SymbolicName: com.b2international.snowowl.rpc;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Activator: com.b2international.snowowl.internal.rpc.bundle.OM$Activator Bundle-Vendor: B2i Healthcare Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.100", diff --git a/net4j/com.b2international.snowowl.rpc/pom.xml b/net4j/com.b2international.snowowl.rpc/pom.xml index 25745c19ab2..73d947ed015 100644 --- a/net4j/com.b2international.snowowl.rpc/pom.xml +++ b/net4j/com.b2international.snowowl.rpc/pom.xml @@ -6,7 +6,7 @@ com.b2international.snowowl net4j-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.rpc eclipse-plugin diff --git a/net4j/pom.xml b/net4j/pom.xml index 3afea7d3c24..3bac0473923 100644 --- a/net4j/pom.xml +++ b/net4j/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index 2671543edca..491146d1aeb 100644 --- a/pom.xml +++ b/pom.xml @@ -1,13 +1,13 @@ - 4.0.0 - com.b2international.snowowl - snowowl-parent - 7.3.0-SNAPSHOT - pom + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" + xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + 4.0.0 + com.b2international.snowowl + snowowl-parent + 7.4.0-SNAPSHOT + pom UTF-8 @@ -16,7 +16,7 @@ 2.9.10 2.9.10.1 - 4.1.16.Final + 4.1.43.Final 1.7.25 1.2.3 [1.2.3,1.2.4) @@ -66,7 +66,6 @@ - false @@ -75,21 +74,6 @@ remote-repos https://repo.maven.apache.org/maven2 - - - - - - - - - - - - - - - protege-mvn-repo https://b2ihealthcare.github.io/protege/ @@ -115,22 +99,6 @@ - - - - - - - - - - - - - - - - @@ -935,11 +903,6 @@ maven-assembly-plugin 2.3 - - - - -
diff --git a/releng/com.b2international.snowowl.server.update/category.xml b/releng/com.b2international.snowowl.server.update/category.xml index 4e613c9da34..6acec323a97 100644 --- a/releng/com.b2international.snowowl.server.update/category.xml +++ b/releng/com.b2international.snowowl.server.update/category.xml @@ -1,27 +1,27 @@ - + - + - + - + - + - + - + - + diff --git a/releng/com.b2international.snowowl.server.update/pom.xml b/releng/com.b2international.snowowl.server.update/pom.xml index 18abbafabee..9b21c4f1087 100644 --- a/releng/com.b2international.snowowl.server.update/pom.xml +++ b/releng/com.b2international.snowowl.server.update/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl releng-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/releng/com.b2international.snowowl.server.update/snow-owl-oss.product b/releng/com.b2international.snowowl.server.update/snow-owl-oss.product index 7d2e1bdd081..668811f9f49 100644 --- a/releng/com.b2international.snowowl.server.update/snow-owl-oss.product +++ b/releng/com.b2international.snowowl.server.update/snow-owl-oss.product @@ -1,7 +1,7 @@ - + diff --git a/releng/pom.xml b/releng/pom.xml index 5b7ef026c9d..e609d301967 100644 --- a/releng/pom.xml +++ b/releng/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl snowowl-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/releng/target-platform/pom.xml b/releng/target-platform/pom.xml index d543dcec475..a42f70aee0a 100644 --- a/releng/target-platform/pom.xml +++ b/releng/target-platform/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl releng-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT target-platform diff --git a/snomed/com.b2international.snowowl.snomed.common/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.common/META-INF/MANIFEST.MF index 2263bc8aebf..60fe46c2c84 100644 --- a/snomed/com.b2international.snowowl.snomed.common/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.common/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Commons Bundle-SymbolicName: com.b2international.snowowl.snomed.common -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Export-Package: com.b2international.snowowl.snomed.common diff --git a/snomed/com.b2international.snowowl.snomed.common/pom.xml b/snomed/com.b2international.snowowl.snomed.common/pom.xml index 7b91e7183f6..7c5e5d01d42 100644 --- a/snomed/com.b2international.snowowl.snomed.common/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.common/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl snomed-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.snomed.common eclipse-plugin diff --git a/snomed/com.b2international.snowowl.snomed.common/src/com/b2international/snowowl/snomed/common/SnomedConstants.java b/snomed/com.b2international.snowowl.snomed.common/src/com/b2international/snowowl/snomed/common/SnomedConstants.java index 38682f04115..b14fcfd3cfd 100644 --- a/snomed/com.b2international.snowowl.snomed.common/src/com/b2international/snowowl/snomed/common/SnomedConstants.java +++ b/snomed/com.b2international.snowowl.snomed.common/src/com/b2international/snowowl/snomed/common/SnomedConstants.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,13 +15,9 @@ */ package com.b2international.snowowl.snomed.common; -import java.util.Collection; -import java.util.Collections; import java.util.Map; import java.util.Set; -import com.google.common.collect.BiMap; -import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -200,6 +196,9 @@ private Concepts() { } public static final String REFSET_DRUG_TO_GROUPER_SIMPLE_MAP = "499896751000133109"; public static final String REFSET_DRUG_TO_PACKAGING_SIMPLE_MAP = "780548781000133105"; + // complex map with map block type + public static final String REFSET_COMPLEX_BLOCK_MAP_TYPE = "999001671000000105"; + //used for NEHTA AU AMT extension /**@deprecated For NEHTA only. {@value}*/ @Deprecated public static final String REFSET_STRENGTH = "700000111000036105"; @@ -427,7 +426,6 @@ private Concepts() { } // Module dependency public static final String ATTRIBUTE_TYPE_SOURCE_EFFECTIVE_TIME = "900000000000536009"; public static final String ATTRIBUTE_TYPE_TARGET_EFFECTIVE_TIME = "900000000000537000"; - } // RF2 effective time format diff --git a/snomed/com.b2international.snowowl.snomed.common/src/com/b2international/snowowl/snomed/common/SnomedRf2Headers.java b/snomed/com.b2international.snowowl.snomed.common/src/com/b2international/snowowl/snomed/common/SnomedRf2Headers.java index 14845c6d63f..32346426c61 100644 --- a/snomed/com.b2international.snowowl.snomed.common/src/com/b2international/snowowl/snomed/common/SnomedRf2Headers.java +++ b/snomed/com.b2international.snowowl.snomed.common/src/com/b2international/snowowl/snomed/common/SnomedRf2Headers.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -121,6 +121,9 @@ public abstract class SnomedRf2Headers { public static final String FIELD_MRCM_RULE_REFSET_ID = "mrcmRuleRefsetId"; + // Field used in "complex map with map block" reference sets + public static final String FIELD_MAP_BLOCK = "mapBlock"; + public static final String ATTRIBUTE_DESCRIPTION = "attributeDescription"; public static final String ATTRIBUTE_TYPE = "attributeType"; public static final String ATTRIBUTE_ORDER = "attributeOrder"; @@ -381,6 +384,21 @@ public abstract class SnomedRf2Headers { ATTRIBUTE_ORDER }; + public static final String[] COMPLEX_BLOCK_MAP_TYPE_HEADER = new String[] { + FIELD_ID, + FIELD_EFFECTIVE_TIME, + FIELD_ACTIVE, + FIELD_MODULE_ID, + FIELD_REFSET_ID, + FIELD_REFERENCED_COMPONENT_ID, + FIELD_MAP_GROUP, + FIELD_MAP_PRIORITY, + FIELD_MAP_RULE, + FIELD_MAP_ADVICE, + FIELD_MAP_TARGET, + FIELD_CORRELATION_ID, + FIELD_MAP_BLOCK }; + private SnomedRf2Headers() { // Prevent instantiation } diff --git a/snomed/com.b2international.snowowl.snomed.core.feature/feature.xml b/snomed/com.b2international.snowowl.snomed.core.feature/feature.xml index cdb57b79b4b..a034a036837 100644 --- a/snomed/com.b2international.snowowl.snomed.core.feature/feature.xml +++ b/snomed/com.b2international.snowowl.snomed.core.feature/feature.xml @@ -2,7 +2,7 @@ @@ -89,4 +89,18 @@ Visit us at http://b2i.sg version="0.0.0" unpack="false"/> + + + + diff --git a/snomed/com.b2international.snowowl.snomed.core.feature/pom.xml b/snomed/com.b2international.snowowl.snomed.core.feature/pom.xml index 7a333f8450e..79e4b1c9a27 100644 --- a/snomed/com.b2international.snowowl.snomed.core.feature/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.core.feature/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl snomed-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.snomed.core.feature eclipse-feature diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.feature/feature.xml b/snomed/com.b2international.snowowl.snomed.core.rest.feature/feature.xml index 4277d5ebc96..fb04555a59f 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.feature/feature.xml +++ b/snomed/com.b2international.snowowl.snomed.core.rest.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.feature/pom.xml b/snomed/com.b2international.snowowl.snomed.core.rest.feature/pom.xml index 37c19be6242..b469dde0a8a 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.feature/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.core.rest.feature/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl snomed-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.snomed.core.rest.feature eclipse-feature diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/.launch/snomed-e2e-tests (cis).launch b/snomed/com.b2international.snowowl.snomed.core.rest.tests/.launch/snomed-e2e-tests (cis).launch index c842ddc9875..0021cc27a7c 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/.launch/snomed-e2e-tests (cis).launch +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/.launch/snomed-e2e-tests (cis).launch @@ -29,12 +29,12 @@ - + - - + + diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/.launch/snomed-e2e-tests.launch b/snomed/com.b2international.snowowl.snomed.core.rest.tests/.launch/snomed-e2e-tests.launch index 3cbb0a2f41a..e2a5402d951 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/.launch/snomed-e2e-tests.launch +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/.launch/snomed-e2e-tests.launch @@ -33,7 +33,7 @@ - + diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.core.rest.tests/META-INF/MANIFEST.MF index eeb63910cad..4bea1ec5c7c 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT REST API Tests Bundle-SymbolicName: com.b2international.snowowl.snomed.core.rest.tests -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/pom.xml b/snomed/com.b2international.snowowl.snomed.core.rest.tests/pom.xml index bd99f16c3b9..e4f01fac8aa 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl snomed-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/io/SnomedRefSetDSVExportTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/io/SnomedRefSetDSVExportTest.java index 28c9cba4351..4d2c2f1f865 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/io/SnomedRefSetDSVExportTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/io/SnomedRefSetDSVExportTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,6 @@ import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; import com.b2international.snowowl.snomed.core.domain.constraint.SnomedCardinalityPredicate; @@ -209,8 +208,8 @@ private Set relationshipKeysOf(SnomedConcepts concepts) { .stream() .flatMap(concept -> concept.getRelationships().stream()) .filter(r -> r.isActive() && - (CharacteristicType.STATED_RELATIONSHIP.equals(r.getCharacteristicType()) - || CharacteristicType.ADDITIONAL_RELATIONSHIP.equals(r.getCharacteristicType()))) + (Concepts.STATED_RELATIONSHIP.equals(r.getCharacteristicTypeId()) + || Concepts.ADDITIONAL_RELATIONSHIP.equals(r.getCharacteristicTypeId()))) .map(r -> String.format("%s=%s", r.getTypeId(), r.getDestinationId())) .collect(Collectors.toSet()); } @@ -236,8 +235,8 @@ private String createRefset(String branchPath, SnomedRefSetType type) { SnomedDescriptionCreateRequestBuilder fsn = toDescriptionRequest(Concepts.FULLY_SPECIFIED_NAME, "term-test"); SnomedDescriptionCreateRequestBuilder pt = toDescriptionRequest(Concepts.SYNONYM, "test"); - SnomedRelationshipCreateRequestBuilder statedIsA = toRelationshipRequest(Concepts.IS_A, CharacteristicType.STATED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(type)); - SnomedRelationshipCreateRequestBuilder inferredIsA = toRelationshipRequest(Concepts.IS_A, CharacteristicType.INFERRED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(type)); + SnomedRelationshipCreateRequestBuilder statedIsA = toRelationshipRequest(Concepts.IS_A, Concepts.STATED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(type)); + SnomedRelationshipCreateRequestBuilder inferredIsA = toRelationshipRequest(Concepts.IS_A, Concepts.INFERRED_RELATIONSHIP, SnomedRefSetUtil.getParentConceptId(type)); SnomedRefSetCreateRequestBuilder refSet = toRefSetRequest(type); @@ -293,13 +292,13 @@ private String generateId() { .orElseThrow(() -> new IllegalStateException("Couldn't generate identifier concept ID")); } - private SnomedRelationshipCreateRequestBuilder toRelationshipRequest(String typeId, CharacteristicType characteristicType, String desctinationId) { + private SnomedRelationshipCreateRequestBuilder toRelationshipRequest(String typeId, String characteristicTypeId, String desctinationId) { return SnomedRequests.prepareNewRelationship() .setIdFromNamespace(Concepts.B2I_NAMESPACE) .setModuleId(Concepts.MODULE_SCT_CORE) .setDestinationId(desctinationId) .setTypeId(typeId) - .setCharacteristicType(characteristicType); + .setCharacteristicTypeId(characteristicTypeId); } private SnomedDescriptionCreateRequestBuilder toDescriptionRequest(String typeId, String term) { diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/issue/EclSerializerTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/issue/EclSerializerTest.java index 50398a30cdf..2467c0296e3 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/issue/EclSerializerTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/issue/EclSerializerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/issue/IssueSO2503RemoteJobDynamicMappingFix.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/issue/IssueSO2503RemoteJobDynamicMappingFix.java index c2eb45a2ce7..98edcaf7276 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/issue/IssueSO2503RemoteJobDynamicMappingFix.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/issue/IssueSO2503RemoteJobDynamicMappingFix.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/AbstractSnomedApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/AbstractSnomedApiTest.java index 9fc85730b86..79b51c6f8b8 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/AbstractSnomedApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/AbstractSnomedApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,103 +15,16 @@ */ package com.b2international.snowowl.snomed.core.rest; -import java.util.Optional; -import java.util.Random; - -import org.junit.Rule; -import org.junit.rules.TestWatcher; -import org.junit.runner.Description; - -import com.b2international.snowowl.core.api.IBranchPath; -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.datastore.BranchPathUtils; -import com.b2international.snowowl.eventbus.IEventBus; -import com.b2international.snowowl.test.commons.Services; +import com.b2international.snowowl.test.commons.rest.AbstractApiTest; /** - * @since 2.0 + * @since 7.3 */ -@BranchBase(Branch.MAIN_PATH) -public abstract class AbstractSnomedApiTest { - - private static final Random RANDOM = new Random(); - - private final class CustomTestWatcher extends TestWatcher { - @Override - protected void starting(Description description) { - System.out.println("===== Start of " + description + " ====="); - - Class testClass = description.getTestClass(); - BranchBase branchBaseAnnotation = getBranchBaseAnnotation(testClass); - String testBasePath = getTestBasePath(branchBaseAnnotation); - String testClassName = testClass.getSimpleName(); - - if (isolateTests(branchBaseAnnotation)) { - String testMethodName = description.getMethodName() - .replace("[", "_") // Remove special characters from parameterized test names - .replace("]", ""); - - // Also add a random suffix if it would go over the 50 character branch name limit - if (testMethodName.length() > 50) { - String suffix = Integer.toString(RANDOM.nextInt(Integer.MAX_VALUE), 36); - testMethodName = testMethodName.substring(0, 44) + suffix; - } - - branchPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join(testBasePath, testClassName, testMethodName)); - } else { - branchPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join(testBasePath, testClassName)); - } - - SnomedBranchingRestRequests.createBranchRecursively(branchPath); - } - - @Override - protected void finished(Description description) { - System.out.println("===== End of " + description + " ====="); - } +public abstract class AbstractSnomedApiTest extends AbstractApiTest { - private BranchBase getBranchBaseAnnotation(Class type) { - if (type.isAnnotationPresent(BranchBase.class)) { - return type.getAnnotation(BranchBase.class); - } else { - if (type.getSuperclass() != null) { - BranchBase doc = getBranchBaseAnnotation(type.getSuperclass()); - if (doc != null) { - return doc; - } - } - - for (Class iface : type.getInterfaces()) { - BranchBase doc = getBranchBaseAnnotation(iface); - if (doc != null) { - return doc; - } - } - - return null; - } - } - - private String getTestBasePath(BranchBase branchBaseAnnotation) { - return Optional.ofNullable(branchBaseAnnotation) - .map(a -> a.value()) - .orElse(Branch.MAIN_PATH); - } - - private boolean isolateTests(BranchBase branchBaseAnnotation) { - return Optional.ofNullable(branchBaseAnnotation) - .map(a -> a.isolateTests()) - .orElse(true); - } - } - - protected IBranchPath branchPath; - - protected IEventBus getBus() { - return Services.bus(); + @Override + protected String getApiBaseUrl() { + return SnomedApiTestConstants.SCT_API; } - @Rule - public final TestWatcher watcher = new CustomTestWatcher(); - } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/AllSnomedApiTests.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/AllSnomedApiTests.java index 237e23d374c..c578e23ead1 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/AllSnomedApiTests.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/AllSnomedApiTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -107,10 +107,11 @@ public class AllSnomedApiTests { @ClassRule public static final RuleChain appRule = RuleChain - .outerRule(SnowOwlAppRule.snowOwl(AllSnomedApiTests.class).clearResources(true)) + .outerRule(SnowOwlAppRule.snowOwl(AllSnomedApiTests.class)) .around(new BundleStartRule("org.eclipse.jetty.osgi.boot")) .around(new BundleStartRule("com.b2international.snowowl.core.rest")) .around(new SnomedContentRule(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, Branch.MAIN_PATH, Resources.Snomed.MINI_RF2_INT, Rf2ReleaseType.FULL)) - .around(new SnomedContentRule(SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME, SnomedApiTestConstants.EXTENSION_PATH, Resources.Snomed.MINI_RF2_EXT, Rf2ReleaseType.DELTA)); + .around(new SnomedContentRule(SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME, SnomedApiTestConstants.EXTENSION_PATH, Resources.Snomed.MINI_RF2_EXT, Rf2ReleaseType.DELTA)) + .around(new SnomedContentRule(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, Branch.MAIN_PATH, Resources.Snomed.MINI_RF2_COMPLEX_BLOCK_MAP, Rf2ReleaseType.DELTA)); } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/Issue3019FixDeletionOfReferringMembersTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/Issue3019FixDeletionOfReferringMembersTest.java index 955969743da..76998118b2f 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/Issue3019FixDeletionOfReferringMembersTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/Issue3019FixDeletionOfReferringMembersTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,8 +24,8 @@ import org.junit.Test; -import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; +import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedApiTestConstants.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedApiTestConstants.java index 7f1a1c1845d..829eb65bdd8 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedApiTestConstants.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedApiTestConstants.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.google.common.base.Joiner; import com.google.common.collect.ImmutableMap; /** @@ -71,8 +70,6 @@ public abstract class SnomedApiTestConstants { public static final String EXTENSION_PATH = "MAIN/2016-07-31/SNOMEDCT-B2I"; - public static final Joiner PATH_JOINER = Joiner.on('/'); - public static final String OWL_AXIOM_1 = "SubClassOf(ObjectIntersectionOf(:73211009 ObjectSomeValuesFrom(:246075003 :410942007)) :8801005)"; diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedCompareRestRequestTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedCompareRestRequestTest.java index 141597bf9ad..a5169bfe426 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedCompareRestRequestTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedCompareRestRequestTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedComponentRestRequests.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedComponentRestRequests.java index e3e46ac34c7..0755949c197 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedComponentRestRequests.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedComponentRestRequests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,16 +15,21 @@ */ package com.b2international.snowowl.snomed.core.rest; +import static com.b2international.snowowl.test.commons.rest.RestExtensions.COMMA_JOINER; +import static com.b2international.snowowl.test.commons.rest.RestExtensions.JSON_UTF8; import static com.b2international.snowowl.test.commons.rest.RestExtensions.givenAuthenticatedRequest; +import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertNotNull; import java.util.Map; +import org.hamcrest.Matchers; + import com.b2international.snowowl.core.api.IBranchPath; -import com.google.common.base.Charsets; -import com.google.common.base.Joiner; +import com.b2international.snowowl.snomed.core.domain.AssociationTarget; +import com.b2international.snowowl.snomed.core.domain.InactivationProperties; +import com.google.common.collect.ImmutableMap; -import io.restassured.http.ContentType; import io.restassured.response.ValidatableResponse; /** @@ -34,9 +39,35 @@ */ public abstract class SnomedComponentRestRequests { - private static final Joiner COMMA_JOINER = Joiner.on(","); - private static final String JSON_UTF8 = ContentType.JSON.withCharset(Charsets.UTF_8); + public static ValidatableResponse assertInactivation(final IBranchPath branchPath, final String conceptId, InactivationProperties inactivationProperties) { + return assertInactivation(branchPath, conceptId, inactivationProperties, null); + } + + public static ValidatableResponse assertInactivation(final IBranchPath branchPath, final String conceptId, InactivationProperties inactivationProperties, final String defaultModuleId) { + ImmutableMap.Builder inactivationRequestBody = ImmutableMap.builder() + .put("active", false) + .put("inactivationProperties", inactivationProperties) + .put("commitComment", "Inactivated concept"); + + if (defaultModuleId != null) { + inactivationRequestBody.put("defaultModuleId", defaultModuleId); + } + SnomedComponentType type = SnomedComponentType.getByComponentId(conceptId); + updateComponent(branchPath, type, conceptId, inactivationRequestBody.build()) + .statusCode(204); + + final String[] associationReferenceSetIds = inactivationProperties.getAssociationTargets().stream().map(AssociationTarget::getReferenceSetId).toArray(length -> new String[length]); + final String[] associationTargets = inactivationProperties.getAssociationTargets().stream().map(AssociationTarget::getTargetComponentId).toArray(length -> new String[length]); + + return getComponent(branchPath, type, conceptId, "inactivationProperties(),members()") + .statusCode(200) + .body("active", equalTo(false)) + .body("inactivationProperties.inactivationIndicatorId", equalTo(inactivationProperties.getInactivationIndicatorId())) + .body("inactivationProperties.associationTargets.referenceSetId", Matchers.containsInAnyOrder(associationReferenceSetIds)) + .body("inactivationProperties.associationTargets.targetComponentId", Matchers.containsInAnyOrder(associationTargets)); + } + public static ValidatableResponse createComponent(IBranchPath branchPath, SnomedComponentType type, Map requestBody) { return givenAuthenticatedRequest(SnomedApiTestConstants.SCT_API) .contentType(JSON_UTF8) diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedComponentType.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedComponentType.java index ac84f4729ea..98dcce5625a 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedComponentType.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedComponentType.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,8 @@ import java.util.Locale; +import com.b2international.snowowl.snomed.cis.SnomedIdentifiers; + /** * Enumerates SNOMED CT component types used in the REST API tests. * @@ -36,4 +38,14 @@ public enum SnomedComponentType { public String toLowerCasePlural() { return toString().toLowerCase(Locale.ENGLISH) + "s"; } + + public static SnomedComponentType getByComponentId(String componentId) { + switch (SnomedIdentifiers.getComponentCategory(componentId)) { + case CONCEPT: return SnomedComponentType.CONCEPT; + case DESCRIPTION: return SnomedComponentType.DESCRIPTION; + case RELATIONSHIP: return SnomedComponentType.RELATIONSHIP; + default: throw new UnsupportedOperationException("Not supported for componentId: " + componentId); + } + + } } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedExportRestRequests.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedExportRestRequests.java index 9a02d1d2a3e..3ee49bb1cbb 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedExportRestRequests.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedExportRestRequests.java @@ -24,6 +24,7 @@ import java.io.InputStream; import java.util.Map; +import com.b2international.snowowl.test.commons.rest.AbstractApiTest; import com.google.common.io.ByteSource; import com.google.common.io.Files; @@ -33,7 +34,7 @@ /** * @since 5.4 */ -public abstract class SnomedExportRestRequests extends AbstractSnomedApiTest { +public abstract class SnomedExportRestRequests extends AbstractApiTest { public static ValidatableResponse createExport(final Map exportConfiguration) { return givenAuthenticatedRequest(SnomedApiTestConstants.SCT_API) diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedMergingRestRequests.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedMergingRestRequests.java index a2b9485fd32..b57d1411c8c 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedMergingRestRequests.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedMergingRestRequests.java @@ -35,7 +35,7 @@ */ public abstract class SnomedMergingRestRequests { - private static final long MERGE_POLLING_INTERVAL = 2_000L; + private static final long MERGE_POLLING_INTERVAL = 200L; private static final Set FINISH_STATES = ImmutableSet.of( Merge.Status.COMPLETED.name(), diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetDeletionPerformanceTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetDeletionPerformanceTest.java index 729207eef84..aecb8a61735 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetDeletionPerformanceTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetDeletionPerformanceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +36,6 @@ import com.b2international.snowowl.core.terminology.ComponentCategory; import com.b2international.snowowl.snomed.cis.domain.SctId; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; import com.b2international.snowowl.snomed.datastore.request.SnomedConceptCreateRequestBuilder; import com.b2international.snowowl.snomed.datastore.request.SnomedDescriptionCreateRequestBuilder; @@ -120,8 +119,8 @@ private void createConcepts(final Set conceptIds, final BulkRequestBuild .setModuleId(Concepts.MODULE_SCT_CORE) .addDescription(createDescriptionRequest(Concepts.FULLY_SPECIFIED_NAME, "fsn")) .addDescription(createDescriptionRequest(Concepts.SYNONYM, "pt")) - .addRelationship(createRelationshipRequest(Concepts.IS_A, CharacteristicType.STATED_RELATIONSHIP, Concepts.MODULE_SCT_CORE)) - .addRelationship(createRelationshipRequest(Concepts.IS_A, CharacteristicType.INFERRED_RELATIONSHIP, Concepts.MODULE_SCT_CORE)); + .addRelationship(createRelationshipRequest(Concepts.IS_A, Concepts.STATED_RELATIONSHIP, Concepts.MODULE_SCT_CORE)) + .addRelationship(createRelationshipRequest(Concepts.IS_A, Concepts.INFERRED_RELATIONSHIP, Concepts.MODULE_SCT_CORE)); bulk.add(conceptCreateRequestBuilder); } @@ -141,13 +140,13 @@ private Set generateConceptIds(int quantity) { .collect(Collectors.toSet()); } - private SnomedRelationshipCreateRequestBuilder createRelationshipRequest(String typeId, CharacteristicType characteristicType, String desctinationId) { + private SnomedRelationshipCreateRequestBuilder createRelationshipRequest(String typeId, String characteristicTypeId, String desctinationId) { return SnomedRequests.prepareNewRelationship() .setIdFromNamespace(Concepts.B2I_NAMESPACE) .setModuleId(Concepts.MODULE_SCT_CORE) .setDestinationId(desctinationId) .setTypeId(typeId) - .setCharacteristicType(characteristicType); + .setCharacteristicTypeId(characteristicTypeId); } private SnomedDescriptionCreateRequestBuilder createDescriptionRequest(String typeId, String term) { diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedRestFixtures.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedRestFixtures.java index d1de2d234d8..1fdb44bfcc7 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedRestFixtures.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedRestFixtures.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,9 +41,6 @@ import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; import com.b2international.snowowl.snomed.core.domain.refset.DataType; @@ -74,11 +71,15 @@ public static String createNewConcept(IBranchPath conceptPath) { } public static String createNewConcept(IBranchPath conceptPath, String parentConceptId) { - Map conceptRequestBody = createConceptRequestBody(parentConceptId) + Map conceptRequestBody = createConceptRequestBody(parentConceptId) .put("commitComment", "Created new concept") .build(); - return lastPathSegment(createComponent(conceptPath, SnomedComponentType.CONCEPT, conceptRequestBody) + return createNewConcept(conceptPath, conceptRequestBody); + } + + public static String createNewConcept(IBranchPath conceptPath, Map requestBody) { + return lastPathSegment(createComponent(conceptPath, SnomedComponentType.CONCEPT, requestBody) .statusCode(201) .body(equalTo("")) .extract().header("Location")); @@ -89,7 +90,12 @@ public static Builder createConceptRequestBody(String parentConc } public static Builder createConceptRequestBody(String parentConceptId, String moduleId, Map acceptabilityMap) { + return createConceptRequestBody(parentConceptId, moduleId, acceptabilityMap, true); + } + + public static Builder createConceptRequestBody(String parentConceptId, String moduleId, Map acceptabilityMap, boolean active) { Map relationshipRequestBody = ImmutableMap.builder() + .put("active", active) .put("moduleId", moduleId) .put("typeId", Concepts.IS_A) .put("destinationId", parentConceptId) @@ -112,6 +118,7 @@ public static Builder createConceptRequestBody(String parentConc .build(); Builder conceptRequestBody = ImmutableMap.builder() + .put("active", active) .put("moduleId", moduleId) .put("descriptions", ImmutableList.of(fsnRequestBody, ptRequestBody)) .put("relationships", ImmutableList.of(relationshipRequestBody)); @@ -132,7 +139,7 @@ public static String createNewDescription(IBranchPath descriptionPath, String co } public static String createNewDescription(IBranchPath descriptionPath, String conceptId, String typeId, Map acceptabilityMap, final String languageCode) { - Map requestBody = createDescriptionRequestBody(conceptId, typeId, Concepts.MODULE_SCT_CORE, acceptabilityMap, CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE, languageCode) + Map requestBody = createDescriptionRequestBody(conceptId, typeId, Concepts.MODULE_SCT_CORE, acceptabilityMap, Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE, languageCode) .put("commitComment", "Created new description") .build(); @@ -177,17 +184,17 @@ public static Builder createDescriptionRequestBody(String concep } public static Builder createDescriptionRequestBody(String conceptId, String typeId, String moduleId, Map acceptabilityMap) { - return createDescriptionRequestBody(conceptId, typeId, moduleId, acceptabilityMap, CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE); + return createDescriptionRequestBody(conceptId, typeId, moduleId, acceptabilityMap, Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE); } public static Builder createDescriptionRequestBody(String conceptId, String typeId, String moduleId, Map acceptabilityMap, - CaseSignificance caseSignificance) { - return createDescriptionRequestBody(conceptId, typeId, moduleId, acceptabilityMap, caseSignificance, DEFAULT_LANGUAGE_CODE); + String caseSignificanceId) { + return createDescriptionRequestBody(conceptId, typeId, moduleId, acceptabilityMap, caseSignificanceId, DEFAULT_LANGUAGE_CODE); } private static Builder createDescriptionRequestBody(String conceptId, String typeId, String moduleId, Map acceptabilityMap, - CaseSignificance caseSignificance, final String languageCode) { + String caseSignificanceId, final String languageCode) { return ImmutableMap.builder() .put("conceptId", conceptId) .put("moduleId", moduleId) @@ -195,23 +202,23 @@ private static Builder createDescriptionRequestBody(String conce .put("term", DEFAULT_TERM) .put("languageCode", languageCode) .put("acceptability", acceptabilityMap) - .put("caseSignificance", caseSignificance); + .put("caseSignificanceId", caseSignificanceId); } public static String createNewRelationship(IBranchPath relationshipPath) { - return createNewRelationship(relationshipPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.STATED_RELATIONSHIP, 0); + return createNewRelationship(relationshipPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.STATED_RELATIONSHIP, 0); } public static String createNewRelationship(IBranchPath relationshipPath, String sourceId, String typeId, String destinationId) { - return createNewRelationship(relationshipPath, sourceId, typeId, destinationId, CharacteristicType.STATED_RELATIONSHIP, 0); + return createNewRelationship(relationshipPath, sourceId, typeId, destinationId, Concepts.STATED_RELATIONSHIP, 0); } - public static String createNewRelationship(IBranchPath relationshipPath, String sourceId, String typeId, String destinationId, CharacteristicType characteristicType) { - return createNewRelationship(relationshipPath, sourceId, typeId, destinationId, characteristicType, 0); + public static String createNewRelationship(IBranchPath relationshipPath, String sourceId, String typeId, String destinationId, String characteristicTypeId) { + return createNewRelationship(relationshipPath, sourceId, typeId, destinationId, characteristicTypeId, 0); } - public static String createNewRelationship(IBranchPath relationshipPath, String sourceId, String typeId, String destinationId, CharacteristicType characteristicType, int group) { - Map relationshipRequestBody = createRelationshipRequestBody(sourceId, typeId, destinationId, Concepts.MODULE_SCT_CORE, characteristicType, group) + public static String createNewRelationship(IBranchPath relationshipPath, String sourceId, String typeId, String destinationId, String characteristicTypeId, int group) { + Map relationshipRequestBody = createRelationshipRequestBody(sourceId, typeId, destinationId, Concepts.MODULE_SCT_CORE, characteristicTypeId, group) .put("commitComment", "Created new relationship") .build(); @@ -222,24 +229,24 @@ public static String createNewRelationship(IBranchPath relationshipPath, String } public static Builder createRelationshipRequestBody(String sourceId, String typeId, String destinationId) { - return createRelationshipRequestBody(sourceId, typeId, destinationId, Concepts.MODULE_SCT_CORE, CharacteristicType.STATED_RELATIONSHIP, 0); + return createRelationshipRequestBody(sourceId, typeId, destinationId, Concepts.MODULE_SCT_CORE, Concepts.STATED_RELATIONSHIP, 0); } - public static Builder createRelationshipRequestBody(String sourceId, String typeId, String destinationId, CharacteristicType characteristicType) { - return createRelationshipRequestBody(sourceId, typeId, destinationId, Concepts.MODULE_SCT_CORE, characteristicType, 0); + public static Builder createRelationshipRequestBody(String sourceId, String typeId, String destinationId, String characteristicTypeId) { + return createRelationshipRequestBody(sourceId, typeId, destinationId, Concepts.MODULE_SCT_CORE, characteristicTypeId, 0); } - public static Builder createRelationshipRequestBody(String sourceId, String typeId, String destinationId, String moduleId) { - return createRelationshipRequestBody(sourceId, typeId, destinationId, moduleId, CharacteristicType.STATED_RELATIONSHIP, 0); + public static Builder createRelationshipRequestBody(String sourceId, String typeId, String destinationId, String moduleId, String characteristicTypeId) { + return createRelationshipRequestBody(sourceId, typeId, destinationId, moduleId, characteristicTypeId, 0); } - public static Builder createRelationshipRequestBody(String sourceId, String typeId, String destinationId, String moduleId, CharacteristicType characteristicType, int group) { + public static Builder createRelationshipRequestBody(String sourceId, String typeId, String destinationId, String moduleId, String characteristicTypeId, int group) { return ImmutableMap.builder() .put("moduleId", moduleId) .put("sourceId", sourceId) .put("typeId", typeId) .put("destinationId", destinationId) - .put("characteristicType", characteristicType) + .put("characteristicTypeId", characteristicTypeId) .put("group", group); } @@ -365,8 +372,8 @@ public static void inactivateRelationship(IBranchPath relationshipPath, String r } @SuppressWarnings("unchecked") - public static void reactivateConcept(IBranchPath conceptPath, String id) { - final Map concept = getComponent(conceptPath, SnomedComponentType.CONCEPT, id, "descriptions()", "relationships()") + public static void reactivateConcept(IBranchPath branch, String conceptId) { + final Map concept = getComponent(branch, SnomedComponentType.CONCEPT, conceptId, "descriptions()", "relationships()") .statusCode(200) .extract().as(Map.class); @@ -376,20 +383,23 @@ public static void reactivateConcept(IBranchPath conceptPath, String id) { reactivationRequest.remove("associationTargets"); reactivationRequest.put("commitComment", "Reactivated concept"); + // reactivate all relationships as well final Map relationships = (Map) reactivationRequest.get("relationships"); final List> relationshipItems = (List>) relationships.get("items"); - relationshipItems.get(0).put("active", true); + relationshipItems.forEach(relationship -> { + relationship.put("active", true); + }); - updateComponent(conceptPath, SnomedComponentType.CONCEPT, id, reactivationRequest).statusCode(204); + updateComponent(branch, SnomedComponentType.CONCEPT, conceptId, reactivationRequest).statusCode(204); } public static void changeCaseSignificance(IBranchPath descriptionPath, String descriptionId) { - changeCaseSignificance(descriptionPath, descriptionId, CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE); + changeCaseSignificance(descriptionPath, descriptionId, Concepts.ENTIRE_TERM_CASE_SENSITIVE); } - public static void changeCaseSignificance(IBranchPath descriptionPath, String descriptionId, CaseSignificance caseSignificance) { + public static void changeCaseSignificance(IBranchPath descriptionPath, String descriptionId, String caseSignificanceId) { Map descriptionUpdateRequest = ImmutableMap.builder() - .put("caseSignificance", caseSignificance) + .put("caseSignificanceId", caseSignificanceId) .put("commitComment", "Changed case significance on description") .build(); @@ -398,7 +408,7 @@ public static void changeCaseSignificance(IBranchPath descriptionPath, String de public static void changeToDefining(IBranchPath conceptPath, String conceptId) { Map conceptUpdateRequest = ImmutableMap.builder() - .put("definitionStatus", DefinitionStatus.FULLY_DEFINED) + .put("definitionStatusId", Concepts.FULLY_DEFINED) .put("commitComment", "Changed definition status on concept") .build(); @@ -550,6 +560,16 @@ public static Map getValidProperties(SnomedRefSetType refSetType .put(SnomedRf2Headers.FIELD_MAP_ADVICE, "complexMapAdvice") .put(SnomedRf2Headers.FIELD_CORRELATION_ID, Concepts.REFSET_CORRELATION_NOT_SPECIFIED) .build(); + case COMPLEX_BLOCK_MAP: + return ImmutableMap.builder() + .put(SnomedRf2Headers.FIELD_MAP_TARGET, "complexBlockMapTarget") + .put(SnomedRf2Headers.FIELD_MAP_GROUP, 0) + .put(SnomedRf2Headers.FIELD_MAP_PRIORITY, 0) + .put(SnomedRf2Headers.FIELD_MAP_RULE, "complexBlockMapRule") + .put(SnomedRf2Headers.FIELD_MAP_ADVICE, "complexBlockMapAdvice") + .put(SnomedRf2Headers.FIELD_CORRELATION_ID, Concepts.REFSET_CORRELATION_NOT_SPECIFIED) + .put(SnomedRf2Headers.FIELD_MAP_BLOCK, 1) + .build(); case DESCRIPTION_TYPE: return ImmutableMap.builder() .put(SnomedRf2Headers.FIELD_DESCRIPTION_FORMAT, Concepts.ROOT_CONCEPT) diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedBranchingApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedBranchingApiTest.java index 6fd4f125d82..70846671403 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedBranchingApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedBranchingApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ package com.b2international.snowowl.snomed.core.rest.branches; import static com.b2international.snowowl.datastore.BranchPathUtils.createPath; -import static com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests.*; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.hasItem; @@ -34,54 +33,54 @@ public class SnomedBranchingApiTest extends AbstractSnomedApiTest { @Test public void readNonExistentBranch() { - getBranch(createPath("MAIN/x/y/z")).statusCode(404); + branching.getBranch(createPath("MAIN/x/y/z")).statusCode(404); } @Test public void createBranchWithNonexistentParent() { - createBranch(createPath("MAIN/x/y/z")).statusCode(400); + branching.createBranch(createPath("MAIN/x/y/z")).statusCode(400); } @Test public void updateMetadata() throws Exception { - updateBranch(branchPath, ImmutableMap.of("key", "value")); - getBranch(branchPath).body("metadata.key", equalTo("value")); + branching.updateBranch(branchPath, ImmutableMap.of("key", "value")); + branching.getBranch(branchPath).body("metadata.key", equalTo("value")); } @Test public void updateMainMetadata() throws Exception { // XXX: modifies MAIN branch, may affect other tests - updateBranch(BranchPathUtils.createMainPath(), ImmutableMap.of("key", "value")); - getBranch(BranchPathUtils.createMainPath()).body("metadata.key", equalTo("value")); + branching.updateBranch(BranchPathUtils.createMainPath(), ImmutableMap.of("key", "value")); + branching.getBranch(BranchPathUtils.createMainPath()).body("metadata.key", equalTo("value")); } @Test public void createChildBranch() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); - getBranch(a).statusCode(200); + branching.createBranch(a).statusCode(201); + branching.getBranch(a).statusCode(200); } @Test public void createChildBranchWithMetadata() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a, ImmutableMap.of("key", "value")).statusCode(201); - getBranch(a).statusCode(200).body("metadata.key", equalTo("value")); + branching.createBranch(a, ImmutableMap.of("key", "value")).statusCode(201); + branching.getBranch(a).statusCode(200).body("metadata.key", equalTo("value")); } @Test public void createBranchTwice() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); - createBranch(a).statusCode(409); + branching.createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(409); } @Test public void deleteChildBranch() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); - deleteBranch(a).statusCode(204); - getBranch(a).statusCode(200).body("deleted", equalTo(true)); + branching.createBranch(a).statusCode(201); + branching.deleteBranch(a).statusCode(204); + branching.getBranch(a).statusCode(200).body("deleted", equalTo(true)); } @Test @@ -89,13 +88,13 @@ public void deleteBranchRecursively() { IBranchPath a = createPath(branchPath, "a"); IBranchPath b = createPath(a, "b"); - createBranchRecursively(b); - getBranch(b).statusCode(200); - getBranch(a).statusCode(200); + branching.createBranchRecursively(b); + branching.getBranch(b).statusCode(200); + branching.getBranch(a).statusCode(200); - deleteBranch(a).statusCode(204); - getBranch(a).statusCode(200).body("deleted", equalTo(true)); - getBranch(b).statusCode(200).body("deleted", equalTo(true)); + branching.deleteBranch(a).statusCode(204); + branching.getBranch(a).statusCode(200).body("deleted", equalTo(true)); + branching.getBranch(b).statusCode(200).body("deleted", equalTo(true)); } @Test @@ -103,10 +102,10 @@ public void createBranchOnDeletedBranch() { IBranchPath a = createPath(branchPath, "a"); IBranchPath b = createPath(a, "b"); - createBranch(a).statusCode(201); - deleteBranch(a).statusCode(204); + branching.createBranch(a).statusCode(201); + branching.deleteBranch(a).statusCode(204); - createBranch(b).statusCode(400); + branching.createBranch(b).statusCode(400); } @Test @@ -114,13 +113,13 @@ public void getChildren() { IBranchPath a = createPath(branchPath, "a"); IBranchPath b = createPath(a, "b"); - createBranchRecursively(b); + branching.createBranchRecursively(b); - getAllBranches().statusCode(200) + branching.getAllBranches().statusCode(200) .body("items.name", hasItem(a.lastSegment())) .body("items.name", hasItem(b.lastSegment())); - getBranchChildren(branchPath).statusCode(200) + branching.getBranchChildren(branchPath).statusCode(200) .body("items.name", hasItem(a.lastSegment())) .body("items.name", hasItem(b.lastSegment())); } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedMergeApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedMergeApiTest.java index 7c3f12d9cd1..8c2c80abd8b 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedMergeApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedMergeApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ package com.b2international.snowowl.snomed.core.rest.branches; import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.getNextAvailableEffectiveDate; -import static com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests.createBranch; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.createComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.deleteComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.getComponent; @@ -42,9 +41,6 @@ import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; import com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest; import com.b2international.snowowl.snomed.core.rest.SnomedComponentType; import com.google.common.collect.ImmutableMap; @@ -60,7 +56,7 @@ public class SnomedMergeApiTest extends AbstractSnomedApiTest { private static void rebaseConceptDeletionOverChange(IBranchPath parentPath, IBranchPath childPath, String conceptId) { final Map changeOnParent = ImmutableMap.builder() - .put("definitionStatus", DefinitionStatus.FULLY_DEFINED) + .put("definitionStatusId", Concepts.FULLY_DEFINED) .put("commitComment", "Changed definition status on parent") .build(); @@ -73,7 +69,7 @@ private static void rebaseConceptDeletionOverChange(IBranchPath parentPath, IBra @Test public void mergeNewConceptForward() { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final String conceptId = createNewConcept(a); merge(a, branchPath, "Merged new concept from child branch").body("status", equalTo(Merge.Status.COMPLETED.name())); @@ -85,7 +81,7 @@ public void mergeNewConceptForward() { @Test public void mergeNewDescriptionForward() { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final String descriptionId = createNewDescription(a); merge(a, branchPath, "Merged new description from child branch").body("status", equalTo(Merge.Status.COMPLETED.name())); @@ -97,7 +93,7 @@ public void mergeNewDescriptionForward() { @Test public void mergeNewRelationshipForward() { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); String relationshipId = createNewRelationship(a); merge(a, branchPath, "Merged new relationship from child branch").body("status", equalTo(Merge.Status.COMPLETED.name())); @@ -109,7 +105,7 @@ public void mergeNewRelationshipForward() { @Test public void noMergeWithNonExistentReview() throws BadRequestException { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); createNewConcept(a); merge(a, branchPath, "Merged new concept from child branch with non-existent review ID", "non-existent-id") @@ -188,18 +184,18 @@ public void noMergeWithNonExistentReview() throws BadRequestException { @Test public void mergeNewConceptToUnrelatedBranch() { final IBranchPath v1 = BranchPathUtils.createPath(branchPath, "v1"); - createBranch(v1).statusCode(201); + branching.createBranch(v1).statusCode(201); // Concept 1 is created on the two branches' common ancestor final String concept1Id = createNewConcept(branchPath); final IBranchPath v2 = BranchPathUtils.createPath(branchPath, "v2"); - createBranch(v2).statusCode(201); + branching.createBranch(v2).statusCode(201); final IBranchPath a = BranchPathUtils.createPath(v1, "extension-old"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final IBranchPath b = BranchPathUtils.createPath(v2, "extension-new"); - createBranch(b).statusCode(201); + branching.createBranch(b).statusCode(201); // Concept 2 is initially only visible on branch "extension-old" final String concept2Id = createNewConcept(a); @@ -218,9 +214,9 @@ public void mergeNewConceptToUnrelatedBranch() { @Test public void mergeNewDescriptionToUnrelatedBranch() { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final IBranchPath b = BranchPathUtils.createPath(branchPath, "b"); - createBranch(b).statusCode(201); + branching.createBranch(b).statusCode(201); final String descriptionId = createNewDescription(a); getComponent(a, SnomedComponentType.DESCRIPTION, descriptionId).statusCode(200); @@ -235,9 +231,9 @@ public void mergeNewDescriptionToUnrelatedBranch() { @Test public void mergeNewRelationshipToUnrelatedBranch() { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final IBranchPath b = BranchPathUtils.createPath(branchPath, "b"); - createBranch(b).statusCode(201); + branching.createBranch(b).statusCode(201); final String relationshipId = createNewRelationship(a); getComponent(a, SnomedComponentType.RELATIONSHIP, relationshipId).statusCode(200); @@ -254,7 +250,7 @@ public void mergeReactivatedConcept() { final String conceptId = createInactiveConcept(branchPath); final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); reactivateConcept(a, conceptId); @@ -273,7 +269,7 @@ public void rebaseReactivatedConcept() { final String concept1Id = createInactiveConcept(branchPath); final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); reactivateConcept(a, concept1Id); @@ -303,7 +299,7 @@ public void rebaseReactivatedConcept() { @Test public void rebaseNewConceptDiverged() { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final String concept1Id = createNewConcept(branchPath); final String concept2Id = createNewConcept(a); @@ -328,7 +324,7 @@ public void rebaseNewConceptDiverged() { @Test public void rebaseNewDescriptionDiverged() { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final String description1Id = createNewDescription(branchPath); final String description2Id = createNewDescription(a); @@ -353,7 +349,7 @@ public void rebaseNewDescriptionDiverged() { @Test public void rebaseNewRelationshipDiverged() { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final String relationship1Id = createNewRelationship(branchPath); final String relationship2Id = createNewRelationship(a); @@ -378,10 +374,10 @@ public void rebaseNewRelationshipDiverged() { @Test public void rebaseNewConceptStale() { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final IBranchPath b = BranchPathUtils.createPath(a, "b"); - createBranch(b).statusCode(201); + branching.createBranch(b).statusCode(201); final String concept1Id = createNewConcept(b); final String concept2Id = createNewConcept(a); @@ -410,12 +406,12 @@ public void rebaseChangedConceptOnParentDeletedOnBranch() { final String conceptId = createNewConcept(branchPath); final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); rebaseConceptDeletionOverChange(branchPath, a, conceptId); // Concept should still be present on parent, and deleted on child - getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId).statusCode(200).body("definitionStatus", equalTo(DefinitionStatus.FULLY_DEFINED.name())); + getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId).statusCode(200).body("definitionStatusId", equalTo(Concepts.FULLY_DEFINED)); getComponent(a, SnomedComponentType.CONCEPT, conceptId).statusCode(404); } @@ -424,14 +420,14 @@ public void rebaseChangedDescriptionOnParentDeletedOnBranch() { final String descriptionId = createNewDescription(branchPath); final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); changeCaseSignificance(branchPath, descriptionId); // Parent branch changes to CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE deleteComponent(a, SnomedComponentType.DESCRIPTION, descriptionId, false).statusCode(204); merge(branchPath, a, "Rebased deletion over case significance change").body("status", equalTo(Merge.Status.COMPLETED.name())); - getComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId).statusCode(200).body("caseSignificance", equalTo(CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE.name())); + getComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId).statusCode(200).body("caseSignificanceId", equalTo(Concepts.ENTIRE_TERM_CASE_SENSITIVE)); getComponent(a, SnomedComponentType.DESCRIPTION, descriptionId).statusCode(404); } @@ -440,7 +436,7 @@ public void rebaseAndMergeChangedOnParentDeletedOnBranch() { final String conceptId = createNewConcept(branchPath); final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); rebaseConceptDeletionOverChange(branchPath, a, conceptId); @@ -456,12 +452,12 @@ public void rebaseAndMergeChangedDescription() { final String description1Id = createNewDescription(branchPath); final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final String description2Id = createNewDescription(branchPath); final Map requestBody = ImmutableMap.builder() - .put("caseSignificance", CaseSignificance.CASE_INSENSITIVE) + .put("caseSignificanceId", Concepts.ENTIRE_TERM_CASE_INSENSITIVE) .put("moduleId", Concepts.MODULE_ROOT) .put("commitComment", "Changed case significance and module on child") .build(); @@ -476,11 +472,11 @@ public void rebaseAndMergeChangedDescription() { // Description 1 retains the changes on child, keeps the original values on parent getComponent(branchPath, SnomedComponentType.DESCRIPTION, description1Id).statusCode(200) - .body("caseSignificance", equalTo(CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE.name())) + .body("caseSignificanceId", equalTo(Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE)) .body("moduleId", equalTo(Concepts.MODULE_SCT_CORE)); getComponent(a, SnomedComponentType.DESCRIPTION, description1Id).statusCode(200) - .body("caseSignificance", equalTo(CaseSignificance.CASE_INSENSITIVE.name())) + .body("caseSignificanceId", equalTo(Concepts.ENTIRE_TERM_CASE_INSENSITIVE)) .body("moduleId", equalTo(Concepts.MODULE_ROOT)); merge(a, branchPath, "Merged description change to parent").body("status", equalTo(Merge.Status.COMPLETED.name())); @@ -490,11 +486,11 @@ public void rebaseAndMergeChangedDescription() { // Description 1 changes are visible everywhere getComponent(branchPath, SnomedComponentType.DESCRIPTION, description1Id).statusCode(200) - .body("caseSignificance", equalTo(CaseSignificance.CASE_INSENSITIVE.name())) + .body("caseSignificanceId", equalTo(Concepts.ENTIRE_TERM_CASE_INSENSITIVE)) .body("moduleId", equalTo(Concepts.MODULE_ROOT)); getComponent(a, SnomedComponentType.DESCRIPTION, description1Id).statusCode(200) - .body("caseSignificance", equalTo(CaseSignificance.CASE_INSENSITIVE.name())) + .body("caseSignificanceId", equalTo(Concepts.ENTIRE_TERM_CASE_INSENSITIVE)) .body("moduleId", equalTo(Concepts.MODULE_ROOT)); } @@ -503,7 +499,7 @@ public void rebaseAndMergeNewDescriptionBothDeleted() { final String description1Id = createNewDescription(branchPath); final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final String description2Id = createNewDescription(branchPath); @@ -532,7 +528,7 @@ public void rebaseOverReusedRelationshipId() { final String relationshipId = createNewRelationship(branchPath); final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); deleteComponent(branchPath, SnomedComponentType.RELATIONSHIP, relationshipId, false).statusCode(204); @@ -561,7 +557,7 @@ public void rebaseOverReusedRelationshipId() { @Test public void rebaseTextDefinitions() throws Exception { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); // Create two new text definitions with "cross-shaped" acceptability on child final String textDefinition1Id = createNewTextDefinition(a, ImmutableMap.of(Concepts.REFSET_LANGUAGE_TYPE_UK, Acceptability.PREFERRED, Concepts.REFSET_LANGUAGE_TYPE_US, Acceptability.ACCEPTABLE)); @@ -586,13 +582,13 @@ public void rebaseTextDefinitions() throws Exception { @Test public void rebaseStaleBranchWithChangesOnDeletedContent() throws Exception { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final String relationshipId = createNewRelationship(a); final String descriptionId = createNewDescription(a); final IBranchPath b = BranchPathUtils.createPath(a, "b"); - createBranch(b).statusCode(201); + branching.createBranch(b).statusCode(201); deleteComponent(a, SnomedComponentType.RELATIONSHIP, relationshipId, false).statusCode(204); deleteComponent(a, SnomedComponentType.DESCRIPTION, descriptionId, false).statusCode(204); @@ -615,13 +611,13 @@ public void rebaseStaleBranchWithChangesOnDeletedContent() throws Exception { @Test public void rebaseStaleBranchWithChangesOnNewContent() throws Exception { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final String relationshipId = createNewRelationship(a); final String descriptionId = createNewDescription(a); final IBranchPath b = BranchPathUtils.createPath(a, "b"); - createBranch(b).statusCode(201); + branching.createBranch(b).statusCode(201); changeCaseSignificance(b, descriptionId); changeRelationshipGroup(b, relationshipId); @@ -630,27 +626,31 @@ public void rebaseStaleBranchWithChangesOnNewContent() throws Exception { createNewRelationship(branchPath); merge(branchPath, a, "Rebased new components over new relationship").body("status", equalTo(Merge.Status.COMPLETED.name())); - getComponent(a, SnomedComponentType.DESCRIPTION, descriptionId).statusCode(200).body("caseSignificance", equalTo(CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE.name())); - getComponent(a, SnomedComponentType.RELATIONSHIP, relationshipId).statusCode(200).body("group", equalTo(0)); + getComponent(a, SnomedComponentType.DESCRIPTION, descriptionId) + .statusCode(200) + .body("caseSignificanceId", equalTo(Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE)); + getComponent(a, SnomedComponentType.RELATIONSHIP, relationshipId) + .statusCode(200) + .body("group", equalTo(0)); // "b" should be STALE at this point, try to rebase it, it should pass and the components should still exist with changed content merge(a, b, "Rebased changed components over new components").body("status", equalTo(Merge.Status.COMPLETED.name())); // Verify that the two components have the modified values - getComponent(b, SnomedComponentType.DESCRIPTION, descriptionId).statusCode(200).body("caseSignificance", equalTo(CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE.name())); + getComponent(b, SnomedComponentType.DESCRIPTION, descriptionId).statusCode(200).body("caseSignificanceId", equalTo(Concepts.ENTIRE_TERM_CASE_SENSITIVE)); getComponent(b, SnomedComponentType.RELATIONSHIP, relationshipId).statusCode(200).body("group", equalTo(99)); } @Test public void rebaseStaleBranchWithDeleteOnChangedContent() throws Exception { final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final String relationshipId = createNewRelationship(a); final String descriptionId = createNewDescription(a); final IBranchPath b = BranchPathUtils.createPath(a, "b"); - createBranch(b).statusCode(201); + branching.createBranch(b).statusCode(201); // Make changes on branch "a" changeCaseSignificance(a, descriptionId); @@ -678,10 +678,10 @@ public void rebaseChangedConceptOnBranchDeletedOnParent() { final String conceptId = createNewConcept(branchPath); final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final Map requestBody = ImmutableMap.builder() - .put("definitionStatus", DefinitionStatus.FULLY_DEFINED) + .put("definitionStatusId", Concepts.FULLY_DEFINED) .put("commitComment", "Changed definition status on child") .build(); @@ -700,7 +700,7 @@ public void rebaseUnsetEffectiveTimeOnSource() { updateRefSetMemberEffectiveTime(branchPath, memberId, calendar.getTime()); final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); calendar.add(Calendar.DATE, 1); updateRefSetMemberEffectiveTime(branchPath, memberId, calendar.getTime()); // Parent increases the effective time by one day @@ -734,7 +734,7 @@ public void rebaseUnsetEffectiveTimeOnTarget() { updateRefSetMemberEffectiveTime(branchPath, memberId, calendar.getTime()); final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); final Map parentRequest = ImmutableMap.builder() .put("active", false) @@ -766,10 +766,10 @@ public void rebaseConceptDeletionOverNewOutboundRelationships() throws Exception // new child branch of test parent branch final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); // create a new outbound relationship - final String newOutboundRelationshipFromDeletedConcept = createNewRelationship(branchPath, deletedConcept, Concepts.FINDING_SITE, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + final String newOutboundRelationshipFromDeletedConcept = createNewRelationship(branchPath, deletedConcept, Concepts.FINDING_SITE, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); // delete destination concept on child branch deleteComponent(a, SnomedComponentType.CONCEPT, deletedConcept, false); @@ -790,10 +790,10 @@ public void rebaseConceptDeletionOverNewInboundRelationships() throws Exception // new child branch of test parent branch final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); // create a new relationship to newly created destination concept on parent branch - final String newInboundRelationshipToDeletedConcept = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.FINDING_SITE, deletedConcept, CharacteristicType.INFERRED_RELATIONSHIP); + final String newInboundRelationshipToDeletedConcept = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.FINDING_SITE, deletedConcept, Concepts.INFERRED_RELATIONSHIP); // delete destination concept on child branch deleteComponent(a, SnomedComponentType.CONCEPT, deletedConcept, false); @@ -813,11 +813,11 @@ public void rebaseConceptDeletionOverNewOutAndInboundRelationships() throws Exce // new child branch of test parent branch final IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); // create a new relationship to newly created destination concept on parent branch - final String newInboundRelationshipToDeletedConcept = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.FINDING_SITE, deletedConcept, CharacteristicType.INFERRED_RELATIONSHIP); - final String newOutboundRelationshipFromDeletedConcept = createNewRelationship(branchPath, deletedConcept, Concepts.FINDING_SITE, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + final String newInboundRelationshipToDeletedConcept = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.FINDING_SITE, deletedConcept, Concepts.INFERRED_RELATIONSHIP); + final String newOutboundRelationshipFromDeletedConcept = createNewRelationship(branchPath, deletedConcept, Concepts.FINDING_SITE, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); // delete destination concept on child branch deleteComponent(a, SnomedComponentType.CONCEPT, deletedConcept, false); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedMergeConflictTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedMergeConflictTest.java index 5673d4f9251..227f6918beb 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedMergeConflictTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedMergeConflictTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ package com.b2international.snowowl.snomed.core.rest.branches; import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.getNextAvailableEffectiveDate; -import static com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests.createBranch; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.createComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.deleteComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.updateComponent; @@ -50,7 +49,6 @@ import com.b2international.snowowl.datastore.BranchPathUtils; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; import com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest; import com.b2international.snowowl.snomed.core.rest.SnomedApiTestConstants; import com.b2international.snowowl.snomed.core.rest.SnomedComponentType; @@ -68,9 +66,9 @@ public void changedInSourceAndTargetMergeConflict() { String descriptionId = createNewDescription(branchPath); IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); - changeCaseSignificance(branchPath, descriptionId, CaseSignificance.CASE_INSENSITIVE); // Parent branch changes to CaseSignificance.CASE_INSENSITIVE + changeCaseSignificance(branchPath, descriptionId, Concepts.ENTIRE_TERM_CASE_INSENSITIVE); // Parent branch changes to CaseSignificance.CASE_INSENSITIVE changeCaseSignificance(a, descriptionId); // Child branch changes to CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE Collection conflicts = merge(branchPath, a, "Rebased case significance change over case significance change") @@ -82,8 +80,8 @@ public void changedInSourceAndTargetMergeConflict() { ConflictingAttribute attribute = ConflictingAttributeImpl.builder() .property("caseSignificanceId") - .oldValue(CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE.getConceptId()) - .value(CaseSignificance.CASE_INSENSITIVE.getConceptId()) + .oldValue(Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE) + .value(Concepts.ENTIRE_TERM_CASE_INSENSITIVE) .build(); MergeConflict conflict = Iterables.getOnlyElement(conflicts); @@ -99,16 +97,16 @@ public void changedInSourceAndTargetMultipleConflict() { String descriptionId = createNewDescription(branchPath); IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); Map changesOnParent = ImmutableMap.builder() - .put("caseSignificance", CaseSignificance.CASE_INSENSITIVE) + .put("caseSignificanceId", Concepts.ENTIRE_TERM_CASE_INSENSITIVE) .put("moduleId", Concepts.MODULE_ROOT) .put("commitComment", "Changed case significance and module on parent") .build(); Map changesOnBranch = ImmutableMap.builder() - .put("caseSignificance", CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE) + .put("caseSignificanceId", Concepts.ENTIRE_TERM_CASE_SENSITIVE) .put("moduleId", Concepts.MODULE_SCT_MODEL_COMPONENT) .put("commitComment", "Changed case significance and module on branch") .build(); @@ -132,8 +130,8 @@ public void changedInSourceAndTargetMultipleConflict() { Map expectedAttributes = newHashMap(); expectedAttributes.put("caseSignificanceId", ConflictingAttributeImpl.builder() .property("caseSignificanceId") - .oldValue(CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE.getConceptId()) - .value(CaseSignificance.CASE_INSENSITIVE.getConceptId()) + .oldValue(Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE) + .value(Concepts.ENTIRE_TERM_CASE_INSENSITIVE) .build()); expectedAttributes.put("moduleId", ConflictingAttributeImpl.builder() @@ -156,7 +154,7 @@ public void changedInSourceDetachedInTargetMergeConflict() { String memberId = createNewRefSetMember(branchPath); IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); Date nextEffectiveTime = getNextAvailableEffectiveDate(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME); String nextEffectiveTimeAsString = EffectiveTimes.format(nextEffectiveTime, DateFormats.SHORT); @@ -206,7 +204,7 @@ public void changedInSourceDetachedInTargetMergeConflict() { @Test public void addedInSourceAndTargetMergeConflict() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); String descriptionId = createNewDescription(branchPath); @@ -218,7 +216,7 @@ public void addedInSourceAndTargetMergeConflict() { .put("term", "Synonym of root concept") .put("languageCode", "en") .put("acceptability", SnomedApiTestConstants.UK_ACCEPTABLE_MAP) - .put("caseSignificance", CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE) + .put("caseSignificanceId", Concepts.ENTIRE_TERM_CASE_INSENSITIVE) .put("commitComment", "Created new synonym with duplicate SCTID") .build(); @@ -245,7 +243,7 @@ public void addedInTargetDetachedInSourceMergeConflict() { String conceptId = createNewConcept(branchPath); IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); deleteComponent(branchPath, SnomedComponentType.CONCEPT, conceptId, false).statusCode(204); String relationshipId = createNewRelationship(a, Concepts.ROOT_CONCEPT, Concepts.PART_OF, conceptId); @@ -274,7 +272,7 @@ public void addedInSourceDetachedInTargetMergeConflict() { String conceptId = createNewConcept(branchPath); IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, conceptId); deleteComponent(a, SnomedComponentType.CONCEPT, conceptId, false).statusCode(204); @@ -298,7 +296,7 @@ public void deleteReferencedComponentOnSourceMergeConflict() { String conceptId = createNewConcept(branchPath); IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); deleteComponent(branchPath, SnomedComponentType.CONCEPT, conceptId, false).statusCode(204); String memberId = createNewRefSetMember(a, conceptId); @@ -328,7 +326,7 @@ public void deleteReferencedComponentOnTargetMergeConflict() { String conceptId = createNewConcept(branchPath); IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); createNewRefSetMember(branchPath, conceptId); deleteComponent(a, SnomedComponentType.CONCEPT, conceptId, false).statusCode(204); @@ -352,7 +350,7 @@ public void noMergeNewDescriptionToUnrelatedBranch() { String conceptId = createNewConcept(branchPath); IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); /* * XXX: Creating a new description on the concept itself would result in a DELETED_WHILE_CHANGED conflict; @@ -361,7 +359,7 @@ public void noMergeNewDescriptionToUnrelatedBranch() { createNewDescription(a, Concepts.ROOT_CONCEPT, conceptId); IBranchPath b = BranchPathUtils.createPath(branchPath, "b"); - createBranch(b).statusCode(201); + branching.createBranch(b).statusCode(201); deleteComponent(b, SnomedComponentType.CONCEPT, conceptId, false).statusCode(204); @@ -385,12 +383,12 @@ public void noMergeNewRelationshipToUnrelatedBranch() { String conceptId = createNewConcept(branchPath); IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); createNewRelationship(a, Concepts.ROOT_CONCEPT, Concepts.PART_OF, conceptId); IBranchPath b = BranchPathUtils.createPath(branchPath, "b"); - createBranch(b).statusCode(201); + branching.createBranch(b).statusCode(201); deleteComponent(b, SnomedComponentType.CONCEPT, conceptId, false).statusCode(204); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedReviewApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedReviewApiTest.java index c04749fa261..a3e5b99816f 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedReviewApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/branches/SnomedReviewApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ */ package com.b2international.snowowl.snomed.core.rest.branches; -import static com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests.createBranch; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.deleteComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedRestFixtures.createNewConcept; import static com.b2international.snowowl.snomed.core.rest.SnomedRestFixtures.createNewDescription; @@ -89,7 +88,7 @@ public void createReviewRebaseMain() { @Test public void createRegularReview() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); String reviewId = getReviewJobId(createReview(a, branchPath)); @@ -104,7 +103,7 @@ public void reviewBeforeMerge() { String deletedConceptId = createNewConcept(branchPath); IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); String newConceptId = createNewConcept(a); createNewRelationship(a); @@ -126,7 +125,7 @@ public void reviewBeforeRebase() { String deletedConceptId = createNewConcept(branchPath); IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); String newConceptId = createNewConcept(branchPath); createNewRelationship(branchPath); @@ -148,7 +147,7 @@ public void reviewDescriptionInactivationRebase() { String descriptionId = createNewDescription(branchPath); IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); inactivateDescription(branchPath, descriptionId); @@ -165,7 +164,7 @@ public void reviewRelationshipInactivationRebase() { String relationshipId = createNewRelationship(branchPath); IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); inactivateRelationship(branchPath, relationshipId); @@ -181,12 +180,12 @@ public void reviewRelationshipInactivationRebase() { @Test public void reviewAfterParentRebase() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); String deletedConceptId = createNewConcept(a); IBranchPath b = BranchPathUtils.createPath(a, "b"); - createBranch(b).statusCode(201); + branching.createBranch(b).statusCode(201); deleteComponent(a, SnomedComponentType.CONCEPT, deletedConceptId, false).statusCode(204); String newConcept1Id = createNewConcept(a); @@ -216,12 +215,12 @@ public void reviewAfterParentRebase() { @Test public void reviewAfterParentMerge() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); String deletedConceptId = createNewConcept(a); IBranchPath b = BranchPathUtils.createPath(a, "b"); - createBranch(b).statusCode(201); + branching.createBranch(b).statusCode(201); deleteComponent(a, SnomedComponentType.CONCEPT, deletedConceptId, false).statusCode(204); String newConcept1Id = createNewConcept(a); @@ -254,7 +253,7 @@ public void reviewAfterParentMerge() { @Test public void deleteReviewAndChanges() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); String reviewId = getReviewJobId(createReview(a, branchPath)); waitForReviewJob(reviewId).body("status", equalTo(ReviewStatus.CURRENT.name())); @@ -269,7 +268,7 @@ public void deleteReviewAndChanges() { @Test public void setReviewStale() throws Exception { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); String reviewId = getReviewJobId(createReview(a, branchPath)); waitForReviewJob(reviewId).body("status", equalTo(ReviewStatus.CURRENT.name())); @@ -285,9 +284,9 @@ public void setReviewStale() throws Exception { @Test public void setReviewStaleAfterParentRebase() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); IBranchPath b = BranchPathUtils.createPath(a, "b"); - createBranch(b).statusCode(201); + branching.createBranch(b).statusCode(201); createNewConcept(branchPath); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/classification/SnomedClassificationApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/classification/SnomedClassificationApiTest.java index 80162230a28..c0bbc93b16d 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/classification/SnomedClassificationApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/classification/SnomedClassificationApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,8 +48,6 @@ import com.b2international.snowowl.core.api.IBranchPath; import com.b2international.snowowl.core.repository.JsonSupport; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; import com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest; @@ -75,7 +73,7 @@ public class SnomedClassificationApiTest extends AbstractSnomedApiTest { private static int getPersistedInferredRelationshipCount(IBranchPath conceptPath, String conceptId) { List> relationships = getComponent(conceptPath, SnomedComponentType.CONCEPT, conceptId, - "relationships(\"active\":true,\"characteristicType\":\"" + CharacteristicType.INFERRED_RELATIONSHIP.getConceptId() + "\")") + "relationships(\"active\":true,\"characteristicTypeId\":\"" + Concepts.INFERRED_RELATIONSHIP + "\")") .statusCode(200) .extract() .jsonPath() @@ -196,11 +194,11 @@ public void persistRedundantRelationship() throws Exception { String childConceptId = createNewConcept(branchPath, parentConceptId); // Add "regular" inferences before running the classification - createNewRelationship(branchPath, parentConceptId, Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); - createNewRelationship(branchPath, childConceptId, Concepts.IS_A, parentConceptId, CharacteristicType.INFERRED_RELATIONSHIP); + createNewRelationship(branchPath, parentConceptId, Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); + createNewRelationship(branchPath, childConceptId, Concepts.IS_A, parentConceptId, Concepts.INFERRED_RELATIONSHIP); // Add redundant information that should be removed - createNewRelationship(branchPath, childConceptId, Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + createNewRelationship(branchPath, childConceptId, Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); String classificationId = getClassificationJobId(beginClassification(branchPath)); waitForClassificationJob(branchPath, classificationId) @@ -237,13 +235,13 @@ public void testRedundantRelationshipModuleChange() throws Exception { String childConceptId = createNewConcept(branchPath, parentConceptId); // Add "regular" inferences before running the classification - createNewRelationship(branchPath, parentConceptId, Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); - createNewRelationship(branchPath, childConceptId, Concepts.IS_A, parentConceptId, CharacteristicType.INFERRED_RELATIONSHIP); + createNewRelationship(branchPath, parentConceptId, Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); + createNewRelationship(branchPath, childConceptId, Concepts.IS_A, parentConceptId, Concepts.INFERRED_RELATIONSHIP); // Add redundant information that should be removed Map relationshipRequestBody = createRelationshipRequestBody( childConceptId, Concepts.IS_A, Concepts.ROOT_CONCEPT, - Concepts.MODULE_SCT_MODEL_COMPONENT, CharacteristicType.INFERRED_RELATIONSHIP, 0) + Concepts.MODULE_SCT_MODEL_COMPONENT, Concepts.INFERRED_RELATIONSHIP, 0) .put("commitComment", "Created new relationship") .build(); @@ -297,11 +295,11 @@ public void issue_SO_2152_testGroupRenumbering() throws Exception { String conceptId = createNewConcept(branchPath); // Add "regular" inferences before running the classification - createNewRelationship(branchPath, conceptId, Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + createNewRelationship(branchPath, conceptId, Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); // Add new relationship to the root as stated createNewRelationship(branchPath); // Add the same relationship with a different group to the new concept as inferred - createNewRelationship(branchPath, conceptId, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.INFERRED_RELATIONSHIP, 5); + createNewRelationship(branchPath, conceptId, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.INFERRED_RELATIONSHIP, 5); String classificationId = getClassificationJobId(beginClassification(branchPath)); waitForClassificationJob(branchPath, classificationId) @@ -390,8 +388,8 @@ private static void assertInferredIsAExists(FluentIterable c && parentConceptId.equals(relationship.getDestinationId()) && relationship.getGroup() == 0 && relationship.getUnionGroup() == 0 - && RelationshipModifier.EXISTENTIAL.equals(relationship.getModifier()) - && CharacteristicType.INFERRED_RELATIONSHIP.equals(relationship.getCharacteristicType()); + && Concepts.EXISTENTIAL_RESTRICTION_MODIFIER.equals(relationship.getModifierId()) + && Concepts.INFERRED_RELATIONSHIP.equals(relationship.getCharacteristicTypeId()); })); } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedConceptApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedConceptApiTest.java index 3aa89aeafee..de733ad2017 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedConceptApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedConceptApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,7 @@ import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.createVersion; import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.getNextAvailableEffectiveDateAsString; import static com.b2international.snowowl.snomed.core.rest.SnomedApiTestConstants.UK_ACCEPTABLE_MAP; -import static com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests.createBranchRecursively; -import static com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests.deleteBranch; +import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.assertInactivation; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.createComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.deleteComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.getComponent; @@ -36,18 +35,18 @@ import static com.b2international.snowowl.snomed.core.rest.SnomedRestFixtures.reactivateConcept; import static com.b2international.snowowl.snomed.core.rest.SnomedRestFixtures.reserveComponentId; import static com.b2international.snowowl.test.commons.rest.RestExtensions.lastPathSegment; +import static com.google.common.collect.Maps.newHashMap; import static org.assertj.core.api.Assertions.assertThat; -import static org.hamcrest.CoreMatchers.allOf; import static org.hamcrest.CoreMatchers.endsWith; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.hasItem; -import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.CoreMatchers.nullValue; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.Collection; +import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Map; @@ -70,7 +69,13 @@ import com.b2international.snowowl.snomed.cis.domain.SctId; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.*; +import com.b2international.snowowl.snomed.core.domain.AssociationTarget; +import com.b2international.snowowl.snomed.core.domain.InactivationProperties; +import com.b2international.snowowl.snomed.core.domain.SnomedConcept; +import com.b2international.snowowl.snomed.core.domain.SnomedDescription; +import com.b2international.snowowl.snomed.core.domain.SnomedDescriptions; +import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; +import com.b2international.snowowl.snomed.core.domain.SnomedRelationships; import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMembers; @@ -82,6 +87,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; +import com.google.common.collect.Maps; import io.restassured.response.ValidatableResponse; @@ -182,7 +188,7 @@ public void createConceptWithReservedId() { @Test public void createConceptOnDeletedBranch() { - deleteBranch(branchPath); + branching.deleteBranch(branchPath); Map requestBody = createConceptRequestBody(Concepts.ROOT_CONCEPT) .put("commitComment", "Created new concept on deleted branch") @@ -232,42 +238,173 @@ public void testConceptInactivation() throws Exception { } @Test - public void testConceptReactivation() throws Exception { - // Create two concepts, add an additional relationship pointing from one to the other - String conceptId1 = createNewConcept(branchPath); - String conceptId2 = createNewConcept(branchPath); - String relationshipId = createNewRelationship(branchPath, conceptId1, Concepts.PART_OF, conceptId2); + public void reactivateConceptWithActiveParentAndInboundRelationship() throws Exception { + // Create two concepts, one that will be inactivated + String conceptWithReferenceToInactivatedConcept = createNewConcept(branchPath); + String conceptToInactivate = createNewConcept(branchPath); + // and an inbound relationship to the inactivated concept + String inboundStatedRelationshipId = createNewRelationship(branchPath, conceptWithReferenceToInactivatedConcept, Concepts.PART_OF, conceptToInactivate, Concepts.STATED_RELATIONSHIP); + // and an outbound inferred relationships, which will be reactivated along with the concept + String outboundInferredRelationshipId = createNewRelationship(branchPath, conceptToInactivate, Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); // Inactivate the concept with the relationship is pointing to + final InactivationProperties inactivationProperties = new InactivationProperties( + Concepts.DUPLICATE, + ImmutableList.of( + new AssociationTarget(Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION, conceptWithReferenceToInactivatedConcept) + ) + ); Map inactivationBody = ImmutableMap.builder() .put("active", false) - .put("inactivationIndicator", InactivationIndicator.DUPLICATE) - .put("associationTargets", ImmutableMap.of(AssociationType.POSSIBLY_EQUIVALENT_TO, ImmutableList.of(conceptId1))) + .put("inactivationProperties", inactivationProperties) .put("commitComment", "Inactivated concept") .build(); - updateComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, inactivationBody).statusCode(204); - getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, "inactivationProperties()").statusCode(200) - .body("active", equalTo(false)) - .body("inactivationIndicator", equalTo(InactivationIndicator.DUPLICATE.toString())) - .body("associationTargets." + AssociationType.POSSIBLY_EQUIVALENT_TO.name(), hasItem(conceptId1)); + updateComponent(branchPath, SnomedComponentType.CONCEPT, conceptToInactivate, inactivationBody) + .statusCode(204); + + getComponent(branchPath, SnomedComponentType.CONCEPT, conceptToInactivate, "inactivationProperties()") + .statusCode(200) + .body("active", equalTo(false)) + .body("inactivationProperties.inactivationIndicatorId", equalTo(Concepts.DUPLICATE)) + .body("inactivationProperties.associationTargets.referenceSetId", hasItem(Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION)) + .body("inactivationProperties.associationTargets.targetComponentId", hasItem(conceptWithReferenceToInactivatedConcept)); // Verify that the inbound relationship is inactive - getComponent(branchPath, SnomedComponentType.RELATIONSHIP, relationshipId).statusCode(200) - .body("active", equalTo(false)); + getComponent(branchPath, SnomedComponentType.RELATIONSHIP, inboundStatedRelationshipId) + .statusCode(200) + .body("active", equalTo(false)); // Reactivate the concept - reactivateConcept(branchPath, conceptId2); + reactivateConcept(branchPath, conceptToInactivate); + // verify that the inferred outbound relationship is active again + getComponent(branchPath, SnomedComponentType.RELATIONSHIP, outboundInferredRelationshipId) + .statusCode(200) + .body("active", equalTo(true)); + // Verify that the concept is active again, it has two active descriptions, no association targets, no indicator - getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, "inactivationProperties()").statusCode(200) - .body("active", equalTo(true)) - .body("inactivationIndicator", nullValue()) - .body("associationTargets", nullValue()); - + getComponent(branchPath, SnomedComponentType.CONCEPT, conceptToInactivate, "inactivationProperties()").statusCode(200) + .body("active", equalTo(true)) + .body("inactivationIndicator", nullValue()) + .body("associationTargets", nullValue()) + .body("parentIds", equalTo(ImmutableList.of(Concepts.ROOT_CONCEPT))) // verify the the inferred and stated hierarchy is back and valid + .body("statedParentIds", equalTo(ImmutableList.of(Concepts.ROOT_CONCEPT))) + .body("ancestorIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))) + .body("statedAncestorIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))); + // Verify that the inbound relationship is still inactive, meaning that manual reactivation is required - getComponent(branchPath, SnomedComponentType.RELATIONSHIP, relationshipId).statusCode(200) - .body("active", equalTo(false)); + getComponent(branchPath, SnomedComponentType.RELATIONSHIP, inboundStatedRelationshipId).statusCode(200) + .body("active", equalTo(false)); + } + + @Test + public void reactivateConceptWithInactiveParent() throws Exception { + // Create two concepts, one that will be inactivated + String inactiveParentConcept = createNewConcept(branchPath, createConceptRequestBody(ROOT_CONCEPT, Concepts.MODULE_SCT_CORE, SnomedApiTestConstants.UK_PREFERRED_MAP, false) + .put("commitComment", "Created new concept") + .build()); + String inactiveChildConcept = createNewConcept(branchPath, createConceptRequestBody(inactiveParentConcept, Concepts.MODULE_SCT_CORE, SnomedApiTestConstants.UK_PREFERRED_MAP, false) + .put("commitComment", "Created new concept") + .build()); + + // Reactivate the child concept + reactivateConcept(branchPath, inactiveChildConcept); + + // Verify that the concept is active again, no association targets, no indicator + getComponent(branchPath, SnomedComponentType.CONCEPT, inactiveChildConcept, "inactivationProperties()").statusCode(200) + .body("active", equalTo(true)) + .body("inactivationIndicator", nullValue()) + .body("associationTargets", nullValue()) + .body("parentIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))) + .body("statedParentIds", equalTo(ImmutableList.of(inactiveParentConcept))) + .body("ancestorIds", equalTo(ImmutableList.of())) + .body("statedAncestorIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))); + + // after reactivating the parent the child should have the proper parentage set + reactivateConcept(branchPath, inactiveParentConcept); + + getComponent(branchPath, SnomedComponentType.CONCEPT, inactiveParentConcept, "inactivationProperties()").statusCode(200) + .body("active", equalTo(true)) + .body("inactivationIndicator", nullValue()) + .body("associationTargets", nullValue()) + .body("parentIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))) + .body("statedParentIds", equalTo(ImmutableList.of(Concepts.ROOT_CONCEPT))) + .body("ancestorIds", equalTo(ImmutableList.of())) + .body("statedAncestorIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))); + + getComponent(branchPath, SnomedComponentType.CONCEPT, inactiveChildConcept, "inactivationProperties()").statusCode(200) + .body("active", equalTo(true)) + .body("inactivationIndicator", nullValue()) + .body("associationTargets", nullValue()) + .body("parentIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))) + .body("statedParentIds", equalTo(ImmutableList.of(inactiveParentConcept))) + .body("ancestorIds", equalTo(ImmutableList.of())) + .body("statedAncestorIds", equalTo(ImmutableList.of(Concepts.ROOT_CONCEPT, IComponent.ROOT_ID))); + } + + @Test + public void reactivateConceptWithInactiveParentRelationshipsFirst() throws Exception { + // Create two concepts, one that will be inactivated + String inactiveParentConcept = createNewConcept(branchPath, createConceptRequestBody(ROOT_CONCEPT, Concepts.MODULE_SCT_CORE, SnomedApiTestConstants.UK_PREFERRED_MAP, false) + .put("commitComment", "Created new concept") + .build()); + String inactiveChildConcept = createNewConcept(branchPath, createConceptRequestBody(inactiveParentConcept, Concepts.MODULE_SCT_CORE, SnomedApiTestConstants.UK_PREFERRED_MAP, false) + .put("commitComment", "Created new concept") + .build()); + + final Map concept = getComponent(branchPath, SnomedComponentType.CONCEPT, inactiveChildConcept, "relationships()") + .statusCode(200) + .extract().as(Map.class); + // Reactivate relationships first + final List> relationshipItems = (List>) ((Map) concept.get("relationships")).get("items"); + relationshipItems.forEach(relationship -> { + final Map updatedRelationship = newHashMap(relationship); + updatedRelationship.put("active", true); + updatedRelationship.put("commitComment", "Reactivate Relationship"); + updateComponent(branchPath, SnomedComponentType.RELATIONSHIP, (String) relationship.get("id"), updatedRelationship).statusCode(204); + }); + + // Reactivate the child concept + final Map reactivationRequest = Maps.newHashMap(concept); + reactivationRequest.put("active", true); + reactivationRequest.remove("inactivationIndicator"); + reactivationRequest.remove("associationTargets"); + reactivationRequest.remove("relationships"); //remove relationships from concept update call + reactivationRequest.put("commitComment", "Reactivated concept"); + + updateComponent(branchPath, SnomedComponentType.CONCEPT, inactiveChildConcept, reactivationRequest).statusCode(204); + + // Verify that the concept is active again, no association targets, no indicator + getComponent(branchPath, SnomedComponentType.CONCEPT, inactiveChildConcept, "inactivationProperties()").statusCode(200) + .body("active", equalTo(true)) + .body("inactivationIndicator", nullValue()) + .body("associationTargets", nullValue()) + .body("parentIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))) + .body("statedParentIds", equalTo(ImmutableList.of(inactiveParentConcept))) + .body("ancestorIds", equalTo(ImmutableList.of())) + .body("statedAncestorIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))); + + // after reactivating the parent the child should have the proper parentage set + reactivateConcept(branchPath, inactiveParentConcept); + + getComponent(branchPath, SnomedComponentType.CONCEPT, inactiveParentConcept, "inactivationProperties()").statusCode(200) + .body("active", equalTo(true)) + .body("inactivationIndicator", nullValue()) + .body("associationTargets", nullValue()) + .body("parentIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))) + .body("statedParentIds", equalTo(ImmutableList.of(Concepts.ROOT_CONCEPT))) + .body("ancestorIds", equalTo(ImmutableList.of())) + .body("statedAncestorIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))); + + getComponent(branchPath, SnomedComponentType.CONCEPT, inactiveChildConcept, "inactivationProperties()").statusCode(200) + .body("active", equalTo(true)) + .body("inactivationIndicator", nullValue()) + .body("associationTargets", nullValue()) + .body("parentIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))) + .body("statedParentIds", equalTo(ImmutableList.of(inactiveParentConcept))) + .body("ancestorIds", equalTo(ImmutableList.of())) + .body("statedAncestorIds", equalTo(ImmutableList.of(Concepts.ROOT_CONCEPT, IComponent.ROOT_ID))); } @Test @@ -304,85 +441,56 @@ public void restoreEffectiveTimeOnReleasedConcept() throws Exception { @Test public void updateAssociationTarget() throws Exception { - String conceptId1 = createNewConcept(branchPath); - String conceptId2 = createNewConcept(branchPath); - String conceptId3 = createNewConcept(branchPath); - - // Inactivate the duplicate concept and point to the other one - Map inactivationRequestBody = ImmutableMap.builder() - .put("active", false) - .put("inactivationIndicator", InactivationIndicator.DUPLICATE) - .put("associationTargets", ImmutableMap.of(AssociationType.POSSIBLY_EQUIVALENT_TO, ImmutableList.of(conceptId1))) - .put("commitComment", "Inactivated concept") - .build(); - - updateComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, inactivationRequestBody).statusCode(204); - getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, "inactivationProperties()").statusCode(200) - .body("active", equalTo(false)) - .body("inactivationIndicator", equalTo(InactivationIndicator.DUPLICATE.toString())) - .body("associationTargets." + AssociationType.POSSIBLY_EQUIVALENT_TO.name(), hasItem(conceptId1)); - - // Update the inactivation reason and association target properties - Map updateRequestBody = ImmutableMap.builder() - .put("active", false) - .put("inactivationIndicator", InactivationIndicator.AMBIGUOUS) - .put("associationTargets", ImmutableMap.of(AssociationType.REPLACED_BY, ImmutableList.of(conceptId3))) - .put("commitComment", "Changed inactivation reason and association target") - .build(); - - updateComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, updateRequestBody).statusCode(204); - - // Verify association target and inactivation indicator update - getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, "inactivationProperties()").statusCode(200) - .body("active", equalTo(false)) - .body("inactivationIndicator", equalTo(InactivationIndicator.AMBIGUOUS.toString())) - .body("associationTargets." + AssociationType.POSSIBLY_EQUIVALENT_TO.name(), nullValue()) - .body("associationTargets." + AssociationType.REPLACED_BY.name(), allOf(hasItem(conceptId3), not(hasItem(conceptId1)))); + String conceptToInactivate = createNewConcept(branchPath); + String firstAssociationTarget = createNewConcept(branchPath); + String secondAssociationTarget = createNewConcept(branchPath); + + // Inactivate the concept first pointing to the first association target + assertInactivation( + branchPath, + conceptToInactivate, + new InactivationProperties(Concepts.DUPLICATE, ImmutableList.of( + new AssociationTarget(Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION, firstAssociationTarget) + )) + ); + + // Inactivate again, this time it will update the inactivation reason and association target properties + assertInactivation( + branchPath, + conceptToInactivate, + new InactivationProperties(Concepts.AMBIGUOUS, ImmutableList.of( + new AssociationTarget(Concepts.REFSET_REPLACED_BY_ASSOCIATION, secondAssociationTarget) + )) + ); } - + @Test public void updateAssociationTargetWithReuse() throws Exception { - String conceptId1 = createNewConcept(branchPath); - String conceptId2 = createNewConcept(branchPath); - String conceptId3 = createNewConcept(branchPath); - String conceptId4 = createNewConcept(branchPath); + String conceptToInactivate = createNewConcept(branchPath); + String firstAssociationTarget = createNewConcept(branchPath); + String secondAssociationTarget = createNewConcept(branchPath); + String thirdAssociationTarget = createNewConcept(branchPath); // Inactivate the duplicate concept and point to the other one - Map inactivationRequestBody = ImmutableMap.builder() - .put("active", false) - .put("inactivationIndicator", InactivationIndicator.DUPLICATE) - .put("associationTargets", ImmutableMap.of(AssociationType.POSSIBLY_EQUIVALENT_TO, ImmutableList.of(conceptId1))) - .put("commitComment", "Inactivated concept") - .build(); - - updateComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, inactivationRequestBody).statusCode(204); - Collection memberIds = getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, - "members()", "inactivationProperties()").statusCode(200) - .body("active", equalTo(false)) - .body("inactivationIndicator", equalTo(InactivationIndicator.DUPLICATE.toString())) - .body("associationTargets." + AssociationType.POSSIBLY_EQUIVALENT_TO.name(), hasItem(conceptId1)) - .extract().path("members.items.id"); - + Collection memberIds = assertInactivation( + branchPath, + conceptToInactivate, + new InactivationProperties(Concepts.DUPLICATE, ImmutableList.of( + new AssociationTarget(Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION, firstAssociationTarget) + )) + ).extract().path("members.items.id"); assertEquals(2, memberIds.size()); - // Update the inactivation reason and association target - Map updateRequestBody = ImmutableMap.builder() - .put("active", false) - .put("inactivationIndicator", InactivationIndicator.AMBIGUOUS) - .put("associationTargets", ImmutableMap.of( - AssociationType.POSSIBLY_EQUIVALENT_TO, ImmutableList.of(conceptId3, conceptId1), - AssociationType.REPLACED_BY, ImmutableList.of(conceptId4))) - .put("commitComment", "Changed inactivation reason and association targets") - .build(); - - updateComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, updateRequestBody).statusCode(204); - Collection updatedMemberIds = getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, - "members()", "inactivationProperties()").statusCode(200) - .body("active", equalTo(false)) - .body("inactivationIndicator", equalTo(InactivationIndicator.AMBIGUOUS.toString())) - .body("associationTargets." + AssociationType.POSSIBLY_EQUIVALENT_TO.name(), allOf(hasItem(conceptId3), hasItem(conceptId1))) - .body("associationTargets." + AssociationType.REPLACED_BY.name(), hasItem(conceptId4)) - .extract().path("members.items.id"); + // Inactivate again, this time it will update the inactivation reason and association target properties + Collection updatedMemberIds = assertInactivation( + branchPath, + conceptToInactivate, + new InactivationProperties(Concepts.AMBIGUOUS, ImmutableList.of( + new AssociationTarget(Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION, firstAssociationTarget), + new AssociationTarget(Concepts.REFSET_REPLACED_BY_ASSOCIATION, secondAssociationTarget), + new AssociationTarget(Concepts.REFSET_REPLACED_BY_ASSOCIATION, thirdAssociationTarget) + )) + ).extract().path("members.items.id"); // Verify that the member UUIDs have not been cycled assertEquals(4, updatedMemberIds.size()); @@ -391,46 +499,28 @@ public void updateAssociationTargetWithReuse() throws Exception { @Test public void updateAssociationTargetWithDefaultModule() throws Exception { - String conceptId1 = createNewConcept(branchPath); - String conceptId2 = createNewConcept(branchPath); - String conceptId3 = createNewConcept(branchPath); + String conceptToInactivate = createNewConcept(branchPath); + String firstAssociationTarget = createNewConcept(branchPath); + String secondAssociationTarget = createNewConcept(branchPath); // Inactivate the duplicate concept and point to the other one - Map inactivationRequestBody = ImmutableMap.builder() - .put("active", false) - .put("inactivationIndicator", InactivationIndicator.DUPLICATE) - .put("associationTargets", ImmutableMap.of(AssociationType.POSSIBLY_EQUIVALENT_TO, ImmutableList.of(conceptId1))) - .put("commitComment", "Inactivated concept") - .build(); - - updateComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, inactivationRequestBody) - .statusCode(204); - - getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, "inactivationProperties()") - .statusCode(200) - .body("active", equalTo(false)) - .body("inactivationIndicator", equalTo(InactivationIndicator.DUPLICATE.toString())) - .body("associationTargets." + AssociationType.POSSIBLY_EQUIVALENT_TO.name(), hasItem(conceptId1)); + assertInactivation( + branchPath, + conceptToInactivate, + new InactivationProperties(Concepts.DUPLICATE, ImmutableList.of( + new AssociationTarget(Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION, firstAssociationTarget) + )) + ); // Update the inactivation reason and association target properties, specifying the module - Map updateRequestBody = ImmutableMap.builder() - .put("active", false) - .put("inactivationIndicator", InactivationIndicator.AMBIGUOUS) - .put("associationTargets", ImmutableMap.of(AssociationType.REPLACED_BY, ImmutableList.of(conceptId3))) - .put("commitComment", "Changed inactivation reason and association target") - .put("defaultModuleId", "449081005") // SNOMED CT Spanish edition module - .build(); - - updateComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, updateRequestBody) - .statusCode(204); - - // Verify association target and inactivation indicator update - final ValidatableResponse response = getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId2, "inactivationProperties(),members()") - .statusCode(200) - .body("active", equalTo(false)) - .body("inactivationIndicator", equalTo(InactivationIndicator.AMBIGUOUS.toString())) - .body("associationTargets." + AssociationType.POSSIBLY_EQUIVALENT_TO.name(), nullValue()) - .body("associationTargets." + AssociationType.REPLACED_BY.name(), allOf(hasItem(conceptId3), not(hasItem(conceptId1)))); + final ValidatableResponse response = assertInactivation( + branchPath, + conceptToInactivate, + new InactivationProperties(Concepts.AMBIGUOUS, ImmutableList.of( + new AssociationTarget(Concepts.REFSET_REPLACED_BY_ASSOCIATION, secondAssociationTarget) + )), + "449081005" // defaultModuleId + ); // Check that the default module is honored final SnomedReferenceSetMembers refSetMembers = response.extract() @@ -449,18 +539,14 @@ public void updateInactivationIndicatorOnActiveConcept() throws Exception { // ensure that the concept does not have any indicator set before the update getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId, "inactivationProperties()") .statusCode(200) - .body("inactivationIndicator", nullValue()); + .body("inactivationProperties.inactivationIndicator", nullValue()); // Inactivate the duplicate concept and point to the other one - Map updateReq = ImmutableMap.builder() - .put("inactivationIndicator", InactivationIndicator.PENDING_MOVE) - .put("commitComment", "Add a pending move indicator to an active concept") - .build(); - updateComponent(branchPath, SnomedComponentType.CONCEPT, conceptId, updateReq) - .statusCode(204); - getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId, "inactivationProperties()") - .statusCode(200) - .body("inactivationIndicator", equalTo(InactivationIndicator.PENDING_MOVE.toString())); + assertInactivation( + branchPath, + conceptId, + new InactivationProperties(Concepts.PENDING_MOVE, ImmutableList.of()) + ); } @Test @@ -478,13 +564,14 @@ public void updateInactivationIndicatorOnActiveConceptWithAssociationTargets() t // ensure that the concept does not have any indicator set before the update SnomedReferenceSetMembers currentMembers = getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId, "inactivationProperties(),members()") .statusCode(200) - .body("inactivationIndicator", nullValue()) - .body("associationTargets", equalTo(ImmutableMap.of(AssociationType.POSSIBLY_EQUIVALENT_TO.name(), ImmutableList.of(Concepts.ROOT_CONCEPT)))) + .body("inactivationProperties.inactivationIndicatorId", nullValue()) + .body("inactivationProperties.associationTargets.referenceSetId", equalTo(ImmutableList.of(Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION))) + .body("inactivationProperties.associationTargets.targetComponentId", equalTo(ImmutableList.of(Concepts.ROOT_CONCEPT))) .extract() .jsonPath().getObject("members", SnomedReferenceSetMembers.class); Map updateReq = ImmutableMap.builder() - .put("inactivationIndicator", InactivationIndicator.PENDING_MOVE) + .put("inactivationProperties", new InactivationProperties(Concepts.PENDING_MOVE, ImmutableList.of(new AssociationTarget(Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION, Concepts.ROOT_CONCEPT)))) // XXX also pass the current members to the update, without the fix this would cause duplicate association members .put("members", currentMembers) .put("commitComment", "Add a pending move indicator to an active concept") @@ -493,8 +580,9 @@ public void updateInactivationIndicatorOnActiveConceptWithAssociationTargets() t .statusCode(204); List memberIds = getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId, "inactivationProperties(),members()") .statusCode(200) - .body("inactivationIndicator", equalTo(InactivationIndicator.PENDING_MOVE.toString())) - .body("associationTargets", equalTo(ImmutableMap.of(AssociationType.POSSIBLY_EQUIVALENT_TO.name(), ImmutableList.of(Concepts.ROOT_CONCEPT)))) + .body("inactivationProperties.inactivationIndicatorId", equalTo(Concepts.PENDING_MOVE)) + .body("inactivationProperties.associationTargets.referenceSetId", equalTo(ImmutableList.of(Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION))) + .body("inactivationProperties.associationTargets.targetComponentId", equalTo(ImmutableList.of(Concepts.ROOT_CONCEPT))) .extract().path("members.items.id"); assertThat(memberIds.remove(associationMemberId)).isTrue(); @@ -531,7 +619,7 @@ public void deleteConceptOnNestedBranch() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); IBranchPath b = BranchPathUtils.createPath(a, "b"); - createBranchRecursively(b); + branching.createBranchRecursively(b); // New component on nested branch resets the container's version to 1 again createNewConcept(b, parentId); @@ -609,7 +697,7 @@ public void addDescriptionViaConceptUpdate() throws Exception { newTextDefinition.setTypeId(Concepts.TEXT_DEFINITION); newTextDefinition.setTerm("Text Definiton " + new Date()); newTextDefinition.setLanguageCode("en"); - newTextDefinition.setCaseSignificance(CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE); + newTextDefinition.setCaseSignificanceId(Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE); newTextDefinition.setModuleId(Concepts.MODULE_SCT_CORE); List changedDescriptions = ImmutableList.builder() @@ -643,13 +731,13 @@ public void addRelationshipViaConceptUpdate() throws Exception { SnomedRelationship newRelationship = new SnomedRelationship(); newRelationship.setId(reserveComponentId(null, ComponentCategory.RELATIONSHIP)); newRelationship.setActive(true); - newRelationship.setCharacteristicType(CharacteristicType.STATED_RELATIONSHIP); + newRelationship.setCharacteristicTypeId(Concepts.STATED_RELATIONSHIP); newRelationship.setTypeId(Concepts.PART_OF); newRelationship.setDestinationId(Concepts.NAMESPACE_ROOT); newRelationship.setModuleId(Concepts.MODULE_SCT_CORE); newRelationship.setGroup(0); newRelationship.setUnionGroup(0); - newRelationship.setModifier(RelationshipModifier.EXISTENTIAL); + newRelationship.setModifierId(Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); final List changedRelationships = ImmutableList.builder() .addAll(concept.getRelationships()) @@ -866,7 +954,7 @@ public void createConceptWithOwlAxiomMemberWithSubClassOfExpression() throws Exc assertNotNull(conceptWithAxiomMember); assertEquals(1, conceptWithAxiomMember.getMembers().getTotal()); - assertEquals(DefinitionStatus.PRIMITIVE, conceptWithAxiomMember.getDefinitionStatus()); + assertEquals(Concepts.PRIMITIVE, conceptWithAxiomMember.getDefinitionStatusId()); } @Test @@ -896,7 +984,7 @@ public void createConceptWithOwlAxiomMemberWithEquivalentClassesExpression() thr assertNotNull(conceptWithAxiomMember); assertEquals(1, conceptWithAxiomMember.getMembers().getTotal()); - assertEquals(DefinitionStatus.FULLY_DEFINED, conceptWithAxiomMember.getDefinitionStatus()); + assertEquals(Concepts.FULLY_DEFINED, conceptWithAxiomMember.getDefinitionStatusId()); } @Test @@ -925,7 +1013,7 @@ public void createConceptWithOwlAxiomMemberWithComplexSubClassOfExpressionShould assertNotNull(conceptWithAxiomMember); assertEquals(1, conceptWithAxiomMember.getMembers().getTotal()); - assertEquals(DefinitionStatus.PRIMITIVE, conceptWithAxiomMember.getDefinitionStatus()); + assertEquals(Concepts.PRIMITIVE, conceptWithAxiomMember.getDefinitionStatusId()); } @Test @@ -944,7 +1032,7 @@ public void createConceptWithoutOwlAxiomMembersConceptDefinitionStatusShouldDefa .getSync(); assertNotNull(concept); - assertEquals(DefinitionStatus.PRIMITIVE, concept.getDefinitionStatus()); + assertEquals(Concepts.PRIMITIVE, concept.getDefinitionStatusId()); } @Test @@ -953,7 +1041,7 @@ public void testUpdateConceptDefinitionStatusWithoutAxiomMembers() { // Update the definition status on concept Map updateRequestBody = ImmutableMap.builder() - .put("definitionStatus", DefinitionStatus.FULLY_DEFINED) + .put("definitionStatusId", Concepts.FULLY_DEFINED) .put("commitComment", "Changed definition status of concept to fully defined") .build(); @@ -961,7 +1049,7 @@ public void testUpdateConceptDefinitionStatusWithoutAxiomMembers() { // Verify change of definition status on concept getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId, "").statusCode(200) - .body("definitionStatus", equalTo(DefinitionStatus.FULLY_DEFINED.toString())); + .body("definitionStatusId", equalTo(Concepts.FULLY_DEFINED)); } @Test @@ -970,7 +1058,7 @@ public void testUpdateConceptDefinitionStatusWithAxiomMembersShouldNotChange() { // Update the definition status on concept final Map definitionStatusUpdateRequestBody = ImmutableMap.builder() - .put("definitionStatus", DefinitionStatus.FULLY_DEFINED) + .put("definitionStatusId", Concepts.FULLY_DEFINED) .put("commitComment", "Changed definition status of concept to fully defined") .build(); @@ -992,7 +1080,7 @@ public void testUpdateConceptDefinitionStatusWithAxiomMembersShouldNotChange() { final Map updateRequestBody = ImmutableMap.builder() .put("members", SnomedReferenceSetMembers.of(changedMembers)) - .put("definitionStatus", DefinitionStatus.PRIMITIVE) + .put("definitionStatusId", Concepts.PRIMITIVE) .put("commitComment", "Add new reference set member via concept update") .build(); @@ -1005,7 +1093,7 @@ public void testUpdateConceptDefinitionStatusWithAxiomMembersShouldNotChange() { assertEquals(1, updatedConcept.getMembers().getTotal()); // Verify that definition status is still fully defined - assertEquals(DefinitionStatus.FULLY_DEFINED, updatedConcept.getDefinitionStatus()); + assertEquals(Concepts.FULLY_DEFINED, updatedConcept.getDefinitionStatusId()); } @Test @@ -1040,7 +1128,7 @@ public void testUpdateConceptDefinitionStatusWithEquivalentClassesAxiomMember() assertEquals(1, updatedConcept.getMembers().getTotal()); // Verify that definition status was updated to FULLY DEFINED - assertEquals(DefinitionStatus.FULLY_DEFINED, updatedConcept.getDefinitionStatus()); + assertEquals(Concepts.FULLY_DEFINED, updatedConcept.getDefinitionStatusId()); } @Test @@ -1049,7 +1137,7 @@ public void testUpdateConceptDefinitionStatusWithSubClassOfAxiomMemberShouldChan // Update the definition status on concept final Map definitionStatusUpdateRequestBody = ImmutableMap.builder() - .put("definitionStatus", DefinitionStatus.FULLY_DEFINED) + .put("definitionStatusId", Concepts.FULLY_DEFINED) .put("commitComment", "Changed definition status of concept to fully defined") .build(); @@ -1082,7 +1170,7 @@ public void testUpdateConceptDefinitionStatusWithSubClassOfAxiomMemberShouldChan assertEquals(1, updatedConcept.getMembers().getTotal()); // Verify that definition status was updated to FULLY DEFINED - assertEquals(DefinitionStatus.PRIMITIVE, updatedConcept.getDefinitionStatus()); + assertEquals(Concepts.PRIMITIVE, updatedConcept.getDefinitionStatusId()); } @Test @@ -1097,7 +1185,7 @@ public void testPendingMoveUpdateOnConceptWithSetDescriptions() { final List descriptions = conceptBeforeDescriptionPendingMoveChanges.getDescriptions() .stream() .map(desc -> { - desc.setInactivationIndicator(DescriptionInactivationIndicator.PENDING_MOVE); + desc.setInactivationProperties(new InactivationProperties(Concepts.PENDING_MOVE, Collections.emptyList())); desc.setActive(false); return desc; }).collect(Collectors.toList()); @@ -1116,7 +1204,7 @@ public void testPendingMoveUpdateOnConceptWithSetDescriptions() { conceptAfterDescriptionPendingMoveChanges.getDescriptions().forEach(desc -> { // Check descriptions inactivation indicator - assertEquals(DescriptionInactivationIndicator.PENDING_MOVE, desc.getInactivationIndicator()); + assertEquals(Concepts.PENDING_MOVE, desc.getInactivationProperties().getInactivationIndicatorId()); }); } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedDescriptionApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedDescriptionApiTest.java index dba820bc4da..a3afb3c6024 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedDescriptionApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedDescriptionApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.createCodeSystemAndVersion; import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.createVersion; import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.getNextAvailableEffectiveDateAsString; -import static com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests.createBranchRecursively; +import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.assertInactivation; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.createComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.deleteComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.getComponent; @@ -46,6 +46,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.UUID; @@ -57,18 +58,14 @@ import com.b2international.index.revision.RevisionIndex; import com.b2international.index.revision.TimestampProvider; import com.b2international.snowowl.core.ApplicationContext; -import com.b2international.snowowl.core.RepositoryInfo; import com.b2international.snowowl.core.RepositoryManager; -import com.b2international.snowowl.core.RepositoryInfo.Health; import com.b2international.snowowl.core.api.IBranchPath; import com.b2international.snowowl.core.domain.TransactionContext; import com.b2international.snowowl.core.events.bulk.BulkRequest; import com.b2international.snowowl.core.events.bulk.BulkRequestBuilder; -import com.b2international.snowowl.core.repository.DefaultRepositoryContext; import com.b2international.snowowl.core.setup.Environment; import com.b2international.snowowl.core.terminology.ComponentCategory; import com.b2international.snowowl.datastore.BranchPathUtils; -import com.b2international.snowowl.datastore.request.IndexReadRequest; import com.b2international.snowowl.datastore.request.RepositoryRequest; import com.b2international.snowowl.snomed.cis.ISnomedIdentifierService; import com.b2international.snowowl.snomed.cis.domain.IdentifierStatus; @@ -76,9 +73,8 @@ import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.AssociationType; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; -import com.b2international.snowowl.snomed.core.domain.DescriptionInactivationIndicator; +import com.b2international.snowowl.snomed.core.domain.AssociationTarget; +import com.b2international.snowowl.snomed.core.domain.InactivationProperties; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; @@ -193,7 +189,7 @@ public void createDuplicateDescription() { public void createDescriptionCaseInsensitive() { Map requestBody = createDescriptionRequestBody(Concepts.ROOT_CONCEPT, Concepts.SYNONYM, Concepts.MODULE_SCT_CORE, SnomedApiTestConstants.UK_ACCEPTABLE_MAP, - CaseSignificance.CASE_INSENSITIVE) + Concepts.ENTIRE_TERM_CASE_INSENSITIVE) .put("commitComment", "Created new description with case insensitive significance") .build(); @@ -202,7 +198,7 @@ public void createDescriptionCaseInsensitive() { .extract().header("Location")); getComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId).statusCode(200) - .body("caseSignificance", equalTo(CaseSignificance.CASE_INSENSITIVE.name())); + .body("caseSignificanceId", equalTo(Concepts.ENTIRE_TERM_CASE_INSENSITIVE)); } @Test @@ -311,84 +307,60 @@ public void testReactivateThenInactivateDescription() throws Exception { @Test public void inactivateWithIndicator() { String descriptionId = createNewDescription(branchPath); - Map requestBody = ImmutableMap.builder() - .put("active", false) - .put("inactivationIndicator", DescriptionInactivationIndicator.DUPLICATE) - .put("commitComment", "Inactivated description with indicator") - .build(); - - updateComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId, requestBody).statusCode(204); - getComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId, "inactivationProperties()").statusCode(200) - .body("active", equalTo(false)) - .body("inactivationIndicator", equalTo(DescriptionInactivationIndicator.DUPLICATE.name())); + assertInactivation( + branchPath, + descriptionId, + new InactivationProperties(Concepts.DUPLICATE, Collections.emptyList()) + ); } @Test public void inactivateWithIndicatorAndAssociationTarget() { - String description1Id = createNewDescription(branchPath); - String description2Id = createNewDescription(branchPath); - - Map requestBody = ImmutableMap.builder() - .put("active", false) - .put("inactivationIndicator", DescriptionInactivationIndicator.DUPLICATE) - .put("associationTargets", ImmutableMap.of(AssociationType.POSSIBLY_EQUIVALENT_TO.name(), ImmutableList.of(description1Id))) - .put("commitComment", "Inactivated description with indicator and association target") - .build(); + String descriptionToInactivate = createNewDescription(branchPath); + String associationTarget = createNewDescription(branchPath); - updateComponent(branchPath, SnomedComponentType.DESCRIPTION, description2Id, requestBody).statusCode(204); - getComponent(branchPath, SnomedComponentType.DESCRIPTION, description2Id, "inactivationProperties()").statusCode(200) - .body("active", equalTo(false)) - .body("inactivationIndicator", equalTo(DescriptionInactivationIndicator.DUPLICATE.name())) - .body("associationTargets." + AssociationType.POSSIBLY_EQUIVALENT_TO.name(), hasItem(description1Id)); + assertInactivation( + branchPath, + descriptionToInactivate, + new InactivationProperties(Concepts.DUPLICATE, ImmutableList.of(new AssociationTarget(Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION, associationTarget))) + ); } @Test public void updateIndicatorAfterInactivation() { - String descriptionId = createNewDescription(branchPath); - Map inactivationRequestBody = ImmutableMap.builder() - .put("active", false) - .put("inactivationIndicator", DescriptionInactivationIndicator.DUPLICATE) - .put("commitComment", "Inactivated description with indicator") - .build(); - - updateComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId, inactivationRequestBody).statusCode(204); - getComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId, "inactivationProperties()").statusCode(200) - .body("active", equalTo(false)) - .body("inactivationIndicator", equalTo(DescriptionInactivationIndicator.DUPLICATE.name())); - - Map updateRequestBody = ImmutableMap.builder() - .put("active", false) - .put("inactivationIndicator", DescriptionInactivationIndicator.OUTDATED) - .put("commitComment", "Updated inactivation indicator on description") - .build(); + String descriptionToInactivate = createNewDescription(branchPath); + + assertInactivation( + branchPath, + descriptionToInactivate, + new InactivationProperties(Concepts.DUPLICATE, Collections.emptyList()) + ); - updateComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId, updateRequestBody).statusCode(204); - getComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId, "inactivationProperties()").statusCode(200) - .body("active", equalTo(false)) - .body("inactivationIndicator", equalTo(DescriptionInactivationIndicator.OUTDATED.name())); + assertInactivation( + branchPath, + descriptionToInactivate, + new InactivationProperties(Concepts.OUTDATED, Collections.emptyList()) + ); } @Test public void updateInactivationIndicatorOnActiveReleasedDescription() throws Exception { - String descriptionId = createNewDescription(branchPath); - Map inactivationRequestBody = ImmutableMap.builder() - .put("inactivationIndicator", DescriptionInactivationIndicator.PENDING_MOVE) - .put("commitComment", "Add pending move to description") - .build(); - updateComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId, inactivationRequestBody).statusCode(204); - getComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId, "inactivationProperties()").statusCode(200) - .body("inactivationIndicator", equalTo(DescriptionInactivationIndicator.PENDING_MOVE.name())); + String descriptionToInactivate = createNewDescription(branchPath); + + assertInactivation( + branchPath, + descriptionToInactivate, + new InactivationProperties(Concepts.PENDING_MOVE, Collections.emptyList()) + ); // release component createCodeSystemAndVersion(branchPath, "SNOMEDCT-RELDESC-INACTIVATIONINDICATOR", "v1", "20180701"); - Map updateRequestBody = ImmutableMap.builder() - .put("inactivationIndicator", DescriptionInactivationIndicator.CONCEPT_NON_CURRENT) - .put("commitComment", "Updated inactivation indicator on description") - .build(); - - updateComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId, updateRequestBody).statusCode(204); - SnomedDescription description = getComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId, "members()").statusCode(200).extract().as(SnomedDescription.class); + SnomedDescription description = assertInactivation( + branchPath, + descriptionToInactivate, + new InactivationProperties(Concepts.CONCEPT_NON_CURRENT, Collections.emptyList()) + ).extract().as(SnomedDescription.class); SnomedReferenceSetMember inactivationIndicator = description.getMembers().stream() .filter(member -> Concepts.REFSET_DESCRIPTION_INACTIVITY_INDICATOR.equals(member.getReferenceSetId())) @@ -404,13 +376,13 @@ public void updateCaseSignificance() { String descriptionId = createNewDescription(branchPath); Map inactivationRequestBody = ImmutableMap.builder() .put("active", false) - .put("caseSignificance", CaseSignificance.CASE_INSENSITIVE) + .put("caseSignificanceId", Concepts.ENTIRE_TERM_CASE_INSENSITIVE) .put("commitComment", "Updated description case significance") .build(); updateComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId, inactivationRequestBody).statusCode(204); getComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId).statusCode(200) - .body("caseSignificance", equalTo(CaseSignificance.CASE_INSENSITIVE.name())); + .body("caseSignificanceId", equalTo(Concepts.ENTIRE_TERM_CASE_INSENSITIVE)); } @Test @@ -598,7 +570,7 @@ public void updateAcceptabilityWithRemove() throws Exception { public void createDescriptionOnNestedBranch() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); IBranchPath b = BranchPathUtils.createPath(a, "b"); - createBranchRecursively(b); + branching.createBranchRecursively(b); String descriptionId = createNewDescription(b); @@ -619,7 +591,7 @@ public void deleteDescriptionOnNestedBranch() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); IBranchPath b = BranchPathUtils.createPath(a, "b"); - createBranchRecursively(b); + branching.createBranchRecursively(b); // New description on nested branch resets the concept's version to 1 again createNewDescription(b, conceptId); @@ -656,18 +628,16 @@ public void testDuplicateMemberCleanupEmptiesAcceptabilityMap() throws Exception .field(SnomedRf2Headers.FIELD_ACCEPTABILITY_ID, Concepts.REFSET_DESCRIPTION_ACCEPTABILITY_PREFERRED) .build(); - new RepositoryRequest<>(SnomedDatastoreActivator.REPOSITORY_UUID, new IndexReadRequest<>( - context -> { - ApplicationContext.getServiceForClass(RepositoryManager.class) - .get(SnomedDatastoreActivator.REPOSITORY_UUID) - .service(RevisionIndex.class) - .prepareCommit(branchPath.getPath()) - .stageNew(member) - .withContext(context) - .commit(ApplicationContext.getServiceForClass(TimestampProvider.class).getTimestamp(), "test", "Added duplicate language reference set member to " + descriptionId); - return null; - } - )).execute(ApplicationContext.getServiceForClass(Environment.class)); + new RepositoryRequest<>(SnomedDatastoreActivator.REPOSITORY_UUID, context -> { + ApplicationContext.getServiceForClass(RepositoryManager.class) + .get(SnomedDatastoreActivator.REPOSITORY_UUID) + .service(RevisionIndex.class) + .prepareCommit(branchPath.getPath()) + .stageNew(member) + .withContext(context) + .commit(ApplicationContext.getServiceForClass(TimestampProvider.class).getTimestamp(), "test", "Added duplicate language reference set member to " + descriptionId); + return null; + }).execute(ApplicationContext.getServiceForClass(Environment.class)); // Check the acceptability map; the description should be acceptable in the UK reference set SnomedDescription description = getComponent(branchPath, SnomedComponentType.DESCRIPTION, descriptionId, "members()").statusCode(200) diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedModuleDependencyRefsetTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedModuleDependencyRefsetTest.java index 9c4699fe7ca..be1aa2d7d8d 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedModuleDependencyRefsetTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedModuleDependencyRefsetTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.b2international.snowowl.snomed.core.rest.components; import static com.b2international.snowowl.snomed.core.rest.CodeSystemRestRequests.createCodeSystem; @@ -23,9 +38,8 @@ import com.b2international.snowowl.core.date.DateFormats; import com.b2international.snowowl.core.date.EffectiveTimes; import com.b2international.snowowl.datastore.BranchPathUtils; -import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; +import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMembers; @@ -127,11 +141,11 @@ public void updateRelevantModDepMembersForExtensionVersions() { // create both inferred and stated relationships Map inferredRelationshipRequestBody = SnomedRestFixtures - .createRelationshipRequestBody(NORWEGIAN_MODULE_CONCEPT_ID, Concepts.IS_A, Concepts.MODULE_ROOT, NORWEGIAN_MODULE_CONCEPT_ID, CharacteristicType.INFERRED_RELATIONSHIP, 0) + .createRelationshipRequestBody(NORWEGIAN_MODULE_CONCEPT_ID, Concepts.IS_A, Concepts.MODULE_ROOT, NORWEGIAN_MODULE_CONCEPT_ID, Concepts.INFERRED_RELATIONSHIP, 0) .put("commitComment", "Created inferred is_a from the norwegian module concept to SCT_MODULE_CORE").build(); Map statedRelationshipRequestBody = SnomedRestFixtures - .createRelationshipRequestBody(NORWEGIAN_MODULE_CONCEPT_ID, Concepts.IS_A, Concepts.MODULE_ROOT, NORWEGIAN_MODULE_CONCEPT_ID, CharacteristicType.STATED_RELATIONSHIP, 0) + .createRelationshipRequestBody(NORWEGIAN_MODULE_CONCEPT_ID, Concepts.IS_A, Concepts.MODULE_ROOT, NORWEGIAN_MODULE_CONCEPT_ID, Concepts.STATED_RELATIONSHIP, 0) .put("commitComment", "Created state is_a from the norwegian module concept to SCT_MODULE_CORE").build(); createComponent(branchPath, SnomedComponentType.RELATIONSHIP, inferredRelationshipRequestBody).statusCode(201); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetApiTest.java index 5aa2d09b41e..7ce67f6297e 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,13 @@ */ package com.b2international.snowowl.snomed.core.rest.components; -import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.*; -import static com.b2international.snowowl.snomed.core.rest.SnomedRestFixtures.*; -import static org.hamcrest.CoreMatchers.*; +import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.getComponent; +import static com.b2international.snowowl.snomed.core.rest.SnomedRestFixtures.createConcreteDomainParentConcept; +import static com.b2international.snowowl.snomed.core.rest.SnomedRestFixtures.createConcreteDomainRefSet; +import static com.b2international.snowowl.snomed.core.rest.SnomedRestFixtures.createNewRefSet; +import static com.b2international.snowowl.snomed.core.rest.SnomedRestFixtures.createNewRefSetMember; +import static com.b2international.snowowl.snomed.core.rest.SnomedRestFixtures.inactivateConcept; +import static org.hamcrest.CoreMatchers.equalTo; import org.junit.Test; diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetBulkApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetBulkApiTest.java index 4b3646f1840..362af7465f6 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetBulkApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetBulkApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetMemberApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetMemberApiTest.java index 75e8da3a6e8..4630bcb8a66 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetMemberApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetMemberApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,7 +52,6 @@ import com.b2international.snowowl.datastore.request.CommitResult; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.core.domain.refset.DataType; import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; @@ -803,7 +802,7 @@ public void executeSyncAction() throws Exception { String conceptId = createNewConcept(branchPath, parentId); conceptIds.add(conceptId); // Need to add an inferred IS A counterpart, as query evaluation uses inferred relationships - createNewRelationship(branchPath, conceptId, Concepts.IS_A, parentId, CharacteristicType.INFERRED_RELATIONSHIP); + createNewRelationship(branchPath, conceptId, Concepts.IS_A, parentId, Concepts.INFERRED_RELATIONSHIP); } final Map memberRequest = ImmutableMap.builder() @@ -827,7 +826,7 @@ public void executeSyncAction() throws Exception { // Add a new concept that matches the query, then sync again String extraConceptId = createNewConcept(branchPath, parentId); conceptIds.add(extraConceptId); - createNewRelationship(branchPath, extraConceptId, Concepts.IS_A, parentId, CharacteristicType.INFERRED_RELATIONSHIP); + createNewRelationship(branchPath, extraConceptId, Concepts.IS_A, parentId, Concepts.INFERRED_RELATIONSHIP); executeSyncAction(memberId); checkReferencedComponentIds(conceptIds, simpleRefSetId); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetMemberParameterizedTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetMemberParameterizedTest.java index aa020f900b7..a2b39cc68de 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetMemberParameterizedTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetMemberParameterizedTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -64,8 +64,9 @@ import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; import com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest; -import com.b2international.snowowl.snomed.core.rest.BranchBase; import com.b2international.snowowl.snomed.core.rest.SnomedComponentType; +import com.b2international.snowowl.snomed.datastore.request.SnomedRelationshipGetRequestBuilder; +import com.b2international.snowowl.test.commons.rest.BranchBase; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; @@ -93,6 +94,7 @@ public static Collection data() { { SnomedRefSetType.ATTRIBUTE_VALUE }, // Concrete data type reference sets are tested separately { SnomedRefSetType.COMPLEX_MAP }, + { SnomedRefSetType.COMPLEX_BLOCK_MAP }, { SnomedRefSetType.DESCRIPTION_TYPE }, { SnomedRefSetType.EXTENDED_MAP }, { SnomedRefSetType.LANGUAGE }, @@ -402,6 +404,16 @@ private Map getUpdateProperties() { .put(SnomedRf2Headers.FIELD_MAP_ADVICE, "complexMapAdvice2") .put(SnomedRf2Headers.FIELD_CORRELATION_ID, Concepts.NAMESPACE_ROOT) .build(); + case COMPLEX_BLOCK_MAP: + return ImmutableMap.builder() + .put(SnomedRf2Headers.FIELD_MAP_TARGET, "complexBlockMapTarget2") + .put(SnomedRf2Headers.FIELD_MAP_GROUP, 1) + .put(SnomedRf2Headers.FIELD_MAP_PRIORITY, 1) + .put(SnomedRf2Headers.FIELD_MAP_RULE, "complexBlockMapRule2") + .put(SnomedRf2Headers.FIELD_MAP_ADVICE, "complexBlockMapAdvice2") + .put(SnomedRf2Headers.FIELD_CORRELATION_ID, Concepts.NAMESPACE_ROOT) + .put(SnomedRf2Headers.FIELD_MAP_BLOCK, 2) + .build(); case DESCRIPTION_TYPE: return ImmutableMap.builder() .put(SnomedRf2Headers.FIELD_DESCRIPTION_FORMAT, Concepts.NAMESPACE_ROOT) @@ -514,6 +526,16 @@ private Map getInvalidProperties() { .put(SnomedRf2Headers.FIELD_CORRELATION_ID, Concepts.REFSET_CORRELATION_NOT_SPECIFIED) .put(SnomedRf2Headers.FIELD_MAP_CATEGORY_ID, Concepts.MAP_CATEGORY_NOT_CLASSIFIED) .build(); + case COMPLEX_BLOCK_MAP: + return ImmutableMap.builder() + .put(SnomedRf2Headers.FIELD_MAP_TARGET, "complexBlockMapTarget") + .put(SnomedRf2Headers.FIELD_MAP_GROUP, 10) + .put(SnomedRf2Headers.FIELD_MAP_PRIORITY, 10) + .put(SnomedRf2Headers.FIELD_MAP_RULE, "complexBlockMapRule") + .put(SnomedRf2Headers.FIELD_MAP_ADVICE, "complexBlockMapAdvice") + .put(SnomedRf2Headers.FIELD_CORRELATION_ID, Concepts.REFSET_CORRELATION_NOT_SPECIFIED) + .put(SnomedRf2Headers.FIELD_MAP_BLOCK, "not an integer") + .build(); case LANGUAGE: return ImmutableMap.builder() .put(SnomedRf2Headers.FIELD_ACCEPTABILITY_ID, "") diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetParameterizedTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetParameterizedTest.java index fbb92c9f9dd..bdfb1a6af73 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetParameterizedTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRefSetParameterizedTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -69,6 +69,7 @@ public static Collection data() { { SnomedRefSetType.ATTRIBUTE_VALUE }, // Concrete data type reference sets are tested separately { SnomedRefSetType.COMPLEX_MAP }, + { SnomedRefSetType.COMPLEX_BLOCK_MAP }, { SnomedRefSetType.DESCRIPTION_TYPE }, { SnomedRefSetType.EXTENDED_MAP }, { SnomedRefSetType.LANGUAGE }, diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRelationshipApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRelationshipApiTest.java index 3bb9bf14fa2..f12a4b59a21 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRelationshipApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedRelationshipApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.createCodeSystemAndVersion; import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.createVersion; import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.getNextAvailableEffectiveDateAsString; -import static com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests.createBranchRecursively; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.createComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.deleteComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.getComponent; @@ -52,8 +51,6 @@ import com.b2international.snowowl.snomed.cis.domain.SctId; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; import com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest; import com.b2international.snowowl.snomed.core.rest.SnomedComponentType; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; @@ -161,7 +158,7 @@ public void createDuplicateRelationship() { @Test public void createRelationshipInferred() { Map requestBody = createRelationshipRequestBody(Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, - CharacteristicType.INFERRED_RELATIONSHIP) + Concepts.INFERRED_RELATIONSHIP) .put("commitComment", "Created new relationship with inferred characteristic type") .build(); @@ -170,7 +167,7 @@ public void createRelationshipInferred() { .extract().header("Location")); getComponent(branchPath, SnomedComponentType.RELATIONSHIP, relationshipId).statusCode(200) - .body("characteristicType", equalTo(CharacteristicType.INFERRED_RELATIONSHIP.name())); + .body("characteristicTypeId", equalTo(Concepts.INFERRED_RELATIONSHIP)); } @Test @@ -299,33 +296,33 @@ public void changeRelationshipUnionGroup() { public void changeRelationshipCharacteristicType() { String relationshipId = createNewRelationship(branchPath); Map requestBody = ImmutableMap.builder() - .put("characteristicType", CharacteristicType.ADDITIONAL_RELATIONSHIP) + .put("characteristicTypeId", Concepts.ADDITIONAL_RELATIONSHIP) .put("commitComment", "Updated relationship characteristic type") .build(); updateComponent(branchPath, SnomedComponentType.RELATIONSHIP, relationshipId, requestBody).statusCode(204); getComponent(branchPath, SnomedComponentType.RELATIONSHIP, relationshipId).statusCode(200) - .body("characteristicType", equalTo(CharacteristicType.ADDITIONAL_RELATIONSHIP.name())); + .body("characteristicTypeId", equalTo(Concepts.ADDITIONAL_RELATIONSHIP)); } @Test public void changeRelationshipModifier() { String relationshipId = createNewRelationship(branchPath); Map requestBody = ImmutableMap.builder() - .put("modifier", RelationshipModifier.UNIVERSAL) + .put("modifierId", Concepts.UNIVERSAL_RESTRICTION_MODIFIER) .put("commitComment", "Updated relationship modifier") .build(); updateComponent(branchPath, SnomedComponentType.RELATIONSHIP, relationshipId, requestBody).statusCode(204); getComponent(branchPath, SnomedComponentType.RELATIONSHIP, relationshipId).statusCode(200) - .body("modifier", equalTo(RelationshipModifier.UNIVERSAL.name())); + .body("modifierId", equalTo(Concepts.UNIVERSAL_RESTRICTION_MODIFIER)); } @Test public void createRelationshipOnNestedBranch() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); IBranchPath b = BranchPathUtils.createPath(a, "b"); - createBranchRecursively(b); + branching.createBranchRecursively(b); String relationshipId = createNewRelationship(b); @@ -352,7 +349,7 @@ public void deleteRelationshipOnNestedBranch() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); IBranchPath b = BranchPathUtils.createPath(a, "b"); - createBranchRecursively(b); + branching.createBranchRecursively(b); // New relationship on nested branch resets the concept's version to 1 again createNewRelationship(b, conceptId, Concepts.PART_OF, Concepts.NAMESPACE_ROOT); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionCreationTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionCreationTest.java index 66be7da97d7..8f8356532c4 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionCreationTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionCreationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ import static com.b2international.snowowl.snomed.core.rest.CodeSystemRestRequests.createCodeSystem; import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.createVersion; import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.getVersion; -import static com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests.createBranch; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.getComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedRestFixtures.createNewConcept; import static org.hamcrest.CoreMatchers.equalTo; @@ -73,7 +72,7 @@ public void createExtensionVersion01() { @Test public void createExtensionVersion02() { IBranchPath a = BranchPathUtils.createPath(branchPath, "a"); - createBranch(a).statusCode(201); + branching.createBranch(a).statusCode(201); String conceptId = createNewConcept(a); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionDowngradeTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionDowngradeTest.java index 0f115a4bfaf..0ddfa64d008 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionDowngradeTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionDowngradeTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ import static com.b2international.snowowl.snomed.core.rest.CodeSystemRestRequests.getCodeSystem; import static com.b2international.snowowl.snomed.core.rest.CodeSystemRestRequests.updateCodeSystem; import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.getVersion; -import static com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests.createBranch; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.createComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.getComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedRestFixtures.createNewConcept; @@ -37,12 +36,11 @@ import com.b2international.snowowl.datastore.CodeSystemVersion; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; import com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest; -import com.b2international.snowowl.snomed.core.rest.BranchBase; import com.b2international.snowowl.snomed.core.rest.SnomedApiTestConstants; import com.b2international.snowowl.snomed.core.rest.SnomedComponentType; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; +import com.b2international.snowowl.test.commons.rest.BranchBase; import com.google.common.collect.ImmutableMap; /** @@ -59,11 +57,11 @@ public void downgradeB2iExtensionWithoutChanges() { .extract() .as(CodeSystemVersion.class); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join(version.getParentBranchPath(), + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join(version.getParentBranchPath(), version.getVersion(), SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); merge(branchPath, targetPath, "Downgraded B2i extension to 2016-01-31.").body("status", equalTo(Merge.Status.COMPLETED.name())); Map updateRequest = ImmutableMap.builder() @@ -84,11 +82,11 @@ public void downgradeB2iExtensionWithNewConceptOnUpgradedBranch() { .statusCode(200) .extract().as(CodeSystemVersion.class); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join(version.getParentBranchPath(), + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join(version.getParentBranchPath(), version.getVersion(), SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); String conceptId = createNewConcept(targetPath); @@ -113,11 +111,11 @@ public void downgradeWithConflictingContent() { .statusCode(200) .extract().as(CodeSystemVersion.class); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join(version.getParentBranchPath(), + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join(version.getParentBranchPath(), version.getVersion(), SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); Map requestBody = ImmutableMap.builder() .put("id", "476216051000154119") // Description of Date-time reference set @@ -127,7 +125,7 @@ public void downgradeWithConflictingContent() { .put("term", "Synonym of root concept") .put("languageCode", "en") .put("acceptability", SnomedApiTestConstants.UK_ACCEPTABLE_MAP) - .put("caseSignificance", CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE) + .put("caseSignificanceId", Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE) .put("commitComment", "Created new synonym with duplicate SCTID") .build(); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionUpgradeTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionUpgradeTest.java index a5722b0a818..e2fe62f8d3f 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionUpgradeTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionUpgradeTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ import static com.b2international.snowowl.snomed.core.rest.CodeSystemRestRequests.updateCodeSystem; import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.createVersion; import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.getNextAvailableEffectiveDateAsString; -import static com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests.createBranch; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.createComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.getComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.updateComponent; @@ -49,19 +48,17 @@ import com.b2international.snowowl.core.branch.Branch; import com.b2international.snowowl.core.merge.Merge; import com.b2international.snowowl.datastore.BranchPathUtils; -import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; +import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; import com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest; -import com.b2international.snowowl.snomed.core.rest.BranchBase; import com.b2international.snowowl.snomed.core.rest.SnomedApiTestConstants; import com.b2international.snowowl.snomed.core.rest.SnomedComponentType; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; +import com.b2international.snowowl.test.commons.rest.BranchBase; import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -74,18 +71,22 @@ @BranchBase(value = SnomedApiTestConstants.EXTENSION_PATH, isolateTests = false) public class SnomedExtensionUpgradeTest extends AbstractSnomedApiTest { + private String getFirstRelationshipId(SnomedConcept concept, String characteristicTypeId) { + return concept.getRelationships().getItems().stream().filter(r -> characteristicTypeId.equals(r.getCharacteristicTypeId())).findFirst().get().getId(); + } + @Test public void upgradeWithoutChanges() { String effectiveDate = getNextAvailableEffectiveDateAsString(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME); String versionId = "v1"; createVersion(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, versionId, effectiveDate).statusCode(201); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join( + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join( Branch.MAIN_PATH, versionId, SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); merge(branchPath, targetPath, "Upgraded B2i extension to v1.").body("status", equalTo(Merge.Status.COMPLETED.name())); @@ -106,12 +107,12 @@ public void upgradeWithNewConceptOnSource() { String versionId = "v2"; createVersion(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, versionId, effectiveDate).statusCode(201); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join( + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join( Branch.MAIN_PATH, versionId, SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); String conceptId = createNewConcept(branchPath); @@ -136,12 +137,12 @@ public void upgradeWithNewConceptOnTarget() { String versionId = "v3"; createVersion(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, versionId, effectiveDate).statusCode(201); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join( + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join( Branch.MAIN_PATH, versionId, SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); String conceptId = createNewConcept(targetPath); @@ -167,12 +168,12 @@ public void upgradeWithConflictingContent() { String versionId = "v4"; createVersion(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, versionId, effectiveDate).statusCode(201); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join( + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join( Branch.MAIN_PATH, versionId, SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); Map requestBody = ImmutableMap.builder() .put("id", "476216051000154119") // Description of Date-time reference set @@ -182,7 +183,7 @@ public void upgradeWithConflictingContent() { .put("term", "Synonym of root concept") .put("languageCode", "en") .put("acceptability", SnomedApiTestConstants.UK_ACCEPTABLE_MAP) - .put("caseSignificance", CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE) + .put("caseSignificanceId", Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE) .put("commitComment", "Created new synonym with duplicate SCTID") .build(); @@ -205,7 +206,7 @@ public void upgradeWithBackAndForthDonatedConcept() { .put("term", descriptionTerm) .put("languageCode", DEFAULT_LANGUAGE_CODE) .put("acceptability", SnomedApiTestConstants.UK_ACCEPTABLE_MAP) - .put("caseSignificance", CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE) + .put("caseSignificanceId", Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE) .put("commitComment", "Created new synonym") .build(); @@ -224,16 +225,16 @@ public void upgradeWithBackAndForthDonatedConcept() { .body("released", equalTo(true)) .body("effectiveTime", equalTo(effectiveDate)) .body("moduleId", equalTo(Concepts.MODULE_SCT_CORE)) - .body("caseSignificance", equalTo(CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE.toString())); + .body("caseSignificanceId", equalTo(Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE)); // upgrade extension to latest INT version - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join( + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join( Branch.MAIN_PATH, versionId, SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); merge(branchPath, targetPath, "Upgraded B2i extension to v10").body("status", equalTo(Merge.Status.COMPLETED.name())); @@ -248,7 +249,7 @@ public void upgradeWithBackAndForthDonatedConcept() { // update description on extension, change module and case significance Map descriptionUpdateRequest = ImmutableMap.builder() - .put("caseSignificance", CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE) + .put("caseSignificanceId", Concepts.ENTIRE_TERM_CASE_SENSITIVE) .put("moduleId", Concepts.MODULE_B2I_EXTENSION) .put("commitComment", "Changed case significance on description") .build(); @@ -260,7 +261,7 @@ public void upgradeWithBackAndForthDonatedConcept() { .body("released", equalTo(true)) .body("effectiveTime", nullValue()) .body("moduleId", equalTo(Concepts.MODULE_B2I_EXTENSION)) - .body("caseSignificance", equalTo(CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE.toString())); + .body("caseSignificanceId", equalTo(Concepts.ENTIRE_TERM_CASE_SENSITIVE)); // version extension @@ -277,7 +278,7 @@ public void upgradeWithBackAndForthDonatedConcept() { // update description on MAIN ("take" extension changes and apply it in INT) Map intDescriptionUpdateRequest = ImmutableMap.builder() - .put("caseSignificance", CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE) + .put("caseSignificanceId", Concepts.ENTIRE_TERM_CASE_SENSITIVE) .put("commitComment", "Changed case significance on description on MAIN") .build(); @@ -294,16 +295,16 @@ public void upgradeWithBackAndForthDonatedConcept() { .body("released", equalTo(true)) .body("effectiveTime", equalTo(newIntEffectiveDate)) .body("moduleId", equalTo(Concepts.MODULE_SCT_CORE)) - .body("caseSignificance", equalTo(CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE.toString())); + .body("caseSignificanceId", equalTo(Concepts.ENTIRE_TERM_CASE_SENSITIVE)); // upgrade extension to new INT version - IBranchPath newTargetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join( + IBranchPath newTargetPath = BranchPathUtils.createPath(PATH_JOINER.join( Branch.MAIN_PATH, newIntversionId, SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(newTargetPath).statusCode(201); + branching.createBranch(newTargetPath).statusCode(201); merge(targetPath, newTargetPath, "Upgraded B2i extension to v11").body("status", equalTo(Merge.Status.COMPLETED.name())); @@ -320,7 +321,7 @@ public void upgradeWithBackAndForthDonatedConcept() { .body("released", equalTo(true)) .body("effectiveTime", equalTo(newIntEffectiveDate)) .body("moduleId", equalTo(Concepts.MODULE_SCT_CORE)) - .body("caseSignificance", equalTo(CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE.toString())); + .body("caseSignificanceId", equalTo(Concepts.ENTIRE_TERM_CASE_SENSITIVE)); } @@ -341,12 +342,12 @@ public void upgradeWithDonatedConcept() { Concepts.SYNONYM, extensionSynonymTerm, SnomedApiTestConstants.UK_ACCEPTABLE_MAP); Map statedIsaRequestBody = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.STATED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.STATED_RELATIONSHIP); Map inferredIsaRequestBody = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); Map additionalRelationshipRequestBody = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.ADDITIONAL_RELATIONSHIP); + Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.ADDITIONAL_RELATIONSHIP); Map extensionConceptRequestBody = createConceptRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, ImmutableList.of(statedIsaRequestBody, inferredIsaRequestBody, additionalRelationshipRequestBody), @@ -368,12 +369,9 @@ public void upgradeWithDonatedConcept() { String extensionSynonymId = extensionConcept.getDescriptions().getItems().stream().filter(d -> d.getTerm().equals(extensionSynonymTerm)) .findFirst().get().getId(); - String extensionStatedIsaId = extensionConcept.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP).findFirst().get().getId(); - String extensionInferredIsaId = extensionConcept.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP).findFirst().get().getId(); - String extensionAdditionalRelationshipId = extensionConcept.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.ADDITIONAL_RELATIONSHIP).findFirst().get().getId(); + String extensionStatedIsaId = getFirstRelationshipId(extensionConcept, Concepts.STATED_RELATIONSHIP); + String extensionInferredIsaId = getFirstRelationshipId(extensionConcept, Concepts.INFERRED_RELATIONSHIP); + String extensionAdditionalRelationshipId = getFirstRelationshipId(extensionConcept, Concepts.ADDITIONAL_RELATIONSHIP); // create new version on MAIN @@ -381,12 +379,12 @@ public void upgradeWithDonatedConcept() { String versionId = "v5"; createVersion(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, versionId, effectiveDate).statusCode(201); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join( + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join( Branch.MAIN_PATH, versionId, SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); // create INT concept with same ID but different description and relationship IDs on version branch @@ -396,9 +394,9 @@ public void upgradeWithDonatedConcept() { Concepts.SYNONYM, extensionPtTerm, SnomedApiTestConstants.UK_PREFERRED_MAP); Map intStatedIsaRequestBody = createRelationshipRequestBody("", Concepts.MODULE_SCT_CORE, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.STATED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.STATED_RELATIONSHIP); Map intInferredIsaRequestBody = createRelationshipRequestBody("", Concepts.MODULE_SCT_CORE, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); Map intConceptRequestBody = createConceptRequestBody(extensionConceptId, "", Concepts.MODULE_SCT_CORE, ImmutableList.of(intStatedIsaRequestBody, intInferredIsaRequestBody), @@ -418,10 +416,8 @@ public void upgradeWithDonatedConcept() { .getId(); String intPtId = intConcept.getDescriptions().getItems().stream().filter(d -> d.getTerm().equals(extensionPtTerm)).findFirst().get().getId(); - String intStatedIsaId = intConcept.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP).findFirst().get().getId(); - String intInferredIsaId = intConcept.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP).findFirst().get().getId(); + String intStatedIsaId = getFirstRelationshipId(intConcept, Concepts.STATED_RELATIONSHIP); + String intInferredIsaId = getFirstRelationshipId(intConcept, Concepts.INFERRED_RELATIONSHIP); assertEquals(intConceptId, extensionConceptId); assertNotEquals(intConcept.getModuleId(), extensionConcept.getModuleId()); @@ -481,7 +477,7 @@ public void upgradeWithDonatedDescription() { .put("term", descriptionTerm) .put("languageCode", DEFAULT_LANGUAGE_CODE) .put("acceptability", SnomedApiTestConstants.US_ACCEPTABLE_MAP) - .put("caseSignificance", CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE) + .put("caseSignificanceId", Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE) .put("commitComment", "Created new extension synonym") .build(); @@ -493,7 +489,7 @@ public void upgradeWithDonatedDescription() { .statusCode(200) .extract().as(SnomedDescription.class); - assertEquals(CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE, extensionDescription.getCaseSignificance()); + assertEquals(Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE, extensionDescription.getCaseSignificanceId()); assertThat(extensionDescription.getAcceptabilityMap().containsKey(Concepts.REFSET_LANGUAGE_TYPE_US)); assertEquals(Acceptability.ACCEPTABLE, extensionDescription.getAcceptabilityMap().get(Concepts.REFSET_LANGUAGE_TYPE_US)); assertFalse(extensionDescription.getAcceptabilityMap().containsKey(Concepts.REFSET_LANGUAGE_TYPE_UK)); @@ -504,12 +500,12 @@ public void upgradeWithDonatedDescription() { String versionId = "v6"; createVersion(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, versionId, effectiveDate).statusCode(201); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join( + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join( Branch.MAIN_PATH, versionId, SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); // create INT description with same ID but with slightly different properties @@ -521,7 +517,7 @@ public void upgradeWithDonatedDescription() { .put("term", descriptionTerm) .put("languageCode", "en") .put("acceptability", SnomedApiTestConstants.UK_ACCEPTABLE_MAP) - .put("caseSignificance", CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE) + .put("caseSignificance", Concepts.ENTIRE_TERM_CASE_SENSITIVE) .put("commitComment", "Created new donated synonym") .build(); @@ -535,7 +531,7 @@ public void upgradeWithDonatedDescription() { .statusCode(200) .extract().as(SnomedDescription.class); - assertEquals(CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE, donatedDescription.getCaseSignificance()); + assertEquals(Concepts.ENTIRE_TERM_CASE_SENSITIVE, donatedDescription.getCaseSignificanceId()); assertThat(donatedDescription.getAcceptabilityMap().containsKey(Concepts.REFSET_LANGUAGE_TYPE_UK)); assertEquals(Acceptability.ACCEPTABLE, donatedDescription.getAcceptabilityMap().get(Concepts.REFSET_LANGUAGE_TYPE_UK)); assertFalse(donatedDescription.getAcceptabilityMap().containsKey(Concepts.REFSET_LANGUAGE_TYPE_US)); @@ -557,7 +553,7 @@ public void upgradeWithDonatedDescription() { .extract().as(SnomedDescription.class); assertEquals(Concepts.MODULE_SCT_CORE, donatedDescriptionInExtension.getModuleId()); - assertEquals(CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE, donatedDescriptionInExtension.getCaseSignificance()); + assertEquals(Concepts.ENTIRE_TERM_CASE_SENSITIVE, donatedDescriptionInExtension.getCaseSignificanceId()); assertThat(donatedDescriptionInExtension.getAcceptabilityMap().containsKey(Concepts.REFSET_LANGUAGE_TYPE_US)); assertEquals(Acceptability.ACCEPTABLE, donatedDescriptionInExtension.getAcceptabilityMap().get(Concepts.REFSET_LANGUAGE_TYPE_US)); assertThat(donatedDescriptionInExtension.getAcceptabilityMap().containsKey(Concepts.REFSET_LANGUAGE_TYPE_UK)); @@ -574,7 +570,7 @@ public void upgradeWithDonatedRelationship() { .put("sourceId", Concepts.ROOT_CONCEPT) .put("typeId", Concepts.PART_OF) .put("destinationId", Concepts.NAMESPACE_ROOT) - .put("characteristicType", CharacteristicType.ADDITIONAL_RELATIONSHIP) + .put("characteristicTypeId", Concepts.ADDITIONAL_RELATIONSHIP) .put("group", 0) .put("commitComment", "Created new extension relationship") .build(); @@ -587,7 +583,7 @@ public void upgradeWithDonatedRelationship() { .statusCode(200) .extract().as(SnomedRelationship.class); - assertEquals(CharacteristicType.ADDITIONAL_RELATIONSHIP, extensionRelationship.getCharacteristicType()); + assertEquals(Concepts.ADDITIONAL_RELATIONSHIP, extensionRelationship.getCharacteristicTypeId()); assertEquals(0, extensionRelationship.getGroup().intValue()); // create new version on MAIN @@ -596,12 +592,12 @@ public void upgradeWithDonatedRelationship() { String versionId = "v9"; createVersion(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, versionId, effectiveDate).statusCode(201); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join( + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join( Branch.MAIN_PATH, versionId, SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); // create INT relationship with same ID but with slightly different properties @@ -611,7 +607,7 @@ public void upgradeWithDonatedRelationship() { .put("sourceId", Concepts.ROOT_CONCEPT) .put("typeId", Concepts.PART_OF) .put("destinationId", Concepts.NAMESPACE_ROOT) - .put("characteristicType", CharacteristicType.INFERRED_RELATIONSHIP) + .put("characteristicTypeId", Concepts.INFERRED_RELATIONSHIP) .put("group", 1) .put("commitComment", "Created new donated INT relationship") .build(); @@ -626,7 +622,7 @@ public void upgradeWithDonatedRelationship() { .statusCode(200) .extract().as(SnomedRelationship.class); - assertEquals(CharacteristicType.INFERRED_RELATIONSHIP, donatedRelationship.getCharacteristicType()); + assertEquals(Concepts.INFERRED_RELATIONSHIP, donatedRelationship.getCharacteristicTypeId()); assertEquals(1, donatedRelationship.getGroup().intValue()); // upgrade extension to new INT version @@ -646,7 +642,7 @@ public void upgradeWithDonatedRelationship() { .extract().as(SnomedRelationship.class); assertEquals(Concepts.MODULE_SCT_CORE, donatedRelationshipInExtension.getModuleId()); - assertEquals(CharacteristicType.INFERRED_RELATIONSHIP, donatedRelationshipInExtension.getCharacteristicType()); + assertEquals(Concepts.INFERRED_RELATIONSHIP, donatedRelationshipInExtension.getCharacteristicTypeId()); assertEquals(1, donatedRelationshipInExtension.getGroup().intValue()); } @@ -667,9 +663,9 @@ public void upgradeWithDonatedConceptAndDescriptions() { Concepts.SYNONYM, extensionSynonymTerm, SnomedApiTestConstants.UK_ACCEPTABLE_MAP); Map statedIsaRequestBody = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.STATED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.STATED_RELATIONSHIP); Map inferredIsaRequestBody = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); Map extensionConceptRequestBody = createConceptRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, ImmutableList.of(statedIsaRequestBody, inferredIsaRequestBody), @@ -691,10 +687,8 @@ public void upgradeWithDonatedConceptAndDescriptions() { String extensionSynonymId = extensionConcept.getDescriptions().getItems().stream().filter(d -> d.getTerm().equals(extensionSynonymTerm)) .findFirst().get().getId(); - String extensionStatedIsaId = extensionConcept.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP).findFirst().get().getId(); - String extensionInferredIsaId = extensionConcept.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP).findFirst().get().getId(); + String extensionStatedIsaId = getFirstRelationshipId(extensionConcept, Concepts.STATED_RELATIONSHIP); + String extensionInferredIsaId = getFirstRelationshipId(extensionConcept, Concepts.INFERRED_RELATIONSHIP); // create new version on MAIN @@ -702,12 +696,12 @@ public void upgradeWithDonatedConceptAndDescriptions() { String versionId = "v7"; createVersion(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, versionId, effectiveDate).statusCode(201); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join( + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join( Branch.MAIN_PATH, versionId, SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); // create INT concept with same ID but different description and relationship IDs on version branch @@ -717,9 +711,9 @@ public void upgradeWithDonatedConceptAndDescriptions() { Concepts.SYNONYM, extensionPtTerm, SnomedApiTestConstants.UK_PREFERRED_MAP); Map intStatedIsaRequestBody = createRelationshipRequestBody("", Concepts.MODULE_SCT_CORE, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.STATED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.STATED_RELATIONSHIP); Map intInferredIsaRequestBody = createRelationshipRequestBody("", Concepts.MODULE_SCT_CORE, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); Map intConceptRequestBody = createConceptRequestBody(extensionConceptId, "", Concepts.MODULE_SCT_CORE, ImmutableList.of(intStatedIsaRequestBody, intInferredIsaRequestBody), @@ -739,10 +733,8 @@ public void upgradeWithDonatedConceptAndDescriptions() { .getId(); String intPtId = intConcept.getDescriptions().getItems().stream().filter(d -> d.getTerm().equals(extensionPtTerm)).findFirst().get().getId(); - String intStatedIsaId = intConcept.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP).findFirst().get().getId(); - String intInferredIsaId = intConcept.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP).findFirst().get().getId(); + String intStatedIsaId = getFirstRelationshipId(intConcept, Concepts.STATED_RELATIONSHIP); + String intInferredIsaId = getFirstRelationshipId(intConcept, Concepts.INFERRED_RELATIONSHIP); assertEquals(intConceptId, extensionConceptId); assertNotEquals(intConcept.getModuleId(), extensionConcept.getModuleId()); @@ -814,9 +806,9 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationships() { Concepts.SYNONYM, extensionSynonymTerm, SnomedApiTestConstants.UK_ACCEPTABLE_MAP); Map statedIsaRequestBody = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.STATED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.STATED_RELATIONSHIP); Map inferredIsaRequestBody = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); Map extensionConceptRequestBody = createConceptRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, ImmutableList.of(statedIsaRequestBody, inferredIsaRequestBody), @@ -838,10 +830,8 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationships() { String extensionSynonymId = extensionConcept.getDescriptions().getItems().stream().filter(d -> d.getTerm().equals(extensionSynonymTerm)) .findFirst().get().getId(); - String extensionStatedIsaId = extensionConcept.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP).findFirst().get().getId(); - String extensionInferredIsaId = extensionConcept.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP).findFirst().get().getId(); + String extensionStatedIsaId = getFirstRelationshipId(extensionConcept, Concepts.STATED_RELATIONSHIP); + String extensionInferredIsaId = getFirstRelationshipId(extensionConcept, Concepts.INFERRED_RELATIONSHIP); // create new version on MAIN @@ -849,12 +839,12 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationships() { String versionId = "v8"; createVersion(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, versionId, effectiveDate).statusCode(201); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join( + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join( Branch.MAIN_PATH, versionId, SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); // create INT concept with same ID but different description and relationship IDs on version branch @@ -864,9 +854,9 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationships() { Concepts.SYNONYM, extensionPtTerm, SnomedApiTestConstants.UK_PREFERRED_MAP); Map intStatedIsaRequestBody = createRelationshipRequestBody(extensionStatedIsaId, "", Concepts.MODULE_SCT_CORE, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.STATED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.STATED_RELATIONSHIP); Map intInferredIsaRequestBody = createRelationshipRequestBody(extensionInferredIsaId, "", Concepts.MODULE_SCT_CORE, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); Map intConceptRequestBody = createConceptRequestBody(extensionConceptId, "", Concepts.MODULE_SCT_CORE, ImmutableList.of(intStatedIsaRequestBody, intInferredIsaRequestBody), @@ -886,10 +876,8 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationships() { .getId(); String intPtId = intConcept.getDescriptions().getItems().stream().filter(d -> d.getTerm().equals(extensionPtTerm)).findFirst().get().getId(); - String intStatedIsaId = intConcept.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP).findFirst().get().getId(); - String intInferredIsaId = intConcept.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP).findFirst().get().getId(); + String intStatedIsaId = getFirstRelationshipId(intConcept, Concepts.STATED_RELATIONSHIP); + String intInferredIsaId = getFirstRelationshipId(intConcept, Concepts.INFERRED_RELATIONSHIP); assertEquals(intConceptId, extensionConceptId); assertNotEquals(intConcept.getModuleId(), extensionConcept.getModuleId()); @@ -938,7 +926,7 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationships() { assertTrue(descriptionIds.contains(extensionSynonymId)); List donatedStatedIsas = donatedConceptInExtension.getRelationships().getItems().stream() - .filter(r -> r.getTypeId().equals(Concepts.IS_A) && r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP) + .filter(r -> r.getTypeId().equals(Concepts.IS_A) && Concepts.STATED_RELATIONSHIP.equals(r.getCharacteristicTypeId())) .collect(toList()); assertEquals(1, donatedStatedIsas.size()); @@ -947,7 +935,7 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationships() { assertEquals(Concepts.MODULE_SCT_CORE, donatedStatedIsa.getModuleId()); List donatedInferredIsas = donatedConceptInExtension.getRelationships().getItems().stream() - .filter(r -> r.getTypeId().equals(Concepts.IS_A) && r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP) + .filter(r -> r.getTypeId().equals(Concepts.IS_A) && Concepts.INFERRED_RELATIONSHIP.equals(r.getCharacteristicTypeId())) .collect(toList()); assertEquals(1, donatedInferredIsas.size()); @@ -974,9 +962,9 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef Concepts.SYNONYM, extensionSynonymTerm1, SnomedApiTestConstants.UK_ACCEPTABLE_MAP); Map statedIsaRequestBody1 = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.STATED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.STATED_RELATIONSHIP); Map inferredIsaRequestBody1 = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); Map extensionConceptRequestBody1 = createConceptRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, ImmutableList.of(statedIsaRequestBody1, inferredIsaRequestBody1), @@ -998,10 +986,8 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef String extensionSynonymId1 = extensionConcept1.getDescriptions().getItems().stream().filter(d -> d.getTerm().equals(extensionSynonymTerm1)) .findFirst().get().getId(); - String extensionStatedIsaId1 = extensionConcept1.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP).findFirst().get().getId(); - String extensionInferredIsaId1 = extensionConcept1.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP).findFirst().get().getId(); + String extensionStatedIsaId1 = getFirstRelationshipId(extensionConcept1, Concepts.STATED_RELATIONSHIP); + String extensionInferredIsaId1 = getFirstRelationshipId(extensionConcept1, Concepts.INFERRED_RELATIONSHIP); // create another extension concept which references the previous one @@ -1017,12 +1003,12 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef Concepts.SYNONYM, extensionSynonymTerm2, SnomedApiTestConstants.UK_ACCEPTABLE_MAP); Map statedIsaRequestBody2 = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.STATED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.STATED_RELATIONSHIP); Map inferredIsaRequestBody2 = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); Map partOfRequestBody = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.PART_OF, extensionConceptId1, CharacteristicType.ADDITIONAL_RELATIONSHIP); + Concepts.PART_OF, extensionConceptId1, Concepts.ADDITIONAL_RELATIONSHIP); Map extensionConceptRequestBody2 = createConceptRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, ImmutableList.of(statedIsaRequestBody2, inferredIsaRequestBody2, partOfRequestBody), @@ -1044,12 +1030,9 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef String extensionSynonymId2 = extensionConcept2.getDescriptions().getItems().stream().filter(d -> d.getTerm().equals(extensionSynonymTerm2)) .findFirst().get().getId(); - String extensionStatedIsaId2 = extensionConcept2.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP).findFirst().get().getId(); - String extensionInferredIsaId2 = extensionConcept2.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP).findFirst().get().getId(); - String extensionPartOfId = extensionConcept2.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.ADDITIONAL_RELATIONSHIP).findFirst().get().getId(); + String extensionStatedIsaId2 = getFirstRelationshipId(extensionConcept2, Concepts.STATED_RELATIONSHIP); + String extensionInferredIsaId2 = getFirstRelationshipId(extensionConcept2, Concepts.INFERRED_RELATIONSHIP); + String extensionPartOfId = getFirstRelationshipId(extensionConcept2, Concepts.ADDITIONAL_RELATIONSHIP); // create new version on MAIN @@ -1057,12 +1040,12 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef String versionId = "v13"; createVersion(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, versionId, effectiveDate).statusCode(201); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join( + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join( Branch.MAIN_PATH, versionId, SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); // create INT concept with same ID on version branch @@ -1072,9 +1055,9 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef Concepts.SYNONYM, extensionPtTerm1, SnomedApiTestConstants.UK_PREFERRED_MAP); Map intStatedIsaRequestBody1 = createRelationshipRequestBody(extensionStatedIsaId1, "", Concepts.MODULE_SCT_CORE, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.STATED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.STATED_RELATIONSHIP); Map intInferredIsaRequestBody1 = createRelationshipRequestBody(extensionInferredIsaId1, "", Concepts.MODULE_SCT_CORE, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); Map intConceptRequestBody1 = createConceptRequestBody(extensionConceptId1, "", Concepts.MODULE_SCT_CORE, ImmutableList.of(intStatedIsaRequestBody1, intInferredIsaRequestBody1), @@ -1094,10 +1077,8 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef .getId(); String intPtId1 = intConcept1.getDescriptions().getItems().stream().filter(d -> d.getTerm().equals(extensionPtTerm1)).findFirst().get().getId(); - String intStatedIsaId1 = intConcept1.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP).findFirst().get().getId(); - String intInferredIsaId1 = intConcept1.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP).findFirst().get().getId(); + String intStatedIsaId1 = getFirstRelationshipId(intConcept1, Concepts.STATED_RELATIONSHIP); + String intInferredIsaId1 = getFirstRelationshipId(intConcept1, Concepts.INFERRED_RELATIONSHIP); assertEquals(intConceptId1, extensionConceptId1); assertNotEquals(intConcept1.getModuleId(), extensionConcept1.getModuleId()); @@ -1115,9 +1096,9 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef Concepts.SYNONYM, extensionPtTerm2, SnomedApiTestConstants.UK_PREFERRED_MAP); Map intStatedIsaRequestBody2 = createRelationshipRequestBody(extensionStatedIsaId2, "", Concepts.MODULE_SCT_CORE, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.STATED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.STATED_RELATIONSHIP); Map intInferredIsaRequestBody2 = createRelationshipRequestBody(extensionInferredIsaId2, "", Concepts.MODULE_SCT_CORE, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); Map intConceptRequestBody2 = createConceptRequestBody(extensionConceptId2, "", Concepts.MODULE_SCT_CORE, ImmutableList.of(intStatedIsaRequestBody2, intInferredIsaRequestBody2), @@ -1137,10 +1118,8 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef .getId(); String intPtId2 = intConcept2.getDescriptions().getItems().stream().filter(d -> d.getTerm().equals(extensionPtTerm2)).findFirst().get().getId(); - String intStatedIsaId2 = intConcept2.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP).findFirst().get().getId(); - String intInferredIsaId2 = intConcept2.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP).findFirst().get().getId(); + String intStatedIsaId2 = getFirstRelationshipId(intConcept2, Concepts.STATED_RELATIONSHIP); + String intInferredIsaId2 = getFirstRelationshipId(intConcept2, Concepts.INFERRED_RELATIONSHIP); assertEquals(intConceptId2, extensionConceptId2); assertNotEquals(intConcept2.getModuleId(), extensionConcept2.getModuleId()); @@ -1197,7 +1176,7 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef assertEquals(Concepts.MODULE_B2I_EXTENSION, additionalSyonym.getModuleId()); List donatedStatedIsas = donatedConceptInExtension1.getRelationships().getItems().stream() - .filter(r -> r.getTypeId().equals(Concepts.IS_A) && r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP) + .filter(r -> r.getTypeId().equals(Concepts.IS_A) && Concepts.STATED_RELATIONSHIP.equals(r.getCharacteristicTypeId())) .collect(toList()); assertEquals(1, donatedStatedIsas.size()); @@ -1206,7 +1185,7 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef assertEquals(Concepts.MODULE_SCT_CORE, donatedStatedIsa.getModuleId()); List donatedInferredIsas = donatedConceptInExtension1.getRelationships().getItems().stream() - .filter(r -> r.getTypeId().equals(Concepts.IS_A) && r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP) + .filter(r -> r.getTypeId().equals(Concepts.IS_A) && Concepts.INFERRED_RELATIONSHIP.equals(r.getCharacteristicTypeId())) .collect(toList()); assertEquals(1, donatedInferredIsas.size()); @@ -1249,7 +1228,7 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef assertEquals(Concepts.MODULE_B2I_EXTENSION, additionalSyonym2.getModuleId()); List donatedStatedIsas2 = donatedConceptInExtension2.getRelationships().getItems().stream() - .filter(r -> r.getTypeId().equals(Concepts.IS_A) && r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP) + .filter(r -> r.getTypeId().equals(Concepts.IS_A) && Concepts.STATED_RELATIONSHIP.equals(r.getCharacteristicTypeId())) .collect(toList()); assertEquals(1, donatedStatedIsas2.size()); @@ -1258,7 +1237,7 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef assertEquals(Concepts.MODULE_SCT_CORE, donatedStatedIsa2.getModuleId()); List donatedInferredIsas2 = donatedConceptInExtension2.getRelationships().getItems().stream() - .filter(r -> r.getTypeId().equals(Concepts.IS_A) && r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP) + .filter(r -> r.getTypeId().equals(Concepts.IS_A) && Concepts.INFERRED_RELATIONSHIP.equals(r.getCharacteristicTypeId())) .collect(toList()); assertEquals(1, donatedInferredIsas2.size()); @@ -1267,7 +1246,7 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithCrossRef assertEquals(Concepts.MODULE_SCT_CORE, donatedInferredIsa2.getModuleId()); List additionalRelationships = donatedConceptInExtension2.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.ADDITIONAL_RELATIONSHIP) + .filter(r -> Concepts.ADDITIONAL_RELATIONSHIP.equals(r.getCharacteristicTypeId())) .collect(toList()); assertEquals(1, additionalRelationships.size()); @@ -1295,9 +1274,9 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithExternal Concepts.SYNONYM, extensionSynonymTerm1, SnomedApiTestConstants.UK_ACCEPTABLE_MAP); Map statedIsaRequestBody1 = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.STATED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.STATED_RELATIONSHIP); Map inferredIsaRequestBody1 = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); Map extensionConceptRequestBody1 = createConceptRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, ImmutableList.of(statedIsaRequestBody1, inferredIsaRequestBody1), @@ -1319,10 +1298,8 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithExternal String extensionSynonymId1 = extensionConcept1.getDescriptions().getItems().stream().filter(d -> d.getTerm().equals(extensionSynonymTerm1)) .findFirst().get().getId(); - String extensionStatedIsaId1 = extensionConcept1.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP).findFirst().get().getId(); - String extensionInferredIsaId1 = extensionConcept1.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP).findFirst().get().getId(); + String extensionStatedIsaId1 = getFirstRelationshipId(extensionConcept1, Concepts.STATED_RELATIONSHIP); + String extensionInferredIsaId1 = getFirstRelationshipId(extensionConcept1, Concepts.INFERRED_RELATIONSHIP); // create another extension concept which references the previous one @@ -1338,12 +1315,12 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithExternal Concepts.SYNONYM, extensionSynonymTerm2, SnomedApiTestConstants.UK_ACCEPTABLE_MAP); Map statedIsaRequestBody2 = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.STATED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.STATED_RELATIONSHIP); Map inferredIsaRequestBody2 = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); Map partOfRequestBody = createRelationshipRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, - Concepts.PART_OF, extensionConceptId1, CharacteristicType.ADDITIONAL_RELATIONSHIP); + Concepts.PART_OF, extensionConceptId1, Concepts.ADDITIONAL_RELATIONSHIP); Map extensionConceptRequestBody2 = createConceptRequestBody(Concepts.B2I_NAMESPACE, Concepts.MODULE_B2I_EXTENSION, ImmutableList.of(statedIsaRequestBody2, inferredIsaRequestBody2, partOfRequestBody), @@ -1365,12 +1342,9 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithExternal String extensionSynonymId2 = extensionConcept2.getDescriptions().getItems().stream().filter(d -> d.getTerm().equals(extensionSynonymTerm2)) .findFirst().get().getId(); - String extensionStatedIsaId2 = extensionConcept2.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP).findFirst().get().getId(); - String extensionInferredIsaId2 = extensionConcept2.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP).findFirst().get().getId(); - String extensionPartOfId = extensionConcept2.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.ADDITIONAL_RELATIONSHIP).findFirst().get().getId(); + String extensionStatedIsaId2 = getFirstRelationshipId(extensionConcept2, Concepts.STATED_RELATIONSHIP); + String extensionInferredIsaId2 = getFirstRelationshipId(extensionConcept2, Concepts.INFERRED_RELATIONSHIP); + String extensionPartOfId = getFirstRelationshipId(extensionConcept2, Concepts.ADDITIONAL_RELATIONSHIP); // create new version on MAIN @@ -1378,12 +1352,12 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithExternal String versionId = "v12"; createVersion(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, versionId, effectiveDate).statusCode(201); - IBranchPath targetPath = BranchPathUtils.createPath(SnomedApiTestConstants.PATH_JOINER.join( + IBranchPath targetPath = BranchPathUtils.createPath(PATH_JOINER.join( Branch.MAIN_PATH, versionId, SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME)); - createBranch(targetPath).statusCode(201); + branching.createBranch(targetPath).statusCode(201); // create INT concept with same ID on version branch @@ -1393,9 +1367,9 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithExternal Concepts.SYNONYM, extensionPtTerm1, SnomedApiTestConstants.UK_PREFERRED_MAP); Map intStatedIsaRequestBody1 = createRelationshipRequestBody(extensionStatedIsaId1, "", Concepts.MODULE_SCT_CORE, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.STATED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.STATED_RELATIONSHIP); Map intInferredIsaRequestBody1 = createRelationshipRequestBody(extensionInferredIsaId1, "", Concepts.MODULE_SCT_CORE, - Concepts.IS_A, Concepts.ROOT_CONCEPT, CharacteristicType.INFERRED_RELATIONSHIP); + Concepts.IS_A, Concepts.ROOT_CONCEPT, Concepts.INFERRED_RELATIONSHIP); Map intConceptRequestBody1 = createConceptRequestBody(extensionConceptId1, "", Concepts.MODULE_SCT_CORE, ImmutableList.of(intStatedIsaRequestBody1, intInferredIsaRequestBody1), @@ -1415,10 +1389,8 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithExternal .getId(); String intPtId1 = intConcept1.getDescriptions().getItems().stream().filter(d -> d.getTerm().equals(extensionPtTerm1)).findFirst().get().getId(); - String intStatedIsaId1 = intConcept1.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP).findFirst().get().getId(); - String intInferredIsaId1 = intConcept1.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP).findFirst().get().getId(); + String intStatedIsaId1 = getFirstRelationshipId(intConcept1, Concepts.STATED_RELATIONSHIP); + String intInferredIsaId1 = getFirstRelationshipId(intConcept1, Concepts.INFERRED_RELATIONSHIP); assertEquals(intConceptId1, extensionConceptId1); assertNotEquals(intConcept1.getModuleId(), extensionConcept1.getModuleId()); @@ -1477,7 +1449,7 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithExternal assertEquals(Concepts.MODULE_B2I_EXTENSION, additionalSyonym.getModuleId()); List donatedStatedIsas = donatedConceptInExtension1.getRelationships().getItems().stream() - .filter(r -> r.getTypeId().equals(Concepts.IS_A) && r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP) + .filter(r -> r.getTypeId().equals(Concepts.IS_A) && Concepts.STATED_RELATIONSHIP.equals(r.getCharacteristicTypeId())) .collect(toList()); assertEquals(1, donatedStatedIsas.size()); @@ -1486,7 +1458,7 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithExternal assertEquals(Concepts.MODULE_SCT_CORE, donatedStatedIsa.getModuleId()); List donatedInferredIsas = donatedConceptInExtension1.getRelationships().getItems().stream() - .filter(r -> r.getTypeId().equals(Concepts.IS_A) && r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP) + .filter(r -> r.getTypeId().equals(Concepts.IS_A) && Concepts.INFERRED_RELATIONSHIP.equals(r.getCharacteristicTypeId())) .collect(toList()); assertEquals(1, donatedInferredIsas.size()); @@ -1529,7 +1501,7 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithExternal assertEquals(Concepts.MODULE_B2I_EXTENSION, additionalSyonym2.getModuleId()); List extensionStatedIsas2 = extensionConceptInExtension2.getRelationships().getItems().stream() - .filter(r -> r.getTypeId().equals(Concepts.IS_A) && r.getCharacteristicType() == CharacteristicType.STATED_RELATIONSHIP) + .filter(r -> r.getTypeId().equals(Concepts.IS_A) && Concepts.STATED_RELATIONSHIP.equals(r.getCharacteristicTypeId())) .collect(toList()); assertEquals(1, extensionStatedIsas2.size()); @@ -1538,7 +1510,7 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithExternal assertEquals(Concepts.MODULE_B2I_EXTENSION, extensionStatedIsa2.getModuleId()); List extensionInferredIsas2 = extensionConceptInExtension2.getRelationships().getItems().stream() - .filter(r -> r.getTypeId().equals(Concepts.IS_A) && r.getCharacteristicType() == CharacteristicType.INFERRED_RELATIONSHIP) + .filter(r -> r.getTypeId().equals(Concepts.IS_A) && Concepts.INFERRED_RELATIONSHIP.equals(r.getCharacteristicTypeId())) .collect(toList()); assertEquals(1, extensionInferredIsas2.size()); @@ -1547,7 +1519,7 @@ public void upgradeWithDonatedConceptAndDescriptionsAndRelationshipsWithExternal assertEquals(Concepts.MODULE_B2I_EXTENSION, extensionInferredIsa2.getModuleId()); List additionalRelationships = extensionConceptInExtension2.getRelationships().getItems().stream() - .filter(r -> r.getCharacteristicType() == CharacteristicType.ADDITIONAL_RELATIONSHIP) + .filter(r -> Concepts.ADDITIONAL_RELATIONSHIP.equals(r.getCharacteristicTypeId())) .collect(toList()); assertEquals(1, additionalRelationships.size()); @@ -1610,18 +1582,18 @@ private Map createDescriptionRequestBody(String id, String names return builder.build(); } - private Map createRelationshipRequestBody(String namespace, String moduleId, String typeId, String destinationId, CharacteristicType characteristicType) { - return createRelationshipRequestBody("", namespace, moduleId, typeId, destinationId, characteristicType); + private Map createRelationshipRequestBody(String namespace, String moduleId, String typeId, String destinationId, String characteristicTypeId) { + return createRelationshipRequestBody("", namespace, moduleId, typeId, destinationId, characteristicTypeId); } - private Map createRelationshipRequestBody(String id, String namespace, String moduleId, String typeId, String destinationId, CharacteristicType characteristicType) { + private Map createRelationshipRequestBody(String id, String namespace, String moduleId, String typeId, String destinationId, String characteristicTypeId) { Builder builder = ImmutableMap.builder() .put("moduleId", moduleId) .put("namespaceId", Strings.isNullOrEmpty(namespace) ? "" : namespace) .put("typeId", typeId) .put("destinationId", destinationId) - .put("characteristicType", characteristicType); + .put("characteristicType", characteristicTypeId); if (!Strings.isNullOrEmpty(id)) { builder.put("id", id); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionVersioningTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionVersioningTest.java index 80ecfb49ab4..6e67b42b138 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionVersioningTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/ext/SnomedExtensionVersioningTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,9 +26,9 @@ import org.junit.Test; import com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest; -import com.b2international.snowowl.snomed.core.rest.BranchBase; import com.b2international.snowowl.snomed.core.rest.SnomedApiTestConstants; import com.b2international.snowowl.snomed.core.rest.SnomedComponentType; +import com.b2international.snowowl.test.commons.rest.BranchBase; /** * @since 4.7 diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedExportApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedExportApiTest.java index 5ff71211ca5..d37e25be8d7 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedExportApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedExportApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ import static com.b2international.snowowl.snomed.core.rest.CodeSystemVersionRestRequests.createVersion; import static com.b2international.snowowl.snomed.core.rest.SnomedApiTestConstants.UK_ACCEPTABLE_MAP; import static com.b2international.snowowl.snomed.core.rest.SnomedApiTestConstants.UK_PREFERRED_MAP; -import static com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests.createBranch; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.createComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.getComponent; import static com.b2international.snowowl.snomed.core.rest.SnomedComponentRestRequests.updateComponent; @@ -72,15 +71,12 @@ import com.b2international.snowowl.core.attachments.InternalAttachmentRegistry; import com.b2international.snowowl.core.date.DateFormats; import com.b2international.snowowl.core.date.EffectiveTimes; +import com.b2international.snowowl.core.domain.ExportResult; import com.b2international.snowowl.core.events.util.Promise; import com.b2international.snowowl.datastore.BranchPathUtils; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; -import com.b2international.snowowl.snomed.core.domain.Rf2ExportResult; import com.b2international.snowowl.snomed.core.domain.Rf2RefSetExportLayout; import com.b2international.snowowl.snomed.core.domain.Rf2ReleaseType; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; @@ -136,7 +132,7 @@ private static void assertArchiveContainsFiles(File exportArchive, Map existingFiles = newHashSet(); - try (FileSystem fs = FileSystems.newFileSystem(exportArchive.toPath(), null)) { + try (FileSystem fs = FileSystems.newFileSystem(exportArchive.toPath(), (ClassLoader) null)) { for (Path path : fs.getRootDirectories()) { Files.walkFileTree(path, new SimpleFileVisitor() { @Override @@ -169,7 +165,7 @@ private static Multimap> collectLines(File exportA Multimap> resultMap = ArrayListMultimap.create(); - try (FileSystem fs = FileSystems.newFileSystem(exportArchive.toPath(), null)) { + try (FileSystem fs = FileSystems.newFileSystem(exportArchive.toPath(), (ClassLoader) null)) { for (Path path : fs.getRootDirectories()) { Files.walkFileTree(path, new SimpleFileVisitor() { @Override @@ -229,9 +225,9 @@ public void createInvalidExportConfiguration() { @Test public void exportUnpublishedDeltaRelationships() throws Exception { - String statedRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.STATED_RELATIONSHIP); - String inferredRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.INFERRED_RELATIONSHIP); - String additionalRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.ADDITIONAL_RELATIONSHIP); + String statedRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.STATED_RELATIONSHIP); + String inferredRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.INFERRED_RELATIONSHIP); + String additionalRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.ADDITIONAL_RELATIONSHIP); String transientEffectiveTime = "20170301"; @@ -258,7 +254,7 @@ public void exportUnpublishedDeltaRelationships() throws Exception { Concepts.NAMESPACE_ROOT, "0", Concepts.PART_OF, - CharacteristicType.STATED_RELATIONSHIP.getConceptId(), + Concepts.STATED_RELATIONSHIP, Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); String inferredLine = TAB_JOINER.join(inferredRelationshipId, @@ -269,7 +265,7 @@ public void exportUnpublishedDeltaRelationships() throws Exception { Concepts.NAMESPACE_ROOT, "0", Concepts.PART_OF, - CharacteristicType.INFERRED_RELATIONSHIP.getConceptId(), + Concepts.INFERRED_RELATIONSHIP, Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); String additionalLine = TAB_JOINER.join(additionalRelationshipId, @@ -280,7 +276,7 @@ public void exportUnpublishedDeltaRelationships() throws Exception { Concepts.NAMESPACE_ROOT, "0", Concepts.PART_OF, - CharacteristicType.ADDITIONAL_RELATIONSHIP.getConceptId(), + Concepts.ADDITIONAL_RELATIONSHIP, Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); Multimap> fileToLinesMap = ArrayListMultimap.>create(); @@ -298,7 +294,7 @@ public void exportUnpublishedDeltaRelationships() throws Exception { @Test public void executeMultipleExportsAtTheSameTime() throws Exception { - Promise first = SnomedRequests.rf2().prepareExport() + Promise first = SnomedRequests.rf2().prepareExport() .setCodeSystem("SNOMEDCT") .setReleaseType(Rf2ReleaseType.FULL) .setCountryNamespaceElement("INT") @@ -308,7 +304,7 @@ public void executeMultipleExportsAtTheSameTime() throws Exception { .build(SnomedDatastoreActivator.REPOSITORY_UUID) .execute(getBus()); - Promise second = SnomedRequests.rf2().prepareExport() + Promise second = SnomedRequests.rf2().prepareExport() .setCodeSystem("SNOMEDCT") .setCountryNamespaceElement("INT") .setRefSetExportLayout(Rf2RefSetExportLayout.COMBINED) @@ -323,8 +319,8 @@ public void executeMultipleExportsAtTheSameTime() throws Exception { @Override public String apply(List input) { - Rf2ExportResult firstResult = (Rf2ExportResult) input.get(0); - Rf2ExportResult secondResult = (Rf2ExportResult) input.get(1); + ExportResult firstResult = (ExportResult) input.get(0); + ExportResult secondResult = (ExportResult) input.get(1); InternalAttachmentRegistry fileRegistry = (InternalAttachmentRegistry) ApplicationContext.getServiceForClass(AttachmentRegistry.class); @@ -367,9 +363,9 @@ public String apply(Throwable input) { public void exportDeltaInDateRangeFromVersion() throws Exception { createCodeSystem(branchPath, "SNOMEDCT-DELTA").statusCode(201); - String statedRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.STATED_RELATIONSHIP); - String inferredRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.INFERRED_RELATIONSHIP); - String additionalRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.ADDITIONAL_RELATIONSHIP); + String statedRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.STATED_RELATIONSHIP); + String inferredRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.INFERRED_RELATIONSHIP); + String additionalRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.ADDITIONAL_RELATIONSHIP); String versionEffectiveTime = "20170302"; createVersion("SNOMEDCT-DELTA", "v1", versionEffectiveTime).statusCode(201); @@ -401,7 +397,7 @@ public void exportDeltaInDateRangeFromVersion() throws Exception { Concepts.NAMESPACE_ROOT, "0", Concepts.PART_OF, - CharacteristicType.STATED_RELATIONSHIP.getConceptId(), + Concepts.STATED_RELATIONSHIP, Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); String inferredLine = TAB_JOINER.join(inferredRelationshipId, @@ -412,7 +408,7 @@ public void exportDeltaInDateRangeFromVersion() throws Exception { Concepts.NAMESPACE_ROOT, "0", Concepts.PART_OF, - CharacteristicType.INFERRED_RELATIONSHIP.getConceptId(), + Concepts.INFERRED_RELATIONSHIP, Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); String additionalLine = TAB_JOINER.join(additionalRelationshipId, @@ -423,7 +419,7 @@ public void exportDeltaInDateRangeFromVersion() throws Exception { Concepts.NAMESPACE_ROOT, "0", Concepts.PART_OF, - CharacteristicType.ADDITIONAL_RELATIONSHIP.getConceptId(), + Concepts.ADDITIONAL_RELATIONSHIP, Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); Multimap> fileToLinesMap = ArrayListMultimap.>create(); @@ -442,9 +438,9 @@ public void exportDeltaInDateRangeFromVersion() throws Exception { public void exportDeltaInDateRangeAndUnpublishedComponents() throws Exception { createCodeSystem(branchPath, "SNOMEDCT-GAMMA").statusCode(201); - String statedRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.STATED_RELATIONSHIP); - String inferredRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.INFERRED_RELATIONSHIP); - String additionalRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.ADDITIONAL_RELATIONSHIP); + String statedRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.STATED_RELATIONSHIP); + String inferredRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.INFERRED_RELATIONSHIP); + String additionalRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.ADDITIONAL_RELATIONSHIP); String relationshipEffectiveTime = "20170303"; createVersion("SNOMEDCT-GAMMA", "v1", relationshipEffectiveTime).statusCode(201); @@ -484,7 +480,7 @@ public void exportDeltaInDateRangeAndUnpublishedComponents() throws Exception { Concepts.NAMESPACE_ROOT, "0", Concepts.PART_OF, - CharacteristicType.STATED_RELATIONSHIP.getConceptId(), + Concepts.STATED_RELATIONSHIP, Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); String inferredLine = TAB_JOINER.join(inferredRelationshipId, @@ -495,7 +491,7 @@ public void exportDeltaInDateRangeAndUnpublishedComponents() throws Exception { Concepts.NAMESPACE_ROOT, "0", Concepts.PART_OF, - CharacteristicType.INFERRED_RELATIONSHIP.getConceptId(), + Concepts.INFERRED_RELATIONSHIP, Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); String additionalLine = TAB_JOINER.join(additionalRelationshipId, @@ -506,14 +502,14 @@ public void exportDeltaInDateRangeAndUnpublishedComponents() throws Exception { Concepts.NAMESPACE_ROOT, "0", Concepts.PART_OF, - CharacteristicType.ADDITIONAL_RELATIONSHIP.getConceptId(), + Concepts.ADDITIONAL_RELATIONSHIP, Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); String conceptLine = TAB_JOINER.join(conceptId, conceptEffectiveTime, "1", Concepts.MODULE_SCT_CORE, - DefinitionStatus.PRIMITIVE.getConceptId()); + Concepts.PRIMITIVE); String descriptionLine = TAB_JOINER.join(descriptionId, "", @@ -523,7 +519,7 @@ public void exportDeltaInDateRangeAndUnpublishedComponents() throws Exception { "en", Concepts.SYNONYM, "Description term", - CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE.getConceptId()); + Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE); Multimap> fileToLinesMap = ArrayListMultimap.>create(); @@ -557,7 +553,7 @@ public void exportContentFromVersionFixerTask() throws Exception { IBranchPath taskBranch = BranchPathUtils.createPath(versionPath, "Fix01"); // create fixer branch for version branch - createBranch(taskBranch).statusCode(201); + branching.createBranch(taskBranch).statusCode(201); // change an existing component final String newEffectiveTime = "20170302"; @@ -618,7 +614,7 @@ public void exportContentFromVersionFixerTaskTransEffTime() throws Exception { IBranchPath taskBranch = BranchPathUtils.createPath(versionPath, "Fix01"); // create fixer branch for version branch - createBranch(taskBranch).statusCode(201); + branching.createBranch(taskBranch).statusCode(201); // change an existing component @@ -698,10 +694,10 @@ public void exportPublishedAndUnpublishedTextDef() throws Exception { final File exportArchive = getExportFile(exportId); String textDefinitionLine = getComponentLine(ImmutableList. of(textDefinitionId, versionEffectiveTime, "1", MODULE_SCT_CORE, conceptId, "en", - Concepts.TEXT_DEFINITION, "Description term", CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE.getConceptId())); + Concepts.TEXT_DEFINITION, "Description term", Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE)); String unpublishedTextDefinitionLine = getComponentLine(ImmutableList. of(unpublishedTextDefinitionId, "", "1", MODULE_SCT_CORE, conceptId, "en", - Concepts.TEXT_DEFINITION, "Description term", CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE.getConceptId())); + Concepts.TEXT_DEFINITION, "Description term", Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE)); final Multimap> fileToLinesMap = ArrayListMultimap.>create(); @@ -725,12 +721,12 @@ public void exportAlwaysCreatesTextDef_DescAndLangRefsetFiles() throws Exception createVersion(codeSystemShortName, "v1", versionEffectiveTime).statusCode(201); getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId).statusCode(200) - .body("definitionStatus", equalTo(DefinitionStatus.PRIMITIVE.name())); + .body("definitionStatusId", equalTo(Concepts.PRIMITIVE)); changeToDefining(branchPath, conceptId); getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId).statusCode(200) - .body("definitionStatus", equalTo(DefinitionStatus.FULLY_DEFINED.name())); + .body("definitionStatusId", equalTo(Concepts.FULLY_DEFINED)); // create new version final String newVersionEffectiveTime = "20170302"; @@ -982,7 +978,7 @@ public void exportLangRefset_acceptabilityAndDescChanges() throws Exception { createVersion(codeSystemShortName, "v1", versionEffectiveTime).statusCode(201); Map caseSignificanceChangeRequestBody = ImmutableMap.builder() - .put("caseSignificance", CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE) + .put("caseSignificance", Concepts.ENTIRE_TERM_CASE_SENSITIVE) .put("commitComment", "Updated description case significance") .build(); Map acceptabilityChangeRequestBody = ImmutableMap.builder() @@ -1024,17 +1020,17 @@ public void exportLangRefset_acceptabilityAndDescChanges() throws Exception { final File exportArchive = getExportFile(exportId); String descriptionLineA = createDescriptionLine(descriptionIdA, "", conceptId, "en", Concepts.SYNONYM, DEFAULT_TERM, - CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE.getConceptId()); + Concepts.ENTIRE_TERM_CASE_SENSITIVE); String descriptionLineB = createDescriptionLine(descriptionIdB, "", conceptId, "da", Concepts.SYNONYM, DEFAULT_TERM, - CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE.getConceptId()); + Concepts.ENTIRE_TERM_CASE_SENSITIVE); String descriptionLineC = createDescriptionLine(descriptionIdC, versionEffectiveTime, conceptId, "en", Concepts.SYNONYM, DEFAULT_TERM); String descriptionLineD = createDescriptionLine(descriptionIdD, versionEffectiveTime, conceptId, "da", Concepts.SYNONYM, DEFAULT_TERM); String descriptionLineE = createDescriptionLine(descriptionIdE, "", conceptId, "en", Concepts.SYNONYM, DEFAULT_TERM, - CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE.getConceptId()); + Concepts.ENTIRE_TERM_CASE_SENSITIVE); String descriptionLineF = createDescriptionLine(descriptionIdF, "", conceptId, "da", Concepts.SYNONYM, DEFAULT_TERM, - CaseSignificance.ENTIRE_TERM_CASE_SENSITIVE.getConceptId()); + Concepts.ENTIRE_TERM_CASE_SENSITIVE); String languageMemberLineA = createLanguageRefsetMemberLine(branchPath, descriptionIdA, "", Concepts.REFSET_LANGUAGE_TYPE_UK, Acceptability.PREFERRED.getConceptId()); @@ -1081,9 +1077,9 @@ public void exportConceptsAndRelationshipsOnly() throws Exception { final String conceptId = createNewConcept(branchPath); createNewDescription(branchPath, conceptId, Concepts.SYNONYM, UK_ACCEPTABLE_MAP, "en"); - String statedRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.STATED_RELATIONSHIP); - String inferredRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.INFERRED_RELATIONSHIP); - String additionalRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, CharacteristicType.ADDITIONAL_RELATIONSHIP); + String statedRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.STATED_RELATIONSHIP); + String inferredRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.INFERRED_RELATIONSHIP); + String additionalRelationshipId = createNewRelationship(branchPath, Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.ADDITIONAL_RELATIONSHIP); createNewRefSet(branchPath, SnomedRefSetType.OWL_AXIOM, Concepts.REFSET_OWL_AXIOM); @@ -1111,17 +1107,17 @@ public void exportConceptsAndRelationshipsOnly() throws Exception { final String exportId = getExportId(createExport(config)); final File exportArchive = getExportFile(exportId); - String conceptLine = TAB_JOINER.join(conceptId, "", "1", Concepts.MODULE_SCT_CORE, DefinitionStatus.PRIMITIVE.getConceptId()); + String conceptLine = TAB_JOINER.join(conceptId, "", "1", Concepts.MODULE_SCT_CORE, Concepts.PRIMITIVE); String statedLine = TAB_JOINER.join(statedRelationshipId, "", "1", Concepts.MODULE_SCT_CORE, Concepts.ROOT_CONCEPT, Concepts.NAMESPACE_ROOT, - "0", Concepts.PART_OF, CharacteristicType.STATED_RELATIONSHIP.getConceptId(), Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); + "0", Concepts.PART_OF, Concepts.STATED_RELATIONSHIP, Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); String inferredLine = TAB_JOINER.join(inferredRelationshipId, "", "1", Concepts.MODULE_SCT_CORE, Concepts.ROOT_CONCEPT, - Concepts.NAMESPACE_ROOT, "0", Concepts.PART_OF, CharacteristicType.INFERRED_RELATIONSHIP.getConceptId(), + Concepts.NAMESPACE_ROOT, "0", Concepts.PART_OF, Concepts.INFERRED_RELATIONSHIP, Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); String additionalLine = TAB_JOINER.join(additionalRelationshipId, "", "1", Concepts.MODULE_SCT_CORE, Concepts.ROOT_CONCEPT, - Concepts.NAMESPACE_ROOT, "0", Concepts.PART_OF, CharacteristicType.ADDITIONAL_RELATIONSHIP.getConceptId(), + Concepts.NAMESPACE_ROOT, "0", Concepts.PART_OF, Concepts.ADDITIONAL_RELATIONSHIP, Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); String owlMemberLine = TAB_JOINER.join(memberId, "", "1", Concepts.MODULE_SCT_CORE, Concepts.REFSET_OWL_AXIOM, Concepts.ROOT_CONCEPT, @@ -1353,7 +1349,7 @@ private static String getLanguageRefsetMemberId(IBranchPath branchPath, String d } private static String createDescriptionLine(String id, String effectiveTime, String conceptId, String languageCode, String type, String term) { - return createDescriptionLine(id, effectiveTime, conceptId, languageCode, type, term, CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE.getConceptId()); + return createDescriptionLine(id, effectiveTime, conceptId, languageCode, type, term, Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE); } private static String createDescriptionLine(String id, String effectiveTime, String conceptId, String languageCode, String type, String term, String caseSignificance) { diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedImportApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedImportApiTest.java index 1acc8a8a2b7..24a7e58e304 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedImportApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedImportApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,7 +49,6 @@ import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; import com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest; -import com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests; import com.b2international.snowowl.snomed.core.rest.SnomedComponentType; import com.google.common.collect.ImmutableMap; @@ -493,7 +492,7 @@ public void import28ImportConceptAsInactive() { private void validateBranchHeadtimestampUpdate(IBranchPath branch, String importArchiveFileName, boolean createVersions) { - ValidatableResponse response = SnomedBranchingRestRequests.getBranch(branch); + ValidatableResponse response = branching.getBranch(branch); String baseTimestamp = response.extract().jsonPath().getString("baseTimestamp"); String headTimestamp = response.extract().jsonPath().getString("headTimestamp"); @@ -505,7 +504,7 @@ private void validateBranchHeadtimestampUpdate(IBranchPath branch, String import importArchive(importArchiveFileName, branch, createVersions, Rf2ReleaseType.DELTA); - ValidatableResponse response2 = SnomedBranchingRestRequests.getBranch(branch); + ValidatableResponse response2 = branching.getBranch(branch); String baseTimestampAfterImport = response2.extract().jsonPath().getString("baseTimestamp"); String headTimestampAfterImport = response2.extract().jsonPath().getString("headTimestamp"); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedImportRowValidatorTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedImportRowValidatorTest.java index 88046ae6300..76ce90bb37d 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedImportRowValidatorTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedImportRowValidatorTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,8 +33,8 @@ import com.b2international.snowowl.core.ApplicationContext; import com.b2international.snowowl.core.attachments.AttachmentRegistry; import com.b2international.snowowl.snomed.core.domain.ISnomedImportConfiguration.ImportStatus; -import com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest; import com.b2international.snowowl.snomed.core.domain.Rf2ReleaseType; +import com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; import com.b2international.snowowl.snomed.datastore.request.rf2.Rf2ImportResponse; diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/perf/SnomedConceptCreatePerformanceTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/perf/SnomedConceptCreatePerformanceTest.java index ad320f2a558..eb3a90c71e6 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/perf/SnomedConceptCreatePerformanceTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/perf/SnomedConceptCreatePerformanceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/perf/SnomedMergePerformanceTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/perf/SnomedMergePerformanceTest.java index aa7a99ee07c..90c23ff652e 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/perf/SnomedMergePerformanceTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/perf/SnomedMergePerformanceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ */ package com.b2international.snowowl.snomed.core.rest.perf; -import static com.b2international.snowowl.snomed.core.rest.SnomedBranchingRestRequests.createBranch; import static org.assertj.core.api.Assertions.assertThat; import java.util.Set; @@ -35,7 +34,6 @@ import com.b2international.snowowl.datastore.request.CommitResult; import com.b2international.snowowl.datastore.request.RepositoryRequests; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; import com.b2international.snowowl.snomed.core.rest.AbstractSnomedApiTest; @@ -78,7 +76,7 @@ public static void deleteBranch() { @Test public void testPerf() throws Exception { IBranchPath branch = BranchPathUtils.createPath(branchPath, "merge-test"); - createBranch(branch).statusCode(201); + branching.createBranch(branch).statusCode(201); BulkRequestBuilder bulk = BulkRequest.create(); final int numberOfConceptsToWorkWith = 10_000; for (int i = 0; i < numberOfConceptsToWorkWith; i++) { @@ -100,7 +98,7 @@ public void testPerf() throws Exception { .preferredIn(Concepts.REFSET_LANGUAGE_TYPE_UK)) .addRelationship(SnomedRequests.prepareNewRelationship() .setIdFromNamespace(null /*INT*/) - .setCharacteristicType(CharacteristicType.STATED_RELATIONSHIP) + .setCharacteristicTypeId(Concepts.STATED_RELATIONSHIP) .setTypeId(Concepts.IS_A) .setDestinationId(Concepts.ROOT_CONCEPT))); } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/versioning/SnomedVersioningApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/versioning/SnomedVersioningApiTest.java index ee2e9b7f076..ef648a68dbf 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/versioning/SnomedVersioningApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/versioning/SnomedVersioningApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.core.rest/META-INF/MANIFEST.MF index fc39e50cc4d..a695bd0b90d 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.core.rest/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT REST Services Bundle-SymbolicName: com.b2international.snowowl.snomed.core.rest;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.core.rest Automatic-Module-Name: com.b2international.snowowl.rest.snomed diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/pom.xml b/snomed/com.b2international.snowowl.snomed.core.rest/pom.xml index fe6407bd2cf..1a02412afc8 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.core.rest/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl snomed-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.snomed.core.rest diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/core/rest/SnomedApiConfig.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/core/rest/SnomedApiConfig.java index 3ee2d591eb2..53c001a37af 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/core/rest/SnomedApiConfig.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/core/rest/SnomedApiConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import org.springframework.context.annotation.Configuration; import com.b2international.snowowl.core.config.SnowOwlConfiguration; +import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; import com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration; import springfox.documentation.spring.web.plugins.Docket; @@ -31,6 +32,8 @@ @ComponentScan("com.b2international.snowowl.snomed.core.rest") public class SnomedApiConfig extends BaseApiConfig { + public static final String REPOSITORY_ID = SnomedDatastoreActivator.REPOSITORY_UUID; + @Override public String getApiBaseUrl() { return "/snomed-ct/v3"; diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/AbstractSnomedRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/AbstractSnomedRestService.java index cf8b770f680..b3b3a3208f7 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/AbstractSnomedRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/AbstractSnomedRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,14 +18,14 @@ import java.util.Set; import com.b2international.snowowl.core.rest.AbstractRestService; -import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; +import com.b2international.snowowl.core.rest.SnomedApiConfig; /** * @since 7.2 */ public abstract class AbstractSnomedRestService extends AbstractRestService { - protected String repositoryId = SnomedDatastoreActivator.REPOSITORY_UUID; + protected final String repositoryId = SnomedApiConfig.REPOSITORY_ID; public AbstractSnomedRestService() { super(); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedClassificationRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedClassificationRestService.java index 6befca795b3..39dd9c3953e 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedClassificationRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedClassificationRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,14 +81,6 @@ public SnomedClassificationRestService() { @RequestParam(value="userId", required=false) final String userId, - @ApiParam(value = "The scrollKeepAlive to start a scroll using this query") - @RequestParam(value="scrollKeepAlive", required=false) - final String scrollKeepAlive, - - @ApiParam(value = "A scrollId to continue scrolling a previous query") - @RequestParam(value="scrollId", required=false) - final String scrollId, - @ApiParam(value = "The search key to use for retrieving the next page of results") @RequestParam(value="searchAfter", required=false) final String searchAfter, @@ -106,8 +98,6 @@ public SnomedClassificationRestService() { .filterByUserId(userId) .filterByStatus(status) .sortBy(extractSortFields(sort)) - .setScroll(scrollKeepAlive) - .setScrollId(scrollId) .setSearchAfter(searchAfter) .setLimit(limit) .build(SnomedDatastoreActivator.REPOSITORY_UUID) @@ -182,14 +172,6 @@ public Promise> beginClassification( @PathVariable(value="classificationId") final String classificationId, - @ApiParam(value = "The scrollKeepAlive to start a scroll using this query") - @RequestParam(value="scrollKeepAlive", required=false) - final String scrollKeepAlive, - - @ApiParam(value = "A scrollId to continue scrolling a previous query") - @RequestParam(value="scrollId", required=false) - final String scrollId, - @ApiParam(value = "The search key to use for retrieving the next page of results") @RequestParam(value="searchAfter", required=false) final String searchAfter, @@ -207,8 +189,6 @@ public Promise> beginClassification( .filterByClassificationId(classificationId) .setExpand("equivalentConcepts(expand(pt()))") .setLocales(extendedLocales) - .setScroll(scrollKeepAlive) - .setScrollId(scrollId) .setSearchAfter(searchAfter) .setLimit(limit) .build(SnomedDatastoreActivator.REPOSITORY_UUID) @@ -236,14 +216,6 @@ public Promise> beginClassification( @RequestParam(value="expand", required=false) final String expand, - @ApiParam(value = "The scrollKeepAlive to start a scroll using this query") - @RequestParam(value="scrollKeepAlive", required=false) - final String scrollKeepAlive, - - @ApiParam(value = "A scrollId to continue scrolling a previous query") - @RequestParam(value="scrollId", required=false) - final String scrollId, - @ApiParam(value = "The search key to use for retrieving the next page of results") @RequestParam(value="searchAfter", required=false) final String searchAfter, @@ -262,8 +234,6 @@ public Promise> beginClassification( return ClassificationRequests.prepareSearchRelationshipChange() .filterByClassificationId(classificationId) .setExpand(expandWithRelationship) - .setScroll(scrollKeepAlive) - .setScrollId(scrollId) .setSearchAfter(searchAfter) .setLimit(limit) .build(SnomedDatastoreActivator.REPOSITORY_UUID) diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedConceptRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedConceptRestService.java index 010d5b1704c..4e454258670 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedConceptRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedConceptRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ */ package com.b2international.snowowl.snomed.core.rest; -import java.net.URI; import java.util.Collections; import java.util.List; import java.util.Map; @@ -28,7 +27,6 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; import com.b2international.commons.StringUtils; import com.b2international.commons.http.ExtendedLocale; @@ -43,10 +41,10 @@ import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; -import com.b2international.snowowl.snomed.core.rest.domain.ChangeRequest; import com.b2international.snowowl.snomed.core.rest.domain.SnomedConceptRestInput; import com.b2international.snowowl.snomed.core.rest.domain.SnomedConceptRestSearch; import com.b2international.snowowl.snomed.core.rest.domain.SnomedConceptRestUpdate; +import com.b2international.snowowl.snomed.core.rest.domain.SnomedResourceRequest; import com.b2international.snowowl.snomed.datastore.request.SnomedDescriptionSearchRequestBuilder; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; import com.google.common.collect.ImmutableMap; @@ -113,8 +111,6 @@ public SnomedConceptRestService() { return SnomedRequests .prepareSearchConcept() .setLimit(params.getLimit()) - .setScroll(params.getScrollKeepAlive()) - .setScrollId(params.getScrollId()) .setSearchAfter(params.getSearchAfter()) .filterByIds(params.getId()) .filterByEffectiveTime(params.getEffectiveTime()) @@ -230,7 +226,7 @@ public ResponseEntity create( @ApiParam(value = "Concept parameters") @RequestBody - final ChangeRequest body, + final SnomedResourceRequest body, @RequestHeader(value = X_AUTHOR, required = false) final String author) { @@ -246,7 +242,7 @@ public ResponseEntity create( .getResultAs(String.class); - return ResponseEntity.created(getConceptLocationURI(branchPath, createdConceptId)).build(); + return ResponseEntity.created(getResourceLocationURI(branchPath, createdConceptId)).build(); } @ApiOperation( @@ -281,7 +277,7 @@ public void update( @ApiParam(value = "Updated Concept parameters") @RequestBody - final ChangeRequest body, + final SnomedResourceRequest body, @RequestHeader(value = X_AUTHOR, required = false) final String author) { @@ -335,10 +331,6 @@ public void delete( .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS); } - private URI getConceptLocationURI(String branchPath, String conceptId) { - return MvcUriComponentsBuilder.fromController(SnomedConceptRestService.class).pathSegment(branchPath, conceptId).build().toUri(); - } - @Override protected Sort toSort(String field, boolean ascending, String branch, List extendedLocales) { switch (field) { diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedDescriptionRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedDescriptionRestService.java index a2ff6f5637a..641d72fe1ae 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedDescriptionRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedDescriptionRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ */ package com.b2international.snowowl.snomed.core.rest; -import java.net.URI; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -25,7 +24,6 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; import com.b2international.commons.StringUtils; import com.b2international.commons.http.ExtendedLocale; @@ -38,10 +36,10 @@ import com.b2international.snowowl.snomed.core.domain.Acceptability; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; import com.b2international.snowowl.snomed.core.domain.SnomedDescriptions; -import com.b2international.snowowl.snomed.core.rest.domain.ChangeRequest; import com.b2international.snowowl.snomed.core.rest.domain.SnomedDescriptionRestInput; import com.b2international.snowowl.snomed.core.rest.domain.SnomedDescriptionRestSearch; import com.b2international.snowowl.snomed.core.rest.domain.SnomedDescriptionRestUpdate; +import com.b2international.snowowl.snomed.core.rest.domain.SnomedResourceRequest; import com.b2international.snowowl.snomed.datastore.request.SnomedDescriptionSearchRequestBuilder; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; import com.google.common.collect.ImmutableSet; @@ -132,8 +130,6 @@ public Promise searchByGet( return req .setLocales(extendedLocales) .setLimit(params.getLimit()) - .setScroll(params.getScrollKeepAlive()) - .setScrollId(params.getScrollId()) .setSearchAfter(params.getSearchAfter()) .setExpand(params.getExpand()) .sortBy(sorts) @@ -183,7 +179,7 @@ public ResponseEntity create( @ApiParam(value = "Description parameters") @RequestBody - final ChangeRequest body, + final SnomedResourceRequest body, @RequestHeader(value = X_AUTHOR, required = false) final String author) { @@ -198,7 +194,7 @@ public ResponseEntity create( .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS) .getResultAs(String.class); - return ResponseEntity.created(getDescriptionLocation(branchPath, createdDescriptionId)).build(); + return ResponseEntity.created(getResourceLocationURI(branchPath, createdDescriptionId)).build(); } @ApiOperation( @@ -250,7 +246,7 @@ public void update( @ApiParam(value = "Update Description parameters") @RequestBody - final ChangeRequest body, + final SnomedResourceRequest body, @RequestHeader(value = X_AUTHOR, required = false) final String author) { @@ -301,7 +297,4 @@ public void delete( .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS); } - private URI getDescriptionLocation(final String branchPath, final String descriptionId) { - return MvcUriComponentsBuilder.fromController(SnomedDescriptionRestService.class).pathSegment(branchPath, descriptionId).build().toUri(); - } } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedExportRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedExportRestService.java index 9e0477d7c1f..c033c6bd30c 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedExportRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedExportRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,6 +43,7 @@ import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; import com.b2international.commons.exceptions.BadRequestException; +import com.b2international.commons.exceptions.NotFoundException; import com.b2international.commons.validation.ApiValidation; import com.b2international.snowowl.core.ApplicationContext; import com.b2international.snowowl.core.attachments.AttachmentRegistry; @@ -50,17 +51,16 @@ import com.b2international.snowowl.core.branch.Branch; import com.b2international.snowowl.core.date.DateFormats; import com.b2international.snowowl.core.date.Dates; +import com.b2international.snowowl.core.domain.ExportResult; import com.b2international.snowowl.core.rest.AbstractRestService; import com.b2international.snowowl.core.rest.RestApiError; import com.b2international.snowowl.datastore.request.RepositoryRequests; import com.b2international.snowowl.eventbus.IEventBus; import com.b2international.snowowl.snomed.cis.SnomedIdentifiers; -import com.b2international.snowowl.snomed.core.domain.Rf2ExportResult; import com.b2international.snowowl.snomed.core.domain.Rf2RefSetExportLayout; import com.b2international.snowowl.snomed.core.domain.Rf2ReleaseType; import com.b2international.snowowl.snomed.core.rest.domain.SnomedExportRestConfiguration; import com.b2international.snowowl.snomed.core.rest.domain.SnomedExportRestRun; -import com.b2international.snowowl.snomed.core.rest.exceptions.ExportRunNotFoundException; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; import com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; @@ -215,7 +215,7 @@ public SnomedExportRestRun getExport( final SnomedExportRestRun restRun = exports.get(exportId); if (restRun == null) { - throw new ExportRunNotFoundException(exportId.toString()); + throw new NotFoundException("Export run", exportId.toString()); } else { return restRun; } @@ -240,7 +240,7 @@ public SnomedExportRestRun getExport( final Rf2RefSetExportLayout refSetExportLayout = ApplicationContext.getServiceForClass(SnomedCoreConfiguration.class).getExport().getRefSetExportLayout(); - final Rf2ExportResult exportedFile = SnomedRequests.rf2().prepareExport() + final ExportResult exportedFile = SnomedRequests.rf2().prepareExport() .setReleaseType(export.getType()) .setCodeSystem(export.getCodeSystemShortName()) .setExtensionOnly(export.isExtensionOnly()) diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedImportRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedImportRestService.java index 0acc882a440..e702c58b2db 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedImportRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedImportRestService.java @@ -155,13 +155,14 @@ private SnomedImportDetails convertToDetails(final UUID importId, final ISnomedImportConfiguration configuration) { final SnomedImportDetails details = new SnomedImportDetails(); - details.setCompletionDate(configuration.getCompletionDate()); - details.setCreateVersions(configuration.shouldCreateVersion()); details.setId(importId); - details.setStartDate(configuration.getStartDate()); - details.setStatus(SnomedImportStatus.getImportStatus(configuration.getStatus())); details.setType(configuration.getRf2ReleaseType()); details.setBranchPath(configuration.getBranchPath()); + details.setCodeSystemShortName(configuration.getCodeSystemShortName()); + details.setCreateVersions(configuration.shouldCreateVersion()); + details.setStartDate(configuration.getStartDate()); + details.setCompletionDate(configuration.getCompletionDate()); + details.setStatus(SnomedImportStatus.getImportStatus(configuration.getStatus())); return details; } } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetMemberRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetMemberRestService.java index 4d2f2e10fa2..b0debc63172 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetMemberRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetMemberRestService.java @@ -15,7 +15,6 @@ */ package com.b2international.snowowl.snomed.core.rest; -import java.net.URI; import java.util.List; import java.util.UUID; import java.util.concurrent.TimeUnit; @@ -24,7 +23,6 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; import com.b2international.commons.http.ExtendedLocale; import com.b2international.commons.options.Options; @@ -34,10 +32,10 @@ import com.b2international.snowowl.core.rest.RestApiError; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMembers; -import com.b2international.snowowl.snomed.core.rest.domain.ChangeRequest; import com.b2international.snowowl.snomed.core.rest.domain.SnomedMemberRestUpdate; import com.b2international.snowowl.snomed.core.rest.domain.SnomedRefSetMemberRestInput; import com.b2international.snowowl.snomed.core.rest.domain.SnomedReferenceSetMemberRestSearch; +import com.b2international.snowowl.snomed.core.rest.domain.SnomedResourceRequest; import com.b2international.snowowl.snomed.core.rest.request.RefSetMemberRequestResolver; import com.b2international.snowowl.snomed.core.rest.request.RequestResolver; import com.b2international.snowowl.snomed.core.rest.request.RestRequest; @@ -88,8 +86,6 @@ public SnomedReferenceSetMemberRestService() { final SnomedRefSetMemberSearchRequestBuilder req = SnomedRequests.prepareSearchMember() .setLimit(params.getLimit()) - .setScroll(params.getScrollKeepAlive()) - .setScrollId(params.getScrollId()) .setSearchAfter(params.getSearchAfter()) .filterByIds(params.getId()) .filterByActive(params.getActive()) @@ -190,7 +186,7 @@ public ResponseEntity create( @ApiParam(value = "Reference set member parameters") @RequestBody - final ChangeRequest body, + final SnomedResourceRequest body, @RequestHeader(value = X_AUTHOR, required = false) final String author) { @@ -209,7 +205,7 @@ public ResponseEntity create( .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS) .getResultAs(String.class); - return ResponseEntity.created(getRefSetMemberLocationURI(branchPath, createdRefSetMemberId)).build(); + return ResponseEntity.created(getResourceLocationURI(branchPath, createdRefSetMemberId)).build(); } @ApiOperation( @@ -272,7 +268,7 @@ public void update( @ApiParam(value = "Updated Reference Set parameters") @RequestBody - final ChangeRequest body, + final SnomedResourceRequest body, @ApiParam(value = "Force update flag") @RequestParam(defaultValue="false", required=false) @@ -321,7 +317,7 @@ public void update( @ApiParam(value = "Reference set member action") @RequestBody - final ChangeRequest body, + final SnomedResourceRequest body, @RequestHeader(value = X_AUTHOR, required = false) final String author) { @@ -344,7 +340,4 @@ public void update( .getSync(); } - private URI getRefSetMemberLocationURI(String branchPath, String memberId) { - return MvcUriComponentsBuilder.fromController(SnomedReferenceSetMemberRestService.class).pathSegment(branchPath, memberId).build().toUri(); - } } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetRestService.java index d30b586ff00..98707680807 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,17 +17,16 @@ import static com.google.common.collect.Sets.newHashSetWithExpectedSize; -import java.net.URI; import java.util.Collection; import java.util.List; import java.util.Set; import java.util.concurrent.TimeUnit; +import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; import com.b2international.commons.exceptions.BadRequestException; import com.b2international.commons.http.ExtendedLocale; @@ -35,13 +34,15 @@ import com.b2international.snowowl.core.events.bulk.BulkRequest; import com.b2international.snowowl.core.events.bulk.BulkRequestBuilder; import com.b2international.snowowl.core.events.util.Promise; +import com.b2international.snowowl.core.request.SearchResourceRequest.Sort; import com.b2international.snowowl.core.rest.AbstractRestService; import com.b2international.snowowl.core.rest.RestApiError; import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSet; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSets; -import com.b2international.snowowl.snomed.core.rest.domain.ChangeRequest; import com.b2international.snowowl.snomed.core.rest.domain.SnomedRefSetRestInput; +import com.b2international.snowowl.snomed.core.rest.domain.SnomedReferenceSetRestSearch; +import com.b2international.snowowl.snomed.core.rest.domain.SnomedResourceRequest; import com.b2international.snowowl.snomed.core.rest.request.BulkRestRequest; import com.b2international.snowowl.snomed.core.rest.request.RefSetMemberRequestResolver; import com.b2international.snowowl.snomed.core.rest.request.RefSetRequestResolver; @@ -70,53 +71,70 @@ public SnomedReferenceSetRestService() { @ApiOperation( value="Retrieve Reference Sets from a branch", - notes="Returns a list with all reference sets from a branch." + notes="Returns a list with all/filtered Reference Sets from a branch." + + "

The following properties can be expanded:" + + "

" + + "• members() – members currently available in the reference set
" ) @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = SnomedReferenceSets.class), + @ApiResponse(code = 400, message = "Invalid search config", response = RestApiError.class), @ApiResponse(code = 404, message = "Branch not found", response = RestApiError.class) }) @GetMapping(produces = { AbstractRestService.JSON_MEDIA_TYPE }) - public @ResponseBody Promise search( + public @ResponseBody Promise searchByGet( @ApiParam(value = "The branch path", required = true) @PathVariable(value="path") - final String branchPath, - - @ApiParam(value = "The reference set type to match") - @RequestParam(value="refSetTypes", required=false) - final String[] refSetTypes, + final String branch, - @ApiParam(value = "The scrollKeepAlive to start a scroll using this query") - @RequestParam(value="scrollKeepAlive", required=false) - final String scrollKeepAlive, + final SnomedReferenceSetRestSearch params, - @ApiParam(value = "A scrollId to continue scrolling a previous query") - @RequestParam(value="scrollId", required=false) - final String scrollId, - - @ApiParam(value = "The search key to use for retrieving the next page of results") - @RequestParam(value="searchAfter", required=false) - final String searchAfter, + @ApiParam(value = "Accepted language tags, in order of preference") + @RequestHeader(value=HttpHeaders.ACCEPT_LANGUAGE, defaultValue="en-US;q=0.8,en-GB;q=0.6", required=false) + final String acceptLanguage) { + + final List extendedLocales = getExtendedLocales(acceptLanguage); - @ApiParam(value = "The maximum number of items to return", defaultValue = "50") - @RequestParam(value="limit", required=false) - final int limit, - - @ApiParam(value = "Sort keys") - @RequestParam(value="sort", required=false) - final List sortKeys) { + List sorts = extractSortFields(params.getSort(), branch, extendedLocales); return SnomedRequests.prepareSearchRefSet() - .filterByTypes(getRefSetTypes(refSetTypes)) - .setScroll(scrollKeepAlive) - .setScrollId(scrollId) - .setSearchAfter(searchAfter) - .setLimit(limit) - .sortBy(extractSortFields(sortKeys)) - .build(repositoryId, branchPath) + .filterByTypes(getRefSetTypes(params.getRefSetTypes())) + .setLimit(params.getLimit()) + .setSearchAfter(params.getSearchAfter()) + .setLocales(extendedLocales) + .sortBy(sorts) + .build(repositoryId, branch) .execute(getBus()); } + @ApiOperation( + value="Retrieve Reference Sets from a branch", + notes="Returns a list with all/filtered Reference Sets from a branch." + + "

The following properties can be expanded:" + + "

" + + "• members() – members currently available in the reference set
" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "OK", response = SnomedReferenceSets.class), + @ApiResponse(code = 400, message = "Invalid search config", response = RestApiError.class), + @ApiResponse(code = 404, message = "Branch not found", response = RestApiError.class) + }) + @PostMapping(value="/search", produces = { AbstractRestService.JSON_MEDIA_TYPE }) + public @ResponseBody Promise searchByPost( + @ApiParam(value = "The branch path", required = true) + @PathVariable(value="path") + final String branch, + + @RequestBody(required = false) + final SnomedReferenceSetRestSearch body, + + @ApiParam(value = "Accepted language tags, in order of preference") + @RequestHeader(value=HttpHeaders.ACCEPT_LANGUAGE, defaultValue="en-US;q=0.8,en-GB;q=0.6", required=false) + final String acceptLanguage) { + + return searchByGet(branch, body, acceptLanguage); + } + private Collection getRefSetTypes(String[] refSetTypes) { if (refSetTypes == null) { return null; @@ -201,7 +219,7 @@ public ResponseEntity create( @ApiParam(value = "Reference set parameters") @RequestBody - final ChangeRequest body, + final SnomedResourceRequest body, @RequestHeader(value = X_AUTHOR, required = false) final String author) { @@ -216,7 +234,7 @@ public ResponseEntity create( .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS) .getResultAs(String.class); - return ResponseEntity.created(getRefSetLocationURI(branchPath, createdRefSetId)).build(); + return ResponseEntity.created(getResourceLocationURI(branchPath, createdRefSetId)).build(); } @ApiOperation( @@ -243,7 +261,7 @@ public void executeAction( @ApiParam(value = "Reference set action") @RequestBody - final ChangeRequest body, + final SnomedResourceRequest body, @RequestHeader(value = X_AUTHOR) final String author) { @@ -288,7 +306,7 @@ public void updateMembers( @ApiParam(value = "The reference set member changes") @RequestBody - final ChangeRequest request, + final SnomedResourceRequest request, @RequestHeader(value = X_AUTHOR, required = false) final String author) { @@ -350,7 +368,4 @@ public void delete( .getSync(); } - private URI getRefSetLocationURI(String branchPath, String refSetId) { - return MvcUriComponentsBuilder.fromController(SnomedReferenceSetRestService.class).pathSegment(branchPath, refSetId).build().toUri(); - } } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRelationshipRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRelationshipRestService.java index 42e5f2e8c9f..4033792abdf 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRelationshipRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRelationshipRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,14 +15,12 @@ */ package com.b2international.snowowl.snomed.core.rest; -import java.net.URI; import java.util.List; import java.util.concurrent.TimeUnit; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; import com.b2international.commons.http.ExtendedLocale; import com.b2international.snowowl.core.events.util.Promise; @@ -30,10 +28,10 @@ import com.b2international.snowowl.core.rest.RestApiError; import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; import com.b2international.snowowl.snomed.core.domain.SnomedRelationships; -import com.b2international.snowowl.snomed.core.rest.domain.ChangeRequest; import com.b2international.snowowl.snomed.core.rest.domain.SnomedRelationshipRestInput; import com.b2international.snowowl.snomed.core.rest.domain.SnomedRelationshipRestSearch; import com.b2international.snowowl.snomed.core.rest.domain.SnomedRelationshipRestUpdate; +import com.b2international.snowowl.snomed.core.rest.domain.SnomedResourceRequest; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; import io.swagger.annotations.Api; @@ -94,8 +92,6 @@ public Promise searchByGet( .filterByGroup(params.getGroup()) .filterByUnionGroup(params.getUnionGroup()) .setLimit(params.getLimit()) - .setScroll(params.getScrollKeepAlive()) - .setScrollId(params.getScrollId()) .setSearchAfter(params.getSearchAfter()) .setExpand(params.getExpand()) .setLocales(extendedLocales) @@ -150,7 +146,7 @@ public ResponseEntity create( @ApiParam(value = "Relationship parameters") @RequestBody - final ChangeRequest body, + final SnomedResourceRequest body, @RequestHeader(value = X_AUTHOR, required = false) final String author) { @@ -165,7 +161,7 @@ public ResponseEntity create( .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS) .getResultAs(String.class); - return ResponseEntity.created(getRelationshipLocation(branchPath, createdRelationshipId)).build(); + return ResponseEntity.created(getResourceLocationURI(branchPath, createdRelationshipId)).build(); } @ApiOperation( @@ -212,7 +208,7 @@ public void update( @ApiParam(value = "Update Relationship parameters") @RequestBody - final ChangeRequest body, + final SnomedResourceRequest body, @RequestHeader(value = X_AUTHOR, required = false) final String author) { @@ -225,10 +221,10 @@ public void update( .prepareUpdateRelationship(relationshipId) .setActive(update.isActive()) .setModuleId(update.getModuleId()) - .setCharacteristicType(update.getCharacteristicType()) + .setCharacteristicTypeId(update.getCharacteristicTypeId()) .setGroup(update.getGroup()) .setUnionGroup(update.getUnionGroup()) - .setModifier(update.getModifier()) + .setModifierId(update.getModifierId()) .setTypeId(update.getTypeId()) .setDestinationId(update.getDestinationId()) .build(repositoryId, branchPath, author, commitComment, defaultModuleId) @@ -275,7 +271,4 @@ public void delete( .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS); } - private URI getRelationshipLocation(final String branchPath, final String relationshipId) { - return MvcUriComponentsBuilder.fromController(SnomedRelationshipRestService.class).pathSegment(branchPath, relationshipId).build().toUri(); - } } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchCompareRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchCompareRestService.java new file mode 100644 index 00000000000..f7b54a7e34a --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchCompareRestService.java @@ -0,0 +1,33 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.core.rest; + +import org.springframework.web.bind.annotation.RestController; + +import com.b2international.snowowl.core.rest.SnomedApiConfig; +import com.b2international.snowowl.core.rest.compare.RepositoryBranchCompareRestService; + +/** + * @since 7.3 + */ +@RestController +public class SnomedRepositoryBranchCompareRestService extends RepositoryBranchCompareRestService { + + public SnomedRepositoryBranchCompareRestService() { + super(SnomedApiConfig.REPOSITORY_ID); + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeCollectionComparator.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchMergeRestService.java similarity index 51% rename from snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeCollectionComparator.java rename to snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchMergeRestService.java index f3a0fef9615..045b6f8d946 100644 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeCollectionComparator.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchMergeRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,20 +13,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.semanticengine.utils; +package com.b2international.snowowl.snomed.core.rest; -import com.b2international.snowowl.dsl.scg.Attribute; +import org.springframework.web.bind.annotation.RestController; +import com.b2international.snowowl.core.rest.SnomedApiConfig; +import com.b2international.snowowl.core.rest.branch.RepositoryBranchMergeRestService; /** - * {@link CollectionComparator} implementation to handle collections of {@link Attribute}s. - * + * @since 7.3 */ -public class AttributeCollectionComparator extends CollectionComparator { +@RestController +public class SnomedRepositoryBranchMergeRestService extends RepositoryBranchMergeRestService { - @Override - protected boolean itemsEqual(Attribute expected, Attribute actual) { - // TODO: handle single-concept expressions - return expected.toString().equals(actual.toString()); + public SnomedRepositoryBranchMergeRestService() { + super(SnomedApiConfig.REPOSITORY_ID); } -} \ No newline at end of file + +} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/DefinitionStatusProvider.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchRestService.java similarity index 52% rename from snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/DefinitionStatusProvider.java rename to snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchRestService.java index dba716c71ee..e5104b39475 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/DefinitionStatusProvider.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchRestService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,16 +13,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.domain; +package com.b2international.snowowl.snomed.core.rest; + +import org.springframework.web.bind.annotation.RestController; + +import com.b2international.snowowl.core.rest.SnomedApiConfig; +import com.b2international.snowowl.core.rest.branch.RepositoryBranchRestService; /** - * Holds a SNOMED CT concept's definition status. + * @since 7.3 */ -public interface DefinitionStatusProvider { +@RestController +public class SnomedRepositoryBranchRestService extends RepositoryBranchRestService { + + public SnomedRepositoryBranchRestService() { + super(SnomedApiConfig.REPOSITORY_ID); + } - /** - * @return the definition status of this concept (either {@link DefinitionStatus#PRIMITIVE PRIMITIVE} or - * {@link DefinitionStatus#FULLY_DEFINED FULLY_DEFINED}) - */ - DefinitionStatus getDefinitionStatus(); } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchReviewRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchReviewRestService.java new file mode 100644 index 00000000000..ae5b27c5748 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryBranchReviewRestService.java @@ -0,0 +1,33 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.core.rest; + +import org.springframework.web.bind.annotation.RestController; + +import com.b2international.snowowl.core.rest.SnomedApiConfig; +import com.b2international.snowowl.core.rest.branch.RepositoryBranchReviewRestService; + +/** + * @since 7.3 + */ +@RestController +public class SnomedRepositoryBranchReviewRestService extends RepositoryBranchReviewRestService { + + public SnomedRepositoryBranchReviewRestService() { + super(SnomedApiConfig.REPOSITORY_ID); + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryCommitRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryCommitRestService.java new file mode 100644 index 00000000000..e3fe9baed55 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRepositoryCommitRestService.java @@ -0,0 +1,33 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.core.rest; + +import org.springframework.web.bind.annotation.RestController; + +import com.b2international.snowowl.core.rest.SnomedApiConfig; +import com.b2international.snowowl.core.rest.commit.RepositoryCommitRestService; + +/** + * @since 7.3 + */ +@RestController +public class SnomedRepositoryCommitRestService extends RepositoryCommitRestService { + + public SnomedRepositoryCommitRestService() { + super(SnomedApiConfig.REPOSITORY_ID); + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/AbstractSnomedComponentRestUpdate.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/AbstractSnomedComponentRestUpdate.java index 2251f9b4937..8fef4205062 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/AbstractSnomedComponentRestUpdate.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/AbstractSnomedComponentRestUpdate.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ */ package com.b2international.snowowl.snomed.core.rest.domain; +import com.b2international.snowowl.snomed.core.domain.InactivationProperties; + /** * @since 4.0 */ @@ -22,7 +24,8 @@ public abstract class AbstractSnomedComponentRestUpdate { private String moduleId; private Boolean active; - + private InactivationProperties inactivationProperties; + public Boolean isActive() { return active; } @@ -38,5 +41,13 @@ public String getModuleId() { public void setModuleId(final String moduleId) { this.moduleId = moduleId; } + + public InactivationProperties getInactivationProperties() { + return inactivationProperties; + } + + public void setInactivationProperties(InactivationProperties inactivationProperties) { + this.inactivationProperties = inactivationProperties; + } } \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ChangeRequest.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ChangeRequest.java deleted file mode 100644 index cb216da88cb..00000000000 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ChangeRequest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.rest.domain; - -import com.fasterxml.jackson.annotation.JsonUnwrapped; - -public class ChangeRequest { - - private T change; - private String commitComment; - private String defaultModuleId; - - @JsonUnwrapped - public T getChange() { - return change; - } - - public String getCommitComment() { - return commitComment; - } - - public String getDefaultModuleId() { - return defaultModuleId; - } - - public void setChange(final T change) { - this.change = change; - } - - public void setCommitComment(final String commitComment) { - this.commitComment = commitComment; - } - - public void setDefaultModuleId(final String defaultModuleId) { - this.defaultModuleId = defaultModuleId; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("ChangeRequest [change="); - builder.append(change); - builder.append(", commitComment="); - builder.append(commitComment); - builder.append(", defaultModuleId="); - builder.append(defaultModuleId); - builder.append("]"); - return builder.toString(); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ExpandableSnomedRelationship.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ExpandableSnomedRelationship.java deleted file mode 100644 index 6fd4ada18cc..00000000000 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ExpandableSnomedRelationship.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.rest.domain; - -import java.util.Date; - -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; -import com.b2international.snowowl.snomed.core.domain.SnomedConcept; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; -import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMembers; -import com.fasterxml.jackson.annotation.JsonIgnore; -/** - * @since 7.0 - */ -public class ExpandableSnomedRelationship { - - private SnomedRelationship wrappedRelationship; - private SnomedConceptMini source; - private SnomedConceptMini type; - - public ExpandableSnomedRelationship(SnomedRelationship wrappedRelationship, String[] expand) { - this.wrappedRelationship = wrappedRelationship; - final SnomedConcept source = wrappedRelationship.getSource(); - for (String expandParam : expand) { - if ("source.fsn".equals(expandParam)) { - if (source.getFsn() != null) { - setSource(new SnomedConceptMini(source.getId(), source.getFsn().getTerm())); - } else { - setSource(new SnomedConceptMini(source.getId())); - } - } else if ("type.fsn".equals(expandParam)) { - final SnomedConcept type = wrappedRelationship.getType(); - if (type.getFsn() != null) { - setType(new SnomedConceptMini(type.getId(), type.getFsn().getTerm())); - } else { - setType(new SnomedConceptMini(type.getId())); - } - } - } - } - - @JsonIgnore - public long getStorageKey() { - return -1; - } - - public SnomedReferenceSetMembers getMembers() { - return null; - } - - public SnomedConcept getDestinationConcept() { - return null; - } - - public SnomedConcept getSourceConcept() { - return null; - } - - public SnomedConcept getTypeConcept() { - return null; - } - - public void setSource(SnomedConceptMini source) { - this.source = source; - } - - public SnomedConceptMini getSource() { - return source; - } - - public void setType(SnomedConceptMini type) { - this.type = type; - } - - public SnomedConceptMini getType() { - return type; - } - - public Boolean isActive() { - return wrappedRelationship.isActive(); - } - - public Date getEffectiveTime() { - return wrappedRelationship.getEffectiveTime(); - } - - public String getModuleId() { - return wrappedRelationship.getModuleId(); - } - - public String getId() { - return wrappedRelationship.getId(); - } - - public Boolean isReleased() { - return wrappedRelationship.isReleased(); - } - - public String getSourceId() { - return wrappedRelationship.getSourceId(); - } - - public String getDestinationId() { - return wrappedRelationship.getDestinationId(); - } - - public boolean isDestinationNegated() { - return wrappedRelationship.isDestinationNegated(); - } - - public String getTypeId() { - return wrappedRelationship.getTypeId(); - } - - public Integer getGroup() { - return wrappedRelationship.getGroup(); - } - - public Integer getUnionGroup() { - return wrappedRelationship.getUnionGroup(); - } - - public CharacteristicType getCharacteristicType() { - return wrappedRelationship.getCharacteristicType(); - } - - public RelationshipModifier getModifier() { - return wrappedRelationship.getModifier(); - } - - public String getIconId() { - return wrappedRelationship.getIconId(); - } - - public Float getScore() { - return wrappedRelationship.getScore(); - } - -} diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptRestSearch.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptRestSearch.java index d58e6336f95..a271cea544a 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptRestSearch.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptRestSearch.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,19 +15,16 @@ */ package com.b2international.snowowl.snomed.core.rest.domain; -import java.util.List; -import java.util.Set; +import com.b2international.snowowl.core.rest.domain.ResourceRestSearch; import io.swagger.annotations.ApiParam; /** * @since 6.16 */ -public final class SnomedConceptRestSearch { +public final class SnomedConceptRestSearch extends ResourceRestSearch { // concept filters - @ApiParam(value = "The Concept identifier(s) to match") - private Set id; @ApiParam(value = "The effective time to match (yyyyMMdd, exact matches only)") private String effectiveTime; @@ -66,28 +63,6 @@ public final class SnomedConceptRestSearch { @ApiParam(value = "The stated ancestor(s) to match") private String[] statedAncestor; - // scrolling/paging/expansion/sorting - @ApiParam(value = "Expansion parameters") - private String expand; - @ApiParam(value = "The scrollKeepAlive to start a scroll using this query") - private String scrollKeepAlive; - @ApiParam(value = "A scrollId to continue scrolling a previous query") - private String scrollId; - @ApiParam(value = "The search key to use for retrieving the next page of results") - private String searchAfter; - @ApiParam(value = "Sort keys") - private List sort; - @ApiParam(value = "The maximum number of items to return", defaultValue = "50") - private int limit = 50; - - public Set getId() { - return id; - } - - public void setId(Set id) { - this.id = id; - } - public Boolean getActive() { return active; } @@ -208,52 +183,4 @@ public void setDescriptionType(String descriptionType) { this.descriptionType = descriptionType; } - public String getExpand() { - return expand; - } - - public void setExpand(String expand) { - this.expand = expand; - } - - public String getScrollKeepAlive() { - return scrollKeepAlive; - } - - public void setScrollKeepAlive(String scrollKeepAlive) { - this.scrollKeepAlive = scrollKeepAlive; - } - - public String getScrollId() { - return scrollId; - } - - public void setScrollId(String scrollId) { - this.scrollId = scrollId; - } - - public String getSearchAfter() { - return searchAfter; - } - - public void setSearchAfter(String searchAfter) { - this.searchAfter = searchAfter; - } - - public List getSort() { - return sort; - } - - public void setSort(List sort) { - this.sort = sort; - } - - public int getLimit() { - return limit; - } - - public void setLimit(int limit) { - this.limit = limit; - } - } \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptRestUpdate.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptRestUpdate.java index 2d0a88e9531..936889cf994 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptRestUpdate.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptRestUpdate.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,87 +15,40 @@ */ package com.b2international.snowowl.snomed.core.rest.domain; -import java.util.List; -import java.util.Map; - -import com.b2international.snowowl.snomed.core.domain.AssociationType; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; -import com.b2international.snowowl.snomed.core.domain.InactivationIndicator; import com.b2international.snowowl.snomed.core.domain.SnomedDescriptions; import com.b2international.snowowl.snomed.core.domain.SnomedRelationships; import com.b2international.snowowl.snomed.core.domain.SubclassDefinitionStatus; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMembers; import com.b2international.snowowl.snomed.datastore.request.SnomedConceptUpdateRequestBuilder; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; -import com.google.common.collect.ImmutableListMultimap; /** * @since 4.0 */ public class SnomedConceptRestUpdate extends AbstractSnomedComponentRestUpdate { - private DefinitionStatus definitionStatus; + private String definitionStatusId; private SubclassDefinitionStatus subclassDefinitionStatus; - private Map> associationTargets; - private InactivationIndicator inactivationIndicator; private SnomedDescriptions descriptions; private SnomedRelationships relationships; private SnomedReferenceSetMembers members; - public DefinitionStatus getDefinitionStatus() { - return definitionStatus; + public String getDefinitionStatusId() { + return definitionStatusId; } public SubclassDefinitionStatus getSubclassDefinitionStatus() { return subclassDefinitionStatus; } - public void setDefinitionStatus(final DefinitionStatus definitionStatus) { - this.definitionStatus = definitionStatus; + public void setDefinitionStatusId(final String definitionStatusId) { + this.definitionStatusId = definitionStatusId; } public void setSubclassDefinitionStatus(final SubclassDefinitionStatus subclassDefinitionStatus) { this.subclassDefinitionStatus = subclassDefinitionStatus; } - /** - * Returns with the associations between the current component and other SNOMED CT concepts. - * The associations are represented as a multimap where the keys are the {@link AssociationType association type}s - * and the values are the referred associations. - * @return a multimap of associations. - */ - public Map> getAssociationTargets() { - return associationTargets; - } - - /** - * Sets the associations for the current concept. - *
Counterpart of {@link #getAssociationTargets()}. - * @param associationTargets the multimap of associations. - */ - public void setAssociationTargets(final Map> associationTargets) { - this.associationTargets = associationTargets; - } - - /** - * Returns with the concept inactivation reason (if any). May return with {@code null} - * if the concept is active or no reason was specified during the concept inactivation process. - * @return the inactivation process. Can be {@code null} if the concept is not retired or no - * reason was specified. - */ - public InactivationIndicator getInactivationIndicator() { - return inactivationIndicator; - } - - /** - * Counterpart of the {@link #getInactivationIndicator()}. - *
Sets the inactivation reason for the concept update. - * @param inactivationIndicator the desired inactivation reason for the concept update. - */ - public void setInactivationIndicator(final InactivationIndicator inactivationIndicator) { - this.inactivationIndicator = inactivationIndicator; - } - public SnomedDescriptions getDescriptions() { return descriptions; } @@ -121,21 +74,13 @@ public void setRelationships(SnomedRelationships relationships) { } public SnomedConceptUpdateRequestBuilder toRequestBuilder(String conceptId) { - final ImmutableListMultimap.Builder targets; - if (associationTargets != null) { - targets = ImmutableListMultimap.builder(); - associationTargets.forEach(targets::putAll); - } else { - targets = null; - } return SnomedRequests .prepareUpdateConcept(conceptId) .setActive(isActive()) .setModuleId(getModuleId()) - .setAssociationTargets(targets == null ? null : targets.build()) - .setDefinitionStatus(getDefinitionStatus()) - .setInactivationIndicator(getInactivationIndicator()) + .setDefinitionStatusId(getDefinitionStatusId()) .setSubclassDefinitionStatus(getSubclassDefinitionStatus()) + .setInactivationProperties(getInactivationProperties()) .setMembers(getMembers()) .setRelationships(getRelationships()) .setDescriptions(getDescriptions()); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedDescriptionRestInput.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedDescriptionRestInput.java index c2324625988..cc60ab3cd68 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedDescriptionRestInput.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedDescriptionRestInput.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ import java.util.Map; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; import com.b2international.snowowl.snomed.datastore.request.SnomedDescriptionCreateRequestBuilder; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; @@ -31,7 +31,7 @@ public class SnomedDescriptionRestInput extends AbstractSnomedComponentRestInput private String term; private String languageCode; private String conceptId; - private CaseSignificance caseSignificance = CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE; + private String caseSignificanceId = Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE; private Map acceptability; /** @@ -65,8 +65,8 @@ public String getConceptId() { /** * @return */ - public CaseSignificance getCaseSignificance() { - return caseSignificance; + public String getCaseSignificanceId() { + return caseSignificanceId; } public Map getAcceptability() { @@ -89,8 +89,8 @@ public void setConceptId(final String conceptId) { this.conceptId = conceptId; } - public void setCaseSignificance(final CaseSignificance caseSignificance) { - this.caseSignificance = caseSignificance; + public void setCaseSignificanceId(final String caseSignificanceId) { + this.caseSignificanceId = caseSignificanceId; } public void setAcceptability(final Map acceptability) { @@ -108,7 +108,7 @@ protected SnomedDescriptionCreateRequestBuilder createRequestBuilder() { @Override public SnomedDescriptionCreateRequestBuilder toRequestBuilder() { return super.toRequestBuilder() - .setCaseSignificance(getCaseSignificance()) + .setCaseSignificanceId(getCaseSignificanceId()) .setConceptId(getConceptId()) .setLanguageCode(getLanguageCode()) .setTerm(getTerm()) @@ -127,8 +127,8 @@ public String toString() { builder.append(languageCode); builder.append(", conceptId="); builder.append(conceptId); - builder.append(", caseSignificance="); - builder.append(caseSignificance); + builder.append(", caseSignificanceId="); + builder.append(caseSignificanceId); builder.append(", acceptability="); builder.append(acceptability); builder.append("]"); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedDescriptionRestSearch.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedDescriptionRestSearch.java index a66fa9e028f..eab28ac6261 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedDescriptionRestSearch.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedDescriptionRestSearch.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,7 @@ */ package com.b2international.snowowl.snomed.core.rest.domain; -import java.util.List; -import java.util.Set; - +import com.b2international.snowowl.core.rest.domain.ResourceRestSearch; import com.b2international.snowowl.snomed.core.domain.Acceptability; import io.swagger.annotations.ApiParam; @@ -25,10 +23,7 @@ /** * @since 6.16 */ -public final class SnomedDescriptionRestSearch { - - @ApiParam(value = "The Description identifier(s) to match") - private Set id; +public final class SnomedDescriptionRestSearch extends ResourceRestSearch { @ApiParam(value = "The effective time to match (yyyyMMdd, exact matches only)") private String effectiveTime; @@ -72,32 +67,6 @@ public final class SnomedDescriptionRestSearch { @ApiParam(value = "Any membership to match in these language refsets") private String[] languageRefSet; - @ApiParam(value = "The scrollKeepAlive to start a scroll using this query") - private String scrollKeepAlive; - - @ApiParam(value = "A scrollId to continue scrolling a previous query") - private String scrollId; - - @ApiParam(value = "The search key to use for retrieving the next page of results") - private String searchAfter; - - @ApiParam(value = "The maximum number of items to return", defaultValue = "50") - private int limit = 50; - - @ApiParam(value = "Expansion parameters") - private String expand; - - @ApiParam(value = "Sort keys") - private List sort; - - public Set getId() { - return id; - } - - public void setId(Set id) { - this.id = id; - } - public String getEffectiveTime() { return effectiveTime; } @@ -210,52 +179,4 @@ public void setLanguageRefSet(String[] languageRefSet) { this.languageRefSet = languageRefSet; } - public String getScrollKeepAlive() { - return scrollKeepAlive; - } - - public void setScrollKeepAlive(String scrollKeepAlive) { - this.scrollKeepAlive = scrollKeepAlive; - } - - public String getScrollId() { - return scrollId; - } - - public void setScrollId(String scrollId) { - this.scrollId = scrollId; - } - - public String getSearchAfter() { - return searchAfter; - } - - public void setSearchAfter(String searchAfter) { - this.searchAfter = searchAfter; - } - - public int getLimit() { - return limit; - } - - public void setLimit(int limit) { - this.limit = limit; - } - - public String getExpand() { - return expand; - } - - public void setExpand(String expand) { - this.expand = expand; - } - - public List getSort() { - return sort; - } - - public void setSort(List sort) { - this.sort = sort; - } - } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedDescriptionRestUpdate.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedDescriptionRestUpdate.java index 3e9168462aa..0af1a3bcdd4 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedDescriptionRestUpdate.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedDescriptionRestUpdate.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,46 +15,31 @@ */ package com.b2international.snowowl.snomed.core.rest.domain; -import java.util.List; import java.util.Map; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.AssociationType; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; -import com.b2international.snowowl.snomed.core.domain.DescriptionInactivationIndicator; import com.b2international.snowowl.snomed.datastore.request.SnomedDescriptionUpdateRequestBuilder; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; -import com.google.common.collect.ImmutableListMultimap; /** * @since 1.0 */ public class SnomedDescriptionRestUpdate extends AbstractSnomedComponentRestUpdate { - private CaseSignificance caseSignificance; + private String caseSignificanceId; private Map acceptability; - private DescriptionInactivationIndicator inactivationIndicator; - private Map> associationTargets; private String typeId; private String term; private String languageCode; - public CaseSignificance getCaseSignificance() { - return caseSignificance; + public String getCaseSignificanceId() { + return caseSignificanceId; } public Map getAcceptability() { return acceptability; } - public DescriptionInactivationIndicator getInactivationIndicator() { - return inactivationIndicator; - } - - public Map> getAssociationTargets() { - return associationTargets; - } - public String getLanguageCode() { return languageCode; } @@ -67,22 +52,14 @@ public String getTypeId() { return typeId; } - public void setCaseSignificance(final CaseSignificance caseSignificance) { - this.caseSignificance = caseSignificance; + public void setCaseSignificance(final String caseSignificanceId) { + this.caseSignificanceId = caseSignificanceId; } public void setAcceptability(final Map acceptability) { this.acceptability = acceptability; } - public void setInactivationIndicator(DescriptionInactivationIndicator inactivationIndicator) { - this.inactivationIndicator = inactivationIndicator; - } - - public void setAssociationTargets(Map> associationTargets) { - this.associationTargets = associationTargets; - } - public void setLanguageCode(String languageCode) { this.languageCode = languageCode; } @@ -96,20 +73,11 @@ public void setTypeId(String typeId) { } public SnomedDescriptionUpdateRequestBuilder toRequestBuilder(final String descriptionId) { - final ImmutableListMultimap.Builder targets; - if (associationTargets != null) { - targets = ImmutableListMultimap.builder(); - associationTargets.forEach(targets::putAll); - } else { - targets = null; - } - return SnomedRequests - .prepareUpdateDescription(descriptionId) + return SnomedRequests.prepareUpdateDescription(descriptionId) .setActive(isActive()) .setModuleId(getModuleId()) - .setAssociationTargets(targets == null ? null : targets.build()) - .setInactivationIndicator(getInactivationIndicator()) - .setCaseSignificance(getCaseSignificance()) + .setInactivationProperties(getInactivationProperties()) + .setCaseSignificanceId(getCaseSignificanceId()) .setAcceptability(getAcceptability()) .setTypeId(getTypeId()) .setTerm(getTerm()) diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedInboundRelationships.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedInboundRelationships.java deleted file mode 100644 index 661fdff89bc..00000000000 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedInboundRelationships.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.rest.domain; - -import java.util.List; - -/** - * @since 1.0 - */ -public class SnomedInboundRelationships { - - private static String[] expandable = {"source.fsn, type.fsn"}; - - private List inboundRelationships; - private int total; - - public List getInboundRelationships() { - return inboundRelationships; - } - - public int getTotal() { - return total; - } - - public String[] getExpandable() { - return expandable; - } - - public void setInboundRelationships(final List inboundRelationships) { - this.inboundRelationships = inboundRelationships; - } - - public void setTotal(final int total) { - this.total = total; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("SnomedInboundRelationships [inboundRelationships="); - builder.append(inboundRelationships); - builder.append(", total="); - builder.append(total); - builder.append("]"); - return builder.toString(); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedOutboundRelationships.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedOutboundRelationships.java deleted file mode 100644 index a6b69b389cd..00000000000 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedOutboundRelationships.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.rest.domain; - -import java.util.List; - -import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; - -/** - * @since 1.0 - */ -public class SnomedOutboundRelationships { - - private List outboundRelationships; - private int total; - - public List getOutboundRelationships() { - return outboundRelationships; - } - - public int getTotal() { - return total; - } - - public void setOutboundRelationships(final List outboundRelationships) { - this.outboundRelationships = outboundRelationships; - } - - public void setTotal(final int total) { - this.total = total; - } - - @Override - public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("SnomedOutboundRelationships [outboundRelationships="); - builder.append(outboundRelationships); - builder.append(", total="); - builder.append(total); - builder.append("]"); - return builder.toString(); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedReferenceSetMemberRestSearch.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedReferenceSetMemberRestSearch.java index b8ee87ac9f2..cf38c1b7e52 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedReferenceSetMemberRestSearch.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedReferenceSetMemberRestSearch.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ package com.b2international.snowowl.snomed.core.rest.domain; import java.util.List; -import java.util.Set; import com.b2international.commons.CompareUtils; import com.b2international.commons.options.Options; import com.b2international.commons.options.OptionsBuilder; +import com.b2international.snowowl.core.rest.domain.ResourceRestSearch; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.datastore.request.SnomedRefSetMemberSearchRequestBuilder; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -30,11 +30,8 @@ /** * @since 6.16 */ -public final class SnomedReferenceSetMemberRestSearch { +public final class SnomedReferenceSetMemberRestSearch extends ResourceRestSearch { - @ApiParam(value = "Member UUID(s) to match") - private Set id; - @ApiParam(value="The effective time to match (yyyyMMdd, exact matches only)") private String effectiveTime; @@ -99,32 +96,6 @@ public final class SnomedReferenceSetMemberRestSearch { @ApiParam(value="Special filters for owlExpression axiom values") private SnomedOwlExpressionFilters owlExpression; - @ApiParam(value="The scrollKeepAlive to start a scroll using this query") - private String scrollKeepAlive; - - @ApiParam(value="A scrollId to continue scrolling a previous query") - private String scrollId; - - @ApiParam(value="The search key to use for retrieving the next page of results") - private String searchAfter; - - @ApiParam(value="The maximum number of items to return", defaultValue = "50") - private int limit = 50; - - @ApiParam(value="Expansion parameters") - private String expand; - - @ApiParam(value="Sort keys") - private List sort; - - public Set getId() { - return id; - } - - public void setId(Set id) { - this.id = id; - } - public String getEffectiveTime() { return effectiveTime; } @@ -293,54 +264,6 @@ public void setOwlExpression(SnomedOwlExpressionFilters owlExpression) { this.owlExpression = owlExpression; } - public String getScrollKeepAlive() { - return scrollKeepAlive; - } - - public void setScrollKeepAlive(String scrollKeepAlive) { - this.scrollKeepAlive = scrollKeepAlive; - } - - public String getScrollId() { - return scrollId; - } - - public void setScrollId(String scrollId) { - this.scrollId = scrollId; - } - - public String getSearchAfter() { - return searchAfter; - } - - public void setSearchAfter(String searchAfter) { - this.searchAfter = searchAfter; - } - - public int getLimit() { - return limit; - } - - public void setLimit(int limit) { - this.limit = limit; - } - - public String getExpand() { - return expand; - } - - public void setExpand(String expand) { - this.expand = expand; - } - - public List getSort() { - return sort; - } - - public void setSort(List sort) { - this.sort = sort; - } - @JsonIgnore public Options toPropsFilter() { OptionsBuilder propFilter = Options.builder(); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptMini.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedReferenceSetRestSearch.java similarity index 57% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptMini.java rename to snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedReferenceSetRestSearch.java index c03b48a39e5..91d0270ff42 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptMini.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedReferenceSetRestSearch.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,33 +15,24 @@ */ package com.b2international.snowowl.snomed.core.rest.domain; +import com.b2international.snowowl.core.rest.domain.ResourceRestSearch; + +import io.swagger.annotations.ApiParam; + /** - * @since 7.0 + * @since 7.3 */ -public class SnomedConceptMini { - - private String id; - private String fsn; - - public SnomedConceptMini(String id) { - this(id, id); - } - - public SnomedConceptMini(String id, String fsn) { - this.id = id; - this.fsn = fsn; - } +public final class SnomedReferenceSetRestSearch extends ResourceRestSearch { - public void setFsn(String fsn) { - this.fsn = fsn; - } + @ApiParam(value = "The reference set type to match") + private String[] refSetTypes; - public String getId() { - return id; + public String[] getRefSetTypes() { + return refSetTypes; } - public String getFsn() { - return fsn; + public void setRefSetTypes(String[] refSetTypes) { + this.refSetTypes = refSetTypes; } } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedRelationshipRestInput.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedRelationshipRestInput.java index 0901591f96d..551c58da210 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedRelationshipRestInput.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedRelationshipRestInput.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,7 @@ */ package com.b2international.snowowl.snomed.core.rest.domain; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.datastore.request.SnomedRelationshipCreateRequestBuilder; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; @@ -25,17 +24,17 @@ */ public class SnomedRelationshipRestInput extends AbstractSnomedComponentRestInput { - private CharacteristicType characteristicType = CharacteristicType.STATED_RELATIONSHIP; + private String characteristicTypeId = Concepts.STATED_RELATIONSHIP; private String destinationId; private boolean destinationNegated = false; private int group = 0; - private RelationshipModifier modifier = RelationshipModifier.EXISTENTIAL; + private String modifierId = Concepts.EXISTENTIAL_RESTRICTION_MODIFIER; private String sourceId; private String typeId; private int unionGroup = 0; - public CharacteristicType getCharacteristicType() { - return characteristicType; + public String getCharacteristicTypeId() { + return characteristicTypeId; } public String getDestinationId() { @@ -50,8 +49,8 @@ public int getGroup() { return group; } - public RelationshipModifier getModifier() { - return modifier; + public String getModifierId() { + return modifierId; } public String getSourceId() { @@ -66,8 +65,8 @@ public int getUnionGroup() { return unionGroup; } - public void setCharacteristicType(final CharacteristicType characteristicType) { - this.characteristicType = characteristicType; + public void setCharacteristicTypeId(final String characteristicTypeId) { + this.characteristicTypeId = characteristicTypeId; } public void setDestinationId(final String destinationId) { @@ -82,8 +81,8 @@ public void setGroup(final int group) { this.group = group; } - public void setModifier(final RelationshipModifier modifier) { - this.modifier = modifier; + public void setModifierId(final String modifierId) { + this.modifierId = modifierId; } public void setSourceId(final String sourceId) { @@ -106,11 +105,11 @@ protected SnomedRelationshipCreateRequestBuilder createRequestBuilder() { @Override public SnomedRelationshipCreateRequestBuilder toRequestBuilder() { return super.toRequestBuilder() - .setCharacteristicType(getCharacteristicType()) + .setCharacteristicTypeId(getCharacteristicTypeId()) .setDestinationId(getDestinationId()) .setDestinationNegated(isDestinationNegated()) .setGroup(getGroup()) - .setModifier(getModifier()) + .setModifierId(getModifierId()) .setSourceId(getSourceId()) .setTypeId(getTypeId()) .setUnionGroup(getUnionGroup()); @@ -123,16 +122,16 @@ public String toString() { builder.append(getId()); builder.append(", getModuleId()="); builder.append(getModuleId()); - builder.append(", getCharacteristicType()="); - builder.append(getCharacteristicType()); + builder.append(", getCharacteristicTypeId()="); + builder.append(getCharacteristicTypeId()); builder.append(", getDestinationId()="); builder.append(getDestinationId()); builder.append(", isDestinationNegated()="); builder.append(isDestinationNegated()); builder.append(", getGroup()="); builder.append(getGroup()); - builder.append(", getModifier()="); - builder.append(getModifier()); + builder.append(", getModifierId()="); + builder.append(getModifierId()); builder.append(", getSourceId()="); builder.append(getSourceId()); builder.append(", getTypeId()="); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedRelationshipRestSearch.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedRelationshipRestSearch.java index 505954b2d49..4f837c7ee85 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedRelationshipRestSearch.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedRelationshipRestSearch.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,15 +15,14 @@ */ package com.b2international.snowowl.snomed.core.rest.domain; -import java.util.List; -import java.util.Set; +import com.b2international.snowowl.core.rest.domain.ResourceRestSearch; import io.swagger.annotations.ApiParam; -public final class SnomedRelationshipRestSearch { - - @ApiParam(value = "The Relationship ID(s) to match") - private Set id; +/** + * @since 6.16 + */ +public final class SnomedRelationshipRestSearch extends ResourceRestSearch { @ApiParam(value = "The effective time to match (yyyyMMdd, exact matches only)") private String effectiveTime; @@ -55,32 +54,6 @@ public final class SnomedRelationshipRestSearch { @ApiParam(value = "The union group to match") private Integer unionGroup; - @ApiParam(value = "The scrollKeepAlive to start a scroll using this query") - private String scrollKeepAlive; - - @ApiParam(value = "A scrollId to continue scrolling a previous query") - private String scrollId; - - @ApiParam(value = "The search key to use for retrieving the next page of results") - private String searchAfter; - - @ApiParam(value = "The maximum number of items to return", defaultValue = "50") - private int limit = 50; - - @ApiParam(value = "Expansion parameters") - private String expand; - - @ApiParam(value = "Sort keys") - private List sort; - - public Set getId() { - return id; - } - - public void setId(Set id) { - this.id = id; - } - public String getEffectiveTime() { return effectiveTime; } @@ -161,52 +134,4 @@ public void setUnionGroup(Integer unionGroup) { this.unionGroup = unionGroup; } - public String getScrollKeepAlive() { - return scrollKeepAlive; - } - - public void setScrollKeepAlive(String scrollKeepAlive) { - this.scrollKeepAlive = scrollKeepAlive; - } - - public String getScrollId() { - return scrollId; - } - - public void setScrollId(String scrollId) { - this.scrollId = scrollId; - } - - public String getSearchAfter() { - return searchAfter; - } - - public void setSearchAfter(String searchAfter) { - this.searchAfter = searchAfter; - } - - public int getLimit() { - return limit; - } - - public void setLimit(int limit) { - this.limit = limit; - } - - public String getExpand() { - return expand; - } - - public void setExpand(String expand) { - this.expand = expand; - } - - public List getSort() { - return sort; - } - - public void setSort(List sort) { - this.sort = sort; - } - } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedRelationshipRestUpdate.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedRelationshipRestUpdate.java index c3a9689d3e9..c37fb85e17d 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedRelationshipRestUpdate.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedRelationshipRestUpdate.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,6 @@ */ package com.b2international.snowowl.snomed.core.rest.domain; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; - - /** * @since 1.0 */ @@ -26,8 +22,8 @@ public class SnomedRelationshipRestUpdate extends AbstractSnomedComponentRestUpd private Integer group; private Integer unionGroup; - private CharacteristicType characteristicType; - private RelationshipModifier modifier; + private String characteristicTypeId; + private String modifierId; private String destinationId; private String typeId; @@ -47,20 +43,20 @@ public void setUnionGroup(final Integer unionGroup) { this.unionGroup = unionGroup; } - public CharacteristicType getCharacteristicType() { - return characteristicType; + public String getCharacteristicTypeId() { + return characteristicTypeId; } - public void setCharacteristicType(final CharacteristicType characteristicType) { - this.characteristicType = characteristicType; + public void setCharacteristicTypeId(final String characteristicTypeId) { + this.characteristicTypeId = characteristicTypeId; } - public RelationshipModifier getModifier() { - return modifier; + public String getModifierId() { + return modifierId; } - public void setModifier(final RelationshipModifier modifier) { - this.modifier = modifier; + public void setModifierId(final String modifierId) { + this.modifierId = modifierId; } public String getDestinationId() { diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedIdentifierRequest.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedResourceRequest.java similarity index 50% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedIdentifierRequest.java rename to snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedResourceRequest.java index 945451db1e1..c8b835969ce 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedIdentifierRequest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedResourceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,31 +15,27 @@ */ package com.b2international.snowowl.snomed.core.rest.domain; -import com.b2international.snowowl.core.terminology.ComponentCategory; - +import com.b2international.snowowl.core.rest.domain.ResourceRequest; +import com.google.common.base.MoreObjects.ToStringHelper; /** * @since 1.0 + * @param - the actual resource request body */ -public class SnomedIdentifierRequest { +public final class SnomedResourceRequest extends ResourceRequest { - private ComponentCategory type; - private String namespace; - - public ComponentCategory getType() { - return type; - } - - public void setType(ComponentCategory componentCategory) { - this.type = componentCategory; + private String defaultModuleId; + + public String getDefaultModuleId() { + return defaultModuleId; } - - public String getNamespace() { - return namespace; + + public void setDefaultModuleId(final String defaultModuleId) { + this.defaultModuleId = defaultModuleId; } - - public void setNamespace(String namespace) { - this.namespace = namespace; + + @Override + protected void doToString(ToStringHelper toStringHelper) { + toStringHelper.add("defaultModuleId", defaultModuleId); } - -} +} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/ClassificationRunNotFoundException.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/ClassificationRunNotFoundException.java deleted file mode 100644 index f7218e684e4..00000000000 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/ClassificationRunNotFoundException.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.rest.exceptions; - -import com.b2international.commons.exceptions.NotFoundException; - -/** - * Thrown when details of a classification run can not be retrieved. - */ -public class ClassificationRunNotFoundException extends NotFoundException { - - private static final long serialVersionUID = 1L; - - /** - * Creates a new exception instance with the specified argument. - * - * @param key the identifier of the classification run which was not found - */ - public ClassificationRunNotFoundException(final String key) { - super("Classification run", key); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/ExportRunNotFoundException.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/ExportRunNotFoundException.java deleted file mode 100644 index 0230cc89321..00000000000 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/ExportRunNotFoundException.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.rest.exceptions; - -import com.b2international.commons.exceptions.NotFoundException; - -/** - * Thrown when details of an export run can not be retrieved. - */ -public class ExportRunNotFoundException extends NotFoundException { - - private static final long serialVersionUID = 1L; - - /** - * Creates a new exception instance with the specified argument. - * - * @param key the identifier of the export run which was not found - */ - public ExportRunNotFoundException(final String key) { - super("Export run", key); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/FullySpecifiedNameNotFoundException.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/FullySpecifiedNameNotFoundException.java deleted file mode 100644 index 5ffffde839d..00000000000 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/FullySpecifiedNameNotFoundException.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.rest.exceptions; - -import com.b2international.commons.exceptions.NotFoundException; - -/** - * Thrown when a fully specified name can not be retrieved. - */ -public class FullySpecifiedNameNotFoundException extends NotFoundException { - - private static final long serialVersionUID = 1L; - - /** - * Creates a new exception instance with the specified argument. - * - * @param key the identifier of the concept for which a fully specified name could not be retrieved - */ - public FullySpecifiedNameNotFoundException(final String key) { - super("Fully specified name for concept", key); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/PreferredTermNotFoundException.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/PreferredTermNotFoundException.java deleted file mode 100644 index 9d342438fe5..00000000000 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/PreferredTermNotFoundException.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.rest.exceptions; - -import com.b2international.commons.exceptions.NotFoundException; - -/** - * Thrown when a preferred term can not be retrieved using the given language preferences. - */ -public class PreferredTermNotFoundException extends NotFoundException { - - private static final long serialVersionUID = 1L; - - /** - * Creates a new exception instance with the specified argument. - * - * @param key the identifier of the concept for which a preferred term could not be retrieved - */ - public PreferredTermNotFoundException(final String key) { - super("Preferred term for concept", key); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/SnomedExportException.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/SnomedExportException.java deleted file mode 100644 index 9c67bbb00f8..00000000000 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/SnomedExportException.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.rest.exceptions; - -import static com.google.common.base.Strings.nullToEmpty; - -/** - * Runtime exception indicating the failure of the SNOMED CT export process. - */ -public class SnomedExportException extends RuntimeException { - - private static final long serialVersionUID = 3399575806529622257L; - - /** - * Creates a new exception instance with the given message. - * - * @param message the message for the exception to describe the cause of the problem - */ - public SnomedExportException(final String message) { - super(nullToEmpty(message)); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/SnomedImportConfigurationNotFoundException.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/SnomedImportConfigurationNotFoundException.java deleted file mode 100644 index b1e12f42f88..00000000000 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/exceptions/SnomedImportConfigurationNotFoundException.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.rest.exceptions; - -import static com.google.common.base.Preconditions.checkNotNull; - -import java.util.UUID; - -import com.b2international.commons.exceptions.NotFoundException; - -/** - * Thrown when a SNOMED CT import configuration with a particular identifier could not be found. - */ -public class SnomedImportConfigurationNotFoundException extends NotFoundException { - - private static final long serialVersionUID = 4991544292465337742L; - - /** - * Creates a new exception instance with the specified parameters. - * - * @param importId the identifier of the import configuration - */ - public SnomedImportConfigurationNotFoundException(final UUID importId) { - super("SNOMED CT import configuration", checkNotNull(importId, "importId").toString()); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/FsnJoinerOperation.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/FsnJoinerOperation.java index 7342763cd02..8fc24f749f8 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/FsnJoinerOperation.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/FsnJoinerOperation.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ public final List run() { } private Map initDescriptionsByConcept(Iterable conceptEntries) { - final Set conceptIds = FluentIterable.from(conceptEntries).transform(IComponent.ID_FUNCTION).toSet(); + final Set conceptIds = FluentIterable.from(conceptEntries).transform(IComponent::getId).toSet(); return descriptionService.getFullySpecifiedNames(conceptIds, locales); } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/ISnomedRf2ImportService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/ISnomedRf2ImportService.java index c3927528906..5ac044559a7 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/ISnomedRf2ImportService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/ISnomedRf2ImportService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,10 +19,10 @@ import java.util.UUID; import com.b2international.commons.exceptions.BadRequestException; +import com.b2international.commons.exceptions.NotFoundException; import com.b2international.snowowl.core.domain.exceptions.CodeSystemNotFoundException; import com.b2international.snowowl.core.domain.exceptions.CodeSystemVersionNotFoundException; import com.b2international.snowowl.snomed.core.domain.ISnomedImportConfiguration; -import com.b2international.snowowl.snomed.core.rest.exceptions.SnomedImportConfigurationNotFoundException; /** * Implementations allow importing SNOMED CT content from RF2 release archives. @@ -36,7 +36,7 @@ public interface ISnomedRf2ImportService { * * @return the configuration object describing import details * - * @throws SnomedImportConfigurationNotFoundException if the specified import run does not exist + * @throws NotFoundException if the specified import run does not exist */ ISnomedImportConfiguration getImportDetails(UUID importId); @@ -55,9 +55,6 @@ public interface ISnomedRf2ImportService { * * @param importId the identifier of the import run to begin * @param inputStream the input stream opened on a valid RF2 release archive - * - * @throws SnomedImportException if the import can not start for some reason (import errors are only - * reflected in the import run's status flag) */ void startImport(UUID importId, InputStream inputStream); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/SnomedRf2ImportService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/SnomedRf2ImportService.java index a2a5de4ad2e..2a0d9c1be55 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/SnomedRf2ImportService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/SnomedRf2ImportService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,7 +47,6 @@ import com.b2international.snowowl.snomed.core.domain.ISnomedImportConfiguration.ImportStatus; import com.b2international.snowowl.snomed.core.domain.Rf2ReleaseType; import com.b2international.snowowl.snomed.core.rest.domain.SnomedImportConfiguration; -import com.b2international.snowowl.snomed.core.rest.exceptions.SnomedImportConfigurationNotFoundException; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; import com.b2international.snowowl.terminologyregistry.core.request.CodeSystemRequests; @@ -82,7 +81,7 @@ public ISnomedImportConfiguration getImportDetails(final UUID importId) { final ISnomedImportConfiguration configuration = configurationMapping.get(importId); if (null == configuration) { - throw new SnomedImportConfigurationNotFoundException(importId); + throw new NotFoundException("SNOMED CT import configuration", importId.toString()); } return configuration; diff --git a/snomed/com.b2international.snowowl.snomed.datastore.tests/.launch/snomed-core-unit-tests.launch b/snomed/com.b2international.snowowl.snomed.datastore.tests/.launch/snomed-core-unit-tests.launch index a2f61a8e4a2..cfd422d0110 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore.tests/.launch/snomed-core-unit-tests.launch +++ b/snomed/com.b2international.snowowl.snomed.datastore.tests/.launch/snomed-core-unit-tests.launch @@ -33,11 +33,12 @@ + - - + + diff --git a/snomed/com.b2international.snowowl.snomed.datastore.tests/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.datastore.tests/META-INF/MANIFEST.MF index 13a48533fce..7fd392d73f9 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore.tests/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.datastore.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Datastore Tests Bundle-SymbolicName: com.b2international.snowowl.snomed.datastore.tests;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.snomed.datastore Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/snomed/com.b2international.snowowl.snomed.datastore.tests/pom.xml b/snomed/com.b2international.snowowl.snomed.datastore.tests/pom.xml index e104578b933..4af84da3cf1 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore.tests/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.datastore.tests/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.b2international.snowowl - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT snomed-parent com.b2international.snowowl.snomed.datastore.tests @@ -46,9 +46,8 @@ org.eclipse.tycho tycho-surefire-plugin - ${tycho.version} - ${tycho.testArgLine} -Dlogback.configurationFile=${basedir}/src/configuration/logback-maven.xml + ${tycho.testArgLine} -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Dlogback.configurationFile=${basedir}/src/configuration/logback-maven.xml **/AllSnomedDatastoreTests.java diff --git a/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRelationshipIndexEntrySerializationTest.java b/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRelationshipIndexEntrySerializationTest.java index b311fee9784..100e9160ce0 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRelationshipIndexEntrySerializationTest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRelationshipIndexEntrySerializationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,8 +27,6 @@ import com.b2international.index.revision.BaseRevisionIndexTest; import com.b2international.index.revision.RevisionBranch; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; import com.b2international.snowowl.snomed.datastore.id.RandomSnomedIdentiferGenerator; import com.fasterxml.jackson.databind.ObjectMapper; @@ -59,8 +57,8 @@ public void indexRelationship() throws Exception { .sourceId(Concepts.ROOT_CONCEPT) .destinationId(Concepts.ROOT_CONCEPT) .typeId(Concepts.IS_A) - .characteristicTypeId(CharacteristicType.STATED_RELATIONSHIP.getConceptId()) - .modifierId(RelationshipModifier.EXISTENTIAL.getConceptId()) + .characteristicTypeId(Concepts.STATED_RELATIONSHIP) + .modifierId(Concepts.EXISTENTIAL_RESTRICTION_MODIFIER) .destinationNegated(true) .group(1) .unionGroup(1) diff --git a/snomed/com.b2international.snowowl.snomed.datastore/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.datastore/META-INF/MANIFEST.MF index dc8e7a8654b..e9611cb8083 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.datastore/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Datastore Bundle-SymbolicName: com.b2international.snowowl.snomed.datastore;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Activator: com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 @@ -24,7 +24,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", com.b2international.snowowl.snomed.icons;bundle-version="6.15.0", com.b2international.snowowl.snomed.ql, com.b2international.snowowl.datastore;visibility:=reexport -Export-Package: com.b2international.snowowl.snomed.core.domain, +Export-Package: com.b2international.snowowl.snomed.core, + com.b2international.snowowl.snomed.core.domain, com.b2international.snowowl.snomed.core.domain.constraint, com.b2international.snowowl.snomed.core.domain.refset, com.b2international.snowowl.snomed.core.ecl, diff --git a/snomed/com.b2international.snowowl.snomed.datastore/pom.xml b/snomed/com.b2international.snowowl.snomed.datastore/pom.xml index a5d86e50b6b..4f64ee0c8a8 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.datastore/pom.xml @@ -11,6 +11,6 @@ com.b2international.snowowl snomed-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/cli/SnomedCommand.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/cli/SnomedCommand.java index b599771f413..3a37d9b24e0 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/cli/SnomedCommand.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/cli/SnomedCommand.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -95,9 +95,9 @@ public void run(CommandLineStream out) { out.println("Unrecognized import format: '%s'. Supported formats are: %s", format, SUPPORTED_FORMAT); } - final User user = out.authenticate(); + final User user = out.authenticate(getBus()); - if (user == null || !user.hasPermission(new Permission(Permission.IMPORT, SnomedDatastoreActivator.REPOSITORY_UUID, ""))) { + if (user == null || !user.hasPermission(new Permission(Permission.IMPORT, Permission.asResource(SnomedDatastoreActivator.REPOSITORY_UUID, branch), ""))) { out.println("User is unauthorized to import SNOMED CT content."); return; } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/AcceptabilityMembership.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/AcceptabilityMembership.java new file mode 100644 index 00000000000..ecf66eb2a88 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/AcceptabilityMembership.java @@ -0,0 +1,66 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.core.domain; + +import java.io.Serializable; +import java.util.Objects; + +/** + * @since 7.4 + */ +public final class AcceptabilityMembership implements Comparable, Serializable { + + private SnomedConcept languageRefSet; + private SnomedConcept acceptability; + + public AcceptabilityMembership() { + } + + public AcceptabilityMembership(String languageRefSetId, String acceptabilityId) { + setLanguageRefSet(new SnomedConcept(languageRefSetId)); + setAcceptability(new SnomedConcept(acceptabilityId)); + } + + public SnomedConcept getAcceptability() { + return acceptability; + } + + public void setAcceptability(SnomedConcept acceptability) { + this.acceptability = acceptability; + } + + public String getAcceptabilityId() { + return acceptability == null ? null : acceptability.getId(); + } + + public SnomedConcept getLanguageRefSet() { + return languageRefSet; + } + + public void setLanguageRefSet(SnomedConcept languageRefSet) { + this.languageRefSet = languageRefSet; + } + + public String getLanguageRefSetId() { + return languageRefSet == null ? null : languageRefSet.getId(); + } + + @Override + public int compareTo(AcceptabilityMembership o) { + return Objects.equals(getAcceptabilityId(), o.getAcceptabilityId()) ? 0 : getAcceptabilityId().compareTo(o.getAcceptabilityId()); + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/AssociationTarget.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/AssociationTarget.java new file mode 100644 index 00000000000..89c3151e57b --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/AssociationTarget.java @@ -0,0 +1,72 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.core.domain; + +import java.io.Serializable; + +/** + * Represents a historical association to another concept in a historical association reference set. + * + * @since 7.4 + */ +public final class AssociationTarget implements Serializable { + + private static final long serialVersionUID = 1L; + + private SnomedConcept referenceSet; + private SnomedCoreComponent targetComponent; + + public AssociationTarget() { + } + + public AssociationTarget(String referenceSetId, String targetComponentId) { + setReferenceSetId(referenceSetId); + setTargetComponentId(targetComponentId); + } + + public SnomedConcept getReferenceSet() { + return referenceSet; + } + + public String getReferenceSetId() { + return referenceSet == null ? null : referenceSet.getId(); + } + + public SnomedCoreComponent getTargetComponent() { + return targetComponent; + } + + public String getTargetComponentId() { + return targetComponent == null ? null : targetComponent.getId(); + } + + public void setReferenceSet(SnomedConcept referenceSet) { + this.referenceSet = referenceSet; + } + + public void setReferenceSetId(String referenceSetId) { + setReferenceSet(new SnomedConcept(referenceSetId)); + } + + public void setTargetComponent(SnomedCoreComponent targetComponent) { + this.targetComponent = targetComponent; + } + + public void setTargetComponentId(String targetComponentId) { + setTargetComponent(SnomedCoreComponent.create(targetComponentId)); + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/AssociationType.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/AssociationType.java deleted file mode 100644 index e4aaf132ca3..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/AssociationType.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.domain; - -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.google.common.base.Strings; - -/** - * Enumerates known historical association reference sets and their corresponding identifier concepts. - * - * @see Historical Association Reference Sets - * (Technical Implementation Guide) - */ -public enum AssociationType { - - /** - * Points to an active concept replacing the referenced inactive concept derived from ICD-9, Chapter XVI. - */ - ALTERNATIVE(Concepts.REFSET_ALTERNATIVE_ASSOCIATION), - - /** - * Points to the original component counterpart of the referenced component, before the move to a new namespace - */ - MOVED_FROM(Concepts.REFSET_MOVED_FROM_ASSOCIATION), - - /** - * Points to the target namespace concept, when the referenced component is moved from its original namespace - */ - MOVED_TO(Concepts.REFSET_MOVED_TO_ASSOCIATION), - - /** - * Points to one of the suggested replacements of the referenced inactive ("ambiguous") concept - */ - POSSIBLY_EQUIVALENT_TO(Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION), - - /** - * Points to a concept that the referenced inactive ("inappropriate") description describes more properly - */ - REFERS_TO(Concepts.REFSET_REFERS_TO_ASSOCIATION), - - /** - * Points to the single replacement concept of the referenced inactive ("erroneous") concept - */ - REPLACED_BY(Concepts.REFSET_REPLACED_BY_ASSOCIATION), - - /** - * Points to the unique equivalent of the referenced inactive (duplicate) concept - */ - SAME_AS(Concepts.REFSET_SAME_AS_ASSOCIATION), - - SIMILAR_TO(Concepts.REFSET_SIMILAR_TO_ASSOCIATION), - - /** - * Points to the closest active supertype of the referenced inactive (NOS or "otherwise specified") concept - */ - WAS_A(Concepts.REFSET_WAS_A_ASSOCIATION); - - private final String conceptId; - - private AssociationType(final String conceptId) { - this.conceptId = conceptId; - } - - /** - * Retrieves the concept identifier for this association reference set. - * - * @return the concept identifier corresponding to the association constant - */ - public String getConceptId() { - return conceptId; - } - - /** - * Performs a reverse lookup by concept identifier and returns the matching association type. - * - * @param conceptId the concept identifier to look for - * - * @return the resolved {@link AssociationType}, or {@code null} if {@code conceptId} is null - * or empty, or no matching enum literal is found - */ - public static AssociationType getByConceptId(final String conceptId) { - if (Strings.isNullOrEmpty(conceptId)) { - return null; - } - - for (final AssociationType candidate : values()) { - if (candidate.getConceptId().equals(conceptId)) { - return candidate; - } - } - - return null; - } -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/CaseSignificance.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/CaseSignificance.java deleted file mode 100644 index 186148feb98..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/CaseSignificance.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.domain; - -import java.text.MessageFormat; - -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.google.common.base.Strings; - -/** - * Enumerates allowed description case significance values and their SNOMED CT concept counterparts. - * - * @see Concept enumerations for caseSignificanceId - * (Technical Implementation Guide) - */ -public enum CaseSignificance implements ConceptEnum { - - /** - * The description term case must be preserved in its entirety - */ - ENTIRE_TERM_CASE_SENSITIVE(Concepts.ENTIRE_TERM_CASE_SENSITIVE), - - /** - * The description term is case insensitive - */ - CASE_INSENSITIVE(Concepts.ENTIRE_TERM_CASE_INSENSITIVE), - - /** - * The initial character of the term is case insensitive - */ - INITIAL_CHARACTER_CASE_INSENSITIVE(Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE); - - private final String conceptId; - - private CaseSignificance(final String conceptId) { - this.conceptId = conceptId; - } - - /** - * Retrieves the concept identifier for this case significance value. - * - * @return the concept identifier corresponding to the case significance constant - */ - @Override - public String getConceptId() { - return conceptId; - } - - /** - * Performs a reverse lookup by concept identifier and returns the matching case significance. - * - * @param conceptId the concept identifier to look for - * - * @return the resolved {@link CaseSignificance}, or {@code null} if {@code conceptId} is null or empty - * @throws IllegalArgumentException if no case significance matches the specified concept identifier - */ - public static CaseSignificance getByConceptId(final String conceptId) { - if (Strings.isNullOrEmpty(conceptId)) { - return null; - } - - for (final CaseSignificance candidate : values()) { - if (candidate.getConceptId().equals(conceptId)) { - return candidate; - } - } - - throw new IllegalArgumentException(MessageFormat.format("No case significance value found for identifier ''{0}''.", conceptId)); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/CharacteristicType.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/CharacteristicType.java deleted file mode 100644 index e07b8e5bc4c..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/CharacteristicType.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.domain; - -import java.text.MessageFormat; - -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.google.common.base.Strings; - -/** - * Enumerates allowed relationship characteristic types and their corresponding concept identifiers. - * - * @see Concept enumerations for - * characteristicTypeId (Technical Implementation Guide) - */ -public enum CharacteristicType implements ConceptEnum { - - /** - * The relationship is used as part of the description logic (DL) definition - */ - DEFINING_RELATIONSHIP(Concepts.DEFINING_RELATIONSHIP), - - /** - * The relationship is defining, and was created by an author (manually) - */ - STATED_RELATIONSHIP(Concepts.STATED_RELATIONSHIP), - - /** - * The relationship is defining, and was created by the reasoner (automatically) - */ - INFERRED_RELATIONSHIP(Concepts.INFERRED_RELATIONSHIP), - - /** - * When creating postcoordinated expressions based on the concept, this relationship can be included as a qualifier - */ - QUALIFYING_RELATIONSHIP(Concepts.QUALIFYING_RELATIONSHIP), - - /** - * The relationship is not part of the DL definition; it only provides supplementary information - */ - ADDITIONAL_RELATIONSHIP(Concepts.ADDITIONAL_RELATIONSHIP); - - private final String conceptId; - - private CharacteristicType(final String conceptId) { - this.conceptId = conceptId; - } - - /** - * Retrieves the concept identifier for this characteristic type. - * - * @return the concept identifier corresponding to the characteristic type constant - */ - @Override - public String getConceptId() { - return conceptId; - } - - /** - * Performs a reverse lookup by concept identifier and returns the matching characteristic type. - * - * @param conceptId the concept identifier to look for - * - * @return the resolved {@link CharacteristicType}, or {@code null} if {@code conceptId} is null or empty - * @throws IllegalArgumentException if no characteristic type matches the specified concept identifier - */ - public static CharacteristicType getByConceptId(final String conceptId) { - if (Strings.isNullOrEmpty(conceptId)) { - return null; - } - - for (final CharacteristicType candidate : values()) { - if (candidate.getConceptId().equals(conceptId)) { - return candidate; - } - } - - throw new IllegalArgumentException(MessageFormat.format("No characteristic type value found for identifier ''{0}''.", conceptId)); - } - - public boolean isDefining() { - return this == DEFINING_RELATIONSHIP || this == INFERRED_RELATIONSHIP || this == STATED_RELATIONSHIP; - } - -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/CharacteristicTypePredicates.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/CharacteristicTypePredicates.java deleted file mode 100644 index b24a69f0778..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/CharacteristicTypePredicates.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.domain; - -import java.util.Set; - -import com.b2international.snowowl.core.ApplicationContext; -import com.b2international.snowowl.core.api.IComponent; -import com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration; -import com.google.common.base.Predicate; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Sets; - -/** - * Predicates regarding {@link CharacteristicType}s. - * @author endre - * - */ -public class CharacteristicTypePredicates { - - private static ImmutableList MANUALLY_ALLOWED_CHARACTERISTIC_TYPES = ImmutableList. of(CharacteristicType.ADDITIONAL_RELATIONSHIP.getConceptId(), CharacteristicType.STATED_RELATIONSHIP.getConceptId()); - private static boolean inferredEditingEnabled = ApplicationContext.getInstance().getServiceChecked(SnomedCoreConfiguration.class).isInferredEditingEnabled(); - - /** - * Predicate for {@link CharacteristicType} IDs. - */ - public static class CharacteristicTypeByIdPredicate implements Predicate { - - private Set ids = Sets.newHashSet(); - - public CharacteristicTypeByIdPredicate(String... characteristicTypesIDs) { - for (String id : characteristicTypesIDs) { - ids.add(id); - } - - //manual override - if (inferredEditingEnabled) { - ids.add(CharacteristicType.INFERRED_RELATIONSHIP.getConceptId()); - } - } - - public CharacteristicTypeByIdPredicate(CharacteristicType... characteristicTypes) { - for (CharacteristicType characteristicType : characteristicTypes) { - ids.add(characteristicType.getConceptId()); - } - //manual override - if (inferredEditingEnabled) { - ids.add(CharacteristicType.INFERRED_RELATIONSHIP.getConceptId()); - } - } - - @Override - public boolean apply(String input) { - return ids.contains(input); - } - - } - - /** - * Predicate for {@link CharacteristicType} {@link IComponent}s - */ - public static class CharacteristicTypeIComponentPredicate implements Predicate> { - - private Set ids = Sets.newHashSet(); - - public CharacteristicTypeIComponentPredicate(String... characteristicTypeIDs) { - for (String id : characteristicTypeIDs) { - ids.add(id); - } - //manual override - if (inferredEditingEnabled) { - ids.add(CharacteristicType.INFERRED_RELATIONSHIP.getConceptId()); - } - } - - public CharacteristicTypeIComponentPredicate(CharacteristicType... characteristicTypes) { - for (CharacteristicType characteristicType : characteristicTypes) { - ids.add(characteristicType.getConceptId()); - } - //manual override - if (inferredEditingEnabled) { - ids.add(CharacteristicType.INFERRED_RELATIONSHIP.getConceptId()); - } - } - - @Override - public boolean apply(IComponent input) { - return ids.contains(input.getId()); - } - } - - - /** - * Returns a {@link Predicate} that selects only those {@link CharacteristicType}s that are allowed to be created by the user. - * @return - */ - public static Predicate> manuallyCreatableCharacteristicTypesIComponentPredicate() { - return new CharacteristicTypeIComponentPredicate(MANUALLY_ALLOWED_CHARACTERISTIC_TYPES.toArray(new String[0])); - } - - - /** - * Returns a {@link Predicate} that selects only those {@link CharacteristicType}s that are allowed to be created by the user. - * @return - */ - public static Predicate manuallyCreatableCharacteristicTypesIDsPredicate() { - return new CharacteristicTypeByIdPredicate(MANUALLY_ALLOWED_CHARACTERISTIC_TYPES.toArray(new String[0])); - } - -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/DefinitionStatus.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/DefinitionStatus.java deleted file mode 100644 index 8d07612e2cb..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/DefinitionStatus.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.domain; - -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import java.text.MessageFormat; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.google.common.base.Strings; - -/** - * Enumerates allowed concept definition status values and their corresponding concept identifiers. - * - * @see Concept enumerations for - * definitionStatusId (Technical Implementation Guide) - */ -public enum DefinitionStatus implements ConceptEnum { - - /** - * The concept's defining relationships do not define the concept in full; the missing parts are not known, not - * expressible in SNOMED CT's terms or are otherwise not present. - */ - PRIMITIVE(Concepts.PRIMITIVE), - - /** - * The concept's defining relationships make up a complete definition of the concept. - */ - FULLY_DEFINED(Concepts.FULLY_DEFINED); - - private final String conceptId; - - private DefinitionStatus(final String conceptId) { - this.conceptId = conceptId; - } - - /** - * Retrieves the concept identifier for this definition status. - * - * @return the concept identifier corresponding to the definition status constant - */ - @Override - public String getConceptId() { - return conceptId; - } - - @JsonIgnore - public boolean isPrimitive() { - return PRIMITIVE.equals(this); - } - - public static DefinitionStatus getByConceptId(String conceptId) { - if (Strings.isNullOrEmpty(conceptId)) { - return null; - } - - for (DefinitionStatus status : values()) { - if (status.getConceptId().equals(conceptId)) { - return status; - } - } - - throw new IllegalArgumentException(MessageFormat.format("No definition status value found for identifier ''{0}''.", conceptId)); - } - -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/DescriptionInactivationIndicator.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/DescriptionInactivationIndicator.java deleted file mode 100644 index bb86523722f..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/DescriptionInactivationIndicator.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.domain; - -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.google.common.base.Strings; - -/** - * Enumeration to specify the reason of the inactivation of SNOMED CT descriptions. - * - * @see Component Inactivation Reference Sets - * (Technical Implementation Guide) - */ -public enum DescriptionInactivationIndicator implements ConceptEnum { - - /** - * The description duplicates another description. - */ - DUPLICATE(Concepts.DUPLICATE), - - /** - * The description is outdated, and should not be used. - */ - OUTDATED(Concepts.OUTDATED), - - /** - * The description contains mistakes in its text, or was otherwise added in error. - */ - ERRONEOUS(Concepts.ERRONEOUS), - - /** - * The description refers to a limited concept. - */ - LIMITED(Concepts.LIMITED), - - /** - * The description was moved to another namespace. - */ - MOVED_ELSEWHERE(Concepts.MOVED_ELSEWHERE), - - /** - * The description is still active, but will be moved to another namespace. - */ - PENDING_MOVE(Concepts.PENDING_MOVE), - - /** - * The description does not describe the concept properly. - */ - INAPPROPRIATE(Concepts.INAPPROPRIATE), - - /** - * The description is still active, but it refers to an inactive concept. - */ - CONCEPT_NON_CURRENT(Concepts.CONCEPT_NON_CURRENT), - - /** - * The description fails to comply with the current editorial guidance - */ - NONCONFORMANCE_TO_EDITORIAL_POLICY(Concepts.NONCONFORMANCE_TO_EDITORIAL_POLICY), - - /** - * The description does not represent the same meaning as the concept's Fully Specified Name (FSN) - */ - NOT_SEMANTICALLY_EQUIVALENT(Concepts.NOT_SEMANTICALLY_EQUIVALENT), - - /** - * The description has been retired without any particular indication. - */ - RETIRED(""); - - private String conceptId; - - private DescriptionInactivationIndicator(final String conceptId) { - this.conceptId = conceptId; - } - - /** - * Returns the identifier of the concept that represents the inactivation reason. - * - * @return the concept identifier of the inactivation reason - */ - @Override - public String getConceptId() { - return conceptId; - } - - /** - * Returns with the description inactivation indication for the specified concept identifier. - * - * @param conceptId the concept identifier to look up - * - * @return the resolved description inactivation indicator, or {@code null} if {@code conceptId} is null or empty, - * or a suitable enum literal cannot be found for the identifier - */ - public static DescriptionInactivationIndicator getInactivationIndicatorByValueId(final String conceptId) { - if (Strings.isNullOrEmpty(conceptId)) { - return null; - } - - for (final DescriptionInactivationIndicator candidate : values()) { - if (candidate.getConceptId().equals(conceptId)) { - return candidate; - } - } - - return null; - } -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/InactivationIndicator.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/InactivationIndicator.java deleted file mode 100644 index c0409ae922c..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/InactivationIndicator.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.domain; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - -/** - * Enumeration to specify the reason of the inactivation of SNOMED CT concepts. - * - * @see Component Inactivation Reference Sets - * (Technical Implementation Guide) - */ -public enum InactivationIndicator implements ConceptEnum { - - /** - * The concept duplicates the definition of another concept. - */ - DUPLICATE(InactivationReason.DUPLICATE), - - /** - * The concept is outdated, and no longer used. - */ - OUTDATED(InactivationReason.OUTDATED), - - /** - * The concept is ambiguous. - */ - AMBIGUOUS(InactivationReason.AMBIGUOUS), - - /** - * The concept contains an error. - */ - ERRONEOUS(InactivationReason.ERRONEOUS), - - /** - * The concept is of limited value as it contains classification categories which do not have a stable meaning. - */ - LIMITED(InactivationReason.LIMITED), - - /** - * The concept was moved to another namespace. - */ - MOVED_ELSEWHERE(InactivationReason.MOVED_ELSEWEHERE), - - /** - * The concept is still active, but is in the process of being moved to another namespace. - */ - PENDING_MOVE(InactivationReason.PENDING_MOVE), - - /** - * Applies to a concept which does not adhere to the Editorial guidelines - */ - NONCONFORMANCE_TO_EDITORIAL_POLICY(InactivationReason.NONCONFORMANCE_TO_EDITORIAL_POLICY), - - /** - * The concept has been retired without any particular indication. - */ - RETIRED(InactivationReason.RETIRED); - - private final InactivationReason inactivationReason; - - private InactivationIndicator(final InactivationReason inactivationReason) { - this.inactivationReason = inactivationReason; - } - - /** - * Retrieves the concept identifier for this inactivation indicator. - * - * @return the concept identifier corresponding to the inactivation indicator constant - */ - @Override - public String getConceptId() { - return inactivationReason.getInactivationReasonConceptId(); - } - - /** - * Returns with the concept inactivation indication for the specified concept identifier. - * - * @param conceptId the concept identifier to look up (may not be {@code null} or empty) - * - * @return the resolved concept inactivation indicator, or {@code #RETIRED} if one cannot be found for the - * specified identifier - */ - public static InactivationIndicator getByConceptId(final String conceptId) { - checkNotNull(conceptId, "Concept identifier may not be null."); - checkArgument(!conceptId.isEmpty(), "Concept identifier may not be empty."); - - for (final InactivationIndicator candidate : values()) { - if (candidate.getConceptId().equals(conceptId)) { - return candidate; - } - } - - return RETIRED; - } - - /** - * Converts this enumeration to its {@link InactivationReason} counterpart (for internal use). - * - * @return the converted inactivation reason value - */ - public InactivationReason toInactivationReason() { - return inactivationReason; - } -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/InactivationProperties.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/InactivationProperties.java new file mode 100644 index 00000000000..aaace9ae571 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/InactivationProperties.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.core.domain; + +import java.io.Serializable; +import java.util.List; + +/** + * @since 7.4 + */ +public final class InactivationProperties implements Serializable { + + private static final long serialVersionUID = 1L; + + private SnomedConcept inactivationIndicator; + private List associationTargets; + + public InactivationProperties() { + } + + public InactivationProperties(String inactivationIndicatorId, List associationTargets) { + setInactivationIndicatorId(inactivationIndicatorId); + setAssociationTargets(associationTargets); + } + + /** + * Returns the component's corresponding active inactivation indicator member value. In case of multiple values present in the corresponding + * inactivation indicator reference set this value will return the first active occurrence from that refset. + * + * @return the inactivation indicator value, or {@code null} if the component does not have an inactivation indicator + */ + public SnomedConcept getInactivationIndicator() { + return inactivationIndicator; + } + + public String getInactivationIndicatorId() { + return inactivationIndicator == null ? null : inactivationIndicator.getId(); + } + + public void setInactivationIndicator(SnomedConcept inactivationIndicator) { + this.inactivationIndicator = inactivationIndicator; + } + + public void setInactivationIndicatorId(String inactivationIndicatorId) { + setInactivationIndicator(inactivationIndicatorId == null ? null : new SnomedConcept(inactivationIndicatorId)); + } + + /** + * Returns all active association targets. + * + * @return related association targets, or empty {@link List} if there are no association targets present for this component. + */ + public List getAssociationTargets() { + return associationTargets; + } + + public void setAssociationTargets(List associationTargets) { + this.associationTargets = associationTargets; + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/InactivationReason.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/InactivationReason.java deleted file mode 100644 index c3f2d8c6659..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/InactivationReason.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.domain; - -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; - -/** - * Enumeration representing the reason of the SNOMED CT concept inactivation. - *

- * The following reasons are available: - *

    - *
  • {@link #DUPLICATE Duplicate}
  • - *
  • {@link #OUTDATED Outdated}
  • - *
  • {@link #AMBIGUOUS Ambiguous}
  • - *
  • {@link #ERRONEOUS Erroneous}
  • - *
  • {@link #LIMITED Limited}
  • - *
  • {@link #MOVED_ELSEWEHERE Moved elsewhere}
  • - *
  • {@link #PENDING_MOVE Pending move}
  • - *
  • {@link #RETIRED Retired}
  • - *
- *

- *

- * Note that "Pending move" is present for completeness, however the process requires the concept to stay active, and so can not be handled by - * component inactivation correctly at this time. - *

- */ -public enum InactivationReason { - - /** - * Duplicate.
- * SNOMED CT reference set: SAME AS (ID: 900000000000527005)
- * SNOMED CT concept of the inactivation reason: DUPLICATE (ID: 900000000000482003) - * - * @see InactivationReason - */ - DUPLICATE("Duplicate", Concepts.REFSET_SAME_AS_ASSOCIATION, Concepts.DUPLICATE), // SAME AS - - /** - * Outdated.
- * SNOMED CT reference set: REPLACED BY (ID: 900000000000526001)
- * SNOMED CT concept of the inactivation reason: OUTDATED (ID: 900000000000483008) - * - * @see InactivationReason - */ - OUTDATED("Outdated", Concepts.REFSET_REPLACED_BY_ASSOCIATION, Concepts.OUTDATED), // REPLACED BY - - /** - * Ambiguous.
- * SNOMED CT reference set: POSSIBLY EQUIVALENT TO (ID: 900000000000523009)
- * SNOMED CT concept of the inactivation reason: AMBIGUOUS (ID: 900000000000484002) - * - * @see InactivationReason - */ - AMBIGUOUS("Ambiguous", Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION, Concepts.AMBIGUOUS), // POSSIBLY EQUIVALENT TO - - /** - * Erroneous.
- * SNOMED CT reference set: REPLACED BY (ID: 900000000000526001)
- * SNOMED CT concept of the inactivation reason: ERRONEOUS (ID: 900000000000485001) - * - * @see InactivationReason - */ - ERRONEOUS("Erroneous", Concepts.REFSET_REPLACED_BY_ASSOCIATION, Concepts.ERRONEOUS), // REPLACED BY - - /** - * Limited.
- * SNOMED CT reference set: WAS A (ID: 900000000000528000)
- * SNOMED CT concept of the inactivation reason: LIMITED (ID: 900000000000486000) - * - * @see InactivationReason - */ - LIMITED("Limited", Concepts.REFSET_WAS_A_ASSOCIATION, Concepts.LIMITED), // WAS A (may not be applicable universally) - - /** - * Moved elsewhere.
- * SNOMED CT reference set: MOVED TO (ID: 900000000000524003)
- * SNOMED CT concept of the inactivation reason: MOVED_ELSEWHERE (ID: 900000000000487009) - * - * @see InactivationReason - */ - MOVED_ELSEWEHERE("Moved elsewhere", Concepts.REFSET_MOVED_TO_ASSOCIATION, Concepts.MOVED_ELSEWHERE), // MOVED TO - - /** - * Pending move.
- * SNOMED CT reference set: MOVED TO (ID: 900000000000524003)
- * SNOMED CT concept of the inactivation reason: PENDING_MOVE (ID: 900000000000492006) - * - * @see InactivationReason - */ - PENDING_MOVE("Pending move", Concepts.REFSET_MOVED_TO_ASSOCIATION, Concepts.PENDING_MOVE), // MOVED TO - - /** - * Nonconformance to editorial policy. No historical association reference set - * member is required.
- * SNOMED CT concept of the inactivation reason: - * NONCONFORMANCE_TO_EDITORIAL_POLICY (ID: 723277005) - * - * @see InactivationReason - */ - NONCONFORMANCE_TO_EDITORIAL_POLICY("Nonconformance to editorial policy", "", Concepts.NONCONFORMANCE_TO_EDITORIAL_POLICY), - - /** - * Retired ("inactive with no reason given for inactivation"). Neither a historical association reference set member nor a component inactivation - * reference set member is required. - * - * @see InactivationReason - */ - RETIRED("Retired", "", ""); - - private final String name; - private final String associatedRefSetId; - private final String inactivationReasonConceptId; - - private InactivationReason(final String name, final String associatedRefSetId, final String inactivationReasonConceptId) { - this.name = name; - this.associatedRefSetId = associatedRefSetId; - this.inactivationReasonConceptId = inactivationReasonConceptId; - } - - /** - * Returns with the human readable name of the inactivation reason. - * - * @return the human readable reason. - */ - public String getName() { - return name; - } - - /** - * Returns with the associated SNOMED CT reference set concept identifier. - *

- * Note: can be empty string if the inactivation reason is {@link #RETIRED retired}. - * - * @return the associated reference set concept identifier. - */ - public String getAssociatedRefSetId() { - return associatedRefSetId; - } - - /** - * Returns with the ID of the inactivation reason SNOMED CT concept. - *

- * Note: can be empty string if the inactivation reason is {@link #RETIRED retired}. - * - * @return the ID of the inactivation reason. - */ - public String getInactivationReasonConceptId() { - return inactivationReasonConceptId; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Enum#toString() - */ - @Override - public String toString() { - return getName(); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/RelationshipModifier.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/RelationshipModifier.java deleted file mode 100644 index 3f36c48090a..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/RelationshipModifier.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.domain; - -import java.text.MessageFormat; - -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.google.common.base.Strings; - -/** - * Enumerates allowed relationship modifiers and maps them to concept identifiers. - * - * @see Concept enumerations for modifierId - * (Technical Implementation Guide) - */ -public enum RelationshipModifier implements ConceptEnum { - - /** - * Existential restriction (∃) - */ - EXISTENTIAL(Concepts.EXISTENTIAL_RESTRICTION_MODIFIER), - - /** - * Universal restriction (∀) - */ - UNIVERSAL(Concepts.UNIVERSAL_RESTRICTION_MODIFIER); - - private final String conceptId; - - private RelationshipModifier(final String conceptId) { - this.conceptId = conceptId; - } - - /** - * Retrieves the concept identifier for this relationship modifier value. - * - * @return the concept identifier corresponding to the modifier constant - */ - @Override - public String getConceptId() { - return conceptId; - } - - /** - * Performs a reverse lookup by concept identifier and returns the matching modifier value. - * - * @param conceptId the concept identifier to look for - * @return the resolved {@link RelationshipModifier}, or {@code null} if {@code conceptId} is null or empty - * @throws IllegalArgumentException if no known relationship modifier matches the specified concept identifier - */ - public static RelationshipModifier getByConceptId(final String conceptId) { - if (Strings.isNullOrEmpty(conceptId)) { - return null; - } - - for (final RelationshipModifier candidate : values()) { - if (candidate.getConceptId().equals(conceptId)) { - return candidate; - } - } - - throw new IllegalArgumentException(MessageFormat.format("No relationship modifier value found for identifier ''{0}''.", conceptId)); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedComponent.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedComponent.java index ff102854e14..f0226fcad83 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedComponent.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,13 @@ */ public abstract class SnomedComponent extends BaseComponent { + /** + * @since 7.4 + */ + public static abstract class Expand { + public static final String MODULE = "module"; + } + /** * @since 6.16 */ @@ -49,6 +56,8 @@ public static abstract class Fields extends BaseComponent.Fields { private String moduleId; private String iconId; private Float score; + + private SnomedConcept module; /** * Returns the component's current status as a boolean value. @@ -94,6 +103,13 @@ public String getIconId() { public Float getScore() { return score; } + + /** + * @return the expanded module of a SNOMED CT Concept + */ + public SnomedConcept getModule() { + return module; + } public void setActive(final Boolean active) { this.active = active; @@ -116,6 +132,10 @@ public void setScore(Float score) { this.score = score; } + public void setModule(SnomedConcept module) { + this.module = module; + } + /** * Creates an update {@link Request} to update the component to the state represented by this instance. * @return diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedConcept.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedConcept.java index c14dc931a8e..9cf0525deec 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedConcept.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedConcept.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,10 +17,8 @@ import static com.google.common.collect.Sets.newHashSet; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import java.util.Map; import java.util.Set; import java.util.stream.Collectors; @@ -30,6 +28,7 @@ import com.b2international.snowowl.core.terminology.ComponentCategory; import com.b2international.snowowl.core.terminology.MapTargetTypes; import com.b2international.snowowl.core.terminology.TerminologyComponent; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSet; @@ -39,10 +38,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Function; -import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Maps; -import com.google.common.collect.Multimap; /** * Represents a SNOMED CT concept. @@ -63,6 +59,8 @@ *

  • {@code statedAncestors(direct:true|false)} - returns the all or the only the direct ancestors of the concept based on the stated tree.
  • *
  • {@code members()} - returns the reference set members referencing this component
  • *
  • {@code preferredDescriptions()} - expands the preferred descriptions for each matching concept
  • + *
  • {@code module()} - expands the module concept of the concept
  • + *
  • {@code definitionStatus()} - expands the definition status concept of the concept
  • * * * The number of expanded fields can be controlled with the {@code limit:} directive. @@ -93,14 +91,17 @@ MapTargetTypes.SIMPLE_MAP_WITH_DESCRIPTION, MapTargetTypes.ATTRIBUTE_VALUE, MapTargetTypes.COMPLEX_MAP, - MapTargetTypes.EXTENDED_MAP + MapTargetTypes.EXTENDED_MAP, + // XXX: Not really SNOMED CT reference set types + MapTargetTypes.VALUE_SET, + MapTargetTypes.MAPPING_SET }, supportedMapTargetTypes = { - "SIMPLE_MAP", - "SIMPLE_MAP_WITH_DESCRIPTION" + MapTargetTypes.SIMPLE_MAP, + MapTargetTypes.SIMPLE_MAP_WITH_DESCRIPTION } ) -public final class SnomedConcept extends SnomedCoreComponent implements DefinitionStatusProvider { +public final class SnomedConcept extends SnomedCoreComponent { private static final long serialVersionUID = 1L; @@ -112,7 +113,6 @@ public final class SnomedConcept extends SnomedCoreComponent implements Definiti public static final class Expand extends SnomedCoreComponent.Expand { public static final String REFERENCE_SET = "referenceSet"; - public static final String INACTIVATION_PROPERTIES = "inactivationProperties"; public static final String STATED_ANCESTORS = "statedAncestors"; public static final String ANCESTORS = "ancestors"; public static final String STATED_DESCENDANTS = "statedDescendants"; @@ -122,7 +122,8 @@ public static final class Expand extends SnomedCoreComponent.Expand { public static final String DESCRIPTIONS = "descriptions"; public static final String FULLY_SPECIFIED_NAME = "fsn"; public static final String PREFERRED_TERM = "pt"; - public static final Object PREFERRED_DESCRIPTIONS = "preferredDescriptions"; + public static final String PREFERRED_DESCRIPTIONS = "preferredDescriptions"; + public static final String DEFINITION_STATUS = "definitionStatus"; } @@ -179,10 +180,8 @@ public static final class Fields extends SnomedCoreComponent.Fields { return ancestors; }; - private DefinitionStatus definitionStatus; + private SnomedConcept definitionStatus; private SubclassDefinitionStatus subclassDefinitionStatus; - private InactivationIndicator inactivationIndicator; - private Multimap associationTargets; private SnomedDescription fsn; private SnomedDescription pt; private SnomedDescriptions descriptions; @@ -211,18 +210,12 @@ public short getTerminologyComponentId() { return SnomedTerminologyComponentConstants.CONCEPT_NUMBER; } - /** - * @deprecated - get the definitionStatusId from {@link #getDefinitionStatusId()} method - */ - @JsonProperty - @Override - public DefinitionStatus getDefinitionStatus() { + public SnomedConcept getDefinitionStatus() { return definitionStatus; } - @JsonProperty public String getDefinitionStatusId() { - return definitionStatus == null ? null : definitionStatus.getConceptId(); + return getDefinitionStatus() == null ? null : getDefinitionStatus().getId(); } /** @@ -235,46 +228,6 @@ public SubclassDefinitionStatus getSubclassDefinitionStatus() { return subclassDefinitionStatus; } - /** - * Returns the concept's corresponding inactivation indicator member value. - * - * @return the inactivation indicator value, or {@code null} if the concept does not have an inactivation indicator - */ - public InactivationIndicator getInactivationIndicator() { - return inactivationIndicator; - } - - /** - * Returns association reference set member targets keyed by the association type. - * - * @return related association targets, or {@code null} if the concept does not have any association targets - */ - @JsonIgnore - public Multimap getAssociationTargets() { - return associationTargets; - } - - /** - * Returns association reference set member targets keyed by the association type as a {@link java.util.Map}. - * - * @return related association targets, or {@code null} if the concept does not have any association targets - */ - @JsonProperty("associationTargets") - public Map> getAssociationTargetsAsMap() { - if (associationTargets == null) { - return null; - } else { - final Map> targets = Maps.newHashMapWithExpectedSize(associationTargets.size()); - associationTargets.forEach((key, value) -> { - if (!targets.containsKey(key)) { - targets.put(key, new ArrayList<>(associationTargets.get(key).size())); - } - targets.get(key).add(value); - }); - return targets; - } - } - /** * Returns the descriptions of the SNOMED CT Concept. * @@ -419,39 +372,18 @@ public List getStatedParentIdsAsString() { return statedParentIds == null ? null : Arrays.stream(statedParentIds).mapToObj(Long::toString).collect(Collectors.toList()); } - @JsonIgnore - public void setDefinitionStatus(final DefinitionStatus definitionStatus) { + public void setDefinitionStatus(SnomedConcept definitionStatus) { this.definitionStatus = definitionStatus; } - public void setDefinitionStatusId(final String definitionStatusId) { - this.definitionStatus = DefinitionStatus.getByConceptId(definitionStatusId); + public void setDefinitionStatusId(String definitionStatusId) { + setDefinitionStatus(new SnomedConcept(definitionStatusId)); } - public void setSubclassDefinitionStatus(final SubclassDefinitionStatus subclassDefinitionStatus) { + public void setSubclassDefinitionStatus(SubclassDefinitionStatus subclassDefinitionStatus) { this.subclassDefinitionStatus = subclassDefinitionStatus; } - public void setInactivationIndicator(final InactivationIndicator inactivationIndicator) { - this.inactivationIndicator = inactivationIndicator; - } - - @JsonIgnore - public void setAssociationTargets(final Multimap associationTargets) { - this.associationTargets = associationTargets; - } - - @JsonProperty("associationTargets") - public void setAssociationTargets(final Map> associationTargets) { - if (associationTargets == null) { - this.associationTargets = null; - } else { - final ImmutableListMultimap.Builder targets = ImmutableListMultimap.builder(); - associationTargets.forEach(targets::putAll); - this.associationTargets = targets.build(); - } - } - public void setDescriptions(SnomedDescriptions descriptions) { this.descriptions = descriptions; } @@ -539,6 +471,11 @@ public void setReferenceSet(SnomedReferenceSet referenceSet) { public SnomedReferenceSet getReferenceSet() { return referenceSet; } + + @JsonIgnore + public boolean isPrimitive() { + return Concepts.PRIMITIVE.equals(getDefinitionStatusId()); + } @Override public Request toCreateRequest(String containerId) { @@ -547,7 +484,7 @@ public Request toCreateRequest(String containerId) { .addMembers(getMembers()) .addRelationships(getRelationships()) .addDescriptions(getDescriptions()) - .setDefinitionStatus(getDefinitionStatus()) + .setDefinitionStatusId(getDefinitionStatusId()) .setId(getId()) .setModuleId(getModuleId()) .setSubclassDefinitionStatus(getSubclassDefinitionStatus()) @@ -558,9 +495,8 @@ public Request toCreateRequest(String containerId) { public Request toUpdateRequest() { return SnomedRequests.prepareUpdateConcept(getId()) .setActive(isActive()) - .setAssociationTargets(getAssociationTargets()) - .setDefinitionStatus(getDefinitionStatus()) - .setInactivationIndicator(getInactivationIndicator()) + .setInactivationProperties(getInactivationProperties()) + .setDefinitionStatusId(getDefinitionStatusId()) .setModuleId(getModuleId()) .setSubclassDefinitionStatus(getSubclassDefinitionStatus()) .setDescriptions(getDescriptions()) @@ -582,15 +518,14 @@ public String toString() { builder.append(getId()); builder.append(", isReleased()="); builder.append(isReleased()); - builder.append(", getDefinitionStatus()="); - builder.append(getDefinitionStatus()); + builder.append(", getDefinitionStatusId()="); + builder.append(getDefinitionStatusId()); builder.append(", getSubclassDefinitionStatus()="); builder.append(getSubclassDefinitionStatus()); - builder.append(", getInactivationIndicator()="); - builder.append(getInactivationIndicator()); - builder.append(", getAssociationTargets()="); - builder.append(getAssociationTargets()); + builder.append(", getInactivationProperties()="); + builder.append(getInactivationProperties()); builder.append("]"); return builder.toString(); } + } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedConcepts.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedConcepts.java index 5b2c8f0d0dc..f6382003a20 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedConcepts.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedConcepts.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,13 +46,12 @@ public List apply(SnomedConcepts input) { * @param total - total number of items in the resultset */ public SnomedConcepts(int limit, int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } /** * Instantiates a pageable collection of SNOMED CT concepts. * @param items - list of @link {@link SnomedConcept}s - * @param scrollId - scrollId for paging the result set continuously * @param searchAfter - searchAfter for paging the result set with a live cursor * @param limit - limit of items for a single page * @param total - total number of items in the result set @@ -60,10 +59,9 @@ public SnomedConcepts(int limit, int total) { @JsonCreator public SnomedConcepts( @JsonProperty("items") List items, - @JsonProperty("scrollId") String scrollId, @JsonProperty("searchAfter") String searchAfter, @JsonProperty("limit") int limit, @JsonProperty("total") int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedCoreComponent.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedCoreComponent.java index f8b0ff3fa0f..95b770dd3ec 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedCoreComponent.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedCoreComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,9 @@ */ package com.b2international.snowowl.snomed.core.domain; +import com.b2international.snowowl.core.api.SnowowlRuntimeException; import com.b2international.snowowl.snomed.cis.SnomedIdentifiers; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMembers; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; @@ -24,6 +26,8 @@ import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver; import com.fasterxml.jackson.databind.jsontype.TypeIdResolver; import com.fasterxml.jackson.databind.type.TypeFactory; +import com.google.common.collect.ImmutableMultimap; +import com.google.common.collect.Multimap; /** * @since 4.6 @@ -32,12 +36,53 @@ @JsonTypeIdResolver(SnomedCoreComponent.SnomedComponentCategoryResolver.class) public abstract class SnomedCoreComponent extends SnomedComponent { + /** + * @since 6.16 + */ + public static abstract class Expand extends SnomedComponent.Expand { + public static final String INACTIVATION_PROPERTIES = "inactivationProperties"; + public static final String REFERRING_MEMBERS = "members"; + } + + /** + * @since 6.16 + */ + public static abstract class Fields extends SnomedComponent.Fields { + } + + /** + * The preferred association targets for the concept inactivation indicators in the SNOMED CT International Edition. + *

    + * Note that "Pending move" is present for completeness, however the process requires the concept to stay active, and so can not be handled by + * component inactivation correctly at this time. + *

    + * + * @since 7.4 + */ + public static final Multimap PREFERRED_INDICATOR_ASSOCIATION_TARGETS = ImmutableMultimap.builder() + .put(Concepts.DUPLICATE, Concepts.REFSET_SAME_AS_ASSOCIATION) + .put(Concepts.OUTDATED, Concepts.REFSET_REPLACED_BY_ASSOCIATION) + .put(Concepts.AMBIGUOUS, Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION) + .put(Concepts.ERRONEOUS, Concepts.REFSET_REPLACED_BY_ASSOCIATION) + .put(Concepts.LIMITED, Concepts.REFSET_WAS_A_ASSOCIATION) + .put(Concepts.MOVED_ELSEWHERE, Concepts.REFSET_MOVED_TO_ASSOCIATION) + .put(Concepts.PENDING_MOVE, Concepts.REFSET_MOVED_TO_ASSOCIATION) + .put(Concepts.NOT_SEMANTICALLY_EQUIVALENT, Concepts.REFSET_REFERS_TO_ASSOCIATION) + .put(Concepts.NONCONFORMANCE_TO_EDITORIAL_POLICY, "") // No historical association reference set + .build(); + + private InactivationProperties inactivationProperties; private SnomedReferenceSetMembers members; - public void setMembers(SnomedReferenceSetMembers members) { - this.members = members; + /** + * Returns the available inactivation properties of this concept. Requires expansion parameter 'inactivationProperties()' in read requests. + * + * @return the expanded inactivation properties or null if expansion was not requested + */ + public InactivationProperties getInactivationProperties() { + return inactivationProperties; } - + /** * Returns the expanded reference set members if any, otherwise it returns a null {@link SnomedReferenceSetMembers}. * @return @@ -45,18 +90,13 @@ public void setMembers(SnomedReferenceSetMembers members) { public SnomedReferenceSetMembers getMembers() { return members; } - - /** - * @since 6.16 - */ - public static abstract class Expand { - public static final String REFERRING_MEMBERS = "members"; + + public void setInactivationProperties(InactivationProperties inactivationProperties) { + this.inactivationProperties = inactivationProperties; } - /** - * @since 6.16 - */ - public static abstract class Fields extends SnomedComponent.Fields { + public void setMembers(SnomedReferenceSetMembers members) { + this.members = members; } /** @@ -101,22 +141,42 @@ public String getDescForKnownTypeIds() { @Override public JavaType typeFromId(DatabindContext context, String type) { - final Class clazz; - switch (SnomedIdentifiers.getComponentCategory(type)) { - case CONCEPT: - clazz = SnomedConcept.class; - break; - case DESCRIPTION: - clazz = SnomedDescription.class; - break; - case RELATIONSHIP: - clazz = SnomedRelationship.class; - break; - default: throw new IllegalArgumentException("Unknown core component type: " + type); - } + final Class clazz = getCoreComponentClass(type); return TypeFactory.defaultInstance().constructSpecializedType(baseType, clazz); } } + + /** + * Creates an empty {@link SnomedCoreComponent} subclass instance based on the componentId. Only the {@link SnomedComponent#getId()} will be set + * on the returned instance. + * + * @param componentId + * @return + */ + public static SnomedCoreComponent create(String componentId) { + try { + return getCoreComponentClass(componentId).getConstructor(String.class).newInstance(componentId); + } catch (Exception e) { + throw new SnowowlRuntimeException(e); + } + } + + /** + * @param componentId + * @return the core component class type based on the component category digit in the given componentId + */ + public static Class getCoreComponentClass(String componentId) { + switch (SnomedIdentifiers.getComponentCategory(componentId)) { + case CONCEPT: + return SnomedConcept.class; + case DESCRIPTION: + return SnomedDescription.class; + case RELATIONSHIP: + return SnomedRelationship.class; + default: + throw new IllegalArgumentException("Unknown core component type: " + componentId); + } + } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedDescription.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedDescription.java index 236b1b118e9..dee59846e5d 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedDescription.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedDescription.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ */ package com.b2international.snowowl.snomed.core.domain; -import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; @@ -34,10 +33,7 @@ import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Maps; -import com.google.common.collect.Multimap; /** * Represents a SNOMED CT description. @@ -50,6 +46,7 @@ *
      *
    • {@code type()} - returns the concept representing the type of the description
    • *
    • {@code members()} - returns the reference set members referencing this component
    • + *
    • {@code acceptabilities()} - returns the acceptability membership for this description
    • *
    * * Expand parameters can be nested to further expand or filter the details returned. @@ -110,10 +107,9 @@ public static final class Fields extends SnomedCoreComponent.Fields { private String term; private String semanticTag; private String languageCode; - private CaseSignificance caseSignificance; - private DescriptionInactivationIndicator inactivationIndicator; + private SnomedConcept caseSignificance; private Map acceptabilityMap; - private Multimap associationTargets; + private List acceptabilities; private SnomedConcept concept; private SnomedConcept type; @@ -194,64 +190,43 @@ public String getLanguageCode() { } /** - * Returns the description's case significance attribute, indicating whether character case within the term should + * Returns the description's case significance concept, indicating whether character case within the term should * be preserved or is interchangeable. * - * @return the case significance of this description + * @return the case significance concept of this description */ - public CaseSignificance getCaseSignificance() { + public SnomedConcept getCaseSignificance() { return caseSignificance; } - - /** - * Returns language reference set member acceptability values for this description, keyed by language reference set identifier. - * - * @return the acceptability map for this description - */ - public Map getAcceptabilityMap() { - return acceptabilityMap; - } - + /** - * Returns the inactivation indicator (if any) of the description that can be used to identify the reason why the - * current description has been deactivated. + * Returns the identifier of the description's case significance concept. * - * @return the inactivation reason for this description, or {@code null} if the description does not have an inactivation indicator set + * @return the identifier of the case significance concept of this description */ - public DescriptionInactivationIndicator getInactivationIndicator() { - return inactivationIndicator; + public String getCaseSignificanceId() { + return getCaseSignificance() == null ? null : getCaseSignificance().getId(); } /** - * Returns association reference set member targets keyed by the association type. + * Returns language reference set member acceptability values for this description, keyed by language reference set identifier. * - * @return related association targets, or {@code null} if the description does not have any association targets + * @return all acceptability values from each available language refset for this description + * @deprecated - expand {@link #getAcceptabilities()} instead of relying on {@link #getAcceptabilityMap()} */ - public Multimap getAssociationTargets() { - return associationTargets; + public Map getAcceptabilityMap() { + return acceptabilityMap; } /** - * Returns association reference set member targets keyed by the association type as a {@link java.util.Map}. + * Returns language reference set member acceptability values for this description, keyed by language reference set identifier. * - * @return related association targets, or {@code null} if the description does not have any association targets + * @return all acceptability values from each available language refset for this description */ - @JsonProperty("associationTargets") - public Map> getAssociationTargetsAsMap() { - if (associationTargets == null) { - return null; - } else { - final Map> targets = Maps.newHashMapWithExpectedSize(associationTargets.size()); - associationTargets.forEach((key, value) -> { - if (!targets.containsKey(key)) { - targets.put(key, new ArrayList<>(associationTargets.get(key).size())); - } - targets.get(key).add(value); - }); - return targets; - } + public List getAcceptabilities() { + return acceptabilities; } - + @JsonIgnore public void setConceptId(final String conceptId) { setConcept(new SnomedConcept(conceptId)); @@ -282,33 +257,22 @@ public void setLanguageCode(final String languageCode) { this.languageCode = languageCode; } - public void setCaseSignificance(final CaseSignificance caseSignificance) { + public void setCaseSignificanceId(final String caseSignificanceId) { + setCaseSignificance(new SnomedConcept(caseSignificanceId)); + } + + public void setCaseSignificance(final SnomedConcept caseSignificance) { this.caseSignificance = caseSignificance; } + @Deprecated @JsonProperty("acceptability") public void setAcceptabilityMap(final Map acceptabilityMap) { this.acceptabilityMap = acceptabilityMap; } - public void setInactivationIndicator(final DescriptionInactivationIndicator descriptionInactivationIndicator) { - this.inactivationIndicator = descriptionInactivationIndicator; - } - - @JsonIgnore - public void setAssociationTargets(final Multimap associationTargets) { - this.associationTargets = associationTargets; - } - - @JsonProperty("associationTargets") - public void setAssociationTargets(final Map> associationTargets) { - if (associationTargets == null) { - this.associationTargets = null; - } else { - final ImmutableListMultimap.Builder targets = ImmutableListMultimap.builder(); - associationTargets.forEach(targets::putAll); - this.associationTargets = targets.build(); - } + public void setAcceptabilities(List acceptabilities) { + this.acceptabilities = acceptabilities; } @Override @@ -316,9 +280,8 @@ public Request toUpdateRequest() { return SnomedRequests.prepareUpdateDescription(getId()) .setAcceptability(getAcceptabilityMap()) .setActive(isActive()) - .setAssociationTargets(getAssociationTargets()) - .setCaseSignificance(getCaseSignificance()) - .setInactivationIndicator(getInactivationIndicator()) + .setInactivationProperties(getInactivationProperties()) + .setCaseSignificanceId(getCaseSignificanceId()) .setModuleId(getModuleId()) .setTypeId(getTypeId()) .setTerm(getTerm()) @@ -331,10 +294,9 @@ public Request toCreateRequest(final String conceptI return SnomedRequests.prepareNewDescription() .setActive(isActive()) .setAcceptability(getAcceptabilityMap()) - .setCaseSignificance(getCaseSignificance()) + .setCaseSignificanceId(getCaseSignificanceId()) // ensure that the description's conceptId property is the right one .setConceptId(conceptId) - .setInactivationIndicator(inactivationIndicator) // XXX assuming that the ID is always set in this case .setId(getId()) .setLanguageCode(getLanguageCode()) @@ -367,13 +329,11 @@ public String toString() { builder.append(getCaseSignificance()); builder.append(", getAcceptabilityMap()="); builder.append(getAcceptabilityMap()); - if (null != inactivationIndicator) { - builder.append(", getDescriptionInactivationIndicator()=") - .append(inactivationIndicator); + if (null != getInactivationProperties()) { + builder.append(", getInactivationProperties()=") + .append(getInactivationProperties()); } - builder.append(", getAssociationTargets()="); - builder.append(getAssociationTargets()); builder.append("]"); return builder.toString(); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedDescriptions.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedDescriptions.java index c605921e073..c61133ff65b 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedDescriptions.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedDescriptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,16 +28,15 @@ public final class SnomedDescriptions extends PageableCollectionResource { public SnomedDescriptions(int limit, int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } @JsonCreator public SnomedDescriptions( @JsonProperty("items") List items, - @JsonProperty("scrollId") String scrollId, @JsonProperty("searchAfter") String searchAfter, @JsonProperty("limit") int limit, @JsonProperty("total") int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedRelationship.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedRelationship.java index 1ac1857157f..2958771599d 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedRelationship.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedRelationship.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,6 +76,8 @@ public static final class Expand { public static final String SOURCE = "source"; public static final String TYPE = "type"; public static final String DESTINATION = "destination"; + public static final String CHARACTERISTIC_TYPE = "characteristicType"; + public static final String MODIFIER = "modifier"; } /* @@ -112,8 +114,8 @@ public static final class Fields extends SnomedCoreComponent.Fields { private boolean destinationNegated; private Integer group; private Integer unionGroup; - private CharacteristicType characteristicType; - private RelationshipModifier modifier; + private SnomedConcept characteristicType; + private SnomedConcept modifier; private SnomedConcept source; private SnomedConcept destination; private SnomedConcept type; @@ -208,10 +210,8 @@ public Integer getUnionGroup() { * Returns the characteristic type of the relationship. * * @return the relationship's characteristic type - * @deprecated - get the characteristicTypeId from {@link #getCharacteristicTypeId()} method */ - @JsonProperty - public CharacteristicType getCharacteristicType() { + public SnomedConcept getCharacteristicType() { return characteristicType; } @@ -219,17 +219,16 @@ public CharacteristicType getCharacteristicType() { * @return the characteristicType ID of the relationship */ public String getCharacteristicTypeId() { - return getCharacteristicType() == null ? null : getCharacteristicType().getConceptId(); + return getCharacteristicType() == null ? null : getCharacteristicType().getId(); } /** * Returns the relationship's modifier value. * * @return the modifier of this relationship - * @deprecated - get the modifierId from {@link #getModifierId()} method */ @JsonProperty - public RelationshipModifier getModifier() { + public SnomedConcept getModifier() { return modifier; } @@ -237,7 +236,7 @@ public RelationshipModifier getModifier() { * @return the modifierId of the relationship. */ public String getModifierId() { - return getModifier() == null ? null : getModifier().getConceptId(); + return getModifier() == null ? null : getModifier().getId(); } public void setSource(SnomedConcept source) { @@ -281,10 +280,8 @@ public void setUnionGroup(final Integer unionGroup) { /** * @param characteristicType - * @deprecated - set characteristicTypeId via {@link #setCharacteristicTypeId(String)} method */ - @JsonIgnore - public void setCharacteristicType(final CharacteristicType characteristicType) { + public void setCharacteristicType(final SnomedConcept characteristicType) { this.characteristicType = characteristicType; } @@ -292,15 +289,13 @@ public void setCharacteristicType(final CharacteristicType characteristicType) { * @param characteristicTypeId */ public void setCharacteristicTypeId(final String characteristicTypeId) { - this.characteristicType = CharacteristicType.getByConceptId(characteristicTypeId); + setCharacteristicType(new SnomedConcept(characteristicTypeId)); } /** * @param modifier - * @deprecated - set modifierId via {@link #setModifierId(String)} method */ - @JsonIgnore - public void setModifier(final RelationshipModifier modifier) { + public void setModifier(final SnomedConcept modifier) { this.modifier = modifier; } @@ -308,19 +303,19 @@ public void setModifier(final RelationshipModifier modifier) { * @param modifierId */ public void setModifierId(final String modifierId) { - this.modifier = RelationshipModifier.getByConceptId(modifierId); + setModifier(new SnomedConcept(modifierId)); } @Override public Request toCreateRequest(String containerId) { return SnomedRequests.prepareNewRelationship() .setActive(isActive()) - .setCharacteristicType(getCharacteristicType()) + .setCharacteristicTypeId(getCharacteristicTypeId()) .setDestinationId(getDestinationId()) .setDestinationNegated(isDestinationNegated()) .setGroup(getGroup()) .setId(getId()) - .setModifier(getModifier()) + .setModifierId(getModifierId()) .setModuleId(getModuleId()) .setSourceId(containerId) .setTypeId(getTypeId()) @@ -332,9 +327,9 @@ public Request toCreateRequest(String containerId) { public Request toUpdateRequest() { return SnomedRequests.prepareUpdateRelationship(getId()) .setActive(isActive()) - .setCharacteristicType(getCharacteristicType()) .setGroup(getGroup()) - .setModifier(getModifier()) + .setCharacteristicTypeId(getCharacteristicTypeId()) + .setModifierId(getModifierId()) .setModuleId(getModuleId()) .setUnionGroup(getUnionGroup()) .setTypeId(getTypeId()) diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedRelationships.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedRelationships.java index 7efac297648..0e356b167b4 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedRelationships.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/SnomedRelationships.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,16 +28,15 @@ public final class SnomedRelationships extends PageableCollectionResource { public SnomedRelationships(int limit, int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } @JsonCreator public SnomedRelationships( @JsonProperty("items") List items, - @JsonProperty("scrollId") String scrollId, @JsonProperty("searchAfter") String searchAfter, @JsonProperty("limit") int limit, @JsonProperty("total") int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/constraint/SnomedConstraints.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/constraint/SnomedConstraints.java index 6e06a896f62..7fad5658e7d 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/constraint/SnomedConstraints.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/constraint/SnomedConstraints.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,15 +26,14 @@ public final class SnomedConstraints extends PageableCollectionResource { public SnomedConstraints(int limit, int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } public SnomedConstraints( List items, - String scrollId, String searchAfter, int limit, int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/MemberChange.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/MemberChange.java index 428096bbd74..8e7da29f110 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/MemberChange.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/MemberChange.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ public interface MemberChange extends Comparable, Serializable { public enum MemberChangeKind { - ADD, REMOVE + ADD, REMOVE, CHANGE } MemberChangeKind getChangeKind(); @@ -34,4 +34,9 @@ public enum MemberChangeKind { String getMemberId(); + default boolean isAdded() { + return getChangeKind() == MemberChangeKind.ADD + || getChangeKind() == MemberChangeKind.CHANGE; + } + } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/MemberChangeImpl.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/MemberChangeImpl.java index a3efd183df6..51a3361fab8 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/MemberChangeImpl.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/MemberChangeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,5 +89,9 @@ public static MemberChange added(SnomedConcept referencedComponent) { public static MemberChange removed(SnomedConcept referencedComponent, String memberId) { return new MemberChangeImpl(MemberChangeKind.REMOVE, referencedComponent, memberId); } - + + public static MemberChange changed(SnomedConcept referencedComponent, String memberId) { + return new MemberChangeImpl(MemberChangeKind.CHANGE, referencedComponent, memberId); + } + } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedRefSetType.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedRefSetType.java index bf499a939a1..d76661d1c45 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedRefSetType.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedRefSetType.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -64,7 +64,7 @@ public enum SnomedRefSetType { * @ordered */ COMPLEX_MAP(5, "COMPLEX_MAP", "COMPLEX_MAP"), - + /** * Description type. * @see #DESCRIPTION_TYPE_VALUE @@ -114,14 +114,18 @@ public enum SnomedRefSetType { * @see #OWL_AXIOM_VALUE * @ordered */ - OWL_AXIOM(12, "OWL_AXIOM", "OWL_AXIOM"), /** + OWL_AXIOM(12, "OWL_AXIOM", "OWL_AXIOM"), + + /** * The 'OWL ONTOLOGY' literal object. * * * @see #OWL_ONTOLOGY_VALUE * @ordered */ - OWL_ONTOLOGY(13, "OWL_ONTOLOGY", "OWL_ONTOLOGY"), /** + OWL_ONTOLOGY(13, "OWL_ONTOLOGY", "OWL_ONTOLOGY"), + + /** * The 'MRCM DOMAIN' literal object. * * @@ -164,7 +168,15 @@ public enum SnomedRefSetType { * @see #ANNOTATION_VALUE * @ordered */ - ANNOTATION(18, "ANNOTATION", "ANNOTATION"); + ANNOTATION(18, "ANNOTATION", "ANNOTATION"), + + /** + * Complex map with map block type. + * @see #COMPLEX_BLOCK_MAP_VALUE + * @ordered + */ + COMPLEX_BLOCK_MAP(19, "COMPLEX_BLOCK_MAP", "COMPLEX_BLOCK_MAP"); + /** * The 'SIMPLE' literal value. @@ -371,6 +383,20 @@ public enum SnomedRefSetType { * @ordered */ public static final int ANNOTATION_VALUE = 18; + + /** + * The 'COMPLEX_BLOCK_MAP' literal value. + * + *

    + * If the meaning of 'COMPLEX_BLOCK_MAP' literal object isn't clear, + * there really should be more of a description here... + *

    + * + * @see #COMPLEX_BLOCK_MAP + * @model + * @ordered + */ + public static final int COMPLEX_BLOCK_MAP_VALUE = 19; /** * An array of all the 'Type' enumerators. @@ -398,6 +424,7 @@ public enum SnomedRefSetType { MRCM_ATTRIBUTE_RANGE, MRCM_MODULE_SCOPE, ANNOTATION, + COMPLEX_BLOCK_MAP, }; /** @@ -457,6 +484,7 @@ public static SnomedRefSetType get(int value) { case MRCM_ATTRIBUTE_RANGE_VALUE: return MRCM_ATTRIBUTE_RANGE; case MRCM_MODULE_SCOPE_VALUE: return MRCM_MODULE_SCOPE; case ANNOTATION_VALUE: return ANNOTATION; + case COMPLEX_BLOCK_MAP_VALUE: return COMPLEX_BLOCK_MAP; } return null; } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedReferenceSetMember.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedReferenceSetMember.java index 56abb8474d6..a1f69ad5807 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedReferenceSetMember.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedReferenceSetMember.java @@ -143,6 +143,13 @@ public SnomedRefSetType type() { public SnomedCoreComponent getReferencedComponent() { return referencedComponent; } + + /** + * @return the referenced component's identifier or null if this is a partially loaded member. + */ + public String getReferencedComponentId() { + return referencedComponent == null ? null : referencedComponent.getId(); + } /** * Returns the identifier of the SNOMED CT Reference Set this SNOMED CT Reference Set Member belongs to. diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedReferenceSetMembers.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedReferenceSetMembers.java index 0c3e0783951..ed1e42debb0 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedReferenceSetMembers.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedReferenceSetMembers.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,16 +38,15 @@ public Set apply(SnomedReferenceSetMembers input) { }; public SnomedReferenceSetMembers(int limit, int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } @JsonCreator public SnomedReferenceSetMembers( @JsonProperty("items") List items, - @JsonProperty("scrollId") String scrollId, @JsonProperty("searchAfter") String searchAfter, @JsonProperty("limit") int limit, @JsonProperty("total") int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedReferenceSets.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedReferenceSets.java index 2683f6b3031..ba188b9e8f4 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedReferenceSets.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/refset/SnomedReferenceSets.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,16 +28,15 @@ public final class SnomedReferenceSets extends PageableCollectionResource { public SnomedReferenceSets(int limit, int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } @JsonCreator public SnomedReferenceSets( @JsonProperty("items") List items, - @JsonProperty("scrollId") String scrollId, @JsonProperty("searchAfter") String searchAfter, @JsonProperty("limit") int limit, @JsonProperty("total") int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/DefaultEclSerializer.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/DefaultEclSerializer.java index e937eb59e36..13af2d2ce82 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/DefaultEclSerializer.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/DefaultEclSerializer.java @@ -18,7 +18,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.serializer.ISerializer; -import com.b2international.snowowl.snomed.ecl.ecl.ConceptReference; +import com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference; import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint; /** @@ -46,8 +46,8 @@ public String serializeWithoutTerms(ExpressionConstraint expression) { } private void removeTerms(EObject expression) { - if (expression instanceof ConceptReference) { - ((ConceptReference) expression).setTerm(null); + if (expression instanceof EclConceptReference) { + ((EclConceptReference) expression).setTerm(null); } else { for (EObject object : expression.eContents()) { removeTerms(object); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclEvaluationRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclEvaluationRequest.java index 54589902420..bd2f87a0791 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclEvaluationRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclEvaluationRequest.java @@ -110,10 +110,10 @@ protected Promise eval(BranchContext context, Any any) { } /** - * Handles ConceptReference/Self simple expression constraints + * Handles EclConceptReference/Self simple expression constraints * @see https://confluence.ihtsdotools.org/display/DOCECL/6.1+Simple+Expression+Constraints */ - protected Promise eval(BranchContext context, ConceptReference concept) { + protected Promise eval(BranchContext context, EclConceptReference concept) { return Promise.immediate(id(concept.getId())); } @@ -123,8 +123,8 @@ protected Promise eval(BranchContext context, ConceptReference conce */ protected Promise eval(BranchContext context, MemberOf memberOf) { final ExpressionConstraint inner = memberOf.getConstraint(); - if (inner instanceof ConceptReference) { - final ConceptReference concept = (ConceptReference) inner; + if (inner instanceof EclConceptReference) { + final EclConceptReference concept = (EclConceptReference) inner; return Promise.immediate(activeMemberOf(concept.getId())); } else if (inner instanceof Any) { return Promise.immediate(Expressions.exists(ACTIVE_MEMBER_OF)); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclRefinementEvaluator.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclRefinementEvaluator.java index d9770966107..545f08609dd 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclRefinementEvaluator.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclRefinementEvaluator.java @@ -100,11 +100,11 @@ public SnomedEclRefinementEvaluator(EclExpression focusConcepts) { this.expressionForm = focusConcepts.getExpressionForm(); } - public Promise evaluate(BranchContext context, Refinement refinement) { + public Promise evaluate(BranchContext context, EclRefinement refinement) { return refinementDispatcher.invoke(context, refinement); } - protected Promise eval(BranchContext context, Refinement refinement) { + protected Promise eval(BranchContext context, EclRefinement refinement) { return SnomedEclEvaluationRequest.throwUnsupported(refinement); } @@ -175,7 +175,7 @@ protected Promise eval(final BranchContext context, NestedRefinement * Handles evaluation of attribute refinements with groups * @see https://confluence.ihtsdotools.org/display/DOCECL/6.2+Refinements */ - protected Promise eval(final BranchContext context, AttributeGroup group) { + protected Promise eval(final BranchContext context, EclAttributeGroup group) { final Cardinality cardinality = group.getCardinality(); final boolean isUnbounded = cardinality == null ? true : cardinality.getMax() == UNBOUNDED_CARDINALITY; final long min = cardinality == null ? 1 : cardinality.getMin(); @@ -205,11 +205,11 @@ protected Promise eval(final BranchContext context, AttributeGroup g /** * Evaluates refinement parts inside attribute group based refinements. */ - protected Promise> evaluateGroup(BranchContext context, Range groupCardinality, Refinement refinement) { + protected Promise> evaluateGroup(BranchContext context, Range groupCardinality, EclRefinement refinement) { return groupRefinementDispatcher.invoke(context, groupCardinality, refinement); } - protected Promise> evalGroup(final BranchContext context, final Range groupCardinality, final Refinement refinement) { + protected Promise> evalGroup(final BranchContext context, final Range groupCardinality, final EclRefinement refinement) { return SnomedEclEvaluationRequest.throwUnsupported(refinement); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclRewriter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclRewriter.java index 039d9b7be1b..bc15e038c38 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclRewriter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclRewriter.java @@ -22,7 +22,6 @@ import com.b2international.snowowl.snomed.ecl.ecl.AndExpressionConstraint; import com.b2international.snowowl.snomed.ecl.ecl.AndRefinement; import com.b2international.snowowl.snomed.ecl.ecl.AttributeConstraint; -import com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup; import com.b2international.snowowl.snomed.ecl.ecl.AttributeValueEquals; import com.b2international.snowowl.snomed.ecl.ecl.AttributeValueNotEquals; import com.b2international.snowowl.snomed.ecl.ecl.ChildOf; @@ -30,7 +29,9 @@ import com.b2international.snowowl.snomed.ecl.ecl.DescendantOf; import com.b2international.snowowl.snomed.ecl.ecl.DescendantOrSelfOf; import com.b2international.snowowl.snomed.ecl.ecl.DottedExpressionConstraint; +import com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup; import com.b2international.snowowl.snomed.ecl.ecl.EclFactory; +import com.b2international.snowowl.snomed.ecl.ecl.EclRefinement; import com.b2international.snowowl.snomed.ecl.ecl.ExclusionExpressionConstraint; import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint; import com.b2international.snowowl.snomed.ecl.ecl.MemberOf; @@ -40,7 +41,6 @@ import com.b2international.snowowl.snomed.ecl.ecl.OrRefinement; import com.b2international.snowowl.snomed.ecl.ecl.ParentOf; import com.b2international.snowowl.snomed.ecl.ecl.RefinedExpressionConstraint; -import com.b2international.snowowl.snomed.ecl.ecl.Refinement; /** * @since 5.4 @@ -56,8 +56,8 @@ public class SnomedEclRewriter { public T rewrite(T eclObject) { if (eclObject instanceof ExpressionConstraint) { return (T) rewriteExpression((ExpressionConstraint) eclObject); - } else if (eclObject instanceof Refinement) { - return (T) rewriteRefinement((Refinement) eclObject); + } else if (eclObject instanceof EclRefinement) { + return (T) rewriteRefinement((EclRefinement) eclObject); } else if (eclObject instanceof Comparison) { return (T) rewriteComparison((Comparison) eclObject); } else { @@ -170,44 +170,44 @@ private ExpressionConstraint rewriteExpression(NestedExpression it) { // REFINEMENT hierarchy - private Refinement rewriteRefinement(Refinement it) { + private EclRefinement rewriteRefinement(EclRefinement it) { if (it instanceof AndRefinement) { return rewriteRefinement((AndRefinement) it); } else if (it instanceof OrRefinement) { return rewriteRefinement((OrRefinement) it); } else if (it instanceof NestedRefinement) { return rewriteRefinement((NestedRefinement) it); - } else if (it instanceof AttributeGroup) { - return rewriteRefinement((AttributeGroup) it); + } else if (it instanceof EclAttributeGroup) { + return rewriteRefinement((EclAttributeGroup) it); } else if (it instanceof AttributeConstraint) { return rewriteRefinement((AttributeConstraint) it); } return it; } - private Refinement rewriteRefinement(AndRefinement it) { + private EclRefinement rewriteRefinement(AndRefinement it) { it.setLeft(rewrite(it.getLeft())); it.setRight(rewrite(it.getRight())); return it; } - private Refinement rewriteRefinement(OrRefinement it) { + private EclRefinement rewriteRefinement(OrRefinement it) { it.setLeft(rewrite(it.getLeft())); it.setRight(rewrite(it.getRight())); return it; } - private Refinement rewriteRefinement(NestedRefinement it) { + private EclRefinement rewriteRefinement(NestedRefinement it) { it.setNested(rewrite(it.getNested())); return it; } - private Refinement rewriteRefinement(AttributeGroup it) { + private EclRefinement rewriteRefinement(EclAttributeGroup it) { it.setRefinement(rewriteRefinement(it.getRefinement())); return it; } - private Refinement rewriteRefinement(AttributeConstraint it) { + private EclRefinement rewriteRefinement(AttributeConstraint it) { it.setComparison(rewrite(it.getComparison())); return it; } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/mrcm/io/MrcmCommand.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/mrcm/io/MrcmCommand.java index b30b558252b..deee72f51d4 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/mrcm/io/MrcmCommand.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/mrcm/io/MrcmCommand.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,6 @@ import com.b2international.commons.extension.Component; import com.b2international.snowowl.core.ApplicationContext; import com.b2international.snowowl.core.console.Command; -import com.b2international.snowowl.core.console.CommandLineAuthenticator; import com.b2international.snowowl.core.console.CommandLineStream; import com.b2international.snowowl.core.date.Dates; import com.b2international.snowowl.identity.domain.Permission; @@ -74,9 +73,9 @@ private static final class ImportCommand extends Command { @Override public void run(CommandLineStream out) { - final User user = out.authenticate(); + final User user = out.authenticate(getBus()); - if (!user.hasPermission(new Permission(Permission.IMPORT, SnomedDatastoreActivator.REPOSITORY_UUID, ""))) { + if (user == null || !user.hasPermission(new Permission(Permission.IMPORT, SnomedDatastoreActivator.REPOSITORY_UUID, ""))) { out.println("User is unauthorized to import MRCM rules."); return; } @@ -106,14 +105,9 @@ private static final class ExportCommand extends Command { @Override public void run(CommandLineStream out) { - final CommandLineAuthenticator authenticator = new CommandLineAuthenticator(); + final User user = out.authenticate(getBus()); - if (!authenticator.authenticate(out)) { - return; - } - - final User user = authenticator.getUser(); - if (!user.hasPermission(new Permission(Permission.EXPORT, SnomedDatastoreActivator.REPOSITORY_UUID, ""))) { + if (user == null || !user.hasPermission(new Permission(Permission.EXPORT, SnomedDatastoreActivator.REPOSITORY_UUID, ""))) { out.println("User is unauthorized to export MRCM rules."); return; } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ql/SnomedQueryEvaluationRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ql/SnomedQueryEvaluationRequest.java index 1e8a9c123f0..0845bcb6403 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ql/SnomedQueryEvaluationRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ql/SnomedQueryEvaluationRequest.java @@ -254,7 +254,7 @@ protected Promise eval(BranchContext context, final LanguageCodeFilt return Promise.immediate(SnomedDescriptionIndexEntry.Expressions.languageCode(languageCodeFilter.getLanguageCode())); } - protected Promise eval(BranchContext context, final Conjunction conjunction) { + protected Promise eval(BranchContext context, final ConjunctionFilter conjunction) { return Promise.all(evaluate(context, conjunction.getLeft()), evaluate(context, conjunction.getRight())) .then(results -> { Expression left = (Expression) results.get(0); @@ -266,7 +266,7 @@ protected Promise eval(BranchContext context, final Conjunction conj }); } - protected Promise eval(BranchContext context, final Disjunction disjunction) { + protected Promise eval(BranchContext context, final DisjunctionFilter disjunction) { return Promise.all(evaluate(context, disjunction.getLeft()), evaluate(context, disjunction.getRight())) .then(results -> { Expression left = (Expression) results.get(0); @@ -278,7 +278,7 @@ protected Promise eval(BranchContext context, final Disjunction disj }); } - protected Promise eval(BranchContext context, final Exclusion exclusion) { + protected Promise eval(BranchContext context, final ExclusionFilter exclusion) { return Promise.all(evaluate(context, exclusion.getLeft()), evaluate(context, exclusion.getRight())) .then(results -> { Expression left = (Expression) results.get(0); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedComplexBlockMapReferenceSetMemberBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedComplexBlockMapReferenceSetMemberBuilder.java new file mode 100644 index 00000000000..aeaa1b5eb7e --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedComplexBlockMapReferenceSetMemberBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.core.store; + +import com.b2international.snowowl.core.domain.TransactionContext; +import com.b2international.snowowl.snomed.common.SnomedRf2Headers; +import com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry; + +/** + * @since 7.4 + */ +public final class SnomedComplexBlockMapReferenceSetMemberBuilder extends SnomedMemberBuilder { + + private String mapTargetId; + private String mapTargetDescription; + private String mapRule; + private String mapAdvice; + private int group = 1; + private int priority = 1; + private String correlationId; + private String mapCategoryId; + private int block = 1; + + public SnomedComplexBlockMapReferenceSetMemberBuilder withMapTargetId(String mapTargetId) { + this.mapTargetId = mapTargetId; + return getSelf(); + } + + public SnomedComplexBlockMapReferenceSetMemberBuilder withMapTargetDescription(String mapTargetDescription) { + this.mapTargetDescription = mapTargetDescription; + return getSelf(); + } + + public SnomedComplexBlockMapReferenceSetMemberBuilder withMapRule(String mapRule) { + this.mapRule = mapRule; + return getSelf(); + } + + public SnomedComplexBlockMapReferenceSetMemberBuilder withMapAdvice(String mapAdvice) { + this.mapAdvice = mapAdvice; + return getSelf(); + } + + public SnomedComplexBlockMapReferenceSetMemberBuilder withGroup(int group) { + this.group = group; + return getSelf(); + } + + public SnomedComplexBlockMapReferenceSetMemberBuilder withPriority(int priority) { + this.priority = priority; + return getSelf(); + } + + public SnomedComplexBlockMapReferenceSetMemberBuilder withCorrelationId(String correlationId) { + this.correlationId = correlationId; + return getSelf(); + } + + public SnomedComplexBlockMapReferenceSetMemberBuilder withMapCategoryId(String mapCategoryId) { + this.mapCategoryId = mapCategoryId; + return getSelf(); + } + + public SnomedComplexBlockMapReferenceSetMemberBuilder withBlock(int block) { + this.block = block; + return getSelf(); + } + + @Override + public void init(SnomedRefSetMemberIndexEntry.Builder component, TransactionContext context) { + super.init(component, context); + component + .field(SnomedRf2Headers.FIELD_MAP_TARGET, mapTargetId) + .field(SnomedRf2Headers.FIELD_MAP_TARGET_DESCRIPTION, mapTargetDescription) + .field(SnomedRf2Headers.FIELD_MAP_RULE, mapRule) + .field(SnomedRf2Headers.FIELD_MAP_ADVICE, mapAdvice) + .field(SnomedRf2Headers.FIELD_MAP_GROUP, group) + .field(SnomedRf2Headers.FIELD_MAP_PRIORITY, priority) + .field(SnomedRf2Headers.FIELD_CORRELATION_ID, correlationId) + .field(SnomedRf2Headers.FIELD_MAP_CATEGORY_ID, mapCategoryId) + .field(SnomedRf2Headers.FIELD_MAP_BLOCK, block); + } +} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedComponents.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedComponents.java index 40bbf87bed1..00d518f9cb9 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedComponents.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedComponents.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -183,4 +183,13 @@ public static SnomedMRCMAttributeRangeReferenceSetMemberBuilder newMRCMAttribute public static SnomedMRCMModuleScopeReferenceSetMemberBuilder newMRCMModuleScopeReferenceSetMember() { return new SnomedMRCMModuleScopeReferenceSetMemberBuilder(); } + + /** + * Creates and returns a new {@link SnomedComplexBlockMapReferenceSetMemberBuilder SNOMED CT Complex Block Map Reference set member builder}. + * + * @return + */ + public static SnomedComplexBlockMapReferenceSetMemberBuilder newComplexBlockMapMember() { + return new SnomedComplexBlockMapReferenceSetMemberBuilder(); + } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedConceptBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedConceptBuilder.java index b9d7559d816..567d4e8a317 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedConceptBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedConceptBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package com.b2international.snowowl.snomed.core.store; import com.b2international.snowowl.core.domain.TransactionContext; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; /** @@ -24,7 +24,7 @@ */ public final class SnomedConceptBuilder extends SnomedComponentBuilder { - private DefinitionStatus definitionStatus = DefinitionStatus.PRIMITIVE; + private String definitionStatusId = Concepts.PRIMITIVE; private boolean exhaustive = false; /** @@ -41,12 +41,12 @@ public final SnomedConceptBuilder withExhaustive(boolean exhaustive) { /** * Specifies the {@link DefinitionStatus} to use for the new concept. * - * @param definitionStatus - * - the definition status to use + * @param definitionStatusId + * - the definition status ID to use * @return */ - public final SnomedConceptBuilder withDefinitionStatus(DefinitionStatus definitionStatus) { - this.definitionStatus = definitionStatus; + public final SnomedConceptBuilder withDefinitionStatusId(String definitionStatusId) { + this.definitionStatusId = definitionStatusId; return getSelf(); } @@ -59,8 +59,8 @@ protected SnomedConceptDocument.Builder create() { public void init(SnomedConceptDocument.Builder component, TransactionContext context) { super.init(component, context); // check that the definitionStatus concept does exist before using it in this concept - context.lookup(definitionStatus.getConceptId(), SnomedConceptDocument.class); - component.primitive(definitionStatus.isPrimitive()); + context.lookup(definitionStatusId, SnomedConceptDocument.class); + component.primitive(Concepts.PRIMITIVE.equals(definitionStatusId)); component.exhaustive(exhaustive); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedConcreteDomainReferenceSetMemberBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedConcreteDomainReferenceSetMemberBuilder.java index cb159e7cf24..10d71b83636 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedConcreteDomainReferenceSetMemberBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedConcreteDomainReferenceSetMemberBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ package com.b2international.snowowl.snomed.core.store; import com.b2international.snowowl.core.domain.TransactionContext; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry; /** @@ -28,7 +28,7 @@ public final class SnomedConcreteDomainReferenceSetMemberBuilder extends SnomedM private int group; private String typeId; private String serializedValue; - private CharacteristicType characteristicType = CharacteristicType.STATED_RELATIONSHIP; + private String characteristicTypeId = Concepts.STATED_RELATIONSHIP; public SnomedConcreteDomainReferenceSetMemberBuilder withGroup(int group) { this.group = group; @@ -45,8 +45,8 @@ public SnomedConcreteDomainReferenceSetMemberBuilder withSerializedValue(String return getSelf(); } - public SnomedConcreteDomainReferenceSetMemberBuilder withCharacteristicType(CharacteristicType characteristicType) { - this.characteristicType = characteristicType; + public SnomedConcreteDomainReferenceSetMemberBuilder withCharacteristicTypeId(String characteristicTypeId) { + this.characteristicTypeId = characteristicTypeId; return getSelf(); } @@ -57,7 +57,7 @@ public void init(SnomedRefSetMemberIndexEntry.Builder component, TransactionCont .field(SnomedRf2Headers.FIELD_RELATIONSHIP_GROUP, group) .field(SnomedRf2Headers.FIELD_TYPE_ID, typeId) .field(SnomedRf2Headers.FIELD_VALUE, serializedValue) - .field(SnomedRf2Headers.FIELD_CHARACTERISTIC_TYPE_ID, characteristicType.getConceptId()); + .field(SnomedRf2Headers.FIELD_CHARACTERISTIC_TYPE_ID, characteristicTypeId); } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedDescriptionBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedDescriptionBuilder.java index e3da29c31b0..4cf7b08c7c6 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedDescriptionBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedDescriptionBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package com.b2international.snowowl.snomed.core.store; import com.b2international.snowowl.core.domain.TransactionContext; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedDescriptionIndexEntry; @@ -25,7 +25,7 @@ */ public final class SnomedDescriptionBuilder extends SnomedComponentBuilder { - private CaseSignificance caseSignificance = CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE; + private String caseSignificanceId = Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE; private String type; private String term; private String languageCode = "en"; @@ -45,11 +45,11 @@ public SnomedDescriptionBuilder withType(String type) { /** * Specifies the case significance of the new SNOMED CT Description. * - * @param caseSignificance + * @param caseSignificanceId * @return */ - public SnomedDescriptionBuilder withCaseSignificance(CaseSignificance caseSignificance) { - this.caseSignificance = caseSignificance; + public SnomedDescriptionBuilder withCaseSignificanceId(String caseSignificanceId) { + this.caseSignificanceId = caseSignificanceId; return getSelf(); } @@ -89,7 +89,7 @@ public SnomedDescriptionBuilder withConcept(String concept) { @Override public void init(SnomedDescriptionIndexEntry.Builder component, TransactionContext context) { super.init(component, context); - component.caseSignificanceId(context.lookup(caseSignificance.getConceptId(), SnomedConceptDocument.class).getId()); + component.caseSignificanceId(context.lookup(caseSignificanceId, SnomedConceptDocument.class).getId()); component.typeId(context.lookup(type, SnomedConceptDocument.class).getId()); component.term(term); component.languageCode(languageCode); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedRelationshipBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedRelationshipBuilder.java index 6da78f1a4eb..3d5c20b6df2 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedRelationshipBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/store/SnomedRelationshipBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,6 @@ import com.b2international.snowowl.core.domain.TransactionContext; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry; @@ -27,8 +25,8 @@ */ public final class SnomedRelationshipBuilder extends SnomedComponentBuilder { - private CharacteristicType characteristicType = CharacteristicType.STATED_RELATIONSHIP; - private RelationshipModifier modifier = RelationshipModifier.EXISTENTIAL; + private String characteristicTypeId = Concepts.STATED_RELATIONSHIP; + private String modifierId = Concepts.EXISTENTIAL_RESTRICTION_MODIFIER; private String type; private String source; private String destination; @@ -39,24 +37,24 @@ public final class SnomedRelationshipBuilder extends SnomedComponentBuilderAvailable values: - *
      - *
    • {@link #ENTIRE_TERM_CASE_SENSITIVE Case sensitive}
    • - *
    • {@link #ENTIRE_TERM_CASE_INSENSITIVE Case insensitive}
    • - *
    • {@link #ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE Initial character case insensitive}
    • - *
    - *

    - */ -public enum CaseSignificance { - - /** - * Case sensitive. Concept ID: {@code 900000000000017005}. - *

    - * The text of the Description.term must be presented in the case in which it is specified. - * @see CaseSignificance - */ - ENTIRE_TERM_CASE_SENSITIVE("Case sensitive", Concepts.ENTIRE_TERM_CASE_SENSITIVE), - - /** - * Case insensitive. Concept ID: {@code 900000000000448009}. - *

    - * The entire Description.term is case insensitive and can be can be changed from upper to lower case - * (or vice-versa) if appropriate to the context in which it is used. - * @see CaseSignificance - */ - ENTIRE_TERM_CASE_INSENSITIVE("Case insensitive", Concepts.ENTIRE_TERM_CASE_INSENSITIVE), - - /** - * Initial character case insensitive. Concept ID: {@code 900000000000020002}. - *

    - * The initial character of the Description.term is case insensitive and can be changed - * from upper to lower case (or vice-versa) if appropriate to the context in which it is used. - * @see CaseSignificance - */ - ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE("Initial character case insensitive", Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE); - - private final String name; - private final String id; - - private CaseSignificance(final String name, final String id) { - this.name = name; - this.id = id; - } - - /** - * Returns with the associated metadata concept ID. - * @return the unique identifier of the case significance metadata concept. - */ - public String getId() { - return id; - } - - /** - * Returns with the human readable name of the case significance enumeration. - * @return the name of the case significance. - */ - public String getName() { - return name; - } - - /* - * (non-Javadoc) - * @see java.lang.Enum#toString() - */ - @Override - public String toString() { - return name; - } - - /** - * Returns with the proper case significance instance identified by the specified SNOMED CT ID. - * @param conceptId the case significance concept ID. - * @return the case significance enumeration. - */ - public static CaseSignificance getById(final String conceptId) { - Preconditions.checkNotNull(conceptId, "Case significance metadata concept ID argument cannot be null."); - for (CaseSignificance caseSignificance : values()) { - if (conceptId.equals(caseSignificance.getId())) { - return caseSignificance; - } - } - throw new IllegalArgumentException("Case significance metadata does not exists for ID: " + conceptId); - } - - /** - * Returns with the proper case significance instance identified by the specified SNOMED CT ID. - * @param conceptId the case significance concept ID. - * @return the case significance enumeration. - */ - public static CaseSignificance getById(final long conceptId) { - return getById(String.valueOf(conceptId)); - } - - /** - * Returns with the proper case significance instance based on the specified description index entry's case significance concept. - * @param description SNOMED CT description index entry. - * @return the case significance enumeration. - */ - public static CaseSignificance getForDescriptionIndexEntry(final SnomedDescriptionIndexEntry description) { - return getById(description.getCaseSignificanceId()); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedRefSetUtil.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedRefSetUtil.java index c07f3cac6f2..cdba5305e91 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedRefSetUtil.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedRefSetUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,7 @@ */ package com.b2international.snowowl.snomed.datastore; -import static com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType.COMPLEX_MAP; -import static com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType.EXTENDED_MAP; -import static com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType.SIMPLE_MAP; -import static com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType.SIMPLE_MAP_WITH_DESCRIPTION; +import static com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType.*; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static java.util.stream.Collectors.collectingAndThen; @@ -100,6 +97,7 @@ public static final BiMap getConcreteDomainRefSetMap() { SnomedRefSetType.SIMPLE_MAP, SnomedRefSetType.SIMPLE_MAP_WITH_DESCRIPTION, SnomedRefSetType.COMPLEX_MAP, + SnomedRefSetType.COMPLEX_BLOCK_MAP, SnomedRefSetType.EXTENDED_MAP) .putAll(SnomedRF2Folder.METADATA, SnomedRefSetType.MRCM_DOMAIN, @@ -187,6 +185,8 @@ public static SnomedRefSetType getByConceptId(String conceptId) { return SnomedRefSetType.SIMPLE; case Concepts.REFSET_COMPLEX_MAP_TYPE: return SnomedRefSetType.COMPLEX_MAP; + case Concepts.REFSET_COMPLEX_BLOCK_MAP_TYPE: + return SnomedRefSetType.COMPLEX_BLOCK_MAP; case Concepts.EXTENDED_MAP_TYPE: return SnomedRefSetType.EXTENDED_MAP; case Concepts.REFSET_DESCRIPTION_TYPE: @@ -218,7 +218,9 @@ public static SnomedRefSetType getByConceptId(String conceptId) { * @return {@code true} if the reference set type is complex or extended map type, otherwise returns with {@code false}. */ public static boolean isComplexMapping(final SnomedRefSetType type) { - return COMPLEX_MAP.equals(type) || EXTENDED_MAP.equals(type); + return COMPLEX_MAP.equals(type) + || COMPLEX_BLOCK_MAP.equals(type) + || EXTENDED_MAP.equals(type); } /** @@ -230,6 +232,7 @@ public static boolean isMapping(final SnomedRefSetType type) { return SIMPLE_MAP.equals(type) || SIMPLE_MAP_WITH_DESCRIPTION.equals(type) || COMPLEX_MAP.equals(type) + || COMPLEX_BLOCK_MAP.equals(type) || EXTENDED_MAP.equals(type); } @@ -249,6 +252,7 @@ public static String getTypeLabel(SnomedRefSetType type) { case SIMPLE_MAP_WITH_DESCRIPTION: return "Simple map type with map target description"; case SIMPLE: return "Simple type reference set"; case COMPLEX_MAP: return "Complex map type reference set"; + case COMPLEX_BLOCK_MAP: return "Complex map with map block type reference set"; case EXTENDED_MAP: return "Extended map type reference set"; case DESCRIPTION_TYPE: return "Description type reference set"; case ASSOCIATION: return "Association type reference set"; @@ -288,6 +292,8 @@ public static String getParentConceptId(SnomedRefSetType type) { return Concepts.REFSET_SIMPLE_TYPE; case COMPLEX_MAP: return Concepts.REFSET_COMPLEX_MAP_TYPE; + case COMPLEX_BLOCK_MAP: + return Concepts.REFSET_COMPLEX_BLOCK_MAP_TYPE; case DESCRIPTION_TYPE: return Concepts.REFSET_DESCRIPTION_TYPE; case CONCRETE_DATA_TYPE: diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/InactivationExpander.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/InactivationExpander.java deleted file mode 100644 index 783ec2a8212..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/InactivationExpander.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore.converter; - -import static com.google.common.collect.Lists.newArrayList; - -import java.util.Collection; -import java.util.List; -import java.util.Set; - -import com.b2international.snowowl.core.domain.BranchContext; -import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.AssociationType; -import com.b2international.snowowl.snomed.core.domain.SnomedComponent; -import com.b2international.snowowl.snomed.core.domain.SnomedCoreComponent; -import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; -import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; -import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMembers; -import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; -import com.google.common.base.Function; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Iterables; -import com.google.common.collect.Multimap; -import com.google.common.collect.Multimaps; - -public abstract class InactivationExpander { - - private BranchContext context; - private String inactivationIndicatorId; - - public InactivationExpander(BranchContext context, String inactivationIndicatorId) { - this.context = context; - this.inactivationIndicatorId = inactivationIndicatorId; - } - - void expand(List results, Set componentIds) { - - if (componentIds.isEmpty()) { - return; - } - - final List refSetIds = newArrayList(); - for (final AssociationType associationType : AssociationType.values()) { - refSetIds.add(associationType.getConceptId()); - } - - refSetIds.add(inactivationIndicatorId); - - final SnomedReferenceSetMembers members = SnomedRequests.prepareSearchMember() - .all() - .filterByRefSet(refSetIds) - .filterByReferencedComponent(componentIds) - .filterByActive(true) - .build() - .execute(context); - - if (members.getItems().isEmpty()) { - return; - } - - final Multimap membersByReferencedComponentId = Multimaps.index(members, new Function() { - @Override - public String apply(SnomedReferenceSetMember input) { - return input.getReferencedComponent().getId(); - } - }); - - for (T result : results) { - final Collection referringMembers = membersByReferencedComponentId.get(result.getId()); - final List associationMembers = newArrayList(); - final List inactivationMembers = newArrayList(); - - for (SnomedReferenceSetMember referringMember : referringMembers) { - if (SnomedRefSetType.ASSOCIATION.equals(referringMember.type())) { - associationMembers.add(referringMember); - } else if (SnomedRefSetType.ATTRIBUTE_VALUE.equals(referringMember.type())) { - inactivationMembers.add(referringMember); - } - } - - if (!inactivationMembers.isEmpty()) { - final String valueId = (String) Iterables.getFirst(inactivationMembers, null).getProperties().get(SnomedRf2Headers.FIELD_VALUE_ID); - setInactivationIndicator(result, valueId); - } - - Multimap associationTargets = HashMultimap.create(); - for (SnomedReferenceSetMember associationMember : associationMembers) { - AssociationType type = AssociationType.getByConceptId(associationMember.getReferenceSetId()); - final SnomedCoreComponent target = (SnomedCoreComponent) associationMember.getProperties().get(SnomedRf2Headers.FIELD_TARGET_COMPONENT); - associationTargets.put(type, target.getId()); - } - - if (!associationTargets.isEmpty()) { - setAssociationTargets(result, associationTargets); - } - } - } - - protected abstract void setInactivationIndicator(T result, final String valueId); - - protected abstract void setAssociationTargets(T result, Multimap associationTargets); -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/InactivationPropertiesExpander.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/InactivationPropertiesExpander.java new file mode 100644 index 00000000000..b0b84d46dcf --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/InactivationPropertiesExpander.java @@ -0,0 +1,99 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.datastore.converter; + +import java.util.Collection; +import java.util.List; +import java.util.Set; + +import com.b2international.commons.http.ExtendedLocale; +import com.b2international.commons.options.Options; +import com.b2international.snowowl.core.domain.BranchContext; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; +import com.b2international.snowowl.snomed.common.SnomedRf2Headers; +import com.b2international.snowowl.snomed.core.domain.AssociationTarget; +import com.b2international.snowowl.snomed.core.domain.InactivationProperties; +import com.b2international.snowowl.snomed.core.domain.SnomedCoreComponent; +import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; +import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; +import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMembers; +import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Iterables; +import com.google.common.collect.Multimap; +import com.google.common.collect.Multimaps; +import com.google.common.collect.Sets; + +/** + * @since 7.4 + * @param + */ +public final class InactivationPropertiesExpander { + + private final BranchContext context; + private final Options expand; + private final List locales; + private final String inactivationIndicatorRefSetId; + + public InactivationPropertiesExpander(BranchContext context, Options expand, List locales, String inactivationIndicatorRefSetId) { + this.context = context; + this.expand = expand; + this.locales = locales; + this.inactivationIndicatorRefSetId = inactivationIndicatorRefSetId; + } + + void expand(List results, Set referencedComponentIds) { + if (!expand.containsKey(SnomedCoreComponent.Expand.INACTIVATION_PROPERTIES)) { + return; + } + + final SnomedReferenceSetMembers members = SnomedRequests.prepareSearchMember() + .all() + .filterByActive(true) + // all association type refsets and the indicator + .filterByRefSet(String.format("<%s OR %s", Concepts.REFSET_ASSOCIATION_TYPE, inactivationIndicatorRefSetId)) + .filterByReferencedComponent(referencedComponentIds) + .build() + .execute(context); + + final Multimap membersByReferencedComponentId = Multimaps.index(members, SnomedReferenceSetMember::getReferencedComponentId); + + for (SnomedCoreComponent result : results) { + final Collection referringMembers = membersByReferencedComponentId.get(result.getId()); + final ImmutableList.Builder associationTargets = ImmutableList.builder(); + final Set inactivationIndicatorIds = Sets.newHashSet(); + + for (SnomedReferenceSetMember referringMember : referringMembers) { + if (SnomedRefSetType.ASSOCIATION.equals(referringMember.type())) { + final AssociationTarget associationTarget = new AssociationTarget(); + associationTarget.setReferenceSetId(referringMember.getReferenceSetId()); + associationTarget.setTargetComponent((SnomedCoreComponent) referringMember.getProperties().get(SnomedRf2Headers.FIELD_TARGET_COMPONENT)); + associationTargets.add(associationTarget); + } else if (SnomedRefSetType.ATTRIBUTE_VALUE.equals(referringMember.type())) { + inactivationIndicatorIds.add((String) referringMember.getProperties().get(SnomedRf2Headers.FIELD_VALUE_ID)); + } + } + + InactivationProperties inactivationProperties = new InactivationProperties(); + inactivationProperties.setInactivationIndicatorId(Iterables.getFirst(inactivationIndicatorIds, null)); + inactivationProperties.setAssociationTargets(associationTargets.build()); + result.setInactivationProperties(inactivationProperties); + } + + // TODO further expand the inactivationProperties nested properties if requested + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/MembersExpander.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/MembersExpander.java index b50b457acea..ad76a9fd675 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/MembersExpander.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/MembersExpander.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,7 +81,7 @@ void expand(List results, Set componentId for (SnomedCoreComponent component : results) { final Collection members = membersByReferencedComponentId.get(component.getId()); - ((SnomedCoreComponent) component).setMembers(new SnomedReferenceSetMembers(ImmutableList.copyOf(members), null, null, members.size(), members.size())); + ((SnomedCoreComponent) component).setMembers(new SnomedReferenceSetMembers(ImmutableList.copyOf(members), null, members.size(), members.size())); } } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/ModuleExpander.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/ModuleExpander.java new file mode 100644 index 00000000000..1b25f833c74 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/ModuleExpander.java @@ -0,0 +1,67 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.datastore.converter; + +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +import com.b2international.commons.http.ExtendedLocale; +import com.b2international.commons.options.Options; +import com.b2international.snowowl.core.domain.BranchContext; +import com.b2international.snowowl.snomed.core.domain.SnomedComponent; +import com.b2international.snowowl.snomed.core.domain.SnomedConcept; +import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; + +/** + * @since 7.4 + */ +final class ModuleExpander { + + private final BranchContext context; + private final Options expand; + private final List locales; + + public ModuleExpander(BranchContext context, Options expand, List locales) { + this.context = context; + this.expand = expand; + this.locales = locales; + } + + void expand(List results) { + if (expand.containsKey(SnomedComponent.Expand.MODULE)) { + final Options moduleOptions = expand.get(SnomedComponent.Expand.MODULE, Options.class); + + final Set moduleIds = results.stream().map(SnomedComponent::getModuleId).collect(Collectors.toSet()); + + final Map modulesById = SnomedRequests.prepareSearchConcept() + .all() + .filterByIds(moduleIds) + .setExpand(moduleOptions.getOptions("expand")) + .setLocales(locales) + .build() + .execute(context) + .stream() + .collect(Collectors.toMap(SnomedConcept::getId, c -> c)); + + for (SnomedComponent component : results) { + component.setModule(modulesById.get(component.getModuleId())); + } + } + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedConceptConverter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedConceptConverter.java index e5ed195c139..aed73d99c71 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedConceptConverter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedConceptConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ */ package com.b2international.snowowl.snomed.datastore.converter; -import static com.b2international.snowowl.core.domain.IComponent.ID_FUNCTION; import static com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument.Expressions.ancestors; import static com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument.Expressions.parents; import static com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument.Expressions.statedAncestors; @@ -47,17 +46,7 @@ import com.b2international.snowowl.core.domain.IComponent; import com.b2international.snowowl.datastore.request.BaseRevisionResourceConverter; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.AssociationType; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; -import com.b2international.snowowl.snomed.core.domain.InactivationIndicator; -import com.b2international.snowowl.snomed.core.domain.SnomedConcept; -import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; -import com.b2international.snowowl.snomed.core.domain.SnomedDescription; -import com.b2international.snowowl.snomed.core.domain.SnomedDescriptions; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationships; -import com.b2international.snowowl.snomed.core.domain.SubclassDefinitionStatus; +import com.b2international.snowowl.snomed.core.domain.*; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSet; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; import com.b2international.snowowl.snomed.datastore.request.DescriptionRequestHelper; @@ -92,15 +81,15 @@ private SnomedReferenceSetConverter getReferenceSetConverter() { } @Override - protected SnomedConcepts createCollectionResource(List results, String scrollId, String searchAfter, int limit, int total) { - return new SnomedConcepts(results, scrollId, searchAfter, limit, total); + protected SnomedConcepts createCollectionResource(List results, String searchAfter, int limit, int total) { + return new SnomedConcepts(results, searchAfter, limit, total); } @Override protected SnomedConcept toResource(final SnomedConceptDocument input) { final SnomedConcept result = new SnomedConcept(); result.setActive(input.isActive()); - result.setDefinitionStatus(toDefinitionStatus(input.isPrimitive())); + result.setDefinitionStatusId(toDefinitionStatus(input.isPrimitive())); result.setEffectiveTime(toEffectiveTime(input.getEffectiveTime())); result.setId(input.getId()); result.setModuleId(input.getModuleId()); @@ -139,7 +128,7 @@ protected SnomedConcept toResource(final SnomedConceptDocument input) { preferredDescription.setAcceptabilityMap(Maps.toMap(description.getLanguageRefSetIds(), any -> Acceptability.PREFERRED)); return preferredDescription; }).collect(Collectors.toList()); - result.setPreferredDescriptions(new SnomedDescriptions(preferredDescriptions, null, null, preferredDescriptions.size(), preferredDescriptions.size())); + result.setPreferredDescriptions(new SnomedDescriptions(preferredDescriptions, null, preferredDescriptions.size(), preferredDescriptions.size())); } return result; @@ -151,11 +140,13 @@ protected void expand(List results) { return; } - final Set conceptIds = FluentIterable.from(results).transform(ID_FUNCTION).toSet(); + final Set conceptIds = FluentIterable.from(results).transform(SnomedConcept::getId).toSet(); expandReferenceSet(results); - expandInactivationProperties(results, conceptIds); + new InactivationPropertiesExpander(context(), expand(), locales(), Concepts.REFSET_CONCEPT_INACTIVITY_INDICATOR).expand(results, conceptIds); new MembersExpander(context(), expand(), locales()).expand(results, conceptIds); + new ModuleExpander(context(), expand(), locales()).expand(results); + expandDefinitionStatus(results); expandPreferredTerm(results, conceptIds); expandFullySpecifiedName(results, conceptIds); @@ -179,6 +170,32 @@ protected void expand(List results) { } } + private void expandDefinitionStatus(List results) { + if (!expand().containsKey(SnomedConcept.Expand.DEFINITION_STATUS)) { + return; + } + + final Options definitionStatusExpand = expand().getOptions(SnomedConcept.Expand.DEFINITION_STATUS).getOptions("expand"); + + Set definitionStatusIds = results.stream() + .map(SnomedConcept::getDefinitionStatusId) + .collect(Collectors.toSet()); + + Map definitionStatusesById = SnomedRequests.prepareSearchConcept() + .filterByIds(definitionStatusIds) + .setLimit(definitionStatusIds.size()) + .setExpand(definitionStatusExpand) + .setLocales(locales()) + .build() + .execute(context()) + .stream() + .collect(Collectors.toMap(SnomedConcept::getId, c -> c)); + + for (SnomedConcept result : results) { + result.setDefinitionStatus(definitionStatusesById.get(result.getDefinitionStatusId())); + } + } + private void expandReferenceSet(List results) { if (!expand().containsKey(SnomedConcept.Expand.REFERENCE_SET)) { return; @@ -192,24 +209,6 @@ private void expandReferenceSet(List results) { getReferenceSetConverter().expand(referenceSets); } - private void expandInactivationProperties(List results, Set conceptIds) { - if (!expand().containsKey(SnomedConcept.Expand.INACTIVATION_PROPERTIES)) { - return; - } - - new InactivationExpander(context(), Concepts.REFSET_CONCEPT_INACTIVITY_INDICATOR) { - @Override - protected void setAssociationTargets(SnomedConcept result, Multimap associationTargets) { - result.setAssociationTargets(associationTargets); - } - - @Override - protected void setInactivationIndicator(SnomedConcept result, String valueId) { - result.setInactivationIndicator(InactivationIndicator.getByConceptId(valueId)); - } - }.expand(results, conceptIds); - } - private void expandPreferredTerm(List results, final Set conceptIds) { if (!expand().containsKey(SnomedConcept.Expand.PREFERRED_TERM)) { return; @@ -281,7 +280,7 @@ private void expandDescriptions(List results, final Set c for (SnomedConcept concept : results) { final List conceptDescriptions = descriptionsByConceptId.get(concept.getId()); - concept.setDescriptions(new SnomedDescriptions(conceptDescriptions, null, null, conceptDescriptions.size(), conceptDescriptions.size())); + concept.setDescriptions(new SnomedDescriptions(conceptDescriptions, null, conceptDescriptions.size(), conceptDescriptions.size())); } } @@ -295,7 +294,7 @@ private void expandRelationships(List results, final Set .prepareSearchRelationship() .all() .filterByActive(expandOptions.containsKey("active") ? expandOptions.getBoolean("active") : null) - .filterByCharacteristicType(expandOptions.containsKey("characteristicType") ? expandOptions.getString("characteristicType") : null) + .filterByCharacteristicType(expandOptions.containsKey("characteristicTypeId") ? expandOptions.getString("characteristicTypeId") : null) .filterByType(expandOptions.containsKey("typeId") ? expandOptions.getCollection("typeId", String.class) : null) .filterByDestination(expandOptions.containsKey("destinationId") ? expandOptions.getCollection("destinationId", String.class) : null) .filterBySource(conceptIds) @@ -309,7 +308,7 @@ private void expandRelationships(List results, final Set for (SnomedConcept concept : results) { final List conceptRelationships = relationshipsByConceptId.get(concept.getId()); - concept.setRelationships(new SnomedRelationships(conceptRelationships, null, null, conceptRelationships.size(), conceptRelationships.size())); + concept.setRelationships(new SnomedRelationships(conceptRelationships, null, conceptRelationships.size(), conceptRelationships.size())); } } @@ -327,7 +326,7 @@ private void expandInboundRelationships(List results, final Set results, final Set conceptInboundRelationships = inboundRelationshipsByConceptId.get(concept.getId()); - concept.setInboundRelationships(new SnomedRelationships(conceptInboundRelationships, null, null, conceptInboundRelationships.size(), conceptInboundRelationships.size())); + concept.setInboundRelationships(new SnomedRelationships(conceptInboundRelationships, null, conceptInboundRelationships.size(), conceptInboundRelationships.size())); } } @@ -438,11 +437,11 @@ private void expandDescendants(List results, final Set co .build().execute(context()); final Map descendantsById = newHashMap(); - descendantsById.putAll(Maps.uniqueIndex(descendants, ID_FUNCTION)); + descendantsById.putAll(Maps.uniqueIndex(descendants, SnomedConcept::getId)); for (SnomedConcept concept : results) { final Collection descendantIds = descendantsByAncestor.get(concept.getId()); final List currentDescendants = FluentIterable.from(descendantIds).skip(offset).limit(limit).transform(Functions.forMap(descendantsById)).toList(); - final SnomedConcepts descendantConcepts = new SnomedConcepts(currentDescendants, null, null, limit, descendantIds.size()); + final SnomedConcepts descendantConcepts = new SnomedConcepts(currentDescendants, null, limit, descendantIds.size()); if (stated) { concept.setStatedDescendants(descendantConcepts); } else { @@ -519,11 +518,11 @@ private void expandAncestors(List results, Set conceptIds .build().execute(context()); final Map ancestorsById = newHashMap(); - ancestorsById.putAll(Maps.uniqueIndex(ancestors, ID_FUNCTION)); + ancestorsById.putAll(Maps.uniqueIndex(ancestors, SnomedConcept::getId)); for (SnomedConcept concept : results) { final Collection ancestorIds = ancestorsByDescendant.get(concept.getId()); final List conceptAncestors = FluentIterable.from(ancestorIds).skip(offset).limit(limit).transform(Functions.forMap(ancestorsById)).toList(); - final SnomedConcepts ancestorConcepts = new SnomedConcepts(conceptAncestors, null, null, limit, ancestorIds.size()); + final SnomedConcepts ancestorConcepts = new SnomedConcepts(conceptAncestors, null, limit, ancestorIds.size()); if (stated) { concept.setStatedAncestors(ancestorConcepts); } else { @@ -543,8 +542,8 @@ private void expandAncestors(List results, Set conceptIds } } - private DefinitionStatus toDefinitionStatus(final boolean primitive) { - return primitive ? DefinitionStatus.PRIMITIVE : DefinitionStatus.FULLY_DEFINED; + private String toDefinitionStatus(final boolean primitive) { + return primitive ? Concepts.PRIMITIVE : Concepts.FULLY_DEFINED; } private SubclassDefinitionStatus toSubclassDefinitionStatus(final boolean exhaustive) { diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedConstraintConverter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedConstraintConverter.java index adf9b7b26a3..ce863cfda63 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedConstraintConverter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedConstraintConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,8 +62,8 @@ protected SnomedConstraintConverter(RepositoryContext context, Options expand, L } @Override - protected SnomedConstraints createCollectionResource(List results, String scrollId, String searchAfter, int limit, int total) { - return new SnomedConstraints(results, scrollId, searchAfter, limit, total); + protected SnomedConstraints createCollectionResource(List results, String searchAfter, int limit, int total) { + return new SnomedConstraints(results, searchAfter, limit, total); } @Override diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedDescriptionConverter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedDescriptionConverter.java index 57443fa6618..cc75e8ab4eb 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedDescriptionConverter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedDescriptionConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,31 +15,27 @@ */ package com.b2international.snowowl.snomed.datastore.converter; -import static com.b2international.snowowl.core.domain.IComponent.ID_FUNCTION; - +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.stream.Collectors; +import com.b2international.commons.CompareUtils; import com.b2international.commons.http.ExtendedLocale; import com.b2international.commons.options.Options; import com.b2international.snowowl.core.domain.BranchContext; -import com.b2international.snowowl.core.domain.IComponent; import com.b2international.snowowl.datastore.request.BaseRevisionResourceConverter; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.AssociationType; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; -import com.b2international.snowowl.snomed.core.domain.DescriptionInactivationIndicator; +import com.b2international.snowowl.snomed.core.domain.AcceptabilityMembership; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; import com.b2international.snowowl.snomed.core.domain.SnomedDescriptions; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedDescriptionIndexEntry; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; -import com.google.common.base.Function; import com.google.common.collect.FluentIterable; import com.google.common.collect.Maps; -import com.google.common.collect.Multimap; /** * @since 4.0 @@ -51,8 +47,8 @@ final class SnomedDescriptionConverter extends BaseRevisionResourceConverter results, String scrollId, String searchAfter, int limit, int total) { - return new SnomedDescriptions(results, scrollId, searchAfter, limit, total); + protected SnomedDescriptions createCollectionResource(List results, String searchAfter, int limit, int total) { + return new SnomedDescriptions(results, searchAfter, limit, total); } @Override @@ -60,7 +56,7 @@ protected SnomedDescription toResource(final SnomedDescriptionIndexEntry input) final SnomedDescription result = new SnomedDescription(); result.setAcceptabilityMap(input.getAcceptabilityMap()); result.setActive(input.isActive()); - result.setCaseSignificance(toCaseSignificance(input.getCaseSignificanceId())); + result.setCaseSignificanceId(input.getCaseSignificanceId()); result.setConceptId(input.getConceptId()); result.setEffectiveTime(toEffectiveTime(input.getEffectiveTime())); result.setId(input.getId()); @@ -82,28 +78,111 @@ protected void expand(List results) { return; } - final Set descriptionIds = FluentIterable.from(results).transform(IComponent.ID_FUNCTION).toSet(); + final Set descriptionIds = FluentIterable.from(results).transform(SnomedDescription::getId).toSet(); - expandInactivationProperties(results, descriptionIds); + new InactivationPropertiesExpander(context(), expand(), locales(), Concepts.REFSET_DESCRIPTION_INACTIVITY_INDICATOR).expand(results, descriptionIds); new MembersExpander(context(), expand(), locales()).expand(results, descriptionIds); + new ModuleExpander(context(), expand(), locales()).expand(results); + expandCaseSignificance(results); expandConcept(results, descriptionIds); expandType(results, descriptionIds); + expandAcceptabilities(results); + } + + private void expandCaseSignificance(List results) { + if (!expand().containsKey("caseSignificance")) { + return; + } + + final Set caseSignificanceIds = results.stream().map(SnomedDescription::getCaseSignificanceId).collect(Collectors.toSet()); + final Options caseSignificanceExpand = expand().get("caseSignificance", Options.class); + + final Map caseSignificancesById = SnomedRequests.prepareSearchConcept() + .filterByIds(caseSignificanceIds) + .setLimit(caseSignificanceIds.size()) + .setExpand(caseSignificanceExpand.getOptions("expand")) + .setLocales(locales()) + .build() + .execute(context()) + .stream() + .collect(Collectors.toMap(SnomedConcept::getId, c -> c)); + + for (SnomedDescription result : results) { + result.setCaseSignificance(caseSignificancesById.get(result.getCaseSignificanceId())); + } + } + + private void expandAcceptabilities(List results) { + if (!expand().containsKey("acceptabilities")) { + return; + } + + // expand the acceptability objects first + for (SnomedDescription result : results) { + if (!CompareUtils.isEmpty(result.getAcceptabilityMap())) { + List acceptabilities = result.getAcceptabilityMap().entrySet().stream() + .map(entry -> new AcceptabilityMembership(entry.getKey(), entry.getValue().getConceptId())) + .sorted() + .collect(Collectors.toList()); + result.setAcceptabilities(acceptabilities); + } else { + result.setAcceptabilities(Collections.emptyList()); + } + } + + // additional expansions supported inside the acceptabilities() expand + final Options expandOptions = expand().get("acceptabilities", Options.class).getOptions("expand"); + + if (expandOptions.containsKey("acceptability")) { + final Options acceptabilityExpand = expandOptions.get("acceptability", Options.class); + final Set acceptabilityIds = results.stream().flatMap(d -> d.getAcceptabilities().stream().map(AcceptabilityMembership::getAcceptabilityId)).collect(Collectors.toSet()); + final Map acceptabilitiesById = SnomedRequests.prepareSearchConcept() + .filterByIds(acceptabilityIds) + .setLimit(acceptabilityIds.size()) + .setExpand(acceptabilityExpand.getOptions("expand")) + .setLocales(locales()) + .build() + .execute(context()) + .stream() + .collect(Collectors.toMap(SnomedConcept::getId, c -> c)); + for (SnomedDescription result : results) { + result.getAcceptabilities().forEach(acceptabilityMembership -> { + acceptabilityMembership.setAcceptability(acceptabilitiesById.get(acceptabilityMembership.getAcceptabilityId())); + }); + } + } + + if (expandOptions.containsKey("languageRefSet")) { + final Options languageRefSetExpand = expandOptions.get("languageRefSet", Options.class); + final Set languageRefSetIds = results.stream().flatMap(d -> d.getAcceptabilities().stream().map(AcceptabilityMembership::getLanguageRefSetId)).collect(Collectors.toSet()); + final Map languageRefSetsById = SnomedRequests.prepareSearchConcept() + .filterByIds(languageRefSetIds) + .setLimit(languageRefSetIds.size()) + .setExpand(languageRefSetExpand.getOptions("expand")) + .setLocales(locales()) + .build() + .execute(context()) + .stream() + .collect(Collectors.toMap(SnomedConcept::getId, c -> c)); + for (SnomedDescription result : results) { + result.getAcceptabilities().forEach(acceptabilityMembership -> { + acceptabilityMembership.setLanguageRefSet(languageRefSetsById.get(acceptabilityMembership.getLanguageRefSetId())); + }); + } + } + + } private void expandConcept(List results, final Set descriptionIds) { if (expand().containsKey("concept")) { final Options expandOptions = expand().get("concept", Options.class); - final Set conceptIds = FluentIterable.from(results) - .transform(new Function() { - @Override public String apply(SnomedDescription input) { return input.getConceptId(); } - }) - .toSet(); + final Set conceptIds = FluentIterable.from(results).transform(SnomedDescription::getConceptId).toSet(); final Map conceptsById = getConceptMap(expandOptions, conceptIds); for (SnomedDescription description : results) { - final SnomedConcept concept = conceptsById.get(description.getConceptId()); - ((SnomedDescription) description).setConcept(concept); + ((SnomedDescription) description).setConcept(conceptsById.get(description.getConceptId())); } } } @@ -111,17 +190,12 @@ private void expandConcept(List results, final Set de private void expandType(List results, final Set descriptionIds) { if (expand().containsKey("type")) { final Options expandOptions = expand().get("type", Options.class); - final Set conceptIds = FluentIterable.from(results) - .transform(new Function() { - @Override public String apply(SnomedDescription input) { return input.getTypeId(); } - }) - .toSet(); + final Set typeIds = FluentIterable.from(results).transform(SnomedDescription::getTypeId).toSet(); - final Map conceptsById = getConceptMap(expandOptions, conceptIds); + final Map typesById = getConceptMap(expandOptions, typeIds); for (SnomedDescription description : results) { - final SnomedConcept type = conceptsById.get(description.getTypeId()); - ((SnomedDescription) description).setType(type); + ((SnomedDescription) description).setType(typesById.get(description.getTypeId())); } } } @@ -136,27 +210,7 @@ private Map getConceptMap(final Options expandOptions, fi .build() .execute(context()); - final Map conceptsById = Maps.uniqueIndex(types, ID_FUNCTION); - return conceptsById; + return Maps.uniqueIndex(types, SnomedConcept::getId); } - private void expandInactivationProperties(List results, final Set descriptionIds) { - if (expand().containsKey("inactivationProperties")) { - new InactivationExpander(context(), Concepts.REFSET_DESCRIPTION_INACTIVITY_INDICATOR) { - @Override - protected void setAssociationTargets(SnomedDescription result,Multimap associationTargets) { - ((SnomedDescription) result).setAssociationTargets(associationTargets); - } - - @Override - protected void setInactivationIndicator(SnomedDescription result, String valueId) { - ((SnomedDescription) result).setInactivationIndicator(DescriptionInactivationIndicator.getInactivationIndicatorByValueId(valueId)); - } - }.expand(results, descriptionIds); - } - } - - private CaseSignificance toCaseSignificance(final String caseSignificanceId) { - return CaseSignificance.getByConceptId(caseSignificanceId); - } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedReferenceSetConverter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedReferenceSetConverter.java index 5febd26847c..f504c2139cb 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedReferenceSetConverter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedReferenceSetConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,12 +39,13 @@ protected SnomedReferenceSetConverter(BranchContext context, Options expand, Lis } @Override - protected SnomedReferenceSets createCollectionResource(List results, String scrollId, String searchAfter, int limit, int total) { - return new SnomedReferenceSets(results, scrollId, searchAfter, limit, total); + protected SnomedReferenceSets createCollectionResource(List results, String searchAfter, int limit, int total) { + return new SnomedReferenceSets(results, searchAfter, limit, total); } @Override protected void expand(List results) { + new ModuleExpander(context(), expand(), locales()).expand(results); expandMembers(results); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedReferenceSetMemberConverter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedReferenceSetMemberConverter.java index d9257ea9f69..9a1085cc4dc 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedReferenceSetMemberConverter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedReferenceSetMemberConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -66,14 +66,15 @@ final class SnomedReferenceSetMemberConverter extends BaseRevisionResourceConver } @Override - protected SnomedReferenceSetMembers createCollectionResource(List results, String scrollId, String searchAfter, int limit, int total) { - return new SnomedReferenceSetMembers(results, scrollId, searchAfter, limit, total); + protected SnomedReferenceSetMembers createCollectionResource(List results, String searchAfter, int limit, int total) { + return new SnomedReferenceSetMembers(results, searchAfter, limit, total); } @Override protected void expand(List results) { expandReferencedComponent(results); expandTargetComponent(results); + new ModuleExpander(context(), expand(), locales()).expand(results); } private void expandTargetComponent(List results) { @@ -97,7 +98,7 @@ public ComponentCategory apply(String id) { for (ComponentCategory category : targetComponentIdsByCategory.keySet()) { final Collection targetComponentIds = targetComponentIdsByCategory.get(category); - final Map componentsById = Maps.uniqueIndex(getComponents(category, targetComponentIds, expandOptions.get("expand", Options.class)), IComponent.ID_FUNCTION); + final Map componentsById = Maps.uniqueIndex(getComponents(category, targetComponentIds, expandOptions.get("expand", Options.class)), IComponent::getId); for (String targetComponentId : targetComponentIds) { final SnomedCoreComponent targetComponent = componentsById.get(targetComponentId); if (targetComponent != null) { diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedRelationshipConverter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedRelationshipConverter.java index 9291cda69b4..720e7d1f449 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedRelationshipConverter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedRelationshipConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,6 @@ */ package com.b2international.snowowl.snomed.datastore.converter; -import static com.b2international.snowowl.core.domain.IComponent.ID_FUNCTION; - import java.util.List; import java.util.Map; import java.util.Set; @@ -25,16 +23,13 @@ import com.b2international.commons.options.Options; import com.b2international.snowowl.core.domain.BranchContext; import com.b2international.snowowl.datastore.request.BaseRevisionResourceConverter; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; import com.b2international.snowowl.snomed.core.domain.SnomedRelationships; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; -import com.google.common.base.Function; -import com.google.common.base.Strings; import com.google.common.collect.FluentIterable; import com.google.common.collect.Maps; @@ -45,19 +40,19 @@ final class SnomedRelationshipConverter extends BaseRevisionResourceConverter results, String scrollId, String searchAfter, int limit, int total) { - return new SnomedRelationships(results, scrollId, searchAfter, limit, total); + protected SnomedRelationships createCollectionResource(List results, String searchAfter, int limit, int total) { + return new SnomedRelationships(results, searchAfter, limit, total); } @Override protected SnomedRelationship toResource(final SnomedRelationshipIndexEntry input) { final SnomedRelationship result = new SnomedRelationship(); result.setActive(input.isActive()); - result.setCharacteristicType(toCharacteristicType(input.getCharacteristicTypeId())); + result.setCharacteristicTypeId(input.getCharacteristicTypeId()); result.setDestinationNegated(input.isDestinationNegated()); result.setEffectiveTime(toEffectiveTime(input.getEffectiveTime())); result.setId(input.getId()); - result.setModifier(toRelationshipModifier(input.isUniversal())); + result.setModifierId(toRelationshipModifier(input.isUniversal())); result.setModuleId(input.getModuleId()); result.setIconId(input.getIconId()); result.setReleased(input.isReleased()); @@ -76,66 +71,58 @@ protected void expand(List results) { return; } - final Set relationshipIds = FluentIterable.from(results).transform(ID_FUNCTION).toSet(); + final Set relationshipIds = FluentIterable.from(results).transform(SnomedRelationship::getId).toSet(); new MembersExpander(context(), expand(), locales()).expand(results, relationshipIds); - if (expand().containsKey(SnomedRelationship.Expand.SOURCE)) { - final Options sourceOptions = expand().get(SnomedRelationship.Expand.SOURCE, Options.class); - final Set sourceConceptIds = FluentIterable.from(results).transform(new Function() { - @Override - public String apply(SnomedRelationship input) { - return input.getSourceId(); - } - }).toSet(); - final SnomedConcepts sourceConcepts = SnomedRequests + new ModuleExpander(context(), expand(), locales()).expand(results); + expandSource(results); + expandDestination(results); + expandType(results); + expandCharacteristicType(results); + expandModifier(results); + } + + private void expandCharacteristicType(List results) { + if (expand().containsKey(SnomedRelationship.Expand.CHARACTERISTIC_TYPE)) { + final Options characteristicTypeOptions = expand().get(SnomedRelationship.Expand.CHARACTERISTIC_TYPE, Options.class); + final Set characteristicTypeConceptIds = FluentIterable.from(results).transform(SnomedRelationship::getCharacteristicTypeId).toSet(); + final SnomedConcepts typeConcepts = SnomedRequests .prepareSearchConcept() - .filterByIds(sourceConceptIds) - .setLimit(sourceConceptIds.size()) - .setExpand(sourceOptions.get("expand", Options.class)) + .filterByIds(characteristicTypeConceptIds) + .setLimit(characteristicTypeConceptIds.size()) + .setExpand(characteristicTypeOptions.get("expand", Options.class)) .setLocales(locales()) .build() .execute(context()); - final Map sourceConceptsById = Maps.uniqueIndex(sourceConcepts, ID_FUNCTION); + final Map characteristicTypesById = Maps.uniqueIndex(typeConcepts, SnomedConcept::getId); for (SnomedRelationship relationship : results) { - final String sourceId = relationship.getSourceId(); - if (sourceConceptsById.containsKey(sourceId)) { - final SnomedConcept sourceConcept = sourceConceptsById.get(sourceId); - ((SnomedRelationship) relationship).setSource(sourceConcept); - } + ((SnomedRelationship) relationship).setCharacteristicType(characteristicTypesById.get(relationship.getCharacteristicTypeId())); } } - if (expand().containsKey(SnomedRelationship.Expand.DESTINATION)) { - final Options destinationOptions = expand().get(SnomedRelationship.Expand.DESTINATION, Options.class); - final Set destinationConceptIds = FluentIterable.from(results).transform(new Function() { - @Override - public String apply(SnomedRelationship input) { - return input.getDestinationId(); - } - }).toSet(); - final SnomedConcepts destinationConcepts = SnomedRequests + } + + private void expandModifier(List results) { + if (expand().containsKey(SnomedRelationship.Expand.MODIFIER)) { + final Options modifierOptions = expand().get(SnomedRelationship.Expand.MODIFIER, Options.class); + final Set modifierIds = FluentIterable.from(results).transform(SnomedRelationship::getModifierId).toSet(); + final SnomedConcepts typeConcepts = SnomedRequests .prepareSearchConcept() - .filterByIds(destinationConceptIds) - .setLimit(destinationConceptIds.size()) - .setExpand(destinationOptions.get("expand", Options.class)) + .filterByIds(modifierIds) + .setLimit(modifierIds.size()) + .setExpand(modifierOptions.get("expand", Options.class)) .setLocales(locales()) .build() .execute(context()); - final Map destinationConceptsById = Maps.uniqueIndex(destinationConcepts, ID_FUNCTION); + final Map modifiersById = Maps.uniqueIndex(typeConcepts, SnomedConcept::getId); for (SnomedRelationship relationship : results) { - final String destinationId = relationship.getDestinationId(); - if (destinationConceptsById.containsKey(destinationId)) { - final SnomedConcept destinationConcept = destinationConceptsById.get(destinationId); - ((SnomedRelationship) relationship).setDestination(destinationConcept); - } + ((SnomedRelationship) relationship).setModifier(modifiersById.get(relationship.getModifierId())); } } + } + + private void expandType(List results) { if (expand().containsKey(SnomedRelationship.Expand.TYPE)) { final Options typeOptions = expand().get(SnomedRelationship.Expand.TYPE, Options.class); - final Set typeConceptIds = FluentIterable.from(results).transform(new Function() { - @Override - public String apply(SnomedRelationship input) { - return input.getTypeId(); - } - }).toSet(); + final Set typeConceptIds = FluentIterable.from(results).transform(SnomedRelationship::getTypeId).toSet(); final SnomedConcepts typeConcepts = SnomedRequests .prepareSearchConcept() .filterByIds(typeConceptIds) @@ -144,7 +131,7 @@ public String apply(SnomedRelationship input) { .setLocales(locales()) .build() .execute(context()); - final Map typeConceptsById = Maps.uniqueIndex(typeConcepts, ID_FUNCTION); + final Map typeConceptsById = Maps.uniqueIndex(typeConcepts, SnomedConcept::getId); for (SnomedRelationship relationship : results) { final String typeId = relationship.getTypeId(); if (typeConceptsById.containsKey(typeId)) { @@ -154,16 +141,54 @@ public String apply(SnomedRelationship input) { } } } - - private CharacteristicType toCharacteristicType(final String characteristicTypeId) { - if (Strings.isNullOrEmpty(characteristicTypeId)) { - return null; - } else { - return CharacteristicType.getByConceptId(characteristicTypeId); + + private void expandDestination(List results) { + if (expand().containsKey(SnomedRelationship.Expand.DESTINATION)) { + final Options destinationOptions = expand().get(SnomedRelationship.Expand.DESTINATION, Options.class); + final Set destinationConceptIds = FluentIterable.from(results).transform(SnomedRelationship::getDestinationId).toSet(); + final SnomedConcepts destinationConcepts = SnomedRequests + .prepareSearchConcept() + .filterByIds(destinationConceptIds) + .setLimit(destinationConceptIds.size()) + .setExpand(destinationOptions.get("expand", Options.class)) + .setLocales(locales()) + .build() + .execute(context()); + final Map destinationConceptsById = Maps.uniqueIndex(destinationConcepts, SnomedConcept::getId); + for (SnomedRelationship relationship : results) { + final String destinationId = relationship.getDestinationId(); + if (destinationConceptsById.containsKey(destinationId)) { + final SnomedConcept destinationConcept = destinationConceptsById.get(destinationId); + ((SnomedRelationship) relationship).setDestination(destinationConcept); + } + } } } - private RelationshipModifier toRelationshipModifier(final boolean universal) { - return universal ? RelationshipModifier.UNIVERSAL : RelationshipModifier.EXISTENTIAL; + private void expandSource(List results) { + if (expand().containsKey(SnomedRelationship.Expand.SOURCE)) { + final Options sourceOptions = expand().get(SnomedRelationship.Expand.SOURCE, Options.class); + final Set sourceConceptIds = FluentIterable.from(results).transform(SnomedRelationship::getSourceId).toSet(); + final SnomedConcepts sourceConcepts = SnomedRequests + .prepareSearchConcept() + .filterByIds(sourceConceptIds) + .setLimit(sourceConceptIds.size()) + .setExpand(sourceOptions.get("expand", Options.class)) + .setLocales(locales()) + .build() + .execute(context()); + final Map sourceConceptsById = Maps.uniqueIndex(sourceConcepts, SnomedConcept::getId); + for (SnomedRelationship relationship : results) { + final String sourceId = relationship.getSourceId(); + if (sourceConceptsById.containsKey(sourceId)) { + final SnomedConcept sourceConcept = sourceConceptsById.get(sourceId); + ((SnomedRelationship) relationship).setSource(sourceConcept); + } + } + } + } + + private String toRelationshipModifier(final boolean universal) { + return universal ? Concepts.UNIVERSAL_RESTRICTION_MODIFIER : Concepts.EXISTENTIAL_RESTRICTION_MODIFIER; } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/SnomedRepositoryPreCommitHook.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/SnomedRepositoryPreCommitHook.java index 7631b0c23f3..a1485f199c7 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/SnomedRepositoryPreCommitHook.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/SnomedRepositoryPreCommitHook.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ import java.io.IOException; import java.util.Collection; +import java.util.Collections; import java.util.Set; import java.util.stream.Stream; @@ -40,7 +41,6 @@ import com.b2international.snowowl.datastore.request.BranchRequest; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; import com.b2international.snowowl.snomed.datastore.index.constraint.SnomedConstraintDocument; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; @@ -88,10 +88,10 @@ protected Collection getChangeSetProcessors(StagingArea stag final Set inferredSourceIds = Sets.newHashSet(); final Set inferredDestinationIds = Sets.newHashSet(); - collectIds(statedSourceIds, statedDestinationIds, staging.getNewObjects(SnomedRelationshipIndexEntry.class), CharacteristicType.STATED_RELATIONSHIP); - collectIds(statedSourceIds, statedDestinationIds, staging.getChangedRevisions(SnomedRelationshipIndexEntry.class).map(diff -> (SnomedRelationshipIndexEntry) diff.newRevision), CharacteristicType.STATED_RELATIONSHIP); - collectIds(inferredSourceIds, inferredDestinationIds, staging.getNewObjects(SnomedRelationshipIndexEntry.class), CharacteristicType.INFERRED_RELATIONSHIP); - collectIds(inferredSourceIds, inferredDestinationIds, staging.getChangedRevisions(SnomedRelationshipIndexEntry.class).map(diff -> (SnomedRelationshipIndexEntry) diff.newRevision), CharacteristicType.INFERRED_RELATIONSHIP); + collectIds(statedSourceIds, statedDestinationIds, staging.getNewObjects(SnomedRelationshipIndexEntry.class), Concepts.STATED_RELATIONSHIP); + collectIds(statedSourceIds, statedDestinationIds, staging.getChangedRevisions(SnomedRelationshipIndexEntry.class).map(diff -> (SnomedRelationshipIndexEntry) diff.newRevision), Concepts.STATED_RELATIONSHIP); + collectIds(inferredSourceIds, inferredDestinationIds, staging.getNewObjects(SnomedRelationshipIndexEntry.class), Concepts.INFERRED_RELATIONSHIP); + collectIds(inferredSourceIds, inferredDestinationIds, staging.getChangedRevisions(SnomedRelationshipIndexEntry.class).map(diff -> (SnomedRelationshipIndexEntry) diff.newRevision), Concepts.INFERRED_RELATIONSHIP); collectIds(statedSourceIds, statedDestinationIds, staging.getNewObjects(SnomedRefSetMemberIndexEntry.class), expressionConverter); collectIds(statedSourceIds, statedDestinationIds, staging.getChangedRevisions(SnomedRefSetMemberIndexEntry.class).map(diff -> (SnomedRefSetMemberIndexEntry) diff.newRevision), expressionConverter); @@ -209,8 +209,6 @@ protected Collection getChangeSetProcessors(StagingArea stag final Taxonomy inferredTaxonomy = Taxonomies.inferred(index, expressionConverter, staging, inferredConceptIds, checkCycles); final Taxonomy statedTaxonomy = Taxonomies.stated(index, expressionConverter, staging, statedConceptIds, checkCycles); - final long branchBaseTimestamp = index.get(RevisionBranch.class, staging.getBranchPath()).getBaseTimestamp(); - // XXX change processor execution order is important!!! return ImmutableList.builder() // execute description change processor to get proper acceptabilityMap values before executing other change processors @@ -218,10 +216,19 @@ protected Collection getChangeSetProcessors(StagingArea stag .add(new DescriptionChangeProcessor()) .add(new ConceptChangeProcessor(DoiDataProvider.INSTANCE, SnomedIconProvider.INSTANCE.getAvailableIconIds(), statedTaxonomy, inferredTaxonomy)) .add(new RelationshipChangeProcessor()) - // effective time restore should be the last processing unit before we send the changes to commit - .add(new ComponentEffectiveTimeRestoreChangeProcessor(log, branchBaseTimestamp)) .build(); - + } + + @Override + protected void postUpdateDocuments(StagingArea staging, RevisionSearcher index) throws IOException { + final RepositoryContext context = ClassUtils.checkAndCast(staging.getContext(), RepositoryContext.class); + final FeatureToggles featureToggles = context.service(FeatureToggles.class); + final boolean importRunning = featureToggles.isEnabled(Features.getImportFeatureToggle(context.id(), index.branch())); + if (!importRunning) { + final long branchBaseTimestamp = index.get(RevisionBranch.class, staging.getBranchPath()).getBaseTimestamp(); + // XXX effective time restore should be the last processing unit before we send the changes to commit + doProcess(Collections.singleton(new ComponentEffectiveTimeRestoreChangeProcessor(log, branchBaseTimestamp)), staging, index); + } } @Override @@ -240,10 +247,10 @@ protected short getTerminologyComponentId(RevisionDocument revision) { throw new UnsupportedOperationException("Unsupported revision document: " + revision); } - private void collectIds(final Set sourceIds, final Set destinationIds, Stream newRelationships, CharacteristicType characteristicType) { + private void collectIds(final Set sourceIds, final Set destinationIds, Stream newRelationships, String characteristicTypeId) { newRelationships .filter(newRelationship -> Concepts.IS_A.equals(newRelationship.getTypeId())) - .filter(newRelationship -> newRelationship.getCharacteristicTypeId().equals(characteristicType.getConceptId())) + .filter(newRelationship -> newRelationship.getCharacteristicTypeId().equals(characteristicTypeId)) .forEach(newRelationship -> { sourceIds.add(newRelationship.getSourceId()); destinationIds.add(newRelationship.getDestinationId()); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedConceptDocument.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedConceptDocument.java index a1b3d9eef3f..a3d49b532a9 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedConceptDocument.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedConceptDocument.java @@ -21,6 +21,7 @@ import static com.b2international.index.query.Expressions.matchAnyInt; import static com.b2international.index.query.Expressions.matchAnyLong; import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.collect.Sets.newHashSetWithExpectedSize; import java.util.Collection; import java.util.Collections; @@ -31,7 +32,7 @@ import com.b2international.collections.longs.LongSet; import com.b2international.commons.StringUtils; import com.b2international.commons.collections.Collections3; -import com.b2international.commons.functions.StringToLongFunction; +import com.b2international.commons.exceptions.BadRequestException; import com.b2international.index.Doc; import com.b2international.index.Script; import com.b2international.index.query.Expression; @@ -127,20 +128,32 @@ public final static class Expressions extends SnomedComponentDocument.Expression private Expressions() { } + private static Iterable toLongValues(Collection values) { + final Set result = newHashSetWithExpectedSize(values.size()); + for (String value : values) { + try { + result.add(Long.valueOf(value)); + } catch (NumberFormatException e) { + throw new BadRequestException("'%s' value is not a valid SNOMED CT identifier", value); + } + } + return result; + } + public static Expression parents(Collection parentIds) { - return matchAnyLong(Fields.PARENTS, StringToLongFunction.copyOf(parentIds)); + return matchAnyLong(Fields.PARENTS, toLongValues(parentIds)); } public static Expression ancestors(Collection ancestorIds) { - return matchAnyLong(Fields.ANCESTORS, StringToLongFunction.copyOf(ancestorIds)); + return matchAnyLong(Fields.ANCESTORS, toLongValues(ancestorIds)); } public static Expression statedParents(Collection statedParentIds) { - return matchAnyLong(Fields.STATED_PARENTS, StringToLongFunction.copyOf(statedParentIds)); + return matchAnyLong(Fields.STATED_PARENTS, toLongValues(statedParentIds)); } public static Expression statedAncestors(Collection statedAncestorIds) { - return matchAnyLong(Fields.STATED_ANCESTORS, StringToLongFunction.copyOf(statedAncestorIds)); + return matchAnyLong(Fields.STATED_ANCESTORS, toLongValues(statedAncestorIds)); } public static Expression primitive() { @@ -241,7 +254,7 @@ public static Builder builder(SnomedConcept input) { .released(input.isReleased()) .effectiveTime(EffectiveTimes.getEffectiveTime(input.getEffectiveTime())) .iconId(input.getIconId()) - .primitive(input.getDefinitionStatus().isPrimitive()) + .primitive(input.isPrimitive()) .exhaustive(input.getSubclassDefinitionStatus().isExhaustive()) .parents(PrimitiveSets.newLongOpenHashSet(input.getParentIds())) .ancestors(PrimitiveSets.newLongOpenHashSet(input.getAncestorIds())) diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedDescriptionIndexEntry.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedDescriptionIndexEntry.java index 9e1c491e943..12c47259811 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedDescriptionIndexEntry.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedDescriptionIndexEntry.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -111,7 +111,7 @@ public static Builder builder(final SnomedDescription input) { .active(input.isActive()) .typeId(input.getTypeId()) .conceptId(input.getConceptId()) - .caseSignificanceId(input.getCaseSignificance().getConceptId()) + .caseSignificanceId(input.getCaseSignificanceId()) .effectiveTime(EffectiveTimes.getEffectiveTime(input.getEffectiveTime())); // TODO add back scoring @@ -130,23 +130,6 @@ public static Builder builder(final SnomedDescription input) { return builder; } -// public static Builder builder(Description description) { -// String id = description.getId(); -// return builder() -// .storageKey(CDOIDUtils.asLong(description.cdoID())) -// .id(id) -// .namespace(!Strings.isNullOrEmpty(id) ? SnomedIdentifiers.getNamespace(id) : null) -// .term(description.getTerm()) -// .moduleId(description.getModule().getId()) -// .released(description.isReleased()) -// .active(description.isActive()) -// .typeId(description.getType().getId()) -// .caseSignificanceId(description.getCaseSignificance().getId()) -// .conceptId(description.getConcept().getId()) -// .languageCode(description.getLanguageCode()) -// .effectiveTime(description.isSetEffectiveTime() ? description.getEffectiveTime().getTime() : EffectiveTimes.UNSET_EFFECTIVE_TIME); -// } - /** * Creates a new {@link Builder} from the given {@link SnomedDescriptionIndexEntry}. The acceptability map is not copied over to the * {@link Builder} instance, if you need that, manually modify the returned {@link Builder} to represent the desired acceptability state. diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRefSetMemberIndexEntry.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRefSetMemberIndexEntry.java index d9aaae78f41..deb8c125691 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRefSetMemberIndexEntry.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRefSetMemberIndexEntry.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,6 @@ import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.InactivationIndicator; import com.b2international.snowowl.snomed.core.domain.RelationshipRefinability; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedCoreComponent; @@ -120,7 +119,8 @@ SnomedRefSetMemberIndexEntry.Fields.MRCM_CONTENT_TYPE_ID, SnomedRefSetMemberIndexEntry.Fields.MRCM_RANGE_CONSTRAINT, SnomedRefSetMemberIndexEntry.Fields.MRCM_ATTRIBUTE_RULE, - SnomedRefSetMemberIndexEntry.Fields.MRCM_RULE_REFSET_ID + SnomedRefSetMemberIndexEntry.Fields.MRCM_RULE_REFSET_ID, + SnomedRefSetMemberIndexEntry.Fields.MAP_BLOCK, } ) @JsonDeserialize(builder = SnomedRefSetMemberIndexEntry.Builder.class) @@ -204,6 +204,9 @@ public static class Fields extends SnomedDocument.Fields { public static final String MRCM_RULE_REFSET_ID = SnomedRf2Headers.FIELD_MRCM_RULE_REFSET_ID; public static final String CLASS_AXIOM_RELATIONSHIP = "classAxiomRelationships"; public static final String GCI_AXIOM_RELATIONSHIP = "gciAxiomRelationships"; + + // Complex map with map block + public static final String MAP_BLOCK = "mapBlock"; } public static Builder builder() { @@ -310,6 +313,10 @@ public static Expression mapTargetDescriptions(Collection mapTargetDescr public static Expression mapGroups(Collection mapGroups) { return matchAnyInt(Fields.MAP_GROUP, mapGroups); } + + public static Expression mapPriority(Collection mapPriorities) { + return matchAnyInt(Fields.MAP_PRIORITY, mapPriorities); + } public static Expression referencedComponentTypes(Collection referencedComponentTypes) { return matchAnyInt(Fields.REFERENCED_COMPONENT_TYPE, referencedComponentTypes.stream().map(Short::intValue).collect(Collectors.toSet())); @@ -549,6 +556,8 @@ public static final class Builder extends SnomedDocument.Builder getAdditionalFields() { putIfPresent(builder, Fields.MRCM_ATTRIBUTE_RULE, getAttributeRule()); // MRCM Module Scope putIfPresent(builder, Fields.MRCM_RULE_REFSET_ID, getMrcmRuleRefsetId()); + // Complex map with map block + putIfPresent(builder, Fields.MAP_BLOCK, getMapBlock()); return builder.build(); } @@ -1456,7 +1479,9 @@ protected ToStringHelper doToString() { .add("rangeConstraint", rangeConstraint) .add("attributeRule", attributeRule) - .add("mrcmRuleRefsetId", mrcmRuleRefsetId); + .add("mrcmRuleRefsetId", mrcmRuleRefsetId) + + .add("mapBlock", mapBlock); } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRelationshipIndexEntry.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRelationshipIndexEntry.java index 4ce907fdae9..1f498c7346c 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRelationshipIndexEntry.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRelationshipIndexEntry.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ import com.b2international.snowowl.core.date.EffectiveTimes; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -78,12 +77,12 @@ public static Builder builder(final SnomedRelationship input) { .sourceId(input.getSourceId()) .typeId(input.getTypeId()) .destinationId(input.getDestinationId()) - .characteristicTypeId(input.getCharacteristicType().getConceptId()) + .characteristicTypeId(input.getCharacteristicTypeId()) .group(input.getGroup()) .unionGroup(input.getUnionGroup()) .active(input.isActive()) .released(input.isReleased()) - .modifierId(input.getModifier().getConceptId()) + .modifierId(input.getModifierId()) .destinationNegated(input.isDestinationNegated()) .moduleId(input.getModuleId()) .effectiveTime(EffectiveTimes.getEffectiveTime(input.getEffectiveTime())); @@ -435,14 +434,6 @@ public boolean isExistential() { return Concepts.EXISTENTIAL_RESTRICTION_MODIFIER.equals(modifierId); } - /** - * @return the {@link CharacteristicType} value for this relationship, based on the stored characteristic type identifier - */ - @JsonIgnore - public CharacteristicType getCharacteristicType() { - return CharacteristicType.getByConceptId(characteristicTypeId); - } - /** * @return the relationship group */ diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/taxonomy/ReasonerTaxonomyBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/taxonomy/ReasonerTaxonomyBuilder.java index 2eead482f9d..257454633f4 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/taxonomy/ReasonerTaxonomyBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/taxonomy/ReasonerTaxonomyBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,9 +62,6 @@ import com.b2international.index.revision.RevisionSearcher; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; import com.b2international.snowowl.snomed.core.domain.SubclassDefinitionStatus; @@ -205,7 +202,7 @@ public ReasonerTaxonomyBuilder addActiveConceptIds(final Stream c final Collection definedConceptIds = newArrayListWithCapacity(chunk.size()); for (SnomedConcept concept : chunk) { conceptIds.add(concept.getId()); - if (!concept.getDefinitionStatus().isPrimitive()) { + if (!concept.isPrimitive()) { definedConceptIds.add(concept.getId()); } } @@ -347,7 +344,7 @@ public ReasonerTaxonomyBuilder addActiveStatedEdges(final Stream filteredRelationships = relationships.filter(r -> r.isActive() && Concepts.IS_A.equals(r.getTypeId()) - && CharacteristicType.STATED_RELATIONSHIP.equals(r.getCharacteristicType()) + && Concepts.STATED_RELATIONSHIP.equals(r.getCharacteristicTypeId()) && !excludedModuleIds.contains(r.getModuleId())); final List sourceIds = newArrayListWithExpectedSize(SCROLL_LIMIT); @@ -415,10 +412,9 @@ public ReasonerTaxonomyBuilder addConceptFlags(final Stream conce entering("Registering active concept flags (exhaustive, fully defined) using concept ID stream"); Stream filteredConcepts = concepts.filter(c -> { - final boolean fullyDefined = DefinitionStatus.FULLY_DEFINED.equals(c.getDefinitionStatus()); final boolean exhaustive = SubclassDefinitionStatus.DISJOINT_SUBCLASSES.equals(c.getSubclassDefinitionStatus()); return c.isActive() - && (fullyDefined || exhaustive) + && (!c.isPrimitive() || exhaustive) && !excludedModuleIds.contains(c.getModuleId()); }); @@ -459,7 +455,7 @@ public ReasonerTaxonomyBuilder addActiveStatedNonIsARelationships(final Stream predicate = relationship -> relationship.isActive() - && CharacteristicType.STATED_RELATIONSHIP.equals(relationship.getCharacteristicType()) + && Concepts.STATED_RELATIONSHIP.equals(relationship.getCharacteristicTypeId()) && !Concepts.IS_A.equals(relationship.getTypeId()) && !excludedModuleIds.contains(relationship.getModuleId()); @@ -497,7 +493,7 @@ public ReasonerTaxonomyBuilder addActiveAdditionalGroupedRelationships(final Str entering("Registering active additional grouped relationships using relationship stream"); Predicate predicate = relationship -> relationship.isActive() - && CharacteristicType.ADDITIONAL_RELATIONSHIP.equals(relationship.getCharacteristicType()) + && Concepts.ADDITIONAL_RELATIONSHIP.equals(relationship.getCharacteristicTypeId()) && relationship.getGroup() > 0 && !excludedModuleIds.contains(relationship.getModuleId()); @@ -623,7 +619,7 @@ public ReasonerTaxonomyBuilder addActiveInferredRelationships(final Stream predicate = relationship -> relationship.isActive() - && CharacteristicType.INFERRED_RELATIONSHIP.equals(relationship.getCharacteristicType()) + && Concepts.INFERRED_RELATIONSHIP.equals(relationship.getCharacteristicTypeId()) && !excludedModuleIds.contains(relationship.getModuleId()); addRelationships(sortedRelationships.filter(predicate), existingInferredRelationships::putAll); @@ -748,7 +744,7 @@ private void addRelationships(final Stream sortedRelationshi final boolean destinationNegated = relationship.isDestinationNegated(); final int group = relationship.getGroup(); final int unionGroup = relationship.getUnionGroup(); - final boolean universal = RelationshipModifier.UNIVERSAL.equals(relationship.getModifier()); + final boolean universal = Concepts.UNIVERSAL_RESTRICTION_MODIFIER.equals(relationship.getModifierId()); final StatementFragment statement = new StatementFragment( typeId, diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/internal/rf2/SnomedDsvExportItemType.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/internal/rf2/SnomedDsvExportItemType.java index 65da8d62f29..84676f2b351 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/internal/rf2/SnomedDsvExportItemType.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/internal/rf2/SnomedDsvExportItemType.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,8 @@ public enum SnomedDsvExportItemType { MAP_ADVICE("Map advice"), CORRELATION("Correlation ID"), MAP_CATEGORY("Map category"), - SDD_CLASS("SDD Class"); + SDD_CLASS("SDD Class"), + MAP_BLOCK("Map block"); private final String displayName; diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/BaseSnomedComponentUpdateRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/BaseSnomedComponentUpdateRequestBuilder.java index 47efcfa6243..ab44417f6ab 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/BaseSnomedComponentUpdateRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/BaseSnomedComponentUpdateRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import com.b2international.snowowl.core.domain.TransactionContext; import com.b2international.snowowl.core.events.BaseRequestBuilder; import com.b2international.snowowl.core.events.Request; +import com.b2international.snowowl.snomed.core.domain.InactivationProperties; /** * @since 4.5 @@ -30,6 +31,7 @@ public abstract class BaseSnomedComponentUpdateRequestBuilder doBuild() { final R req = create(componentId); @@ -59,6 +66,7 @@ protected final Request doBuild() { protected void init(R req) { req.setActive(active); req.setModuleId(moduleId); + req.setInactivationProperties(inactivationProperties); } protected abstract R create(String componentId); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/EvaluateQueryRefSetMemberRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/EvaluateQueryRefSetMemberRequest.java index aacfaf15380..6943cee7571 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/EvaluateQueryRefSetMemberRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/EvaluateQueryRefSetMemberRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,14 +36,12 @@ import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; -import com.b2international.snowowl.snomed.core.domain.SnomedCoreComponent; import com.b2international.snowowl.snomed.core.domain.refset.MemberChange; import com.b2international.snowowl.snomed.core.domain.refset.MemberChangeImpl; import com.b2international.snowowl.snomed.core.domain.refset.QueryRefSetMemberEvaluation; import com.b2international.snowowl.snomed.core.domain.refset.QueryRefSetMemberEvaluationImpl; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry; -import com.google.common.base.Function; import com.google.common.collect.FluentIterable; import com.google.common.collect.Maps; @@ -95,7 +93,7 @@ public QueryRefSetMemberEvaluation execute(BranchContext context) { final Map conceptsToAdd = newHashMap(); final Collection membersToRemove = newHashSet(); - final Map conceptsToActivate = Maps.newHashMap(); + final Collection conceptsToActivate = newHashSet(); // add all matching first for (SnomedConcept matchedConcept : matchingConcepts.getItems()) { @@ -114,25 +112,24 @@ public QueryRefSetMemberEvaluation execute(BranchContext context) { final String referencedComponentId = currentMember.getReferencedComponent().getId(); if (conceptsToAdd.containsKey(referencedComponentId)) { if (!currentMember.isActive()) { - // TODO fix reactivation label??? - conceptsToActivate.put(referencedComponentId, referencedComponentId); + conceptsToAdd.remove(referencedComponentId); + conceptsToActivate.add(currentMember); } else { conceptsToAdd.remove(referencedComponentId); } } else { - membersToRemove.add(currentMember); + if (currentMember.isActive()) { + membersToRemove.add(currentMember); + } } } // fetch all referenced components final Set referencedConceptIds = newHashSet(); referencedConceptIds.addAll(conceptsToAdd.keySet()); - referencedConceptIds.addAll(FluentIterable.from(membersToRemove).transform(new Function() { - @Override - public SnomedCoreComponent apply(SnomedReferenceSetMember input) { - return input.getReferencedComponent(); - } - }).transform(IComponent.ID_FUNCTION).toSet()); + referencedConceptIds.addAll(FluentIterable.from(membersToRemove).transform(SnomedReferenceSetMember::getReferencedComponent).transform(IComponent::getId).toSet()); + + referencedConceptIds.addAll(FluentIterable.from(conceptsToActivate).transform(SnomedReferenceSetMember::getReferencedComponent).transform(IComponent::getId).toSet()); final Map concepts; if (expand().containsKey("referencedComponent")) { @@ -143,7 +140,7 @@ public SnomedCoreComponent apply(SnomedReferenceSetMember input) { .setExpand(expandOptions.getOptions("expand")) .setLocales(locales()) .build() - .execute(context), IComponent.ID_FUNCTION); + .execute(context), IComponent::getId); } else { // initialize with empty SnomedConcept resources concepts = newHashMap(); @@ -162,10 +159,9 @@ public SnomedCoreComponent apply(SnomedReferenceSetMember input) { changes.add(MemberChangeImpl.removed(concepts.get(memberToRemove.getReferencedComponent().getId()), memberToRemove.getId())); } - // TODO reactivation??? -// for (String id : conceptsToActivate.keySet()) { -// changes.add(new Diff(MemberChangeKind.ACTIVATE, id, conceptsToActivate.get(id))); -// } + for (SnomedReferenceSetMember conceptToActivate : conceptsToActivate) { + changes.add(MemberChangeImpl.changed(concepts.get(conceptToActivate.getReferencedComponent().getId()), conceptToActivate.getId())); + } return new QueryRefSetMemberEvaluationImpl(memberId, targetReferenceSet, changes); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/QueryRefSetMemberUpdateRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/QueryRefSetMemberUpdateRequest.java index 405eb604bd4..5e361cb3076 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/QueryRefSetMemberUpdateRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/QueryRefSetMemberUpdateRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,18 @@ public Boolean execute(TransactionContext context) { .execute(context); } break; + case CHANGE: + final SnomedReferenceSetMember memberToChange = SnomedRequests.prepareGetMember(change.getMemberId()) + .build() + .execute(context); + if(!memberToChange.isActive()) { + SnomedRequests.prepareUpdateMember() + .setMemberId(change.getMemberId()) + .setSource(ImmutableMap.of(SnomedRf2Headers.FIELD_ACTIVE, Boolean.TRUE)) + .build() + .execute(context); + } + break; default: throw new UnsupportedOperationException("Not implemented case: " + change.getChangeKind()); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/RefSetSupport.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/RefSetSupport.java index eefc728568a..78e2e82259d 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/RefSetSupport.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/RefSetSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +45,7 @@ private RefSetSupport() { .put(SnomedRefSetType.ATTRIBUTE_VALUE, SnomedTerminologyComponentConstants.RELATIONSHIP) .put(SnomedRefSetType.CONCRETE_DATA_TYPE, TerminologyRegistry.UNSPECIFIED) .put(SnomedRefSetType.COMPLEX_MAP, SnomedTerminologyComponentConstants.CONCEPT) + .put(SnomedRefSetType.COMPLEX_BLOCK_MAP, SnomedTerminologyComponentConstants.CONCEPT) .put(SnomedRefSetType.DESCRIPTION_TYPE, SnomedTerminologyComponentConstants.CONCEPT) .put(SnomedRefSetType.EXTENDED_MAP, SnomedTerminologyComponentConstants.CONCEPT) .put(SnomedRefSetType.LANGUAGE, SnomedTerminologyComponentConstants.DESCRIPTION) diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedAssociationTargetUpdateRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedAssociationTargetUpdateRequest.java index 832a590a602..d6400a2b40a 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedAssociationTargetUpdateRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedAssociationTargetUpdateRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,16 @@ import static com.google.common.collect.Lists.newArrayList; -import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.Map.Entry; -import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.b2international.snowowl.core.domain.TransactionContext; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.AssociationType; import com.b2international.snowowl.snomed.core.domain.SnomedComponent; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; import com.b2international.snowowl.snomed.core.store.SnomedComponents; @@ -40,7 +38,7 @@ import com.google.common.collect.Multimap; /** - * Updates association reference set members on the {@link Inactivatable} specified by identifier. + * Updates association reference set members on a core component specified by identifier. *

    * Existing members are removed when: *

      @@ -80,16 +78,13 @@ final class SnomedAssociationTargetUpdateRequest extends BaseComponentMemberUpda private static final Logger LOG = LoggerFactory.getLogger(SnomedAssociationTargetUpdateRequest.class); - private Multimap newAssociationTargets; + private final Multimap newAssociationTargets; - SnomedAssociationTargetUpdateRequest(final SnomedComponentDocument componentToUpdate) { + SnomedAssociationTargetUpdateRequest(final SnomedComponentDocument componentToUpdate, Multimap newAssociationTargets) { super(componentToUpdate); - } - - void setNewAssociationTargets(final Multimap newAssociationTargets) { this.newAssociationTargets = newAssociationTargets; } - + @Override protected String getMemberType() { return "Association-member"; @@ -107,26 +102,21 @@ protected void doExecute(TransactionContext context, SnomedComponentDocument com SnomedRequests.prepareSearchMember() .all() .filterByReferencedComponent(componentToUpdate.getId()) - .filterByRefSet(Arrays.asList(AssociationType.values()).stream().map(AssociationType::getConceptId).collect(Collectors.toSet())) + .filterByRefSet("<" + Concepts.REFSET_ASSOCIATION_TYPE) .build() .execute(context) - .getItems() ); - final Multimap newAssociationTargetsToCreate = HashMultimap.create(newAssociationTargets); + final Multimap newAssociationTargetsToCreate = HashMultimap.create(newAssociationTargets); final ModuleIdProvider moduleIdFunction = context.service(ModuleIdProvider.class); final Iterator memberIterator = existingMembers.iterator(); while (memberIterator.hasNext()) { final SnomedReferenceSetMember existingMember = memberIterator.next(); - final AssociationType associationType = AssociationType.getByConceptId(existingMember.getReferenceSetId()); - - if (null == associationType) { - continue; - } - + // existing historical association member + final String associationReferenceSetId = existingMember.getReferenceSetId(); final String existingTargetId = ((SnomedComponent) existingMember.getProperties().get(SnomedRf2Headers.FIELD_TARGET_COMPONENT)).getId(); - if (newAssociationTargetsToCreate.remove(associationType, existingTargetId)) { + if (newAssociationTargetsToCreate.remove(associationReferenceSetId, existingTargetId)) { // Exact match, just make sure that the member is active and remove it from the working list final Builder updatedMember = SnomedRefSetMemberIndexEntry.builder(existingMember); final SnomedRefSetMemberIndexEntry oldRevision = updatedMember.build(); @@ -142,24 +132,21 @@ protected void doExecute(TransactionContext context, SnomedComponentDocument com */ for (final SnomedReferenceSetMember existingMember : existingMembers) { - final AssociationType associationType = AssociationType.getByConceptId(existingMember.getReferenceSetId()); - if (null == associationType) { - continue; - } - + final String associationReferenceSetId = existingMember.getReferenceSetId(); + final Builder updatedMember = SnomedRefSetMemberIndexEntry.builder(existingMember); - if (newAssociationTargetsToCreate.containsKey(associationType)) { + if (newAssociationTargetsToCreate.containsKey(associationReferenceSetId)) { // We can re-use the member by changing the target component identifier, and checking that it is active - final Iterator targetIterator = newAssociationTargetsToCreate.get(associationType).iterator(); + final Iterator targetIterator = newAssociationTargetsToCreate.get(associationReferenceSetId).iterator(); final String newTargetId = targetIterator.next(); targetIterator.remove(); if (LOG.isDebugEnabled()) { LOG.debug("Changing association member {} with type {} and target component identifier from {} to {}.", existingMember.getId(), - associationType, + associationReferenceSetId, ((SnomedComponent) existingMember.getProperties().get(SnomedRf2Headers.FIELD_TARGET_COMPONENT)).getId(), newTargetId); } @@ -186,9 +173,9 @@ protected void doExecute(TransactionContext context, SnomedComponentDocument com * to be added as new members; defaultModuleId is only used if there is at least a single * new entry. */ - for (final Entry newAssociationEntry : newAssociationTargetsToCreate.entries()) { + for (final Entry newAssociationEntry : newAssociationTargetsToCreate.entries()) { SnomedComponents.newAssociationMember() - .withRefSet(newAssociationEntry.getKey().getConceptId()) + .withRefSet(newAssociationEntry.getKey()) .withTargetComponentId(newAssociationEntry.getValue()) .withReferencedComponent(componentToUpdate.getId()) .withModule(moduleIdFunction.apply(componentToUpdate)) diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComplexBlockMapMemberCreateDelegate.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComplexBlockMapMemberCreateDelegate.java new file mode 100644 index 00000000000..ca0f3d162b5 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComplexBlockMapMemberCreateDelegate.java @@ -0,0 +1,89 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.datastore.request; + +import java.util.Set; + +import com.b2international.snowowl.core.domain.TransactionContext; +import com.b2international.snowowl.snomed.cis.SnomedIdentifiers; +import com.b2international.snowowl.snomed.common.SnomedRf2Headers; +import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; +import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSet; +import com.b2international.snowowl.snomed.core.store.SnomedComponents; +import com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableSet.Builder; + +/** + * @since 7.4 + */ +final class SnomedComplexBlockMapMemberCreateDelegate extends SnomedRefSetMemberCreateDelegate { + + SnomedComplexBlockMapMemberCreateDelegate(SnomedRefSetMemberCreateRequest request) { + super(request); + } + + @Override + public String execute(SnomedReferenceSet refSet, TransactionContext context) { + checkRefSetType(refSet, SnomedRefSetType.COMPLEX_BLOCK_MAP); + checkReferencedComponent(refSet); + checkHasProperty(SnomedRf2Headers.FIELD_MAP_GROUP); + checkHasProperty(SnomedRf2Headers.FIELD_MAP_PRIORITY); + checkHasProperty(SnomedRf2Headers.FIELD_MAP_RULE); + checkHasProperty(SnomedRf2Headers.FIELD_MAP_ADVICE); + checkHasProperty(SnomedRf2Headers.FIELD_MAP_BLOCK); + + checkComponentExists(refSet, context, SnomedRf2Headers.FIELD_MODULE_ID, getModuleId()); + checkComponentExists(refSet, context, SnomedRf2Headers.FIELD_REFERENCED_COMPONENT_ID, getReferencedComponentId()); + checkComponentExists(refSet, context, SnomedRf2Headers.FIELD_CORRELATION_ID); + + if (SnomedIdentifiers.isValid(getProperty(SnomedRf2Headers.FIELD_MAP_TARGET))) { + checkComponentExists(refSet, context, SnomedRf2Headers.FIELD_MAP_TARGET); + } + + SnomedRefSetMemberIndexEntry member = SnomedComponents.newComplexBlockMapMember() + .withId(getId()) + .withActive(isActive()) + .withReferencedComponent(getReferencedComponentId()) + .withModule(getModuleId()) + .withRefSet(getReferenceSetId()) + .withMapTargetId(getComponentId(SnomedRf2Headers.FIELD_MAP_TARGET)) + .withGroup(getProperty(SnomedRf2Headers.FIELD_MAP_GROUP, Integer.class)) + .withPriority(getProperty(SnomedRf2Headers.FIELD_MAP_PRIORITY, Integer.class)) + .withMapRule(getProperty(SnomedRf2Headers.FIELD_MAP_RULE)) + .withMapAdvice(getProperty(SnomedRf2Headers.FIELD_MAP_ADVICE)) + .withCorrelationId(getComponentId(SnomedRf2Headers.FIELD_CORRELATION_ID)) + .withBlock(getProperty(SnomedRf2Headers.FIELD_MAP_BLOCK, Integer.class)) + .addTo(context); + + return member.getId(); + } + + @Override + protected Set getRequiredComponentIds() { + checkNonEmptyProperty(SnomedRf2Headers.FIELD_MAP_TARGET); + checkNonEmptyProperty(SnomedRf2Headers.FIELD_CORRELATION_ID); + + Builder requiredComponentIds = ImmutableSet.builder() + .add(getComponentId(SnomedRf2Headers.FIELD_CORRELATION_ID)); + + if (SnomedIdentifiers.isValid(getProperty(SnomedRf2Headers.FIELD_MAP_TARGET))) { + requiredComponentIds.add(getComponentId(SnomedRf2Headers.FIELD_MAP_TARGET)); + } + + return requiredComponentIds.build(); + } +} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComplexBlockMapMemberUpdateDelegate.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComplexBlockMapMemberUpdateDelegate.java new file mode 100644 index 00000000000..2b8557d51dc --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComplexBlockMapMemberUpdateDelegate.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.datastore.request; + +import com.b2international.snowowl.core.domain.TransactionContext; +import com.b2international.snowowl.snomed.common.SnomedRf2Headers; +import com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry; + +/** + * @since 7.4 + */ +final class SnomedComplexBlockMapMemberUpdateDelegate extends SnomedRefSetMemberUpdateDelegate { + + SnomedComplexBlockMapMemberUpdateDelegate(SnomedRefSetMemberUpdateRequest request) { + super(request); + } + + @Override + boolean execute(SnomedRefSetMemberIndexEntry original, SnomedRefSetMemberIndexEntry.Builder member, TransactionContext context) { + String newMapTargetId = getComponentId(SnomedRf2Headers.FIELD_MAP_TARGET); + Integer newGroup = getProperty(SnomedRf2Headers.FIELD_MAP_GROUP, Integer.class); + Integer newPriority = getProperty(SnomedRf2Headers.FIELD_MAP_PRIORITY, Integer.class); + String newMapRule = getProperty(SnomedRf2Headers.FIELD_MAP_RULE); + String newMapAdvice = getProperty(SnomedRf2Headers.FIELD_MAP_ADVICE); + String newCorrelationId = getComponentId(SnomedRf2Headers.FIELD_CORRELATION_ID); + Integer newMapBlock = getProperty(SnomedRf2Headers.FIELD_MAP_BLOCK, Integer.class); + + boolean changed = false; + + if (newMapTargetId != null && !newMapTargetId.equals(original.getMapTarget())) { + member.field(SnomedRf2Headers.FIELD_MAP_TARGET, newMapTargetId); + changed |= true; + } + + if (newGroup != null && newGroup.intValue() != original.getMapGroup()) { + member.field(SnomedRf2Headers.FIELD_MAP_GROUP, newGroup); + changed |= true; + } + + if (newPriority != null && newPriority.intValue() != original.getMapPriority()) { + member.field(SnomedRf2Headers.FIELD_MAP_PRIORITY, newPriority); + changed |= true; + } + + if (newMapRule != null && !newMapRule.equals(original.getMapRule())) { + member.field(SnomedRf2Headers.FIELD_MAP_RULE, newMapRule); + changed |= true; + } + + if (newMapAdvice != null && !newMapAdvice.equals(original.getMapAdvice())) { + member.field(SnomedRf2Headers.FIELD_MAP_ADVICE, newMapAdvice); + changed |= true; + } + + if (newCorrelationId != null && !newCorrelationId.equals(original.getCorrelationId())) { + member.field(SnomedRf2Headers.FIELD_CORRELATION_ID, newCorrelationId); + changed |= true; + } + + if (newMapBlock != null && newMapBlock.intValue() != original.getMapBlock()) { + member.field(SnomedRf2Headers.FIELD_MAP_BLOCK, newMapBlock); + changed |= true; + } + + return changed; + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComponentUpdateRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComponentUpdateRequest.java index bf52c3fb9b1..b42f933dcf4 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComponentUpdateRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComponentUpdateRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,16 @@ */ package com.b2international.snowowl.snomed.datastore.request; +import com.b2international.commons.CompareUtils; import com.b2international.commons.exceptions.BadRequestException; +import com.b2international.commons.exceptions.ComponentStatusConflictException; import com.b2international.snowowl.core.domain.TransactionContext; +import com.b2international.snowowl.snomed.core.domain.InactivationProperties; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedComponentDocument; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.google.common.collect.ImmutableMultimap; +import com.google.common.collect.Multimap; /** * @since 4.5 @@ -30,6 +36,7 @@ public abstract class SnomedComponentUpdateRequest implements SnomedComponentReq private String moduleId; private Boolean active; + private InactivationProperties inactivationProperties; protected SnomedComponentUpdateRequest(String componentId) { this.componentId = componentId; @@ -43,11 +50,11 @@ void setModuleId(String moduleId) { this.moduleId = moduleId; } - /** - * @deprecated - visibility will be reduced to protected in 4.6 - * @return - */ - public Boolean isActive() { + void setInactivationProperties(InactivationProperties inactivationProperties) { + this.inactivationProperties = inactivationProperties; + } + + protected Boolean isActive() { return active; } @@ -59,6 +66,10 @@ protected String getComponentId() { return componentId; } + protected InactivationProperties getInactivationProperties() { + return inactivationProperties; + } + protected boolean updateModule(final TransactionContext context, final SnomedComponentDocument original, final SnomedComponentDocument.Builder component) { if (null == moduleId) { return false; @@ -91,4 +102,89 @@ protected void checkUpdateOnReleased(SnomedComponentDocument component, String f } } + protected final , T extends SnomedComponentDocument> boolean processInactivation(final TransactionContext context, final T component, final B updatedComponent) { + if (null == isActive() && getInactivationProperties() == null) { + return false; + } + + final boolean currentStatus = component.isActive(); + final boolean newStatus = isActive() == null ? currentStatus : isActive(); + final String newInactivationIndicatorId = getInactivationProperties() == null || getInactivationProperties().getInactivationIndicatorId() == null ? "" : getInactivationProperties().getInactivationIndicatorId(); + final ImmutableMultimap.Builder newAssociationTargets = ImmutableMultimap.builder(); + + if (getInactivationProperties() != null && !CompareUtils.isEmpty(getInactivationProperties().getAssociationTargets())) { + getInactivationProperties().getAssociationTargets().forEach(associationTarget -> { + newAssociationTargets.put(associationTarget.getReferenceSetId(), associationTarget.getTargetComponentId()); + }); + } + + if (currentStatus && !newStatus) { + + // Active --> Inactive: concept inactivation, update indicator and association targets + // (using default values if not given) + + inactivateComponent(context, component, updatedComponent); + updateInactivationIndicator(context, component, newInactivationIndicatorId); + updateAssociationTargets(context, component, newAssociationTargets.build()); + return true; + + } else if (!currentStatus && newStatus) { + + // Inactive --> Active: concept reactivation, clear indicator and association targets + + reactivateComponent(context, component, updatedComponent); + updateInactivationIndicator(context, component, newInactivationIndicatorId); + updateAssociationTargets(context, component, newAssociationTargets.build()); + return true; + + } else if (currentStatus == newStatus) { + + // Same status, allow indicator and/or association targets to be updated if required + // (using original values that can be null) + + updateInactivationIndicator(context, component, getInactivationProperties() != null ? getInactivationProperties().getInactivationIndicatorId() : null); + updateAssociationTargets(context, component, newAssociationTargets.build()); + return false; + + } else { + return false; + } + } + + protected final void updateAssociationTargets(final TransactionContext context, SnomedComponentDocument concept, Multimap associationTargets) { + if (associationTargets == null) { + return; + } + new SnomedAssociationTargetUpdateRequest(concept, associationTargets).execute(context); + } + + protected final void updateInactivationIndicator(final TransactionContext context, final SnomedComponentDocument concept, final String newInactivationIndicatorId) { + if (newInactivationIndicatorId == null) { + return; + } + + final SnomedInactivationReasonUpdateRequest inactivationUpdateRequest = new SnomedInactivationReasonUpdateRequest(concept, getInactivationIndicatorRefSetId()); + inactivationUpdateRequest.setInactivationValueId(newInactivationIndicatorId); + inactivationUpdateRequest.execute(context); + } + + protected final , T extends SnomedComponentDocument> void inactivateComponent(final TransactionContext context, final T component, final B updatedComponent) { + if (!component.isActive()) { + throw new ComponentStatusConflictException(component.getId(), component.isActive()); + } + + updatedComponent.active(false); + } + + protected final , T extends SnomedComponentDocument> void reactivateComponent(final TransactionContext context, final SnomedComponentDocument component, final B updatedConcept) { + if (component.isActive()) { + throw new ComponentStatusConflictException(component.getId(), component.isActive()); + } + + updatedConcept.active(true); + } + + @JsonIgnore + protected abstract String getInactivationIndicatorRefSetId(); + } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptCreateRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptCreateRequest.java index ebbe5945ff8..317730e01b6 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptCreateRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptCreateRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,9 +40,7 @@ import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.core.domain.ConstantIdStrategy; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; import com.b2international.snowowl.snomed.core.domain.SubclassDefinitionStatus; @@ -69,7 +67,7 @@ public final class SnomedConceptCreateRequest extends BaseSnomedComponentCreateR private SnomedRefSetCreateRequest refSetRequest; @NotNull - private DefinitionStatus definitionStatus = DefinitionStatus.PRIMITIVE; + private String definitionStatusId = Concepts.PRIMITIVE; @NotNull private SubclassDefinitionStatus subclassDefinitionStatus = SubclassDefinitionStatus.NON_DISJOINT_SUBCLASSES; @@ -80,8 +78,8 @@ void setSubclassDefinitionStatus(SubclassDefinitionStatus subclassDefinitionStat this.subclassDefinitionStatus = subclassDefinitionStatus; } - void setDefinitionStatus(DefinitionStatus definitionStatus) { - this.definitionStatus = definitionStatus; + void setDefinitionStatusId(String definitionStatusId) { + this.definitionStatusId = definitionStatusId; } void setDescriptions(final List descriptions) { @@ -120,16 +118,16 @@ public String execute(TransactionContext context) { } private SnomedConceptDocument convertConcept(final TransactionContext context) { - final DefinitionStatus newDefinitionStatus; + final String newDefinitionStatusId; final Set newAxiomExpressions = getOwlAxiomExpressions(); if (!newAxiomExpressions.isEmpty()) { - newDefinitionStatus = SnomedOWLAxiomHelper.getDefinitionStatusFromExpressions(newAxiomExpressions); + newDefinitionStatusId = SnomedOWLAxiomHelper.getDefinitionStatusFromExpressions(newAxiomExpressions); } else { - if (definitionStatus == null) { + if (definitionStatusId == null) { throw new BadRequestException("No axiom members or definition status was set for concept"); } - newDefinitionStatus = definitionStatus; + newDefinitionStatusId = definitionStatusId; } try { @@ -138,7 +136,7 @@ private SnomedConceptDocument convertConcept(final TransactionContext context) { .withId(conceptId) .withActive(isActive()) .withModule(getModuleId()) - .withDefinitionStatus(newDefinitionStatus) + .withDefinitionStatusId(newDefinitionStatusId) .withExhaustive(subclassDefinitionStatus.isExhaustive()) .build(context); } catch (final ComponentNotFoundException e) { @@ -196,8 +194,8 @@ private void convertDescriptions(TransactionContext context, final String concep private void convertRelationships(final TransactionContext context, String conceptId) { if (!relationships.isEmpty()) { - final Set> requiredRelationships = newHashSet(); - requiredRelationships.add(Tuples.pair(Concepts.IS_A, CharacteristicType.STATED_RELATIONSHIP)); + final Set> requiredRelationships = newHashSet(); + requiredRelationships.add(Tuples.pair(Concepts.IS_A, Concepts.STATED_RELATIONSHIP)); for (final SnomedRelationshipCreateRequest relationshipRequest : relationships) { relationshipRequest.setSourceId(conceptId); @@ -208,7 +206,7 @@ private void convertRelationships(final TransactionContext context, String conce relationshipRequest.execute(context); - requiredRelationships.remove(Tuples.pair(relationshipRequest.getTypeId(), relationshipRequest.getCharacteristicType())); + requiredRelationships.remove(Tuples.pair(relationshipRequest.getTypeId(), relationshipRequest.getCharacteristicTypeId())); } if (!requiredRelationships.isEmpty()) { diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptCreateRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptCreateRequestBuilder.java index ccd45ebd8e8..f5de438da7d 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptCreateRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptCreateRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ import java.util.List; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; import com.b2international.snowowl.snomed.core.domain.SubclassDefinitionStatus; @@ -33,7 +32,7 @@ */ public final class SnomedConceptCreateRequestBuilder extends SnomedComponentCreateRequestBuilder { - private DefinitionStatus definitionStatus = DefinitionStatus.PRIMITIVE; + private String definitionStatusId = Concepts.PRIMITIVE; private List descriptions = newArrayList(); private List relationships = newArrayList(); private SnomedRefSetCreateRequest refSet; @@ -92,8 +91,8 @@ public SnomedConceptCreateRequestBuilder addDescriptions(Iterable associationTargets; private List descriptions; private List relationships; private List members; @@ -95,22 +86,14 @@ public final class SnomedConceptUpdateRequest extends SnomedComponentUpdateReque super(componentId); } - void setDefinitionStatus(DefinitionStatus definitionStatus) { - this.definitionStatus = definitionStatus; + void setDefinitionStatusId(String definitionStatusId) { + this.definitionStatusId = definitionStatusId; } void setSubclassDefinitionStatus(SubclassDefinitionStatus subclassDefinitionStatus) { this.subclassDefinitionStatus = subclassDefinitionStatus; } - void setInactivationIndicator(InactivationIndicator inactivationIndicator) { - this.inactivationIndicator = inactivationIndicator; - } - - void setAssociationTargets(Multimap associationTargets) { - this.associationTargets = associationTargets; - } - void setDescriptions(List descriptions) { this.descriptions = descriptions; } @@ -181,6 +164,11 @@ public Boolean execute(TransactionContext context) { return changed; } + + @Override + protected String getInactivationIndicatorRefSetId() { + return Concepts.REFSET_CONCEPT_INACTIVITY_INDICATOR; + } private boolean updateRefSet(TransactionContext context, SnomedConceptDocument concept, SnomedConceptDocument.Builder updatedConcept) { final boolean force = refSet == SnomedReferenceSet.FORCE_DELETE; @@ -255,11 +243,11 @@ private boolean updateDefinitionStatus(final TransactionContext context, final S final String newDefinitionStatusId; if (!newOwlAxiomExpressions.isEmpty()) { // Calculate the definition status - newDefinitionStatusId = SnomedOWLAxiomHelper.getDefinitionStatusFromExpressions(newOwlAxiomExpressions).getConceptId(); + newDefinitionStatusId = SnomedOWLAxiomHelper.getDefinitionStatusFromExpressions(newOwlAxiomExpressions); } else { - if (definitionStatus == null) return false; + if (definitionStatusId == null) return false; - final String incomingDefinitionStatusId = definitionStatus.getConceptId(); + final String incomingDefinitionStatusId = definitionStatusId; newDefinitionStatusId = incomingDefinitionStatusId; } @@ -289,98 +277,6 @@ private boolean updateSubclassDefinitionStatus(final TransactionContext context, } } - private boolean processInactivation(final TransactionContext context, final SnomedConceptDocument concept, final SnomedConceptDocument.Builder updatedConcept) { - if (null == isActive() && null == inactivationIndicator && null == associationTargets) { - return false; - } - - final boolean currentStatus = concept.isActive(); - final boolean newStatus = isActive() == null ? currentStatus : isActive(); - final InactivationIndicator newIndicator = inactivationIndicator == null ? InactivationIndicator.RETIRED : inactivationIndicator; - final Multimap newAssociationTargets = associationTargets == null ? ImmutableMultimap.of() : associationTargets; - - if (currentStatus && !newStatus) { - - // Active --> Inactive: concept inactivation, update indicator and association targets - // (using default values if not given) - - inactivateConcept(context, concept, updatedConcept); - updateInactivationIndicator(context, concept, newIndicator); - updateAssociationTargets(context, concept, newAssociationTargets); - return true; - - } else if (!currentStatus && newStatus) { - - // Inactive --> Active: concept reactivation, clear indicator and association targets - - reactivateConcept(context, concept, updatedConcept); - updateInactivationIndicator(context, concept, newIndicator); - updateAssociationTargets(context, concept, newAssociationTargets); - return true; - - } else if (currentStatus == newStatus) { - - // Same status, allow indicator and/or association targets to be updated if required - // (using original values that can be null) - - updateInactivationIndicator(context, concept, inactivationIndicator); - updateAssociationTargets(context, concept, associationTargets); - return false; - - } else { - return false; - } - } - - private void updateAssociationTargets(final TransactionContext context, SnomedConceptDocument concept, Multimap associationTargets) { - if (associationTargets == null) { - return; - } - - SnomedAssociationTargetUpdateRequest associationUpdateRequest = new SnomedAssociationTargetUpdateRequest(concept); - associationUpdateRequest.setNewAssociationTargets(associationTargets); - associationUpdateRequest.execute(context); - } - - private void updateInactivationIndicator(final TransactionContext context, final SnomedConceptDocument concept, final InactivationIndicator indicator) { - if (indicator == null) { - return; - } - - final SnomedInactivationReasonUpdateRequest inactivationUpdateRequest = new SnomedInactivationReasonUpdateRequest(concept, Concepts.REFSET_CONCEPT_INACTIVITY_INDICATOR); - inactivationUpdateRequest.setInactivationValueId(indicator.getConceptId()); - inactivationUpdateRequest.execute(context); - } - - private void inactivateConcept(final TransactionContext context, final SnomedConceptDocument concept, final SnomedConceptDocument.Builder updatedConcept) { - if (!concept.isActive()) { - throw new ComponentStatusConflictException(concept.getId(), concept.isActive()); - } - - updatedConcept.active(false); - } - - private void reactivateConcept(final TransactionContext context, final SnomedConceptDocument concept, final SnomedConceptDocument.Builder updatedConcept) { - if (concept.isActive()) { - throw new ComponentStatusConflictException(concept.getId(), concept.isActive()); - } - - updatedConcept.active(true); - -// for (final SnomedDescription description : concept.getDescriptions()) { -// // Remove "Concept non-current" reason from active descriptions by changing to "no reason given" -// if (description.isActive()) { -// SnomedInactivationReasonUpdateRequest descriptionUpdateRequest = new SnomedInactivationReasonUpdateRequest( -// description.getId(), -// Concepts.REFSET_DESCRIPTION_INACTIVITY_INDICATOR, -// description.getModuleId()); -// -// descriptionUpdateRequest.setInactivationValueId(DescriptionInactivationIndicator.RETIRED.getConceptId()); -// descriptionUpdateRequest.execute(context); -// } -// } - } - private boolean updateComponents(final TransactionContext context, final String conceptId, final Set previousComponentIds, @@ -434,13 +330,13 @@ public Set getRequiredComponentIds(TransactionContext context) { ids.addAll(ImmutableList.of(Concepts.PRIMITIVE, Concepts.FULLY_DEFINED)); - if (inactivationIndicator != null) { - ids.add(inactivationIndicator.getConceptId()); + if (getInactivationProperties() != null && getInactivationProperties().getInactivationIndicatorId() != null) { + ids.add(getInactivationProperties().getInactivationIndicatorId()); } - if (associationTargets != null && !associationTargets.isEmpty()) { - associationTargets.entries().forEach(entry -> { - ids.add(entry.getKey().getConceptId()); - ids.add(entry.getValue()); + if (getInactivationProperties() != null && !CompareUtils.isEmpty(getInactivationProperties().getAssociationTargets())) { + getInactivationProperties().getAssociationTargets().forEach(associationTarget -> { + ids.add(associationTarget.getReferenceSetId()); + ids.add(associationTarget.getTargetComponentId()); }); } if (!CompareUtils.isEmpty(descriptions)) { @@ -449,7 +345,7 @@ public Set getRequiredComponentIds(TransactionContext context) { ids.add(description.getTypeId()); ids.addAll(description.getAcceptabilityMap().keySet()); ids.addAll(description.getAcceptabilityMap().values().stream().map(Acceptability::getConceptId).collect(Collectors.toSet())); - ids.add(description.getCaseSignificance().getConceptId()); + ids.add(description.getCaseSignificanceId()); }); } if (!CompareUtils.isEmpty(relationships)) { @@ -457,8 +353,8 @@ public Set getRequiredComponentIds(TransactionContext context) { ids.add(relationship.getModuleId()); ids.add(relationship.getTypeId()); ids.add(relationship.getDestinationId()); - ids.add(relationship.getCharacteristicType().getConceptId()); - ids.add(relationship.getModifier().getConceptId()); + ids.add(relationship.getCharacteristicTypeId()); + ids.add(relationship.getModifierId()); }); } if (!CompareUtils.isEmpty(members)) { diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptUpdateRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptUpdateRequestBuilder.java index 234b7d5c5bc..56bc500233c 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptUpdateRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptUpdateRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,26 +17,20 @@ import java.util.List; -import com.b2international.snowowl.snomed.core.domain.AssociationType; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; -import com.b2international.snowowl.snomed.core.domain.InactivationIndicator; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; import com.b2international.snowowl.snomed.core.domain.SubclassDefinitionStatus; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSet; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; import com.google.common.collect.ImmutableList; -import com.google.common.collect.Multimap; /** * @since 4.5 */ public final class SnomedConceptUpdateRequestBuilder extends BaseSnomedComponentUpdateRequestBuilder { - private DefinitionStatus definitionStatus; + private String definitionStatusId; private SubclassDefinitionStatus subclassDefinitionStatus; - private Multimap associationTargets; - private InactivationIndicator inactivationIndicator; private List descriptions; private List relationships; private List members; @@ -51,18 +45,8 @@ protected SnomedConceptUpdateRequest create(String componentId) { return new SnomedConceptUpdateRequest(componentId); } - public SnomedConceptUpdateRequestBuilder setAssociationTargets(Multimap associationTargets) { - this.associationTargets = associationTargets; - return getSelf(); - } - - public SnomedConceptUpdateRequestBuilder setDefinitionStatus(DefinitionStatus definitionStatus) { - this.definitionStatus = definitionStatus; - return getSelf(); - } - - public SnomedConceptUpdateRequestBuilder setInactivationIndicator(InactivationIndicator inactivationIndicator) { - this.inactivationIndicator = inactivationIndicator; + public SnomedConceptUpdateRequestBuilder setDefinitionStatusId(String definitionStatusId) { + this.definitionStatusId = definitionStatusId; return getSelf(); } @@ -94,10 +78,8 @@ public SnomedConceptUpdateRequestBuilder clearRefSet(boolean force) { @Override protected void init(SnomedConceptUpdateRequest req) { super.init(req); - req.setDefinitionStatus(definitionStatus); + req.setDefinitionStatusId(definitionStatusId); req.setSubclassDefinitionStatus(subclassDefinitionStatus); - req.setAssociationTargets(associationTargets); - req.setInactivationIndicator(inactivationIndicator); req.setDescriptions(descriptions); req.setRelationships(relationships); req.setMembers(members); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConcreteDomainMemberCreateDelegate.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConcreteDomainMemberCreateDelegate.java index 2de8d320b92..b5d9fdd0198 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConcreteDomainMemberCreateDelegate.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConcreteDomainMemberCreateDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ import com.b2international.commons.exceptions.BadRequestException; import com.b2international.snowowl.core.domain.TransactionContext; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.core.domain.refset.DataType; import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSet; @@ -62,7 +61,7 @@ public String execute(SnomedReferenceSet refSet, TransactionContext context) { SnomedRefSetMemberIndexEntry member = SnomedComponents.newConcreteDomainReferenceSetMember() .withId(getId()) .withActive(isActive()) - .withCharacteristicType(CharacteristicType.getByConceptId(getComponentId(SnomedRf2Headers.FIELD_CHARACTERISTIC_TYPE_ID))) + .withCharacteristicTypeId(getComponentId(SnomedRf2Headers.FIELD_CHARACTERISTIC_TYPE_ID)) .withGroup(getProperty(SnomedRf2Headers.FIELD_RELATIONSHIP_GROUP, Integer.class)) .withModule(getModuleId()) .withReferencedComponent(getReferencedComponentId()) diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConstraintSearchRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConstraintSearchRequest.java index c87016e9e26..f24200ffb0e 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConstraintSearchRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConstraintSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -115,7 +115,7 @@ protected Class getDocumentType() { @Override protected SnomedConstraints toCollectionResource(BranchContext context, Hits hits) { - return SnomedConverters.newConstraintConverter(context, expand(), locales()).convert(hits.getHits(), hits.getScrollId(), hits.getSearchAfter(), limit(), hits.getTotal()); + return SnomedConverters.newConstraintConverter(context, expand(), locales()).convert(hits.getHits(), hits.getSearchAfter(), limit(), hits.getTotal()); } @Override diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequest.java index 6459a866cb5..2aff5a2bd42 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,9 +26,7 @@ import com.b2international.snowowl.core.exceptions.ComponentNotFoundException; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; import com.b2international.snowowl.snomed.core.domain.ConstantIdStrategy; -import com.b2international.snowowl.snomed.core.domain.DescriptionInactivationIndicator; import com.b2international.snowowl.snomed.core.store.SnomedComponents; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedDescriptionIndexEntry; import com.google.common.collect.ImmutableSet; @@ -51,73 +49,61 @@ public final class SnomedDescriptionCreateRequest extends BaseSnomedComponentCre private String languageCode; @NotNull - private CaseSignificance caseSignificance; + private String caseSignificanceId; @NotEmpty private Map acceptability; - - private DescriptionInactivationIndicator inactivationIndicator; + + private String inactivationIndicatorId; SnomedDescriptionCreateRequest() { } - public String getConceptId() { + String getConceptId() { return conceptId; } - - public String getTypeId() { + + String getTypeId() { return typeId; } - public String getTerm() { - return term; - } - - public String getLanguageCode() { - return languageCode; - } - - public CaseSignificance getCaseSignificance() { - return caseSignificance; - } - - public Map getAcceptability() { + Map getAcceptability() { return acceptability; } - - public void setConceptId(final String conceptId) { + + void setConceptId(final String conceptId) { this.conceptId = conceptId; } - public void setTypeId(final String typeId) { + void setTypeId(final String typeId) { this.typeId = typeId; } - public void setTerm(final String term) { + void setTerm(final String term) { this.term = term; } - public void setLanguageCode(final String languageCode) { + void setLanguageCode(final String languageCode) { this.languageCode = languageCode; } - public void setCaseSignificance(final CaseSignificance caseSignificance) { - this.caseSignificance = caseSignificance; + void setCaseSignificanceId(final String caseSignificanceId) { + this.caseSignificanceId = caseSignificanceId; } - public void setAcceptability(final Map acceptability) { + void setAcceptability(final Map acceptability) { this.acceptability = acceptability; } - public void setInactivationIndicator(DescriptionInactivationIndicator inactivationIndicator) { - this.inactivationIndicator = inactivationIndicator; + void setInactivationIndicatorId(String inactivationIndicatorId) { + this.inactivationIndicatorId = inactivationIndicatorId; } @Override public Set getRequiredComponentIds(TransactionContext context) { Builder result = ImmutableSet.builder() - .add(caseSignificance.getConceptId()) - .add(getTypeId()); + .add(caseSignificanceId) + .add(typeId); acceptability.forEach((refSetId, acceptability) -> { result.add(refSetId); @@ -127,8 +113,8 @@ public Set getRequiredComponentIds(TransactionContext context) { if (getModuleId() != null) { result.add(getModuleId()); } - if (getConceptId() != null) { - result.add(getConceptId()); + if (conceptId != null) { + result.add(conceptId); } return result.build(); } @@ -141,11 +127,11 @@ public String execute(TransactionContext context) { .withId(descriptionId) .withActive(isActive()) .withModule(getModuleId()) - .withCaseSignificance(getCaseSignificance()) - .withTerm(getTerm()) - .withType(getTypeId()) - .withLanguageCode(getLanguageCode()) - .withConcept(getConceptId()) + .withCaseSignificanceId(caseSignificanceId) + .withTerm(term) + .withType(typeId) + .withLanguageCode(languageCode) + .withConcept(conceptId) .build(context); new SnomedDescriptionAcceptabilityUpdateRequest(description, acceptability, true) @@ -155,9 +141,9 @@ public String execute(TransactionContext context) { convertMembers(context, descriptionId); context.add(description); - if (inactivationIndicator != null) { + if (inactivationIndicatorId != null) { final SnomedInactivationReasonUpdateRequest inactivationUpdate = new SnomedInactivationReasonUpdateRequest(description, Concepts.REFSET_DESCRIPTION_INACTIVITY_INDICATOR); - inactivationUpdate.setInactivationValueId(inactivationIndicator.getConceptId()); + inactivationUpdate.setInactivationValueId(inactivationIndicatorId); inactivationUpdate.execute(context); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequestBuilder.java index ab7f544bc89..1efda621fd8 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,6 @@ import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; -import com.b2international.snowowl.snomed.core.domain.DescriptionInactivationIndicator; /** * Builder class to build requests responsible for creating SNOMED CT descriptions. @@ -32,20 +30,20 @@ */ public final class SnomedDescriptionCreateRequestBuilder extends SnomedComponentCreateRequestBuilder { - private CaseSignificance caseSignificance = CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE; + private String caseSignificanceId = Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE; private String term; private String conceptId; private String typeId = Concepts.SYNONYM; private String languageCode = "en"; private Map acceptabilityMap = newHashMap(); - private DescriptionInactivationIndicator inactivationIndicator = DescriptionInactivationIndicator.RETIRED; + private String inactivationIndicatorId = ""; SnomedDescriptionCreateRequestBuilder() { super(); } - public SnomedDescriptionCreateRequestBuilder setCaseSignificance(CaseSignificance caseSignificance) { - this.caseSignificance = caseSignificance; + public SnomedDescriptionCreateRequestBuilder setCaseSignificanceId(String caseSignificanceId) { + this.caseSignificanceId = caseSignificanceId; return getSelf(); } @@ -84,8 +82,8 @@ public SnomedDescriptionCreateRequestBuilder setAcceptability(Mapthis search request builder, for method chaining - * @see #filterByCaseSignificance(Iterable) - * @see #filterByCaseSignificance(String) - * @see SnomedDescription#getCaseSignificance() + * @see #filterByCaseSignificances(Iterable) + * @see SnomedDescription#getCaseSignificanceId() */ - public SnomedDescriptionSearchRequestBuilder filterByCaseSignificance(CaseSignificance caseSignificance) { - return filterByCaseSignificance(caseSignificance.getConceptId()); + public SnomedDescriptionSearchRequestBuilder filterByCaseSignificance(String caseSignificanceId) { + return addOption(OptionKey.CASE_SIGNIFICANCE, caseSignificanceId); } /** * Filter descriptions by their case significance value. * - * @param caseSignificances - * @return this search request builder, for method chaining - * @see #filterByCaseSignificance(CaseSignificance) - * @see #filterByCaseSignificance(String) - * @see SnomedDescription#getCaseSignificance() - */ - public SnomedDescriptionSearchRequestBuilder filterByCaseSignificance(Iterable caseSignificances) { - return addOption(OptionKey.CASE_SIGNIFICANCE, FluentIterable.from(caseSignificances).transform(CaseSignificance::getConceptId).toSet()); - } - - /** - * Filter descriptions by their case significance value. This method accepts ECL values as caseSignificanceFilter. - * - * @param caseSignificanceFilter + * @param caseSignificanceIds * @return this search request builder, for method chaining - * @see #filterByCaseSignificance(CaseSignificance) * @see #filterByCaseSignificance(String) - * @see SnomedDescription#getCaseSignificance() + * @see SnomedDescription#getCaseSignificanceId() */ - public SnomedDescriptionSearchRequestBuilder filterByCaseSignificance(String caseSignificanceFilter) { - return addOption(OptionKey.CASE_SIGNIFICANCE, caseSignificanceFilter); + public SnomedDescriptionSearchRequestBuilder filterByCaseSignificances(Iterable caseSignificanceIds) { + return addOption(OptionKey.CASE_SIGNIFICANCE, caseSignificanceIds); } /** diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionUpdateRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionUpdateRequest.java index 45a973933fd..732a18bc2b2 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionUpdateRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionUpdateRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,35 +18,24 @@ import java.util.Map; import java.util.Set; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.b2international.commons.exceptions.BadRequestException; +import com.b2international.commons.CompareUtils; import com.b2international.snowowl.core.date.EffectiveTimes; import com.b2international.snowowl.core.domain.TransactionContext; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.AssociationType; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; -import com.b2international.snowowl.snomed.core.domain.DescriptionInactivationIndicator; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedDescriptionIndexEntry; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet.Builder; -import com.google.common.collect.Multimap; /** * @since 4.5 */ public final class SnomedDescriptionUpdateRequest extends SnomedComponentUpdateRequest { - private CaseSignificance caseSignificance; + private String caseSignificanceId; private Map acceptability; - private DescriptionInactivationIndicator inactivationIndicator; - private Multimap associationTargets; private String term; private String typeId; @@ -60,16 +49,8 @@ void setAcceptability(Map acceptability) { this.acceptability = acceptability; } - void setAssociationTargets(Multimap associationTargets) { - this.associationTargets = associationTargets; - } - - void setCaseSignificance(CaseSignificance caseSignificance) { - this.caseSignificance = caseSignificance; - } - - void setInactivationIndicator(DescriptionInactivationIndicator inactivationIndicator) { - this.inactivationIndicator = inactivationIndicator; + void setCaseSignificanceId(String caseSignificanceId) { + this.caseSignificanceId = caseSignificanceId; } void setLanguageCode(String languageCode) { @@ -91,7 +72,7 @@ public Boolean execute(TransactionContext context) { boolean changed = false; changed |= updateModule(context, description, updatedDescription); - changed |= updateCaseSignificance(context, description, updatedDescription, caseSignificance); + changed |= updateCaseSignificanceId(context, description, updatedDescription, caseSignificanceId); changed |= updateTypeId(context, description, updatedDescription); changed |= updateTerm(context, description, updatedDescription); changed |= updateLanguageCode(context, description, updatedDescription); @@ -99,7 +80,7 @@ public Boolean execute(TransactionContext context) { // XXX: acceptability and association changes do not push the effective time forward on the description // XXX: this should be executed after processInactivation - updateAcceptability(context, description, updatedDescription); + updateAcceptability(context, description); if (changed) { if (description.getEffectiveTime() != EffectiveTimes.UNSET_EFFECTIVE_TIME) { @@ -110,87 +91,22 @@ public Boolean execute(TransactionContext context) { return changed; } - - private void updateAcceptability(TransactionContext context, final SnomedDescriptionIndexEntry description, final SnomedDescriptionIndexEntry.Builder updatedDescription) { - new SnomedDescriptionAcceptabilityUpdateRequest(description, acceptability, false).execute(context); - } - - private void updateAssociationTargets(TransactionContext context, final SnomedDescriptionIndexEntry description, final Multimap associationTargets) { - final SnomedAssociationTargetUpdateRequest associationUpdateRequest = new SnomedAssociationTargetUpdateRequest(description); - associationUpdateRequest.setNewAssociationTargets(associationTargets); - associationUpdateRequest.execute(context); - } - private boolean processInactivation(final TransactionContext context, final SnomedDescriptionIndexEntry description, final SnomedDescriptionIndexEntry.Builder updatedDescription) { - if (null == isActive() && null == inactivationIndicator && null == associationTargets) { - return false; - } - - final boolean currentStatus = description.isActive(); - final boolean newStatus = isActive() == null ? currentStatus : isActive(); - final DescriptionInactivationIndicator newIndicator = inactivationIndicator == null ? DescriptionInactivationIndicator.RETIRED : inactivationIndicator; - final Multimap newAssociationTargets = associationTargets == null ? ImmutableMultimap.of() : associationTargets; - - if (currentStatus && !newStatus) { - - // Active --> Inactive: description inactivation, update indicator and association targets - // (using default values if not given) - - updatedDescription.active(false); - updateInactivationIndicator(context, description, newIndicator); - updateAssociationTargets(context, description, newAssociationTargets); - - return true; - - } else if (!currentStatus && newStatus) { - - // Inactive --> Active: description reactivation, clear indicator and association targets - // (using default values at all times) - - if (inactivationIndicator != DescriptionInactivationIndicator.RETIRED && inactivationIndicator != null) { - throw new BadRequestException("Cannot reactivate description and retain or change its inactivation indicator at the same time."); - } - - if (associationTargets != null) { - throw new BadRequestException("Cannot reactivate description and retain or change its historical association target(s) at the same time."); - } - - updatedDescription.active(true); - updateInactivationIndicator(context, description, newIndicator); - updateAssociationTargets(context, description, newAssociationTargets); - return true; - - } else if (currentStatus == newStatus) { - - // Inactive --> Inactive: update indicator and/or association targets if required - // (using original values that can be null) - - updateInactivationIndicator(context, description, inactivationIndicator); - updateAssociationTargets(context, description, associationTargets); - return false; - - } else /* if (currentStatus && newStatus) */ { - return false; - } + @Override + protected String getInactivationIndicatorRefSetId() { + return Concepts.REFSET_DESCRIPTION_INACTIVITY_INDICATOR; } - private void updateInactivationIndicator(final TransactionContext context, final SnomedDescriptionIndexEntry description, final DescriptionInactivationIndicator inactivationIndicator) { - if (inactivationIndicator == null) { - return; - } - - final SnomedInactivationReasonUpdateRequest inactivationUpdateRequest = new SnomedInactivationReasonUpdateRequest(description, Concepts.REFSET_DESCRIPTION_INACTIVITY_INDICATOR); - inactivationUpdateRequest.setInactivationValueId(inactivationIndicator.getConceptId()); - inactivationUpdateRequest.execute(context); + private void updateAcceptability(TransactionContext context, final SnomedDescriptionIndexEntry description) { + new SnomedDescriptionAcceptabilityUpdateRequest(description, acceptability, false).execute(context); } - private boolean updateCaseSignificance(final TransactionContext context, final SnomedDescriptionIndexEntry original, final SnomedDescriptionIndexEntry.Builder description, final CaseSignificance newCaseSignificance) { - if (null == newCaseSignificance) { + private boolean updateCaseSignificanceId(final TransactionContext context, final SnomedDescriptionIndexEntry original, final SnomedDescriptionIndexEntry.Builder description, final String newCaseSignificanceId) { + if (null == newCaseSignificanceId) { return false; } final String existingCaseSignificanceId = original.getCaseSignificanceId(); - final String newCaseSignificanceId = newCaseSignificance.getConceptId(); if (!existingCaseSignificanceId.equals(newCaseSignificanceId)) { description.caseSignificanceId(context.lookup(newCaseSignificanceId, SnomedConceptDocument.class).getId()); return true; @@ -243,16 +159,16 @@ private boolean updateLanguageCode(final TransactionContext context, final Snome public Set getRequiredComponentIds(TransactionContext context) { final Builder ids = ImmutableSet.builder(); ids.add(getComponentId()); - if (inactivationIndicator != null) { - ids.add(inactivationIndicator.getConceptId()); + if (getInactivationProperties() != null && getInactivationProperties().getInactivationIndicatorId() != null) { + ids.add(getInactivationProperties().getInactivationIndicatorId()); } - if (caseSignificance != null) { - ids.add(caseSignificance.getConceptId()); + if (caseSignificanceId != null) { + ids.add(caseSignificanceId); } - if (associationTargets != null && !associationTargets.isEmpty()) { - associationTargets.entries().forEach(entry -> { - ids.add(entry.getKey().getConceptId()); - ids.add(entry.getValue()); + if (getInactivationProperties() != null && !CompareUtils.isEmpty(getInactivationProperties().getAssociationTargets())) { + getInactivationProperties().getAssociationTargets().forEach(associationTarget -> { + ids.add(associationTarget.getReferenceSetId()); + ids.add(associationTarget.getTargetComponentId()); }); } if (typeId != null) { diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionUpdateRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionUpdateRequestBuilder.java index 3bc49dc7b1c..e0a979d3029 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionUpdateRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionUpdateRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,10 +18,6 @@ import java.util.Map; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.AssociationType; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; -import com.b2international.snowowl.snomed.core.domain.DescriptionInactivationIndicator; -import com.google.common.collect.Multimap; /** * @since 4.5 @@ -29,9 +25,7 @@ public final class SnomedDescriptionUpdateRequestBuilder extends BaseSnomedComponentUpdateRequestBuilder { private Map acceptability; - private Multimap associationTargets; - private CaseSignificance caseSignificance; - private DescriptionInactivationIndicator inactivationIndicator; + private String caseSignificanceId; private String languageCode; private String typeId; private String term; @@ -45,18 +39,8 @@ public SnomedDescriptionUpdateRequestBuilder setAcceptability(Map associationTargets) { - this.associationTargets = associationTargets; - return getSelf(); - } - - public SnomedDescriptionUpdateRequestBuilder setCaseSignificance(CaseSignificance caseSignificance) { - this.caseSignificance = caseSignificance; - return getSelf(); - } - - public SnomedDescriptionUpdateRequestBuilder setInactivationIndicator(DescriptionInactivationIndicator inactivationIndicator) { - this.inactivationIndicator = inactivationIndicator; + public SnomedDescriptionUpdateRequestBuilder setCaseSignificanceId(String caseSignificanceId) { + this.caseSignificanceId = caseSignificanceId; return getSelf(); } @@ -84,9 +68,7 @@ protected SnomedDescriptionUpdateRequest create(String componentId) { protected void init(SnomedDescriptionUpdateRequest req) { super.init(req); req.setAcceptability(acceptability); - req.setAssociationTargets(associationTargets); - req.setCaseSignificance(caseSignificance); - req.setInactivationIndicator(inactivationIndicator); + req.setCaseSignificanceId(caseSignificanceId); req.setLanguageCode(languageCode); req.setTypeId(typeId); req.setTerm(term); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedOWLAxiomHelper.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedOWLAxiomHelper.java index 4b17ca60389..6fb0355fd84 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedOWLAxiomHelper.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedOWLAxiomHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,10 +16,9 @@ package com.b2international.snowowl.snomed.datastore.request; import java.util.Locale; -import java.util.Optional; import java.util.Set; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.google.common.base.Strings; /** @@ -29,23 +28,17 @@ public final class SnomedOWLAxiomHelper { private static final String EQUIVALENTCLASSES = "equivalentclasses"; - public static DefinitionStatus getDefinitionStatusFromExpressions(Set owlExpressions) { - + public static String getDefinitionStatusFromExpressions(Set owlExpressions) { if (owlExpressions.isEmpty()) { return null; } - Optional equivalenClassesExpression = owlExpressions.stream() + return owlExpressions.stream() .filter(expression -> !Strings.isNullOrEmpty(expression)) .filter(expression -> expression.toLowerCase(Locale.ENGLISH).contains(EQUIVALENTCLASSES)) - .findFirst(); - - if (equivalenClassesExpression.isPresent()) { - return DefinitionStatus.FULLY_DEFINED; - } - - return DefinitionStatus.PRIMITIVE; - + .findFirst() + .map(equivalentClassesAxiom -> Concepts.FULLY_DEFINED) + .orElse(Concepts.PRIMITIVE); } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberCreateRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberCreateRequest.java index c7bc7757669..c8bbc885420 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberCreateRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberCreateRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import org.hibernate.validator.constraints.NotEmpty; -import com.b2international.commons.ClassUtils; +import com.b2international.commons.exceptions.BadRequestException; import com.b2international.commons.options.Options; import com.b2international.snowowl.core.domain.TransactionContext; import com.b2international.snowowl.core.exceptions.ComponentNotFoundException; @@ -60,8 +60,7 @@ final class SnomedRefSetMemberCreateRequest implements SnomedComponentCreateRequ private Map properties = newHashMap(); - SnomedRefSetMemberCreateRequest() { - } + SnomedRefSetMemberCreateRequest() { } String getId() { return id; @@ -90,13 +89,22 @@ boolean hasProperty(String key) { } String getComponentId(String key) { - Object value = properties.get(key); - if (value == null) { - return null; - } else if (value instanceof Map) { - return ClassUtils.checkAndCast(((Map) value).get(SnomedRf2Headers.FIELD_ID), String.class); - } else { - return ClassUtils.checkAndCast(value, String.class); + final Object value = properties.get(key); + + try { + + if (value == null) { + return null; + } else if (value instanceof Map) { + final Map component = (Map) value; + final Object componentId = component.get(SnomedRf2Headers.FIELD_ID); + return (String) componentId; + } else { + return (String) value; + } + + } catch (final ClassCastException cce) { + throw new BadRequestException("Property '%s' must be a String, or have a nested String property named 'id'.", key); } } @@ -105,11 +113,12 @@ String getProperty(String key) { } T getProperty(String key, Class valueType) { - Object value = properties.get(key); - if (value == null) { - return null; - } else { - return ClassUtils.checkAndCast(value, valueType); + final Object value = properties.get(key); + + try { + return valueType.cast(value); + } catch (final ClassCastException cce) { + throw new BadRequestException("Property '%s' must be a %s.", key, valueType.getSimpleName()); } } @@ -188,6 +197,8 @@ private SnomedRefSetMemberCreateDelegate getDelegate(SnomedRefSetType referenceS return new SnomedAttributeValueMemberCreateDelegate(this); case COMPLEX_MAP: return new SnomedComplexMapMemberCreateDelegate(this); + case COMPLEX_BLOCK_MAP: + return new SnomedComplexBlockMapMemberCreateDelegate(this); case CONCRETE_DATA_TYPE: return new SnomedConcreteDomainMemberCreateDelegate(this); case DESCRIPTION_TYPE: diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberSearchRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberSearchRequest.java index 8eb6a22f5d8..28e2da68b4d 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberSearchRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,6 +47,8 @@ */ final class SnomedRefSetMemberSearchRequest extends SnomedSearchRequest { + private static final long serialVersionUID = 1L; + /** * @since 4.5 */ @@ -161,6 +163,9 @@ protected Expression prepareQuery(BranchContext context) { if (propKeys.remove(SnomedRf2Headers.FIELD_MAP_GROUP)) { queryBuilder.filter(mapGroups(propsFilter.getCollection(SnomedRf2Headers.FIELD_MAP_GROUP, Integer.class))); } + if (propKeys.remove(SnomedRf2Headers.FIELD_MAP_PRIORITY)) { + queryBuilder.filter(mapPriority(propsFilter.getCollection(SnomedRf2Headers.FIELD_MAP_PRIORITY, Integer.class))); + } if (propKeys.remove(SnomedRf2Headers.FIELD_VALUE_ID)) { addEclFilter(context, queryBuilder, propsFilter.getCollection(SnomedRf2Headers.FIELD_VALUE_ID, String.class), SnomedRefSetMemberIndexEntry.Expressions::valueIds); } @@ -253,7 +258,7 @@ protected SnomedReferenceSetMembers toCollectionResource(BranchContext context, if (limit() < 1 || hits.getTotal() < 1) { return new SnomedReferenceSetMembers(limit(), hits.getTotal()); } else { - return SnomedConverters.newMemberConverter(context, expand(), locales()).convert(hits.getHits(), hits.getScrollId(), hits.getSearchAfter(), limit(), hits.getTotal()); + return SnomedConverters.newMemberConverter(context, expand(), locales()).convert(hits.getHits(), hits.getSearchAfter(), limit(), hits.getTotal()); } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberUpdateRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberUpdateRequest.java index 0a9a3e31e0b..ccd4b2014bb 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberUpdateRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberUpdateRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ import org.hibernate.validator.constraints.NotEmpty; -import com.b2international.commons.ClassUtils; +import com.b2international.commons.exceptions.BadRequestException; import com.b2international.snowowl.core.date.DateFormats; import com.b2international.snowowl.core.date.EffectiveTimes; import com.b2international.snowowl.core.domain.TransactionContext; @@ -63,13 +63,22 @@ boolean hasProperty(String key) { } String getComponentId(String key) { - Object value = properties.get(key); - if (value == null) { - return null; - } else if (value instanceof Map) { - return ClassUtils.checkAndCast(((Map) value).get(SnomedRf2Headers.FIELD_ID), String.class); - } else { - return ClassUtils.checkAndCast(value, String.class); + final Object value = properties.get(key); + + try { + + if (value == null) { + return null; + } else if (value instanceof Map) { + final Map component = (Map) value; + final Object componentId = component.get(SnomedRf2Headers.FIELD_ID); + return (String) componentId; + } else { + return (String) value; + } + + } catch (final ClassCastException cce) { + throw new BadRequestException("Property '%s' must be a String, or have a nested String property named 'id'.", key); } } @@ -78,11 +87,12 @@ String getProperty(String key) { } T getProperty(String key, Class valueType) { - Object value = properties.get(key); - if (value == null) { - return null; - } else { - return ClassUtils.checkAndCast(value, valueType); + final Object value = properties.get(key); + + try { + return valueType.cast(value); + } catch (final ClassCastException cce) { + throw new BadRequestException("Property '%s' must be a %s.", key, valueType.getSimpleName()); } } @@ -135,6 +145,8 @@ private SnomedRefSetMemberUpdateDelegate getDelegate(SnomedRefSetType referenceS return new SnomedAttributeValueMemberUpdateDelegate(this); case COMPLEX_MAP: return new SnomedComplexMapMemberUpdateDelegate(this); + case COMPLEX_BLOCK_MAP: + return new SnomedComplexBlockMapMemberUpdateDelegate(this); case CONCRETE_DATA_TYPE: return new SnomedConcreteDomainMemberUpdateDelegate(this); case DESCRIPTION_TYPE: diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetSearchRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetSearchRequest.java index ec8209b027f..0ff48c46608 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetSearchRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,7 +91,7 @@ protected SnomedReferenceSets toCollectionResource(BranchContext context, HitsBuilder class to build requests responsible for searching SNOMED CT reference sets. - * This class should be instantiated from the corresponding static method on the central {@link SnomedRequests} class. - * Filter methods restrict the results set returned from the search requests; - * what passes the filters will be returned as part of the pageable resultset. + * Builder class to build requests responsible for searching SNOMED CT reference sets. This class should be instantiated from the corresponding + * static method on the central {@link SnomedRequests} class. Filter methods restrict the results set returned from the search requests; what passes + * the filters will be returned as part of the pageable resultset. * * @since 4.5 */ public final class SnomedRefSetSearchRequestBuilder extends SnomedSearchRequestBuilder { - SnomedRefSetSearchRequestBuilder() {} + SnomedRefSetSearchRequestBuilder() { + } @Override protected SearchResourceRequest createSearch() { return new SnomedRefSetSearchRequest(); } - + public SnomedRefSetSearchRequestBuilder filterByType(SnomedRefSetType refSetType) { return addOption(SnomedRefSetSearchRequest.OptionKey.TYPE, refSetType); } - + public SnomedRefSetSearchRequestBuilder filterByTypes(Collection refSetTypes) { return addOption(SnomedRefSetSearchRequest.OptionKey.TYPE, Collections3.toImmutableSet(refSetTypes)); } @@ -61,22 +60,24 @@ public SnomedRefSetSearchRequestBuilder filterByReferencedComponentType(String r final int referencedComponentTypeAsInt = TerminologyRegistry.INSTANCE.getTerminologyComponentById(referencedComponentType).shortId(); return filterByReferencedComponentType(referencedComponentTypeAsInt); } - + public SnomedRefSetSearchRequestBuilder filterByReferencedComponentType(Integer referencedComponentType) { if (referencedComponentType == null) { return getSelf(); } return addOption(SnomedRefSetSearchRequest.OptionKey.REFERENCED_COMPONENT_TYPE, referencedComponentType); } - + public SnomedRefSetSearchRequestBuilder filterByReferencedComponentTypes(Collection referencedComponentTypes) { return addOption(SnomedRefSetSearchRequest.OptionKey.REFERENCED_COMPONENT_TYPE, Collections3.toImmutableSet(referencedComponentTypes)); } /** - * Returns map type reference sets that have the exact matching map targe component type. - * Only applicable for maps - * @param map target component type integer + * Returns map type reference sets that have the exact matching map target component type. Only applicable for maps, other refsets will not match + * this filter. + * + * @param mapTargetComponentType + * - map target component type integer */ public SnomedRefSetSearchRequestBuilder filterByMapTargetComponentType(Integer mapTargetComponentType) { if (mapTargetComponentType == null) { @@ -84,11 +85,13 @@ public SnomedRefSetSearchRequestBuilder filterByMapTargetComponentType(Integer m } return addOption(SnomedRefSetSearchRequest.OptionKey.MAP_TARGET_COMPONENT_TYPE, mapTargetComponentType); } - + /** - * Returns map type reference sets that have the exact matching map targe component types. - * Only applicable for maps - * @param map target component types + * Returns map type reference sets that have the exact matching map target component types. Only applicable for maps, other refsets will not match + * this filter. + * + * @param mapTargetComponentTypes + * - map target component type values */ public SnomedRefSetSearchRequestBuilder filterByMapTargetComponentTypes(Collection mapTargetComponentTypes) { return addOption(SnomedRefSetSearchRequest.OptionKey.MAP_TARGET_COMPONENT_TYPE, Collections3.toImmutableSet(mapTargetComponentTypes)); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipCreateRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipCreateRequest.java index 54f7c27ff1f..cfa389be247 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipCreateRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipCreateRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,9 +26,7 @@ import com.b2international.commons.exceptions.BadRequestException; import com.b2international.snowowl.core.domain.TransactionContext; import com.b2international.snowowl.core.exceptions.ComponentNotFoundException; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.core.domain.ConstantIdStrategy; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; import com.b2international.snowowl.snomed.core.store.SnomedComponents; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry; import com.google.common.base.Strings; @@ -59,10 +57,10 @@ public final class SnomedRelationshipCreateRequest extends BaseSnomedComponentCr private int unionGroup; @NotNull - private CharacteristicType characteristicType; + private String characteristicTypeId; @NotNull - private RelationshipModifier modifier; + private String modifierId; SnomedRelationshipCreateRequest() {} @@ -90,12 +88,12 @@ public int getUnionGroup() { return unionGroup; } - public CharacteristicType getCharacteristicType() { - return characteristicType; + public String getCharacteristicTypeId() { + return characteristicTypeId; } - public RelationshipModifier getModifier() { - return modifier; + public String getModifierId() { + return modifierId; } void setSourceId(final String sourceId) { @@ -122,19 +120,19 @@ void setUnionGroup(final int unionGroup) { this.unionGroup = unionGroup; } - void setCharacteristicType(final CharacteristicType characteristicType) { - this.characteristicType = characteristicType; + void setCharacteristicTypeId(final String characteristicTypeId) { + this.characteristicTypeId = characteristicTypeId; } - void setModifier(final RelationshipModifier modifier) { - this.modifier = modifier; + void setModifier(final String modifierId) { + this.modifierId = modifierId; } @Override public Set getRequiredComponentIds(TransactionContext context) { Builder result = ImmutableSet.builder() - .add(modifier.getConceptId()) - .add(characteristicType.getConceptId()) + .add(getModifierId()) + .add(getCharacteristicTypeId()) .add(getTypeId()) .add(getDestinationId()); if (getModuleId() != null) { @@ -164,8 +162,8 @@ public String execute(TransactionContext context) { .withType(getTypeId()) .withGroup(getGroup()) .withUnionGroup(getUnionGroup()) - .withCharacteristicType(getCharacteristicType()) - .withModifier(getModifier()) + .withCharacteristicTypeId(getCharacteristicTypeId()) + .withModifierId(getModifierId()) .withDestinationNegated(isDestinationNegated()) .build(context); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipCreateRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipCreateRequestBuilder.java index c8413b4f434..a8f12de4e1d 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipCreateRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipCreateRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,7 @@ */ package com.b2international.snowowl.snomed.datastore.request; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; /** * Builder class to build requests responsible for creating SNOMED CT relationships. @@ -26,12 +25,12 @@ */ public final class SnomedRelationshipCreateRequestBuilder extends SnomedComponentCreateRequestBuilder { - private CharacteristicType characteristicType = CharacteristicType.STATED_RELATIONSHIP; + private String characteristicTypeId = Concepts.STATED_RELATIONSHIP; private String destinationId; private String sourceId; private boolean destinationNegated; private int group = 0; - private RelationshipModifier modifier = RelationshipModifier.EXISTENTIAL; + private String modifierId = Concepts.EXISTENTIAL_RESTRICTION_MODIFIER; private Integer unionGroup = 0; private String typeId; @@ -49,8 +48,8 @@ public SnomedRelationshipCreateRequestBuilder setSourceId(String sourceId) { return getSelf(); } - public SnomedRelationshipCreateRequestBuilder setCharacteristicType(CharacteristicType characteristicType) { - this.characteristicType = characteristicType; + public SnomedRelationshipCreateRequestBuilder setCharacteristicTypeId(String characteristicTypeId) { + this.characteristicTypeId = characteristicTypeId; return getSelf(); } @@ -64,8 +63,8 @@ public SnomedRelationshipCreateRequestBuilder setGroup(Integer group) { return getSelf(); } - public SnomedRelationshipCreateRequestBuilder setModifier(RelationshipModifier modifier) { - this.modifier = modifier; + public SnomedRelationshipCreateRequestBuilder setModifierId(String modifierid) { + this.modifierId = modifierid; return getSelf(); } @@ -82,12 +81,12 @@ public SnomedRelationshipCreateRequestBuilder setUnionGroup(Integer unionGroup) @Override protected void init(BaseSnomedComponentCreateRequest request) { final SnomedRelationshipCreateRequest req = (SnomedRelationshipCreateRequest) request; - req.setCharacteristicType(characteristicType); + req.setCharacteristicTypeId(characteristicTypeId); req.setDestinationId(destinationId); req.setSourceId(sourceId); req.setDestinationNegated(destinationNegated); req.setGroup(group); - req.setModifier(modifier); + req.setModifier(modifierId); req.setUnionGroup(unionGroup); req.setTypeId(typeId); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipSearchRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipSearchRequest.java index 137b89cfb19..4c7c6c124b3 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipSearchRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -90,7 +90,7 @@ protected SnomedRelationships toCollectionResource(BranchContext context, Hits getRequiredComponentIds(TransactionContext context) { final Builder ids = ImmutableSet.builder(); ids.add(getComponentId()); - if (characteristicType != null) { - ids.add(characteristicType.getConceptId()); + if (characteristicTypeId != null) { + ids.add(characteristicTypeId); } if (destinationId != null) { ids.add(destinationId); @@ -197,8 +200,8 @@ public Set getRequiredComponentIds(TransactionContext context) { if (typeId != null) { ids.add(typeId); } - if (modifier != null) { - ids.add(modifier.getConceptId()); + if (modifierId != null) { + ids.add(modifierId); } return ids.build(); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipUpdateRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipUpdateRequestBuilder.java index d179a4455aa..30685c9d7f9 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipUpdateRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRelationshipUpdateRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,18 +15,15 @@ */ package com.b2international.snowowl.snomed.datastore.request; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; - /** * @since 4.5 */ public final class SnomedRelationshipUpdateRequestBuilder extends BaseSnomedComponentUpdateRequestBuilder { - private CharacteristicType characteristicType; + private String characteristicTypeId; private Integer group; private Integer unionGroup; - private RelationshipModifier modifier; + private String modifierId; private String destinationId; private String typeId; @@ -34,8 +31,8 @@ public final class SnomedRelationshipUpdateRequestBuilder extends BaseSnomedComp super(componentId); } - public SnomedRelationshipUpdateRequestBuilder setCharacteristicType(CharacteristicType characteristicType) { - this.characteristicType = characteristicType; + public SnomedRelationshipUpdateRequestBuilder setCharacteristicTypeId(String characteristicTypeId) { + this.characteristicTypeId = characteristicTypeId; return getSelf(); } @@ -44,8 +41,8 @@ public SnomedRelationshipUpdateRequestBuilder setGroup(Integer group) { return getSelf(); } - public SnomedRelationshipUpdateRequestBuilder setModifier(RelationshipModifier modifier) { - this.modifier = modifier; + public SnomedRelationshipUpdateRequestBuilder setModifierId(String modifierId) { + this.modifierId = modifierId; return getSelf(); } @@ -72,10 +69,10 @@ protected SnomedRelationshipUpdateRequest create(String componentId) { @Override protected void init(SnomedRelationshipUpdateRequest req) { super.init(req); - req.setCharacteristicType(characteristicType); + req.setCharacteristicTypeId(characteristicTypeId); req.setGroup(group); req.setUnionGroup(unionGroup); - req.setModifier(modifier); + req.setModifierId(modifierId); req.setDestinationId(destinationId); req.setTypeId(typeId); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRepositoryCommitRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRepositoryCommitRequestBuilder.java index d64e3e4d0f4..1734b6b84e0 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRepositoryCommitRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRepositoryCommitRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ import com.b2international.snowowl.datastore.request.BranchRequest; import com.b2international.snowowl.datastore.request.CommitResult; import com.b2international.snowowl.datastore.request.HealthCheckingRequest; -import com.b2international.snowowl.datastore.request.IndexReadRequest; import com.b2international.snowowl.datastore.request.RepositoryCommitRequestBuilder; import com.b2international.snowowl.datastore.request.RepositoryRequest; import com.b2international.snowowl.datastore.request.RevisionIndexReadRequest; @@ -54,11 +53,9 @@ public AsyncRequest build(String repositoryId, String branch) { return new AsyncRequest<>( new RepositoryRequest<>(repositoryId, new HealthCheckingRequest<>( - new IndexReadRequest<>( - new BranchRequest<>(branch, - new RevisionIndexReadRequest<>( - build() - ) + new BranchRequest<>(branch, + new RevisionIndexReadRequest<>( + build() ) ), allowedHealthstates() diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/dsv/SnomedDSVExportRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/dsv/SnomedDSVExportRequest.java index 1c583964436..4344886bbaa 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/dsv/SnomedDSVExportRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/dsv/SnomedDSVExportRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -137,7 +137,7 @@ private File doExport(BranchContext context) { response = exporter.executeDSVExport(context.service(IProgressMonitor.class)); } catch (Exception e) { LOG.error("Error while exporting DSV.", e); - result.setResultAndMessage(Result.EXCEPTION, "An error occurred while exporting SNOMED CT components to delimiter separated files."); + result.setResultAndMessage(Result.EXCEPTION, "An error occurred while exporting SNOMED CT components to delimiter separated files. Reason: " + e.getMessage()); } if (result.getResult().equals(SnomedExportResult.Result.CANCELED) || result.getResult().equals(SnomedExportResult.Result.EXCEPTION)) { diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/dsv/SnomedSimpleTypeRefSetDSVExporter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/dsv/SnomedSimpleTypeRefSetDSVExporter.java index b4f046fc285..dcd9a1da9b9 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/dsv/SnomedSimpleTypeRefSetDSVExporter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/dsv/SnomedSimpleTypeRefSetDSVExporter.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +41,6 @@ import com.b2international.snowowl.core.request.SearchResourceRequestIterator; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; @@ -142,7 +141,6 @@ private SearchResourceRequestIterator matchingRelationships = concept.getRelationships() .stream() .filter(r -> relationshipTypeId.equals(r.getTypeId()) - && (CharacteristicType.INFERRED_RELATIONSHIP.equals(r.getCharacteristicType()) - || CharacteristicType.ADDITIONAL_RELATIONSHIP.equals(r.getCharacteristicType()))) + && (Concepts.INFERRED_RELATIONSHIP.equals(r.getCharacteristicTypeId()) + || Concepts.ADDITIONAL_RELATIONSHIP.equals(r.getCharacteristicTypeId()))) .collect(Collectors.groupingBy( SnomedRelationship::getGroup, Collectors.reducing(0, relationship -> 1, Integer::sum))); @@ -440,8 +438,8 @@ private void writeValues(BufferedWriter writer, SnomedConcepts chunk) throws IOE .stream() .filter(r -> typeId.equals(r.getTypeId()) && Objects.equals(r.getGroup(), propertyGroup) - && (CharacteristicType.INFERRED_RELATIONSHIP.equals(r.getCharacteristicType()) - || CharacteristicType.ADDITIONAL_RELATIONSHIP.equals(r.getCharacteristicType()))) + && (Concepts.INFERRED_RELATIONSHIP.equals(r.getCharacteristicTypeId()) + || Concepts.ADDITIONAL_RELATIONSHIP.equals(r.getCharacteristicTypeId()))) .forEach(relationship -> { addCells(dataRow, occurrences, includeRelationshipId, ImmutableMap.of(relationship.getDestinationId(), getPreferredTerm(relationship.getDestination()))); }); @@ -518,7 +516,7 @@ private void writeValues(BufferedWriter writer, SnomedConcepts chunk) throws IOE break; case DEFINITION_STATUS: - dataRow.add(concept.getDefinitionStatus().toString()); + dataRow.add(concept.getDefinitionStatusId()); break; default: diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ExportRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ExportRequest.java index aacea249335..e9a9b3ece43 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ExportRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ExportRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.time.Instant; import java.util.*; import java.util.Map.Entry; import java.util.stream.Collectors; @@ -49,6 +50,7 @@ import com.b2international.snowowl.core.date.Dates; import com.b2international.snowowl.core.date.EffectiveTimes; import com.b2international.snowowl.core.domain.BranchContext; +import com.b2international.snowowl.core.domain.ExportResult; import com.b2international.snowowl.core.domain.IComponent; import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.events.Request; @@ -57,7 +59,6 @@ import com.b2international.snowowl.datastore.CodeSystemEntry; import com.b2international.snowowl.datastore.CodeSystemVersionEntry; import com.b2international.snowowl.datastore.request.BranchRequest; -import com.b2international.snowowl.datastore.request.IndexReadRequest; import com.b2international.snowowl.datastore.request.RepositoryRequests; import com.b2international.snowowl.datastore.request.RevisionIndexReadRequest; import com.b2international.snowowl.eventbus.IEventBus; @@ -65,7 +66,6 @@ import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; -import com.b2international.snowowl.snomed.core.domain.Rf2ExportResult; import com.b2international.snowowl.snomed.core.domain.Rf2RefSetExportLayout; import com.b2international.snowowl.snomed.core.domain.Rf2ReleaseType; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; @@ -100,7 +100,7 @@ /** * @since 5.7 */ -final class SnomedRf2ExportRequest implements Request, RepositoryAccessControl { +final class SnomedRf2ExportRequest implements Request, RepositoryAccessControl { private static final String DESCRIPTION_TYPES_EXCEPT_TEXT_DEFINITION = "<<" + Concepts.DESCRIPTION_TYPE_ROOT_CONCEPT + " MINUS " + Concepts.TEXT_DEFINITION; private static final String NON_STATED_CHARACTERISTIC_TYPES = "<<" + Concepts.CHARACTERISTIC_TYPE + " MINUS " + Concepts.STATED_RELATIONSHIP; @@ -251,7 +251,9 @@ void setLocales(List locales) { } @Override - public Rf2ExportResult execute(final RepositoryContext context) { + public ExportResult execute(final RepositoryContext context) { + // register export start time for later use + final long exportStartTime = Instant.now().toEpochMilli(); // Step 1: check if the export reference branch is a working branch path descendant final CodeSystemEntry referenceCodeSystem = validateCodeSystem(context); @@ -302,9 +304,10 @@ public Rf2ExportResult execute(final RepositoryContext context) { // export content from reference branch if (includePreReleaseContent) { + final String referenceBranchToExport = String.format("%s%s%s", referenceBranch, RevisionIndex.AT_CHAR, exportStartTime); exportBranch(releaseDirectory, context, - referenceBranch, + referenceBranchToExport, archiveEffectiveDateShort, EffectiveTimes.UNSET_EFFECTIVE_TIME, EffectiveTimes.UNSET_EFFECTIVE_TIME, @@ -316,7 +319,7 @@ public Rf2ExportResult execute(final RepositoryContext context) { final AttachmentRegistry fileRegistry = context.service(AttachmentRegistry.class); registerResult(fileRegistry, exportId, exportDirectory); final String fileName = releaseDirectory.getFileName() + ".zip"; - return new Rf2ExportResult(fileName, exportId); + return new ExportResult(fileName, exportId); } catch (final Exception e) { throw new SnowowlRuntimeException("Failed to export terminology content to RF2.", e); @@ -799,9 +802,9 @@ private String getBranchOrRangeTarget(final String branch) { } private R execute(RepositoryContext context, String branch, Request next) { - return new IndexReadRequest<>(new BranchRequest<>(branch, new RevisionIndexReadRequest<>(next))).execute(context); + return new BranchRequest<>(branch, new RevisionIndexReadRequest<>(next)).execute(context); } - + private void exportRelationships(final Path releaseDirectory, final RepositoryContext context, final String branch, @@ -1064,7 +1067,8 @@ private static Branch getBranch(final RepositoryContext context, final String pa } private static Branches getBranches(final RepositoryContext context, final String parent, final Collection paths) { - return RepositoryRequests.branching().prepareSearch() + return RepositoryRequests.branching() + .prepareSearch() .all() .filterByParent(parent) .filterByName(paths) diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ExportRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ExportRequestBuilder.java index f8794dc0e51..d9e5b244423 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ExportRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ExportRequestBuilder.java @@ -20,11 +20,11 @@ import java.util.List; import com.b2international.commons.http.ExtendedLocale; +import com.b2international.snowowl.core.domain.ExportResult; import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.events.BaseRequestBuilder; import com.b2international.snowowl.core.events.Request; -import com.b2international.snowowl.datastore.request.RepositoryIndexRequestBuilder; -import com.b2international.snowowl.snomed.core.domain.Rf2ExportResult; +import com.b2international.snowowl.datastore.request.RepositoryRequestBuilder; import com.b2international.snowowl.snomed.core.domain.Rf2RefSetExportLayout; import com.b2international.snowowl.snomed.core.domain.Rf2ReleaseType; @@ -32,8 +32,8 @@ * @since 5.7 */ public final class SnomedRf2ExportRequestBuilder - extends BaseRequestBuilder - implements RepositoryIndexRequestBuilder { + extends BaseRequestBuilder + implements RepositoryRequestBuilder { private String codeSystem; private String referenceBranch; @@ -129,7 +129,7 @@ public SnomedRf2ExportRequestBuilder setLocales(List locales) { } @Override - protected Request doBuild() { + protected Request doBuild() { final SnomedRf2ExportRequest req = new SnomedRf2ExportRequest(); req.setCodeSystem(codeSystem); req.setReferenceBranch(referenceBranch); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ImportRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ImportRequestBuilder.java index 9451d4bce30..981ae11548c 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ImportRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ImportRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ import com.b2international.snowowl.core.events.BaseRequestBuilder; import com.b2international.snowowl.core.events.Request; import com.b2international.snowowl.datastore.request.BranchRequest; -import com.b2international.snowowl.datastore.request.IndexReadRequest; import com.b2international.snowowl.datastore.request.RepositoryRequest; import com.b2international.snowowl.datastore.request.RevisionIndexReadRequest; import com.b2international.snowowl.datastore.request.RevisionIndexRequestBuilder; @@ -83,10 +82,8 @@ protected Request doBuild() { public AsyncRequest build(String repositoryId, String branch) { return new AsyncRequest<>( new RepositoryRequest<>(repositoryId, - new IndexReadRequest<>( - new BranchRequest<>(branch, - new RevisionIndexReadRequest<>(build(), false) - ) + new BranchRequest<>(branch, + new RevisionIndexReadRequest<>(build(), false) ) ) ); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2ConceptExporter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2ConceptExporter.java index d0417f5cdbb..9fe50ee10db 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2ConceptExporter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2ConceptExporter.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,10 +75,10 @@ protected Stream> getMappedStream(final SnomedConcepts results, final String branch) { return results.stream() - .map(concept -> ImmutableList.of(concept.getId(), // id - getEffectiveTime(concept), // effectiveTime - getActive(concept), // active - concept.getModuleId(), // moduleId - concept.getDefinitionStatus().getConceptId())); // definitionStatus + .map(concept -> ImmutableList.of(concept.getId(), // id + getEffectiveTime(concept), // effectiveTime + getActive(concept), // active + concept.getModuleId(), // moduleId + concept.getDefinitionStatusId())); // definitionStatus } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2DescriptionExporter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2DescriptionExporter.java index 72371bc2698..551f090c5a6 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2DescriptionExporter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2DescriptionExporter.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,8 @@ import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.request.SearchResourceRequest.SortField; -import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; +import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.core.domain.Rf2ReleaseType; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; import com.b2international.snowowl.snomed.core.domain.SnomedDescriptions; @@ -100,6 +100,6 @@ protected Stream> getMappedStream(final SnomedDescriptions results, description.getLanguageCode(), // languageCode description.getTypeId(), // typeId description.getTerm().replaceAll("[\n\r\t]+", " "), // term (line breaks replaced with spaces) - description.getCaseSignificance().getConceptId())); // caseSignificanceId + description.getCaseSignificanceId())); // caseSignificanceId } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2Exporter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2Exporter.java index a56d1f68b72..5f541010398 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2Exporter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2Exporter.java @@ -38,7 +38,6 @@ import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.request.SearchResourceRequestIterator; import com.b2international.snowowl.datastore.request.BranchRequest; -import com.b2international.snowowl.datastore.request.IndexReadRequest; import com.b2international.snowowl.datastore.request.RevisionIndexReadRequest; import com.b2international.snowowl.snomed.core.domain.Rf2ReleaseType; import com.b2international.snowowl.snomed.core.domain.SnomedComponent; @@ -150,16 +149,14 @@ public final void exportBranch( final B requestBuilder = createSearchRequestBuilder() .filterByModules(modules) // null value will be ignored .filterByEffectiveTime(effectiveTimeStart, effectiveTimeEnd) - .setLimit(BATCH_SIZE) - .setScroll("15m"); + .setLimit(BATCH_SIZE); final SearchResourceRequestIterator iterator = new SearchResourceRequestIterator<>(requestBuilder, scrolledBuilder -> { - return new IndexReadRequest<>( - new BranchRequest( - branch, - new RevisionIndexReadRequest<>(scrolledBuilder.build()) - ) - ).execute(context); + return new BranchRequest( + branch, + new RevisionIndexReadRequest<>(scrolledBuilder.build()) + ) + .execute(context); }); while (iterator.hasNext()) { diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2LanguageRefSetExporter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2LanguageRefSetExporter.java index fbaacc188d1..413c5243373 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2LanguageRefSetExporter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2LanguageRefSetExporter.java @@ -25,7 +25,6 @@ import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.events.Request; import com.b2international.snowowl.datastore.request.BranchRequest; -import com.b2international.snowowl.datastore.request.IndexReadRequest; import com.b2international.snowowl.datastore.request.RevisionIndexReadRequest; import com.b2international.snowowl.snomed.core.domain.Rf2RefSetExportLayout; import com.b2international.snowowl.snomed.core.domain.Rf2ReleaseType; @@ -91,7 +90,7 @@ protected Stream> getMappedStream(final SnomedReferenceSetMembers r .setFields(SnomedDescriptionIndexEntry.Fields.ID) .build(); - final Set validDescriptionIds = new IndexReadRequest<>(new BranchRequest<>(branch, new RevisionIndexReadRequest<>(request))) + final Set validDescriptionIds = new BranchRequest<>(branch, new RevisionIndexReadRequest<>(request)) .execute(context) .stream() .map(d -> d.getId()) diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2RefSetExporter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2RefSetExporter.java index a3345566d1c..06669b5d4af 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2RefSetExporter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2RefSetExporter.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -146,6 +146,9 @@ private String getCombinedRefSetName() { return "MRCMAttributeRange"; case MRCM_MODULE_SCOPE: return "MRCMModuleScope"; + case COMPLEX_BLOCK_MAP: + // XXX: complex maps with map block are also considered "extended", but with a different column type + return "ExtendedMap"; case ASSOCIATION: //$FALL-THROUGH$ case SIMPLE: //$FALL-THROUGH$ case QUERY: //$FALL-THROUGH$ @@ -304,6 +307,8 @@ static String getColumnTypePrefix(SnomedRefSetType refSetType) { return "ss"; case COMPLEX_MAP: return "iisssc"; + case COMPLEX_BLOCK_MAP: + return "iisssci"; case EXTENDED_MAP: return "iissscc"; case MODULE_DEPENDENCY: @@ -346,6 +351,8 @@ static String[] getHeader(SnomedRefSetType refSetType) { return SnomedRf2Headers.SIMPLE_MAP_TYPE_HEADER_WITH_DESCRIPTION; case COMPLEX_MAP: return SnomedRf2Headers.COMPLEX_MAP_TYPE_HEADER; + case COMPLEX_BLOCK_MAP: + return SnomedRf2Headers.COMPLEX_BLOCK_MAP_TYPE_HEADER; case EXTENDED_MAP: return SnomedRf2Headers.EXTENDED_MAP_TYPE_HEADER; case MODULE_DEPENDENCY: diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2RelationshipExporter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2RelationshipExporter.java index 2e34137d272..0a979ac5505 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2RelationshipExporter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2RelationshipExporter.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -84,14 +84,14 @@ protected Stream> getMappedStream(final SnomedRelationships results return results.stream() .map(relationship -> ImmutableList.of(relationship.getId(), // id - getEffectiveTime(relationship), // effectiveTime - getActive(relationship), // active - relationship.getModuleId(), // moduleId - relationship.getSourceId(), // sourceId - relationship.getDestinationId(), // destinationId - relationship.getGroup().toString(), // group - relationship.getTypeId(), // typeId - relationship.getCharacteristicType().getConceptId(), // characteristicTypeId - relationship.getModifier().getConceptId())); // modifierId + getEffectiveTime(relationship), // effectiveTime + getActive(relationship), // active + relationship.getModuleId(), // moduleId + relationship.getSourceId(), // sourceId + relationship.getDestinationId(), // destinationId + relationship.getGroup().toString(), // group + relationship.getTypeId(), // typeId + relationship.getCharacteristicTypeId(), // characteristicTypeId + relationship.getModifierId())); // modifierId } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2ComplexBlockMapRefSetContentType.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2ComplexBlockMapRefSetContentType.java new file mode 100644 index 00000000000..8e3a3e7e5da --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2ComplexBlockMapRefSetContentType.java @@ -0,0 +1,85 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.datastore.request.rf2.importer; + +import static com.b2international.snowowl.snomed.common.SnomedRf2Headers.COMPLEX_BLOCK_MAP_TYPE_HEADER; +import static com.b2international.snowowl.snomed.common.SnomedRf2Headers.FIELD_CORRELATION_ID; +import static com.b2international.snowowl.snomed.common.SnomedRf2Headers.FIELD_MAP_ADVICE; +import static com.b2international.snowowl.snomed.common.SnomedRf2Headers.FIELD_MAP_GROUP; +import static com.b2international.snowowl.snomed.common.SnomedRf2Headers.FIELD_MAP_PRIORITY; +import static com.b2international.snowowl.snomed.common.SnomedRf2Headers.FIELD_MAP_RULE; +import static com.b2international.snowowl.snomed.common.SnomedRf2Headers.FIELD_MAP_TARGET; +import static com.b2international.snowowl.snomed.common.SnomedRf2Headers.FIELD_MAP_BLOCK; + +import com.b2international.collections.PrimitiveSets; +import com.b2international.collections.longs.LongSet; +import com.b2international.snowowl.snomed.core.domain.SnomedConcept; +import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; +import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; +import com.b2international.snowowl.snomed.datastore.request.rf2.validation.Rf2ValidationIssueReporter; +import com.google.common.collect.ImmutableMap; + +/** + * @since 7.4 + */ +final class Rf2ComplexBlockMapRefSetContentType implements Rf2RefSetContentType { + + @Override + public void resolve(SnomedReferenceSetMember component, String[] values) { + component.setType(SnomedRefSetType.COMPLEX_BLOCK_MAP); + component.setReferenceSetId(values[4]); + // XXX actual type is not relevant here + component.setReferencedComponent(new SnomedConcept(values[5])); + component.setProperties( + ImmutableMap.builder() + .put(FIELD_MAP_GROUP, Integer.parseInt(values[6])) + .put(FIELD_MAP_PRIORITY, Integer.parseInt(values[7])) + .put(FIELD_MAP_RULE, values[8]) + .put(FIELD_MAP_ADVICE, values[9]) + .put(FIELD_MAP_TARGET, values[10]) + .put(FIELD_CORRELATION_ID, values[11]) + .put(FIELD_MAP_BLOCK, Integer.parseInt(values[12])) + .build() + ); + } + + @Override + public String[] getHeaderColumns() { + return COMPLEX_BLOCK_MAP_TYPE_HEADER; + } + + @Override + public String getType() { + return "complex-block-member"; + } + + @Override + public LongSet getDependencies(String[] values) { + return PrimitiveSets.newLongOpenHashSet( + Long.parseLong(values[3]), + Long.parseLong(values[4]), + Long.parseLong(values[11]) + ); + } + + @Override + public void validateMembersByReferenceSetContentType(Rf2ValidationIssueReporter reporter, String[] values) { + final String correlationId = values[11]; + + validateConceptIds(reporter, correlationId); + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2ConceptContentType.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2ConceptContentType.java index 103125f3e9f..a2c19399e29 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2ConceptContentType.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2ConceptContentType.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,9 +18,7 @@ import com.b2international.collections.PrimitiveSets; import com.b2international.collections.longs.LongSet; import com.b2international.snowowl.core.domain.IComponent; -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SubclassDefinitionStatus; import com.b2international.snowowl.snomed.datastore.request.rf2.validation.Rf2ValidationIssueReporter; @@ -37,7 +35,7 @@ public SnomedConcept create() { @Override public void resolve(SnomedConcept component, String[] values) { - component.setDefinitionStatus(Concepts.PRIMITIVE.equals(values[4]) ? DefinitionStatus.PRIMITIVE : DefinitionStatus.FULLY_DEFINED); + component.setDefinitionStatusId(values[4]); component.setSubclassDefinitionStatus(SubclassDefinitionStatus.NON_DISJOINT_SUBCLASSES); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2DescriptionContentType.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2DescriptionContentType.java index 9b8bdb761b0..8221aa80b60 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2DescriptionContentType.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2DescriptionContentType.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ import com.b2international.snowowl.core.terminology.ComponentCategory; import com.b2international.snowowl.snomed.cis.SnomedIdentifiers; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; import com.b2international.snowowl.snomed.datastore.request.rf2.validation.Rf2ValidationDefects; import com.b2international.snowowl.snomed.datastore.request.rf2.validation.Rf2ValidationIssueReporter; @@ -41,7 +40,7 @@ public void resolve(SnomedDescription component, String[] values) { component.setLanguageCode(values[5]); component.setTypeId(values[6]); component.setTerm(values[7]); - component.setCaseSignificance(CaseSignificance.getByConceptId(values[8])); + component.setCaseSignificanceId(values[8]); } @Override diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2Format.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2Format.java index 02bbc8ea0a0..130e39f5af2 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2Format.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2Format.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,7 @@ public final class Rf2Format { .add(new Rf2SimpleMapRefSetContentType()) .add(new Rf2SimpleMapWithDescriptionContentType()) .add(new Rf2ComplexMapRefSetContentType()) + .add(new Rf2ComplexBlockMapRefSetContentType()) .add(new Rf2ExtendedMapRefSetContentType()) // Refset/Metadata .add(new Rf2ModuleDependencyRefSetContentType()) diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2RelationshipContentType.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2RelationshipContentType.java index d901a37b7ce..580210422bd 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2RelationshipContentType.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2RelationshipContentType.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,6 @@ import com.b2international.snowowl.core.terminology.ComponentCategory; import com.b2international.snowowl.snomed.cis.SnomedIdentifiers; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; import com.b2international.snowowl.snomed.datastore.request.rf2.validation.Rf2ValidationDefects; import com.b2international.snowowl.snomed.datastore.request.rf2.validation.Rf2ValidationIssueReporter; @@ -53,8 +51,8 @@ public void resolve(SnomedRelationship component, String[] values) { component.setDestinationId(values[5]); component.setGroup(Integer.parseInt(values[6])); component.setTypeId(values[7]); - component.setCharacteristicType(CharacteristicType.getByConceptId(values[8])); - component.setModifier(RelationshipModifier.getByConceptId(values[9])); + component.setCharacteristicTypeId(values[8]); + component.setModifierId(values[9]); component.setUnionGroup(0); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2TransactionContext.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2TransactionContext.java index 809cfe13c9c..274b54ef246 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2TransactionContext.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/Rf2TransactionContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,6 @@ import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.core.domain.SnomedComponent; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedCoreComponent; @@ -96,8 +95,8 @@ protected RepositoryTransactionContext getDelegate() { } @Override - public void add(Object o) { - getDelegate().add(o); + public String add(Object o) { + return getDelegate().add(o); } @Override @@ -370,7 +369,7 @@ private Class getDocType(SnomedComponent component) { .withActive(concept.isActive()) .withEffectiveTime(concept.getEffectiveTime()) .withModule(concept.getModuleId()) - .withDefinitionStatus(concept.getDefinitionStatus()) + .withDefinitionStatusId(concept.getDefinitionStatusId()) .withExhaustive(concept.getSubclassDefinitionStatus().isExhaustive()); } else if (component instanceof SnomedDescription) { SnomedDescription description = (SnomedDescription) component; @@ -379,7 +378,7 @@ private Class getDocType(SnomedComponent component) { .withActive(description.isActive()) .withEffectiveTime(description.getEffectiveTime()) .withModule(description.getModuleId()) - .withCaseSignificance(description.getCaseSignificance()) + .withCaseSignificanceId(description.getCaseSignificanceId()) .withLanguageCode(description.getLanguageCode()) .withType(description.getTypeId()) .withTerm(description.getTerm()) @@ -394,11 +393,11 @@ private Class getDocType(SnomedComponent component) { .withSource(relationship.getSourceId()) .withType(relationship.getTypeId()) .withDestination(relationship.getDestinationId()) - .withCharacteristicType(relationship.getCharacteristicType()) + .withCharacteristicTypeId(relationship.getCharacteristicTypeId()) .withGroup(relationship.getGroup()) .withUnionGroup(relationship.getUnionGroup()) .withDestinationNegated(false) - .withModifier(relationship.getModifier()); + .withModifierId(relationship.getModifierId()); } else { throw new UnsupportedOperationException("Cannot prepare unknown core component: " + component); } @@ -432,6 +431,16 @@ private Class getDocType(SnomedComponent component) { .withMapRule((String) properties.get(SnomedRf2Headers.FIELD_MAP_RULE)) .withMapTargetId((String) properties.get(SnomedRf2Headers.FIELD_MAP_TARGET)); break; + case COMPLEX_BLOCK_MAP: + builder = SnomedComponents.newComplexBlockMapMember() + .withGroup((Integer) properties.get(SnomedRf2Headers.FIELD_MAP_GROUP)) + .withPriority((Integer) properties.get(SnomedRf2Headers.FIELD_MAP_PRIORITY)) + .withMapAdvice((String) properties.get(SnomedRf2Headers.FIELD_MAP_ADVICE)) + .withCorrelationId((String) properties.get(SnomedRf2Headers.FIELD_CORRELATION_ID)) + .withMapRule((String) properties.get(SnomedRf2Headers.FIELD_MAP_RULE)) + .withMapTargetId((String) properties.get(SnomedRf2Headers.FIELD_MAP_TARGET)) + .withBlock((Integer) properties.get(SnomedRf2Headers.FIELD_MAP_BLOCK)); + break; case LANGUAGE: builder = SnomedComponents.newLanguageMember() .withAcceptability(Acceptability.getByConceptId((String) properties.get(SnomedRf2Headers.FIELD_ACCEPTABILITY_ID))); @@ -490,7 +499,7 @@ private Class getDocType(SnomedComponent component) { break; case CONCRETE_DATA_TYPE: builder = SnomedComponents.newConcreteDomainReferenceSetMember() - .withCharacteristicType(CharacteristicType.getByConceptId((String) properties.get(SnomedRf2Headers.FIELD_CHARACTERISTIC_TYPE_ID))) + .withCharacteristicTypeId((String) properties.get(SnomedRf2Headers.FIELD_CHARACTERISTIC_TYPE_ID)) .withGroup(Integer.parseInt((String) properties.get(SnomedRf2Headers.FIELD_RELATIONSHIP_GROUP))) .withTypeId((String) properties.get(SnomedRf2Headers.FIELD_TYPE_ID)) .withSerializedValue((String) properties.get(SnomedRf2Headers.FIELD_VALUE)); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/SnomedConcreteDomainImportPostProcessor.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/SnomedConcreteDomainImportPostProcessor.java index 468a4e85423..9246b10e0e4 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/SnomedConcreteDomainImportPostProcessor.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/importer/SnomedConcreteDomainImportPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,8 @@ import com.b2international.snowowl.core.events.bulk.BulkRequestBuilder; import com.b2international.snowowl.datastore.oplock.impl.DatastoreLockContextDescriptions; import com.b2international.snowowl.snomed.common.SnomedConstants; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; import com.b2international.snowowl.snomed.datastore.ISnomedImportPostProcessor; import com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration; @@ -215,8 +213,8 @@ private SnomedConceptCreateRequestBuilder createConcept(final String identifierC .setModuleId(MODULE_B2I_EXTENSION.equals(identifierConceptId) ? MODULE_SCT_CORE : MODULE_B2I_EXTENSION) // workaround to be able to set the module for the B2i module concept .addDescription(createDescription(identifierConceptId, fsnTerm, FULLY_SPECIFIED_NAME, Acceptability.PREFERRED)) .addDescription(createDescription(identifierConceptId, ptTerm, SYNONYM, Acceptability.PREFERRED)) - .addRelationship(createIsaRelationship(identifierConceptId, parent, CharacteristicType.STATED_RELATIONSHIP)) - .addRelationship(createIsaRelationship(identifierConceptId, parent, CharacteristicType.INFERRED_RELATIONSHIP)); + .addRelationship(createIsaRelationship(identifierConceptId, parent, Concepts.STATED_RELATIONSHIP)) + .addRelationship(createIsaRelationship(identifierConceptId, parent, Concepts.INFERRED_RELATIONSHIP)); } private SnomedDescriptionCreateRequestBuilder createDescription(final String conceptId, final String term, final String type, final Acceptability acceptability) { @@ -228,11 +226,11 @@ private SnomedDescriptionCreateRequestBuilder createDescription(final String con .setLanguageCode("en") .setTypeId(type) .setTerm(term) - .setCaseSignificance(CaseSignificance.CASE_INSENSITIVE) + .setCaseSignificanceId(Concepts.ENTIRE_TERM_CASE_INSENSITIVE) .setAcceptability(ImmutableMap.of(SnomedConstants.Concepts.REFSET_LANGUAGE_TYPE_US, acceptability)); } - private SnomedRelationshipCreateRequestBuilder createIsaRelationship(final String source, final String destination, final CharacteristicType characteristicType) { + private SnomedRelationshipCreateRequestBuilder createIsaRelationship(final String source, final String destination, final String characteristicTypeId) { return SnomedRequests.prepareNewRelationship() .setIdFromNamespace(B2I_NAMESPACE) .setActive(true) @@ -240,8 +238,8 @@ private SnomedRelationshipCreateRequestBuilder createIsaRelationship(final Strin .setSourceId(source) .setDestinationId(destination) .setTypeId(IS_A) - .setCharacteristicType(characteristicType) - .setModifier(RelationshipModifier.EXISTENTIAL); + .setCharacteristicTypeId(characteristicTypeId) + .setModifierId(Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/taxonomy/Taxonomies.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/taxonomy/Taxonomies.java index c44c6753b53..34c4ed913d7 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/taxonomy/Taxonomies.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/taxonomy/Taxonomies.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import static com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry.Expressions.destinationIds; import static com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry.Expressions.sourceIds; import static com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry.Expressions.typeId; +import static com.google.common.collect.Sets.newHashSet; import java.io.IOException; import java.util.Collection; @@ -44,7 +45,6 @@ import com.b2international.snowowl.core.api.SnowowlRuntimeException; import com.b2international.snowowl.core.domain.IComponent; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedOWLRelationshipDocument; @@ -66,16 +66,15 @@ private Taxonomies() { } public static Taxonomy inferred(RevisionSearcher searcher, SnomedOWLExpressionConverter expressionConverter, StagingArea staging, LongCollection conceptIds, boolean checkCycles) { - return buildTaxonomy(searcher, expressionConverter, staging, conceptIds, CharacteristicType.INFERRED_RELATIONSHIP, checkCycles); + return buildTaxonomy(searcher, expressionConverter, staging, conceptIds, Concepts.INFERRED_RELATIONSHIP, checkCycles); } public static Taxonomy stated(RevisionSearcher searcher, SnomedOWLExpressionConverter expressionConverter, StagingArea staging, LongCollection conceptIds, boolean checkCycles) { - return buildTaxonomy(searcher, expressionConverter, staging, conceptIds, CharacteristicType.STATED_RELATIONSHIP, checkCycles); + return buildTaxonomy(searcher, expressionConverter, staging, conceptIds, Concepts.STATED_RELATIONSHIP, checkCycles); } - private static Taxonomy buildTaxonomy(RevisionSearcher searcher, SnomedOWLExpressionConverter expressionConverter, StagingArea staging, LongCollection conceptIds, CharacteristicType characteristicType, boolean checkCycles) { + private static Taxonomy buildTaxonomy(RevisionSearcher searcher, SnomedOWLExpressionConverter expressionConverter, StagingArea staging, LongCollection conceptIds, String characteristicTypeId, boolean checkCycles) { try { - final String characteristicTypeId = characteristicType.getConceptId(); Collection isaStatements = getStatements(searcher, conceptIds, characteristicTypeId, true); final TaxonomyGraph oldTaxonomy = new TaxonomyGraph(conceptIds.size(), isaStatements.size()); @@ -130,21 +129,34 @@ private static Taxonomy buildTaxonomy(RevisionSearcher searcher, SnomedOWLExpres } } - private static TaxonomyGraphStatus updateTaxonomy(RevisionSearcher searcher, SnomedOWLExpressionConverter expressionConverter, StagingArea staging, TaxonomyGraph graphToUpdate, String characteristicTypeId) { + private static TaxonomyGraphStatus updateTaxonomy(RevisionSearcher searcher, + SnomedOWLExpressionConverter expressionConverter, + StagingArea staging, + TaxonomyGraph graphToUpdate, + String characteristicTypeId) throws IOException { + LOGGER.trace("Processing changes taxonomic information."); staging.getNewObjects(SnomedRelationshipIndexEntry.class) .filter(relationship -> characteristicTypeId.equals(relationship.getCharacteristicTypeId())) .forEach(newRelationship -> updateEdge(newRelationship, graphToUpdate)); + final Set relationshipsToExcludeFromReactivatedConcepts = newHashSet(); + staging.getChangedRevisions(SnomedRelationshipIndexEntry.class) .map(diff -> (SnomedRelationshipIndexEntry) diff.newRevision) .filter(relationship -> characteristicTypeId.equals(relationship.getCharacteristicTypeId())) - .forEach(dirtyRelationship -> updateEdge(dirtyRelationship, graphToUpdate)); + .forEach(dirtyRelationship -> { + relationshipsToExcludeFromReactivatedConcepts.add(dirtyRelationship.getId()); + updateEdge(dirtyRelationship, graphToUpdate); + }); staging.getRemovedObjects(SnomedRelationshipIndexEntry.class) .filter(relationship -> characteristicTypeId.equals(relationship.getCharacteristicTypeId())) - .forEach(relationship -> graphToUpdate.removeEdge(relationship.getId())); + .forEach(relationship -> { + relationshipsToExcludeFromReactivatedConcepts.add(relationship.getId()); + graphToUpdate.removeEdge(relationship.getId()); + }); if (Concepts.STATED_RELATIONSHIP.equals(characteristicTypeId)) { staging.getNewObjects(SnomedRefSetMemberIndexEntry.class) @@ -169,6 +181,8 @@ private static TaxonomyGraphStatus updateTaxonomy(RevisionSearcher searcher, Sno staging.getRemovedObjects(SnomedConceptDocument.class) .forEach(concept -> graphToUpdate.removeNode(concept.getId())); + final Set conceptWithPossibleMissingRelationships = newHashSet(); + staging.getChangedRevisions(SnomedConceptDocument.class, Collections.singleton(SnomedConceptDocument.Fields.ACTIVE)) .forEach(diff -> { final RevisionPropertyDiff propDiff = diff.getRevisionPropertyDiff(SnomedConceptDocument.Fields.ACTIVE); @@ -178,9 +192,31 @@ private static TaxonomyGraphStatus updateTaxonomy(RevisionSearcher searcher, Sno if (!oldValue && newValue) { // make sure the node is part of the new tree graphToUpdate.addNode(conceptId); + conceptWithPossibleMissingRelationships.add(conceptId); } }); + if (!conceptWithPossibleMissingRelationships.isEmpty()) { + Hits possibleMissingRelationships = searcher.search(Query.select(String[].class) + .from(SnomedRelationshipIndexEntry.class) + .fields(SnomedRelationshipIndexEntry.Fields.ID, SnomedRelationshipIndexEntry.Fields.SOURCE_ID, SnomedRelationshipIndexEntry.Fields.DESTINATION_ID) + .where(Expressions.builder() + .filter(SnomedRelationshipIndexEntry.Expressions.active()) + .filter(SnomedRelationshipIndexEntry.Expressions.characteristicTypeId(characteristicTypeId)) + .filter(SnomedRelationshipIndexEntry.Expressions.typeId(Concepts.IS_A)) + .filter(SnomedRelationshipIndexEntry.Expressions.sourceIds(conceptWithPossibleMissingRelationships)) + .mustNot(SnomedRelationshipIndexEntry.Expressions.ids(relationshipsToExcludeFromReactivatedConcepts)) + .build() + ) + .limit(Integer.MAX_VALUE) + .build()); + + for (String[] relationship : possibleMissingRelationships) { + graphToUpdate.addNode(relationship[2]); + graphToUpdate.addEdge(relationship[0], Long.parseLong(relationship[1]), new long[] { Long.parseLong(relationship[2]) }); + } + } + LOGGER.trace("Rebuilding taxonomic information based on the changes."); return graphToUpdate.update(); } diff --git a/snomed/com.b2international.snowowl.snomed.dsl/.project b/snomed/com.b2international.snowowl.snomed.dsl/.project deleted file mode 100644 index 52804ebb82e..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - com.b2international.snowowl.snomed.dsl - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/snomed/com.b2international.snowowl.snomed.dsl/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.dsl/META-INF/MANIFEST.MF deleted file mode 100644 index 780ca726b55..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/META-INF/MANIFEST.MF +++ /dev/null @@ -1,16 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Snow Owl ESCG Evaluator -Bundle-SymbolicName: com.b2international.snowowl.snomed.dsl;singleton:=true -Bundle-Version: 7.3.0.qualifier -Bundle-Vendor: B2i Healthcare -Bundle-RequiredExecutionEnvironment: JavaSE-11 -Require-Bundle: org.eclipse.emf.ecore;bundle-version="2.10.0", - org.eclipse.xtext;bundle-version="[2.18.0,2.19.0)";visibility:=reexport, - com.b2international.snowowl.datastore;visibility:=reexport, - com.b2international.snowowl.snomed.common;visibility:=reexport -Export-Package: com.b2international.snowowl.snomed.dsl.query,com.b2int - ernational.snowowl.snomed.dsl.query.ast,com.b2international.snowowl.s - nomed.dsl.query.queryast,com.b2international.snowowl.snomed.dsl.query - .queryast.impl,com.b2international.snowowl.snomed.dsl.query.queryast. - util,com.b2international.snowowl.snomed.dsl.query.walker diff --git a/snomed/com.b2international.snowowl.snomed.dsl/build.properties b/snomed/com.b2international.snowowl.snomed.dsl/build.properties deleted file mode 100644 index 211b0dc4318..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -source.. = src/ -output.. = target/classes/ -jars.compile.order = . -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - plugin.properties diff --git a/snomed/com.b2international.snowowl.snomed.dsl/plugin.properties b/snomed/com.b2international.snowowl.snomed.dsl/plugin.properties deleted file mode 100644 index bed053bf0ea..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/plugin.properties +++ /dev/null @@ -1,2 +0,0 @@ -pluginName = Query AST Model -providerName = B2i Healthcare diff --git a/snomed/com.b2international.snowowl.snomed.dsl/plugin.xml b/snomed/com.b2international.snowowl.snomed.dsl/plugin.xml deleted file mode 100644 index 9f8246e2ffa..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/plugin.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/snomed/com.b2international.snowowl.snomed.dsl/pom.xml b/snomed/com.b2international.snowowl.snomed.dsl/pom.xml deleted file mode 100644 index 7b87fb8984d..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 4.0.0 - - com.b2international.snowowl - snomed-parent - 7.3.0-SNAPSHOT - - com.b2international.snowowl.snomed.dsl - eclipse-plugin - diff --git a/snomed/com.b2international.snowowl.snomed.dsl/queryast.ecore b/snomed/com.b2international.snowowl.snomed.dsl/queryast.ecore deleted file mode 100644 index 2e7b980640b..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/queryast.ecore +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/snomed/com.b2international.snowowl.snomed.dsl/queryast.genmodel b/snomed/com.b2international.snowowl.snomed.dsl/queryast.genmodel deleted file mode 100644 index 27bcfc5ab9a..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/queryast.genmodel +++ /dev/null @@ -1,49 +0,0 @@ - - - queryast.ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ChainedQueryRewriter.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ChainedQueryRewriter.java deleted file mode 100644 index 3a9c21f845b..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ChainedQueryRewriter.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query; - -import java.util.List; - -public class ChainedQueryRewriter implements QueryRewriter { - - private List> rewriters; - - @Override - public RValue rewrite(RValue input) { - for(QueryRewriter rewriter: rewriters) { - input = rewriter.rewrite(input); - } - return input; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/GraphMLExportRewriter.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/GraphMLExportRewriter.java deleted file mode 100644 index 089da0ef2d0..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/GraphMLExportRewriter.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query; - -import java.io.IOException; -import java.io.Writer; - -import com.b2international.snowowl.snomed.dsl.query.ast.AndClause; -import com.b2international.snowowl.snomed.dsl.query.ast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.ast.BinaryRValue; -import com.b2international.snowowl.snomed.dsl.query.ast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.ast.NotClause; -import com.b2international.snowowl.snomed.dsl.query.ast.OrClause; -import com.b2international.snowowl.snomed.dsl.query.ast.RefSet; -import com.b2international.snowowl.snomed.dsl.query.ast.SubExpression; -import com.b2international.snowowl.snomed.dsl.query.ast.UnaryRValue; - -public class GraphMLExportRewriter implements QueryRewriter { - - Writer writer; - private int nodeCounter = 0; - - public GraphMLExportRewriter(Writer writer) { - this.writer = writer; - } - - @Override - public RValue rewrite(RValue input) { - - writeHead(); - - writeEdge(null, input, nodeCounter); - - writeTail(); - - return input; - } - - protected void writeEdge(RValue from, RValue to, int fromCounter) { - - int toCounter = writeNode(to); - - if(from != null) { - writeEdge("node" + fromCounter, "node" + toCounter); - } - } - - protected int writeNode(RValue node) { - - int myCounter = ++nodeCounter; - - String label = node.getClass().getSimpleName(); - if(node instanceof ConceptRef) { - String prefix = null; - ConceptRef conceptRef = (ConceptRef) node; - switch (conceptRef.getQuantifier()) { - case SELF: prefix = ""; break; - case ANY_SUBTYPE: prefix = "<"; break; - case SELF_AND_ANY_SUBTYPE: prefix = "<<"; break; - } - - label = prefix + conceptRef.getConceptId() + "\n" + conceptRef.getLabel(); - } else if(node instanceof RefSet) { - label = "^" + ((RefSet) node).getId(); - } - - writeNode("node" + myCounter, getColor(node), label); - - if(node instanceof UnaryRValue) { - UnaryRValue unary = (UnaryRValue) node; - writeEdge(node, unary.getValue(), myCounter); - - } else if(node instanceof BinaryRValue) { - BinaryRValue binary = (BinaryRValue) node; - writeEdge(node, binary.getLeft(), myCounter); - writeEdge(node, binary.getRight(), myCounter); - } - - return myCounter; - } - - protected String getColor(RValue node) { - if (node instanceof ConceptRef || node instanceof AttributeClause) { - return "#FFFF99"; - } - if (node instanceof RefSet) { - return "#FFCC66"; - } - if (node instanceof NotClause) { - return "#FF6666"; - } - if (node instanceof AndClause) { - return "#00FF66"; - } - if (node instanceof OrClause) { - return "#33CCFF"; - } - if (node instanceof SubExpression) { - return "#996699"; - } - return "#DDDDDD"; - } - - protected void writeHead() { - writeln(""); - writeln(""); - writeln(""); - writeln(""); - } - - protected void writeNode(String id, String color, String label) { - writeln(String.format("%s", id, color, label)); - } - - protected void writeEdge(String from, String to) { - writeln(String.format("", from, to)); - } - - protected void writeTail() { - writeln(""); - writeln(""); - try { - writer.flush(); - } catch (IOException e) { - throw new RuntimeException("Error while flushing output: ", e); - } - } - - protected void writeln(String line) { - try { - writer.write(line); - writer.write("\n"); - } catch (IOException e) { - throw new RuntimeException("Error while writing to output: ", e); - } - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/SyntaxErrorException.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/SyntaxErrorException.java deleted file mode 100644 index 04c62768072..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/SyntaxErrorException.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query; - -import java.util.List; - -import org.eclipse.xtext.nodemodel.INode; - -import com.google.common.base.Function; -import com.google.common.base.Joiner; -import com.google.common.collect.Iterables; -import com.google.common.collect.Lists; - -public class SyntaxErrorException extends RuntimeException { - - private static final long serialVersionUID = -109709128128071291L; - - private final List syntaxErrors; - - public SyntaxErrorException(final Iterable syntaxErrors) { - super("Syntax error"); - this.syntaxErrors = Lists.newArrayList(syntaxErrors); - } - - public List getSyntaxErrors() { - return syntaxErrors; - } - - /* - * (non-Javadoc) - * @see java.lang.Throwable#getMessage() - */ - @Override - public String getMessage() { - return Joiner.on("\n").join(Iterables.transform(syntaxErrors, new Function() { - @Override public String apply(final INode node) { - return node.getSyntaxErrorMessage().getMessage(); - } - })); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/AndClause.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/AndClause.java deleted file mode 100644 index cbf9ae93542..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/AndClause.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.ast; - -public class AndClause extends BinaryRValue { - - public AndClause() { - super(); - } - - public AndClause(RValue lValue, RValue rValue) { - super(lValue, rValue); - } - - @Override - protected void appendLeftRightSeparatorForToString(StringBuilder buf) { - buf.append(" AND "); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/AttributeClause.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/AttributeClause.java deleted file mode 100644 index 70f3aadb020..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/AttributeClause.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.ast; - - -public class AttributeClause extends BinaryRValue { - - public AttributeClause() { - } - - public AttributeClause(RValue predicate, RValue rValue) { - super(predicate, rValue); - } - - public StringBuilder toString(StringBuilder buf) { - buf.append("Clause {"); - super.toString(buf); - buf.append("}"); - - return buf; - } - - @Override - protected void appendLeftRightSeparatorForToString(StringBuilder buf) { - buf.append("="); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/BinaryRValue.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/BinaryRValue.java deleted file mode 100644 index 2b26b50debe..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/BinaryRValue.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.ast; - -public abstract class BinaryRValue extends RValue { - - private L left; - private R right; - - public BinaryRValue() { - } - public BinaryRValue(L left, R right) { - this.left = left; - this.right = right; - } - - public L getLeft() { - return left; - } - public void setLeft(L left) { - this.left = left; - } - - public R getRight() { - return right; - } - public void setRight(R right) { - this.right = right; - } - - @Override - public StringBuilder toString(StringBuilder buf) { - buf.append('('); - appendRValue(buf, left); - appendLeftRightSeparatorForToString(buf); - appendRValue(buf, right); - buf.append(')'); - return buf; - } - - protected abstract void appendLeftRightSeparatorForToString(StringBuilder buf); - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/ConceptRef.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/ConceptRef.java deleted file mode 100644 index a1a6af4abc5..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/ConceptRef.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.ast; - -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; - - -public class ConceptRef extends RValue { - - public static enum Quantifier { - SELF, - ANY_SUBTYPE, - SELF_AND_ANY_SUBTYPE - } - - public static final ConceptRef PREDICATE_IS_A = new ConceptRef(Concepts.IS_A, "is a"); - - private String conceptId; - private String label; - private Quantifier quantifier; - - public ConceptRef() { - } - public ConceptRef(String conceptId, String label) { - this(conceptId, label, Quantifier.SELF); - } - - public ConceptRef(String conceptId, String label, Quantifier quantifier) { - this.conceptId = conceptId; - this.label = label; - this.quantifier = quantifier; - } - - public String getConceptId() { - return conceptId; - } - public void setConceptId(String conceptId) { - this.conceptId = conceptId; - } - - public String getLabel() { - return label; - } - public void setLabel(String label) { - this.label = label; - } - - public Quantifier getQuantifier() { - return quantifier; - } - public void setQuantifier(Quantifier quantifier) { - this.quantifier = quantifier; - } - - public StringBuilder toString(StringBuilder buf) { - buf.append(" "); - switch (quantifier) { - case SELF: break; - case ANY_SUBTYPE: buf.append("<"); break; - case SELF_AND_ANY_SUBTYPE: buf.append("<<"); break; - } - buf.append(conceptId); - buf.append("["); - buf.append(label); - buf.append("]"); - return buf; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/NotClause.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/NotClause.java deleted file mode 100644 index 8861968c38f..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/NotClause.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.ast; - -public class NotClause extends UnaryRValue { - - public NotClause() { - super(); - } - - public NotClause(RValue value) { - super(value); - } - - @Override - public StringBuilder toString(StringBuilder buf) { - buf.append(" NOT "); - appendRValue(buf, getValue()); - return buf; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/NumericDataClause.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/NumericDataClause.java deleted file mode 100644 index cf2e1e0bf47..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/NumericDataClause.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.ast; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -public class NumericDataClause extends RValue { - - public enum Operator { - EQUALS("=="), - LESS_THAN("<"), - GREATER_THAN(">"), - LESS_EQUALS_TO("<="), - GREATER_EQUALS_TO(">="), - NOT_EQUALS("!="); - - private static final Operator[] VALUES_ARRAY = new Operator[] { - EQUALS, - LESS_THAN, - GREATER_THAN, - LESS_EQUALS_TO, - GREATER_EQUALS_TO, - NOT_EQUALS, }; - - public static final List VALUES = Collections - .unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - public static Operator get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - Operator result = VALUES_ARRAY[i]; - if (result.getLiteral().equals(literal)) { - return result; - } - } - return null; - } - - private String literal; - - private Operator(String literal) { - this.literal = literal; - } - - public String getLiteral() { - return literal; - } - } - - private RValue concepts; - private NumericDataClause.Operator operator; - private double value; - private String unit; - - public NumericDataClause(RValue concepts, Operator operator, double value, String unitType) { - this.concepts = concepts; - this.operator = operator; - this.value = value; - this.unit = unitType; - } - - public Operator getOperator() { - return operator; - } - - public void setOperator(Operator operator) { - this.operator = operator; - } - - public double getValue() { - return value; - } - - public void setValue(int value) { - this.value = value; - } - - public RValue getConcepts() { - return concepts; - } - - public void setConcepts(RValue concepts) { - this.concepts = concepts; - } - - public String getUnit() { - return unit; - } - - public void setUnit(String unit) { - this.unit = unit; - } - - @Override - public StringBuilder toString(StringBuilder buf) { - buf.append("HAS STRENGTH"); - buf.append(" "); - buf.append(operator.getLiteral()); - buf.append(" "); - buf.append(value); - buf.append(" "); - buf.append(unit); - return buf; - } - - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/NumericDataGroupClause.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/NumericDataGroupClause.java deleted file mode 100644 index 6b3529323ff..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/NumericDataGroupClause.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.ast; - -public class NumericDataGroupClause extends RValue { - - private RValue concepts; - private NumericDataClause numericData; - private RValue substances; - - public NumericDataGroupClause(RValue concepts, NumericDataClause numericData, RValue substances) { - super(); - this.concepts = concepts; - this.numericData = numericData; - this.substances = substances; - } - - public RValue getConcepts() { - return concepts; - } - - public void setConcepts(RValue concepts) { - this.concepts = concepts; - } - - public NumericDataClause getNumericData() { - return numericData; - } - - public void setNumericData(NumericDataClause numericData) { - this.numericData = numericData; - } - - public RValue getSubstances() { - return substances; - } - - public void setSubstances(RValue substances) { - this.substances = substances; - } - - @Override - public StringBuilder toString(StringBuilder buf) { - buf.append("NumericDataGroup: "); - buf.append(" "); - buf.append(substances); - buf.append(" -> "); - buf.append(numericData); - return buf; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/OrClause.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/OrClause.java deleted file mode 100644 index 95636488224..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/OrClause.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.ast; - -public class OrClause extends BinaryRValue { - - public OrClause() { - super(); - } - - public OrClause(RValue lValue, RValue rValue) { - super(lValue, rValue); - } - - @Override - protected void appendLeftRightSeparatorForToString(StringBuilder buf) { - buf.append(" OR "); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/RValue.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/RValue.java deleted file mode 100644 index 4a5a6dad703..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/RValue.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.ast; - -import java.io.Serializable; - -public abstract class RValue implements com.b2international.snowowl.snomed.dsl.query.RValue, Serializable { - - private static final long serialVersionUID = -8687445975417678461L; - - - public abstract StringBuilder toString(StringBuilder buf); - - public String toString() { - return toString(new StringBuilder()).toString(); - } - - - protected void appendRValue(StringBuilder buf, RValue rValue) { - if(rValue == null) { - buf.append("null"); - } else { - rValue.toString(buf); - } - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/RefSet.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/RefSet.java deleted file mode 100644 index ac2beb718d6..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/RefSet.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.ast; - -public class RefSet extends RValue { - - private String id; - - public RefSet() { - } - public RefSet(String id) { - this.id = id; - } - - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - - public StringBuilder toString(StringBuilder buf) { - buf.append(" ^"); - buf.append(id); - return buf; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/SubExpression.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/SubExpression.java deleted file mode 100644 index b4e6f3d2d2b..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/SubExpression.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.ast; - -public class SubExpression extends UnaryRValue { - - public SubExpression() { - super(); - } - public SubExpression(RValue subExpression) { - super(subExpression); - } - - @Override - public StringBuilder toString(StringBuilder buf) { - buf.append(" SubExpression { "); - appendRValue(buf, getValue()); - buf.append(" }"); - return buf; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/UnaryRValue.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/UnaryRValue.java deleted file mode 100644 index 85cd271b672..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/ast/UnaryRValue.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.ast; - -public abstract class UnaryRValue extends RValue { - - private T value; - - public UnaryRValue() { - } - public UnaryRValue(T value) { - this.value = value; - } - - public T getValue() { - return value; - } - - public void setValue(T value) { - this.value = value; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/AttributeClause.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/AttributeClause.java deleted file mode 100644 index cccb0ad7511..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/AttributeClause.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast; - - -/** - * - * A representation of the model object 'Attribute Clause'. - * - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getAttributeClause() - * @model - * @generated - */ -public interface AttributeClause extends BinaryRValue { -} // AttributeClause \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/AttributeClauseGroup.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/AttributeClauseGroup.java deleted file mode 100644 index 5a02022a116..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/AttributeClauseGroup.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast; - - -/** - * - * A representation of the model object 'Attribute Clause Group'. - * - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getAttributeClauseGroup() - * @model - * @generated - */ -public interface AttributeClauseGroup extends UnaryRValue { -} // AttributeClauseGroup \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/BinaryRValue.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/BinaryRValue.java deleted file mode 100644 index c1ac1347fde..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/BinaryRValue.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast; - - -/** - * - * A representation of the model object 'Binary RValue'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue#getLeft Left}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue#getRight Right}
      • - *
      - *

      - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getBinaryRValue() - * @model abstract="true" - * @generated - */ -public interface BinaryRValue extends RValue { - /** - * Returns the value of the 'Left' containment reference. - * - *

      - * If the meaning of the 'Left' containment reference isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Left' containment reference. - * @see #setLeft(RValue) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getBinaryRValue_Left() - * @model containment="true" required="true" - * @generated - */ - RValue getLeft(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue#getLeft Left}' containment reference. - * - * - * @param value the new value of the 'Left' containment reference. - * @see #getLeft() - * @generated - */ - void setLeft(RValue value); - - /** - * Returns the value of the 'Right' containment reference. - * - *

      - * If the meaning of the 'Right' containment reference isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Right' containment reference. - * @see #setRight(RValue) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getBinaryRValue_Right() - * @model containment="true" required="true" - * @generated - */ - RValue getRight(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue#getRight Right}' containment reference. - * - * - * @param value the new value of the 'Right' containment reference. - * @see #getRight() - * @generated - */ - void setRight(RValue value); - -} // BinaryRValue \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/ConceptRef.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/ConceptRef.java deleted file mode 100644 index c3d1321af21..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/ConceptRef.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast; - - -/** - * - * A representation of the model object 'Concept Ref'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef#getQuantifier Quantifier}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef#getConceptId Concept Id}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef#getLabel Label}
      • - *
      - *

      - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getConceptRef() - * @model - * @generated - */ -public interface ConceptRef extends RValue { - /** - * Returns the value of the 'Quantifier' attribute. - * The literals are from the enumeration {@link com.b2international.snowowl.snomed.dsl.query.queryast.SubsumptionQuantifier}. - * - *

      - * If the meaning of the 'Quantifier' attribute isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Quantifier' attribute. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.SubsumptionQuantifier - * @see #setQuantifier(SubsumptionQuantifier) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getConceptRef_Quantifier() - * @model required="true" - * @generated - */ - SubsumptionQuantifier getQuantifier(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef#getQuantifier Quantifier}' attribute. - * - * - * @param value the new value of the 'Quantifier' attribute. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.SubsumptionQuantifier - * @see #getQuantifier() - * @generated - */ - void setQuantifier(SubsumptionQuantifier value); - - /** - * Returns the value of the 'Concept Id' attribute. - * - *

      - * If the meaning of the 'Concept Id' attribute isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Concept Id' attribute. - * @see #setConceptId(String) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getConceptRef_ConceptId() - * @model required="true" - * @generated - */ - String getConceptId(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef#getConceptId Concept Id}' attribute. - * - * - * @param value the new value of the 'Concept Id' attribute. - * @see #getConceptId() - * @generated - */ - void setConceptId(String value); - - /** - * Returns the value of the 'Label' attribute. - * - *

      - * If the meaning of the 'Label' attribute isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Label' attribute. - * @see #setLabel(String) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getConceptRef_Label() - * @model - * @generated - */ - String getLabel(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef#getLabel Label}' attribute. - * - * - * @param value the new value of the 'Label' attribute. - * @see #getLabel() - * @generated - */ - void setLabel(String value); - -} // ConceptRef \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/NumericDataClause.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/NumericDataClause.java deleted file mode 100644 index 72b5d7d1f5d..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/NumericDataClause.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast; - - -/** - * - * A representation of the model object 'Numeric Data Clause'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getConcepts Concepts}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getOperator Operator}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getValue Value}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getUnitType Unit Type}
      • - *
      - *

      - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getNumericDataClause() - * @model - * @generated - */ -public interface NumericDataClause extends RValue { - /** - * Returns the value of the 'Operator' attribute. - * - *

      - * If the meaning of the 'Operator' attribute isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Operator' attribute. - * @see #setOperator(String) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getNumericDataClause_Operator() - * @model required="true" - * @generated - */ - String getOperator(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getOperator Operator}' attribute. - * - * - * @param value the new value of the 'Operator' attribute. - * @see #getOperator() - * @generated - */ - void setOperator(String value); - - /** - * Returns the value of the 'Value' attribute. - * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Value' attribute. - * @see #setValue(int) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getNumericDataClause_Value() - * @model required="true" - * @generated - */ - int getValue(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getValue Value}' attribute. - * - * - * @param value the new value of the 'Value' attribute. - * @see #getValue() - * @generated - */ - void setValue(int value); - - /** - * Returns the value of the 'Unit Type' attribute. - * - *

      - * If the meaning of the 'Unit Type' attribute isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Unit Type' attribute. - * @see #setUnitType(String) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getNumericDataClause_UnitType() - * @model required="true" - * @generated - */ - String getUnitType(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getUnitType Unit Type}' attribute. - * - * - * @param value the new value of the 'Unit Type' attribute. - * @see #getUnitType() - * @generated - */ - void setUnitType(String value); - - /** - * Returns the value of the 'Concepts' reference. - * - *

      - * If the meaning of the 'Concepts' reference isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Concepts' reference. - * @see #setConcepts(RValue) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getNumericDataClause_Concepts() - * @model - * @generated - */ - RValue getConcepts(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getConcepts Concepts}' reference. - * - * - * @param value the new value of the 'Concepts' reference. - * @see #getConcepts() - * @generated - */ - void setConcepts(RValue value); - -} // NumericDataClause \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/NumericDataGroupClause.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/NumericDataGroupClause.java deleted file mode 100644 index 903a5bf91da..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/NumericDataGroupClause.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast; - - -/** - * - * A representation of the model object 'Numeric Data Group Clause'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause#getConcepts Concepts}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause#getNumericData Numeric Data}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause#getSubstance Substance}
      • - *
      - *

      - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getNumericDataGroupClause() - * @model - * @generated - */ -public interface NumericDataGroupClause extends RValue { - /** - * Returns the value of the 'Concepts' reference. - * - *

      - * If the meaning of the 'Concepts' reference isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Concepts' reference. - * @see #setConcepts(RValue) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getNumericDataGroupClause_Concepts() - * @model - * @generated - */ - RValue getConcepts(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause#getConcepts Concepts}' reference. - * - * - * @param value the new value of the 'Concepts' reference. - * @see #getConcepts() - * @generated - */ - void setConcepts(RValue value); - - /** - * Returns the value of the 'Numeric Data' reference. - * - *

      - * If the meaning of the 'Numeric Data' reference isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Numeric Data' reference. - * @see #setNumericData(NumericDataClause) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getNumericDataGroupClause_NumericData() - * @model required="true" - * @generated - */ - NumericDataClause getNumericData(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause#getNumericData Numeric Data}' reference. - * - * - * @param value the new value of the 'Numeric Data' reference. - * @see #getNumericData() - * @generated - */ - void setNumericData(NumericDataClause value); - - /** - * Returns the value of the 'Substance' reference. - * - *

      - * If the meaning of the 'Substance' reference isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Substance' reference. - * @see #setSubstance(RValue) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getNumericDataGroupClause_Substance() - * @model required="true" - * @generated - */ - RValue getSubstance(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause#getSubstance Substance}' reference. - * - * - * @param value the new value of the 'Substance' reference. - * @see #getSubstance() - * @generated - */ - void setSubstance(RValue value); - -} // NumericDataGroupClause \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/RValue.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/RValue.java deleted file mode 100644 index 8a7f792abd6..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/RValue.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'RValue'. - * - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getRValue() - * @model abstract="true" - * @generated NOT - */ -public interface RValue extends EObject, com.b2international.snowowl.snomed.dsl.query.RValue { - - public StringBuilder toString(StringBuilder buf); - -} // RValue \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/RefSet.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/RefSet.java deleted file mode 100644 index 882d6d92dc9..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/RefSet.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast; - - -/** - * - * A representation of the model object 'Ref Set'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.RefSet#getId Id}
      • - *
      - *

      - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getRefSet() - * @model - * @generated - */ -public interface RefSet extends RValue { - - /** - * Returns the value of the 'Id' attribute. - * - *

      - * If the meaning of the 'Id' attribute isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Id' attribute. - * @see #setId(String) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getRefSet_Id() - * @model required="true" - * @generated - */ - String getId(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.RefSet#getId Id}' attribute. - * - * - * @param value the new value of the 'Id' attribute. - * @see #getId() - * @generated - */ - void setId(String value); -} // RefSet \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/SubExpression.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/SubExpression.java deleted file mode 100644 index a5514230145..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/SubExpression.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast; - - -/** - * - * A representation of the model object 'Sub Expression'. - * - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getSubExpression() - * @model - * @generated - */ -public interface SubExpression extends UnaryRValue { -} // SubExpression \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/SubsumptionQuantifier.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/SubsumptionQuantifier.java deleted file mode 100644 index b38542a4e84..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/SubsumptionQuantifier.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.Enumerator; - -/** - * - * A representation of the literals of the enumeration 'Subsumption Quantifier', - * and utility methods for working with them. - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getSubsumptionQuantifier() - * @model - * @generated - */ -public enum SubsumptionQuantifier implements Enumerator { - /** - * The 'SELF' literal object. - * - * - * @see #SELF_VALUE - * @generated - * @ordered - */ - SELF(0, "SELF", "SELF"), - - /** - * The 'ANY SUBTYPE' literal object. - * - * - * @see #ANY_SUBTYPE_VALUE - * @generated - * @ordered - */ - ANY_SUBTYPE(1, "ANY_SUBTYPE", "ANY_SUBTYPE"), - - /** - * The 'SELF AND ANY SUBTYPE' literal object. - * - * - * @see #SELF_AND_ANY_SUBTYPE_VALUE - * @generated - * @ordered - */ - SELF_AND_ANY_SUBTYPE(1, "SELF_AND_ANY_SUBTYPE", "SELF_AND_ANY_SUBTYPE"); - - /** - * The 'SELF' literal value. - * - *

      - * If the meaning of 'SELF' literal object isn't clear, - * there really should be more of a description here... - *

      - * - * @see #SELF - * @model - * @generated - * @ordered - */ - public static final int SELF_VALUE = 0; - - /** - * The 'ANY SUBTYPE' literal value. - * - *

      - * If the meaning of 'ANY SUBTYPE' literal object isn't clear, - * there really should be more of a description here... - *

      - * - * @see #ANY_SUBTYPE - * @model - * @generated - * @ordered - */ - public static final int ANY_SUBTYPE_VALUE = 1; - - /** - * The 'SELF AND ANY SUBTYPE' literal value. - * - *

      - * If the meaning of 'SELF AND ANY SUBTYPE' literal object isn't clear, - * there really should be more of a description here... - *

      - * - * @see #SELF_AND_ANY_SUBTYPE - * @model - * @generated - * @ordered - */ - public static final int SELF_AND_ANY_SUBTYPE_VALUE = 1; - - /** - * An array of all the 'Subsumption Quantifier' enumerators. - * - * - * @generated - */ - private static final SubsumptionQuantifier[] VALUES_ARRAY = - new SubsumptionQuantifier[] { - SELF, - ANY_SUBTYPE, - SELF_AND_ANY_SUBTYPE, - }; - - /** - * A public read-only list of all the 'Subsumption Quantifier' enumerators. - * - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the 'Subsumption Quantifier' literal with the specified literal value. - * - * - * @generated - */ - public static SubsumptionQuantifier get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - SubsumptionQuantifier result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Subsumption Quantifier' literal with the specified name. - * - * - * @generated - */ - public static SubsumptionQuantifier getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - SubsumptionQuantifier result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Subsumption Quantifier' literal with the specified integer value. - * - * - * @generated - */ - public static SubsumptionQuantifier get(int value) { - switch (value) { - case SELF_VALUE: return SELF; - case ANY_SUBTYPE_VALUE: return ANY_SUBTYPE; - } - return null; - } - - /** - * - * - * @generated - */ - private final int value; - - /** - * - * - * @generated - */ - private final String name; - - /** - * - * - * @generated - */ - private final String literal; - - /** - * Only this class can construct instances. - * - * - * @generated - */ - private SubsumptionQuantifier(int value, String name, String literal) { - this.value = value; - this.name = name; - this.literal = literal; - } - - /** - * - * - * @generated - */ - public int getValue() { - return value; - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public String getLiteral() { - return literal; - } - - /** - * Returns the literal value of the enumerator, which is its string representation. - * - * - * @generated - */ - @Override - public String toString() { - return literal; - } - -} //SubsumptionQuantifier \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/UnaryRValue.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/UnaryRValue.java deleted file mode 100644 index 739e1bfab71..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/UnaryRValue.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast; - - -/** - * - * A representation of the model object 'Unary RValue'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.UnaryRValue#getValue Value}
      • - *
      - *

      - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getUnaryRValue() - * @model abstract="true" - * @generated - */ -public interface UnaryRValue extends RValue { - /** - * Returns the value of the 'Value' containment reference. - * - *

      - * If the meaning of the 'Value' containment reference isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Value' containment reference. - * @see #setValue(RValue) - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getUnaryRValue_Value() - * @model containment="true" required="true" - * @generated - */ - RValue getValue(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.UnaryRValue#getValue Value}' containment reference. - * - * - * @param value the new value of the 'Value' containment reference. - * @see #getValue() - * @generated - */ - void setValue(RValue value); - -} // UnaryRValue \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/ecoreastFactory.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/ecoreastFactory.java deleted file mode 100644 index 716679a9ef5..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/ecoreastFactory.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast; - -import org.eclipse.emf.ecore.EFactory; - -/** - * - * The Factory for the model. - * It provides a create method for each non-abstract class of the model. - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage - * @generated - */ -public interface ecoreastFactory extends EFactory { - /** - * The singleton instance of the factory. - * - * - * @generated - */ - ecoreastFactory eINSTANCE = com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastFactoryImpl.init(); - - /** - * Returns a new object of class 'Concept Ref'. - * - * - * @return a new object of class 'Concept Ref'. - * @generated - */ - ConceptRef createConceptRef(); - - /** - * Returns a new object of class 'Ref Set'. - * - * - * @return a new object of class 'Ref Set'. - * @generated - */ - RefSet createRefSet(); - - /** - * Returns a new object of class 'Not Clause'. - * - * - * @return a new object of class 'Not Clause'. - * @generated - */ - NotClause createNotClause(); - - /** - * Returns a new object of class 'Sub Expression'. - * - * - * @return a new object of class 'Sub Expression'. - * @generated - */ - SubExpression createSubExpression(); - - /** - * Returns a new object of class 'And Clause'. - * - * - * @return a new object of class 'And Clause'. - * @generated - */ - AndClause createAndClause(); - - /** - * Returns a new object of class 'Or Clause'. - * - * - * @return a new object of class 'Or Clause'. - * @generated - */ - OrClause createOrClause(); - - /** - * Returns a new object of class 'Attribute Clause'. - * - * - * @return a new object of class 'Attribute Clause'. - * @generated - */ - AttributeClause createAttributeClause(); - - /** - * Returns a new object of class 'Attribute Clause Group'. - * - * - * @return a new object of class 'Attribute Clause Group'. - * @generated - */ - AttributeClauseGroup createAttributeClauseGroup(); - - /** - * Returns a new object of class 'Numeric Data Clause'. - * - * - * @return a new object of class 'Numeric Data Clause'. - * @generated - */ - NumericDataClause createNumericDataClause(); - - /** - * Returns a new object of class 'Numeric Data Group Clause'. - * - * - * @return a new object of class 'Numeric Data Group Clause'. - * @generated - */ - NumericDataGroupClause createNumericDataGroupClause(); - - /** - * Returns the package supported by this factory. - * - * - * @return the package supported by this factory. - * @generated - */ - ecoreastPackage getecoreastPackage(); - -} //ecoreastFactory \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/ecoreastPackage.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/ecoreastPackage.java deleted file mode 100644 index 0442bb22231..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/ecoreastPackage.java +++ /dev/null @@ -1,1107 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -/** - * - * The Package for the model. - * It contains accessors for the meta objects to represent - *
        - *
      • each class,
      • - *
      • each feature of each class,
      • - *
      • each enum,
      • - *
      • and each data type
      • - *
      - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastFactory - * @model kind="package" - * @generated - */ -public interface ecoreastPackage extends EPackage { - /** - * The package name. - * - * - * @generated - */ - String eNAME = "queryast"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://www.b2international.com/snowowl/dsl/ast"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "ast"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - ecoreastPackage eINSTANCE = com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl.init(); - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.RValueImpl RValue}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.RValueImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getRValue() - * @generated - */ - int RVALUE = 0; - - /** - * The number of structural features of the 'RValue' class. - * - * - * @generated - * @ordered - */ - int RVALUE_FEATURE_COUNT = 0; - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.UnaryRValueImpl Unary RValue}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.UnaryRValueImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getUnaryRValue() - * @generated - */ - int UNARY_RVALUE = 1; - - /** - * The feature id for the 'Value' containment reference. - * - * - * @generated - * @ordered - */ - int UNARY_RVALUE__VALUE = RVALUE_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Unary RValue' class. - * - * - * @generated - * @ordered - */ - int UNARY_RVALUE_FEATURE_COUNT = RVALUE_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.BinaryRValueImpl Binary RValue}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.BinaryRValueImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getBinaryRValue() - * @generated - */ - int BINARY_RVALUE = 2; - - /** - * The feature id for the 'Left' containment reference. - * - * - * @generated - * @ordered - */ - int BINARY_RVALUE__LEFT = RVALUE_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Right' containment reference. - * - * - * @generated - * @ordered - */ - int BINARY_RVALUE__RIGHT = RVALUE_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Binary RValue' class. - * - * - * @generated - * @ordered - */ - int BINARY_RVALUE_FEATURE_COUNT = RVALUE_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.ConceptRefImpl Concept Ref}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ConceptRefImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getConceptRef() - * @generated - */ - int CONCEPT_REF = 3; - - /** - * The feature id for the 'Quantifier' attribute. - * - * - * @generated - * @ordered - */ - int CONCEPT_REF__QUANTIFIER = RVALUE_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Concept Id' attribute. - * - * - * @generated - * @ordered - */ - int CONCEPT_REF__CONCEPT_ID = RVALUE_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Label' attribute. - * - * - * @generated - * @ordered - */ - int CONCEPT_REF__LABEL = RVALUE_FEATURE_COUNT + 2; - - /** - * The number of structural features of the 'Concept Ref' class. - * - * - * @generated - * @ordered - */ - int CONCEPT_REF_FEATURE_COUNT = RVALUE_FEATURE_COUNT + 3; - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.RefSetImpl Ref Set}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.RefSetImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getRefSet() - * @generated - */ - int REF_SET = 4; - - /** - * The feature id for the 'Id' attribute. - * - * - * @generated - * @ordered - */ - int REF_SET__ID = RVALUE_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Ref Set' class. - * - * - * @generated - * @ordered - */ - int REF_SET_FEATURE_COUNT = RVALUE_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.NotClauseImpl Not Clause}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.NotClauseImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getNotClause() - * @generated - */ - int NOT_CLAUSE = 5; - - /** - * The feature id for the 'Value' containment reference. - * - * - * @generated - * @ordered - */ - int NOT_CLAUSE__VALUE = UNARY_RVALUE__VALUE; - - /** - * The number of structural features of the 'Not Clause' class. - * - * - * @generated - * @ordered - */ - int NOT_CLAUSE_FEATURE_COUNT = UNARY_RVALUE_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.SubExpressionImpl Sub Expression}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.SubExpressionImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getSubExpression() - * @generated - */ - int SUB_EXPRESSION = 6; - - /** - * The feature id for the 'Value' containment reference. - * - * - * @generated - * @ordered - */ - int SUB_EXPRESSION__VALUE = UNARY_RVALUE__VALUE; - - /** - * The number of structural features of the 'Sub Expression' class. - * - * - * @generated - * @ordered - */ - int SUB_EXPRESSION_FEATURE_COUNT = UNARY_RVALUE_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.AndClauseImpl And Clause}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.AndClauseImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getAndClause() - * @generated - */ - int AND_CLAUSE = 7; - - /** - * The feature id for the 'Left' containment reference. - * - * - * @generated - * @ordered - */ - int AND_CLAUSE__LEFT = BINARY_RVALUE__LEFT; - - /** - * The feature id for the 'Right' containment reference. - * - * - * @generated - * @ordered - */ - int AND_CLAUSE__RIGHT = BINARY_RVALUE__RIGHT; - - /** - * The number of structural features of the 'And Clause' class. - * - * - * @generated - * @ordered - */ - int AND_CLAUSE_FEATURE_COUNT = BINARY_RVALUE_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.OrClauseImpl Or Clause}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.OrClauseImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getOrClause() - * @generated - */ - int OR_CLAUSE = 8; - - /** - * The feature id for the 'Left' containment reference. - * - * - * @generated - * @ordered - */ - int OR_CLAUSE__LEFT = BINARY_RVALUE__LEFT; - - /** - * The feature id for the 'Right' containment reference. - * - * - * @generated - * @ordered - */ - int OR_CLAUSE__RIGHT = BINARY_RVALUE__RIGHT; - - /** - * The number of structural features of the 'Or Clause' class. - * - * - * @generated - * @ordered - */ - int OR_CLAUSE_FEATURE_COUNT = BINARY_RVALUE_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.AttributeClauseImpl Attribute Clause}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.AttributeClauseImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getAttributeClause() - * @generated - */ - int ATTRIBUTE_CLAUSE = 9; - - /** - * The feature id for the 'Left' containment reference. - * - * - * @generated - * @ordered - */ - int ATTRIBUTE_CLAUSE__LEFT = BINARY_RVALUE__LEFT; - - /** - * The feature id for the 'Right' containment reference. - * - * - * @generated - * @ordered - */ - int ATTRIBUTE_CLAUSE__RIGHT = BINARY_RVALUE__RIGHT; - - /** - * The number of structural features of the 'Attribute Clause' class. - * - * - * @generated - * @ordered - */ - int ATTRIBUTE_CLAUSE_FEATURE_COUNT = BINARY_RVALUE_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.AttributeClauseGroupImpl Attribute Clause Group}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.AttributeClauseGroupImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getAttributeClauseGroup() - * @generated - */ - int ATTRIBUTE_CLAUSE_GROUP = 10; - - /** - * The feature id for the 'Value' containment reference. - * - * - * @generated - * @ordered - */ - int ATTRIBUTE_CLAUSE_GROUP__VALUE = UNARY_RVALUE__VALUE; - - /** - * The number of structural features of the 'Attribute Clause Group' class. - * - * - * @generated - * @ordered - */ - int ATTRIBUTE_CLAUSE_GROUP_FEATURE_COUNT = UNARY_RVALUE_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataClauseImpl Numeric Data Clause}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataClauseImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getNumericDataClause() - * @generated - */ - int NUMERIC_DATA_CLAUSE = 11; - - /** - * The feature id for the 'Concepts' reference. - * - * - * @generated - * @ordered - */ - int NUMERIC_DATA_CLAUSE__CONCEPTS = RVALUE_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Operator' attribute. - * - * - * @generated - * @ordered - */ - int NUMERIC_DATA_CLAUSE__OPERATOR = RVALUE_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Value' attribute. - * - * - * @generated - * @ordered - */ - int NUMERIC_DATA_CLAUSE__VALUE = RVALUE_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Unit Type' attribute. - * - * - * @generated - * @ordered - */ - int NUMERIC_DATA_CLAUSE__UNIT_TYPE = RVALUE_FEATURE_COUNT + 3; - - /** - * The number of structural features of the 'Numeric Data Clause' class. - * - * - * @generated - * @ordered - */ - int NUMERIC_DATA_CLAUSE_FEATURE_COUNT = RVALUE_FEATURE_COUNT + 4; - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataGroupClauseImpl Numeric Data Group Clause}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataGroupClauseImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getNumericDataGroupClause() - * @generated - */ - int NUMERIC_DATA_GROUP_CLAUSE = 12; - - /** - * The feature id for the 'Concepts' reference. - * - * - * @generated - * @ordered - */ - int NUMERIC_DATA_GROUP_CLAUSE__CONCEPTS = RVALUE_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Numeric Data' reference. - * - * - * @generated - * @ordered - */ - int NUMERIC_DATA_GROUP_CLAUSE__NUMERIC_DATA = RVALUE_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Substance' reference. - * - * - * @generated - * @ordered - */ - int NUMERIC_DATA_GROUP_CLAUSE__SUBSTANCE = RVALUE_FEATURE_COUNT + 2; - - /** - * The number of structural features of the 'Numeric Data Group Clause' class. - * - * - * @generated - * @ordered - */ - int NUMERIC_DATA_GROUP_CLAUSE_FEATURE_COUNT = RVALUE_FEATURE_COUNT + 3; - - /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.SubsumptionQuantifier Subsumption Quantifier}' enum. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.SubsumptionQuantifier - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getSubsumptionQuantifier() - * @generated - */ - int SUBSUMPTION_QUANTIFIER = 13; - - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.RValue RValue}'. - * - * - * @return the meta object for class 'RValue'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.RValue - * @generated - */ - EClass getRValue(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.UnaryRValue Unary RValue}'. - * - * - * @return the meta object for class 'Unary RValue'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.UnaryRValue - * @generated - */ - EClass getUnaryRValue(); - - /** - * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.dsl.query.queryast.UnaryRValue#getValue Value}'. - * - * - * @return the meta object for the containment reference 'Value'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.UnaryRValue#getValue() - * @see #getUnaryRValue() - * @generated - */ - EReference getUnaryRValue_Value(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue Binary RValue}'. - * - * - * @return the meta object for class 'Binary RValue'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue - * @generated - */ - EClass getBinaryRValue(); - - /** - * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue#getLeft Left}'. - * - * - * @return the meta object for the containment reference 'Left'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue#getLeft() - * @see #getBinaryRValue() - * @generated - */ - EReference getBinaryRValue_Left(); - - /** - * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue#getRight Right}'. - * - * - * @return the meta object for the containment reference 'Right'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue#getRight() - * @see #getBinaryRValue() - * @generated - */ - EReference getBinaryRValue_Right(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef Concept Ref}'. - * - * - * @return the meta object for class 'Concept Ref'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef - * @generated - */ - EClass getConceptRef(); - - /** - * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef#getQuantifier Quantifier}'. - * - * - * @return the meta object for the attribute 'Quantifier'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef#getQuantifier() - * @see #getConceptRef() - * @generated - */ - EAttribute getConceptRef_Quantifier(); - - /** - * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef#getConceptId Concept Id}'. - * - * - * @return the meta object for the attribute 'Concept Id'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef#getConceptId() - * @see #getConceptRef() - * @generated - */ - EAttribute getConceptRef_ConceptId(); - - /** - * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef#getLabel Label}'. - * - * - * @return the meta object for the attribute 'Label'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef#getLabel() - * @see #getConceptRef() - * @generated - */ - EAttribute getConceptRef_Label(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.RefSet Ref Set}'. - * - * - * @return the meta object for class 'Ref Set'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.RefSet - * @generated - */ - EClass getRefSet(); - - /** - * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.dsl.query.queryast.RefSet#getId Id}'. - * - * - * @return the meta object for the attribute 'Id'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.RefSet#getId() - * @see #getRefSet() - * @generated - */ - EAttribute getRefSet_Id(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NotClause Not Clause}'. - * - * - * @return the meta object for class 'Not Clause'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.NotClause - * @generated - */ - EClass getNotClause(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression Sub Expression}'. - * - * - * @return the meta object for class 'Sub Expression'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression - * @generated - */ - EClass getSubExpression(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.AndClause And Clause}'. - * - * - * @return the meta object for class 'And Clause'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.AndClause - * @generated - */ - EClass getAndClause(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.OrClause Or Clause}'. - * - * - * @return the meta object for class 'Or Clause'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.OrClause - * @generated - */ - EClass getOrClause(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause Attribute Clause}'. - * - * - * @return the meta object for class 'Attribute Clause'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause - * @generated - */ - EClass getAttributeClause(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup Attribute Clause Group}'. - * - * - * @return the meta object for class 'Attribute Clause Group'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup - * @generated - */ - EClass getAttributeClauseGroup(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause Numeric Data Clause}'. - * - * - * @return the meta object for class 'Numeric Data Clause'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause - * @generated - */ - EClass getNumericDataClause(); - - /** - * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getOperator Operator}'. - * - * - * @return the meta object for the attribute 'Operator'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getOperator() - * @see #getNumericDataClause() - * @generated - */ - EAttribute getNumericDataClause_Operator(); - - /** - * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getValue Value}'. - * - * - * @return the meta object for the attribute 'Value'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getValue() - * @see #getNumericDataClause() - * @generated - */ - EAttribute getNumericDataClause_Value(); - - /** - * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getUnitType Unit Type}'. - * - * - * @return the meta object for the attribute 'Unit Type'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getUnitType() - * @see #getNumericDataClause() - * @generated - */ - EAttribute getNumericDataClause_UnitType(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause Numeric Data Group Clause}'. - * - * - * @return the meta object for class 'Numeric Data Group Clause'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause - * @generated - */ - EClass getNumericDataGroupClause(); - - /** - * Returns the meta object for the reference '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause#getConcepts Concepts}'. - * - * - * @return the meta object for the reference 'Concepts'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause#getConcepts() - * @see #getNumericDataGroupClause() - * @generated - */ - EReference getNumericDataGroupClause_Concepts(); - - /** - * Returns the meta object for the reference '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause#getNumericData Numeric Data}'. - * - * - * @return the meta object for the reference 'Numeric Data'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause#getNumericData() - * @see #getNumericDataGroupClause() - * @generated - */ - EReference getNumericDataGroupClause_NumericData(); - - /** - * Returns the meta object for the reference '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause#getSubstance Substance}'. - * - * - * @return the meta object for the reference 'Substance'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause#getSubstance() - * @see #getNumericDataGroupClause() - * @generated - */ - EReference getNumericDataGroupClause_Substance(); - - /** - * Returns the meta object for the reference '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getConcepts Concepts}'. - * - * - * @return the meta object for the reference 'Concepts'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause#getConcepts() - * @see #getNumericDataClause() - * @generated - */ - EReference getNumericDataClause_Concepts(); - - /** - * Returns the meta object for enum '{@link com.b2international.snowowl.snomed.dsl.query.queryast.SubsumptionQuantifier Subsumption Quantifier}'. - * - * - * @return the meta object for enum 'Subsumption Quantifier'. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.SubsumptionQuantifier - * @generated - */ - EEnum getSubsumptionQuantifier(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - ecoreastFactory getecoreastFactory(); - - /** - * - * Defines literals for the meta objects that represent - *
        - *
      • each class,
      • - *
      • each feature of each class,
      • - *
      • each enum,
      • - *
      • and each data type
      • - *
      - * - * @generated - */ - interface Literals { - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.RValueImpl RValue}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.RValueImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getRValue() - * @generated - */ - EClass RVALUE = eINSTANCE.getRValue(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.UnaryRValueImpl Unary RValue}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.UnaryRValueImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getUnaryRValue() - * @generated - */ - EClass UNARY_RVALUE = eINSTANCE.getUnaryRValue(); - - /** - * The meta object literal for the 'Value' containment reference feature. - * - * - * @generated - */ - EReference UNARY_RVALUE__VALUE = eINSTANCE.getUnaryRValue_Value(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.BinaryRValueImpl Binary RValue}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.BinaryRValueImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getBinaryRValue() - * @generated - */ - EClass BINARY_RVALUE = eINSTANCE.getBinaryRValue(); - - /** - * The meta object literal for the 'Left' containment reference feature. - * - * - * @generated - */ - EReference BINARY_RVALUE__LEFT = eINSTANCE.getBinaryRValue_Left(); - - /** - * The meta object literal for the 'Right' containment reference feature. - * - * - * @generated - */ - EReference BINARY_RVALUE__RIGHT = eINSTANCE.getBinaryRValue_Right(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.ConceptRefImpl Concept Ref}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ConceptRefImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getConceptRef() - * @generated - */ - EClass CONCEPT_REF = eINSTANCE.getConceptRef(); - - /** - * The meta object literal for the 'Quantifier' attribute feature. - * - * - * @generated - */ - EAttribute CONCEPT_REF__QUANTIFIER = eINSTANCE.getConceptRef_Quantifier(); - - /** - * The meta object literal for the 'Concept Id' attribute feature. - * - * - * @generated - */ - EAttribute CONCEPT_REF__CONCEPT_ID = eINSTANCE.getConceptRef_ConceptId(); - - /** - * The meta object literal for the 'Label' attribute feature. - * - * - * @generated - */ - EAttribute CONCEPT_REF__LABEL = eINSTANCE.getConceptRef_Label(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.RefSetImpl Ref Set}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.RefSetImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getRefSet() - * @generated - */ - EClass REF_SET = eINSTANCE.getRefSet(); - - /** - * The meta object literal for the 'Id' attribute feature. - * - * - * @generated - */ - EAttribute REF_SET__ID = eINSTANCE.getRefSet_Id(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.NotClauseImpl Not Clause}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.NotClauseImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getNotClause() - * @generated - */ - EClass NOT_CLAUSE = eINSTANCE.getNotClause(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.SubExpressionImpl Sub Expression}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.SubExpressionImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getSubExpression() - * @generated - */ - EClass SUB_EXPRESSION = eINSTANCE.getSubExpression(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.AndClauseImpl And Clause}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.AndClauseImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getAndClause() - * @generated - */ - EClass AND_CLAUSE = eINSTANCE.getAndClause(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.OrClauseImpl Or Clause}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.OrClauseImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getOrClause() - * @generated - */ - EClass OR_CLAUSE = eINSTANCE.getOrClause(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.AttributeClauseImpl Attribute Clause}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.AttributeClauseImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getAttributeClause() - * @generated - */ - EClass ATTRIBUTE_CLAUSE = eINSTANCE.getAttributeClause(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.AttributeClauseGroupImpl Attribute Clause Group}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.AttributeClauseGroupImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getAttributeClauseGroup() - * @generated - */ - EClass ATTRIBUTE_CLAUSE_GROUP = eINSTANCE.getAttributeClauseGroup(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataClauseImpl Numeric Data Clause}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataClauseImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getNumericDataClause() - * @generated - */ - EClass NUMERIC_DATA_CLAUSE = eINSTANCE.getNumericDataClause(); - - /** - * The meta object literal for the 'Operator' attribute feature. - * - * - * @generated - */ - EAttribute NUMERIC_DATA_CLAUSE__OPERATOR = eINSTANCE.getNumericDataClause_Operator(); - - /** - * The meta object literal for the 'Value' attribute feature. - * - * - * @generated - */ - EAttribute NUMERIC_DATA_CLAUSE__VALUE = eINSTANCE.getNumericDataClause_Value(); - - /** - * The meta object literal for the 'Unit Type' attribute feature. - * - * - * @generated - */ - EAttribute NUMERIC_DATA_CLAUSE__UNIT_TYPE = eINSTANCE.getNumericDataClause_UnitType(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataGroupClauseImpl Numeric Data Group Clause}' class. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataGroupClauseImpl - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getNumericDataGroupClause() - * @generated - */ - EClass NUMERIC_DATA_GROUP_CLAUSE = eINSTANCE.getNumericDataGroupClause(); - - /** - * The meta object literal for the 'Concepts' reference feature. - * - * - * @generated - */ - EReference NUMERIC_DATA_GROUP_CLAUSE__CONCEPTS = eINSTANCE.getNumericDataGroupClause_Concepts(); - - /** - * The meta object literal for the 'Numeric Data' reference feature. - * - * - * @generated - */ - EReference NUMERIC_DATA_GROUP_CLAUSE__NUMERIC_DATA = eINSTANCE.getNumericDataGroupClause_NumericData(); - - /** - * The meta object literal for the 'Substance' reference feature. - * - * - * @generated - */ - EReference NUMERIC_DATA_GROUP_CLAUSE__SUBSTANCE = eINSTANCE.getNumericDataGroupClause_Substance(); - - /** - * The meta object literal for the 'Concepts' reference feature. - * - * - * @generated - */ - EReference NUMERIC_DATA_CLAUSE__CONCEPTS = eINSTANCE.getNumericDataClause_Concepts(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.dsl.query.queryast.SubsumptionQuantifier Subsumption Quantifier}' enum. - * - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.SubsumptionQuantifier - * @see com.b2international.snowowl.snomed.dsl.query.queryast.impl.ecoreastPackageImpl#getSubsumptionQuantifier() - * @generated - */ - EEnum SUBSUMPTION_QUANTIFIER = eINSTANCE.getSubsumptionQuantifier(); - - } - -} //ecoreastPackage \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/AndClauseImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/AndClauseImpl.java deleted file mode 100644 index 403bf9715aa..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/AndClauseImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -import org.eclipse.emf.ecore.EClass; - -import com.b2international.snowowl.snomed.dsl.query.queryast.AndClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model object 'And Clause'. - * - *

      - *

      - * - * @generated - */ -public class AndClauseImpl extends BinaryRValueImpl implements AndClause { - /** - * - * - * @generated - */ - protected AndClauseImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ecoreastPackage.Literals.AND_CLAUSE; - } - - @Override - protected void appendLeftRightSeparatorForToString(StringBuilder buf) { - buf.append(" AND "); - } -} //AndClauseImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/AttributeClauseGroupImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/AttributeClauseGroupImpl.java deleted file mode 100644 index ffe645f1408..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/AttributeClauseGroupImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -import org.eclipse.emf.ecore.EClass; - -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model object 'Attribute Clause Group'. - * - *

      - *

      - * - * @generated - */ -public class AttributeClauseGroupImpl extends UnaryRValueImpl implements AttributeClauseGroup { - /** - * - * - * @generated - */ - protected AttributeClauseGroupImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ecoreastPackage.Literals.ATTRIBUTE_CLAUSE_GROUP; - } - - @Override - public StringBuilder toString(StringBuilder buf) { - buf.append(" GROUP {"); - appendRValue(buf, value); - buf.append("}"); - return buf; - } - -} //AttributeClauseGroupImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/AttributeClauseImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/AttributeClauseImpl.java deleted file mode 100644 index 719b646fb7e..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/AttributeClauseImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -import org.eclipse.emf.ecore.EClass; - -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model object 'Attribute Clause'. - * - *

      - *

      - * - * @generated - */ -public class AttributeClauseImpl extends BinaryRValueImpl implements AttributeClause { - /** - * - * - * @generated - */ - protected AttributeClauseImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ecoreastPackage.Literals.ATTRIBUTE_CLAUSE; - } - - @Override - protected void appendLeftRightSeparatorForToString(StringBuilder buf) { - buf.append("="); - } -} //AttributeClauseImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/BinaryRValueImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/BinaryRValueImpl.java deleted file mode 100644 index b3d5e3ca0ea..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/BinaryRValueImpl.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -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.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model object 'Binary RValue'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.BinaryRValueImpl#getLeft Left}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.BinaryRValueImpl#getRight Right}
      • - *
      - *

      - * - * @generated - */ -public abstract class BinaryRValueImpl extends RValueImpl implements BinaryRValue { - /** - * The cached value of the '{@link #getLeft() Left}' containment reference. - * - * - * @see #getLeft() - * @generated - * @ordered - */ - protected RValue left; - - /** - * The cached value of the '{@link #getRight() Right}' containment reference. - * - * - * @see #getRight() - * @generated - * @ordered - */ - protected RValue right; - - /** - * - * - * @generated - */ - protected BinaryRValueImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ecoreastPackage.Literals.BINARY_RVALUE; - } - - /** - * - * - * @generated - */ - public RValue getLeft() { - return left; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetLeft(RValue newLeft, NotificationChain msgs) { - RValue oldLeft = left; - left = newLeft; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ecoreastPackage.BINARY_RVALUE__LEFT, oldLeft, newLeft); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setLeft(RValue newLeft) { - if (newLeft != left) { - NotificationChain msgs = null; - if (left != null) - msgs = ((InternalEObject)left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ecoreastPackage.BINARY_RVALUE__LEFT, null, msgs); - if (newLeft != null) - msgs = ((InternalEObject)newLeft).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ecoreastPackage.BINARY_RVALUE__LEFT, null, msgs); - msgs = basicSetLeft(newLeft, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.BINARY_RVALUE__LEFT, newLeft, newLeft)); - } - - /** - * - * - * @generated - */ - public RValue getRight() { - return right; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetRight(RValue newRight, NotificationChain msgs) { - RValue oldRight = right; - right = newRight; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ecoreastPackage.BINARY_RVALUE__RIGHT, oldRight, newRight); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setRight(RValue newRight) { - if (newRight != right) { - NotificationChain msgs = null; - if (right != null) - msgs = ((InternalEObject)right).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ecoreastPackage.BINARY_RVALUE__RIGHT, null, msgs); - if (newRight != null) - msgs = ((InternalEObject)newRight).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ecoreastPackage.BINARY_RVALUE__RIGHT, null, msgs); - msgs = basicSetRight(newRight, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.BINARY_RVALUE__RIGHT, newRight, newRight)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ecoreastPackage.BINARY_RVALUE__LEFT: - return basicSetLeft(null, msgs); - case ecoreastPackage.BINARY_RVALUE__RIGHT: - return basicSetRight(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ecoreastPackage.BINARY_RVALUE__LEFT: - return getLeft(); - case ecoreastPackage.BINARY_RVALUE__RIGHT: - return getRight(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ecoreastPackage.BINARY_RVALUE__LEFT: - setLeft((RValue)newValue); - return; - case ecoreastPackage.BINARY_RVALUE__RIGHT: - setRight((RValue)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ecoreastPackage.BINARY_RVALUE__LEFT: - setLeft((RValue)null); - return; - case ecoreastPackage.BINARY_RVALUE__RIGHT: - setRight((RValue)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ecoreastPackage.BINARY_RVALUE__LEFT: - return left != null; - case ecoreastPackage.BINARY_RVALUE__RIGHT: - return right != null; - } - return super.eIsSet(featureID); - } - - @Override - public StringBuilder toString(StringBuilder buf) { - buf.append('('); - appendRValue(buf, left); - appendLeftRightSeparatorForToString(buf); - appendRValue(buf, right); - buf.append(')'); - return buf; - } - - protected abstract void appendLeftRightSeparatorForToString(StringBuilder buf); - -} //BinaryRValueImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/ConceptRefImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/ConceptRefImpl.java deleted file mode 100644 index e429cb14734..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/ConceptRefImpl.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.SubsumptionQuantifier; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model object 'Concept Ref'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.ConceptRefImpl#getQuantifier Quantifier}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.ConceptRefImpl#getConceptId Concept Id}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.ConceptRefImpl#getLabel Label}
      • - *
      - *

      - * - * @generated - */ -public class ConceptRefImpl extends RValueImpl implements ConceptRef { - /** - * The default value of the '{@link #getQuantifier() Quantifier}' attribute. - * - * - * @see #getQuantifier() - * @generated - * @ordered - */ - protected static final SubsumptionQuantifier QUANTIFIER_EDEFAULT = SubsumptionQuantifier.SELF; - - /** - * The cached value of the '{@link #getQuantifier() Quantifier}' attribute. - * - * - * @see #getQuantifier() - * @generated - * @ordered - */ - protected SubsumptionQuantifier quantifier = QUANTIFIER_EDEFAULT; - - /** - * The default value of the '{@link #getConceptId() Concept Id}' attribute. - * - * - * @see #getConceptId() - * @generated - * @ordered - */ - protected static final String CONCEPT_ID_EDEFAULT = null; - - /** - * The cached value of the '{@link #getConceptId() Concept Id}' attribute. - * - * - * @see #getConceptId() - * @generated - * @ordered - */ - protected String conceptId = CONCEPT_ID_EDEFAULT; - - /** - * The default value of the '{@link #getLabel() Label}' attribute. - * - * - * @see #getLabel() - * @generated - * @ordered - */ - protected static final String LABEL_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLabel() Label}' attribute. - * - * - * @see #getLabel() - * @generated - * @ordered - */ - protected String label = LABEL_EDEFAULT; - - /** - * - * - * @generated - */ - protected ConceptRefImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ecoreastPackage.Literals.CONCEPT_REF; - } - - /** - * - * - * @generated - */ - public SubsumptionQuantifier getQuantifier() { - return quantifier; - } - - /** - * - * - * @generated - */ - public void setQuantifier(SubsumptionQuantifier newQuantifier) { - SubsumptionQuantifier oldQuantifier = quantifier; - quantifier = newQuantifier == null ? QUANTIFIER_EDEFAULT : newQuantifier; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.CONCEPT_REF__QUANTIFIER, oldQuantifier, quantifier)); - } - - /** - * - * - * @generated - */ - public String getConceptId() { - return conceptId; - } - - /** - * - * - * @generated - */ - public void setConceptId(String newConceptId) { - String oldConceptId = conceptId; - conceptId = newConceptId; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.CONCEPT_REF__CONCEPT_ID, oldConceptId, conceptId)); - } - - /** - * - * - * @generated - */ - public String getLabel() { - return label; - } - - /** - * - * - * @generated - */ - public void setLabel(String newLabel) { - String oldLabel = label; - label = newLabel; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.CONCEPT_REF__LABEL, oldLabel, label)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ecoreastPackage.CONCEPT_REF__QUANTIFIER: - return getQuantifier(); - case ecoreastPackage.CONCEPT_REF__CONCEPT_ID: - return getConceptId(); - case ecoreastPackage.CONCEPT_REF__LABEL: - return getLabel(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ecoreastPackage.CONCEPT_REF__QUANTIFIER: - setQuantifier((SubsumptionQuantifier)newValue); - return; - case ecoreastPackage.CONCEPT_REF__CONCEPT_ID: - setConceptId((String)newValue); - return; - case ecoreastPackage.CONCEPT_REF__LABEL: - setLabel((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ecoreastPackage.CONCEPT_REF__QUANTIFIER: - setQuantifier(QUANTIFIER_EDEFAULT); - return; - case ecoreastPackage.CONCEPT_REF__CONCEPT_ID: - setConceptId(CONCEPT_ID_EDEFAULT); - return; - case ecoreastPackage.CONCEPT_REF__LABEL: - setLabel(LABEL_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ecoreastPackage.CONCEPT_REF__QUANTIFIER: - return quantifier != QUANTIFIER_EDEFAULT; - case ecoreastPackage.CONCEPT_REF__CONCEPT_ID: - return CONCEPT_ID_EDEFAULT == null ? conceptId != null : !CONCEPT_ID_EDEFAULT.equals(conceptId); - case ecoreastPackage.CONCEPT_REF__LABEL: - return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label); - } - return super.eIsSet(featureID); - } - - public StringBuilder toString(StringBuilder buf) { - buf.append(" "); - switch (quantifier) { - case SELF: break; - case ANY_SUBTYPE: buf.append("<"); break; - case SELF_AND_ANY_SUBTYPE: buf.append("<<"); break; - } - buf.append(conceptId); - buf.append("["); - buf.append(label); - buf.append("]"); - return buf; - } - -} //ConceptRefImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/NotClauseImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/NotClauseImpl.java deleted file mode 100644 index df0bc29a156..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/NotClauseImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -import org.eclipse.emf.ecore.EClass; - -import com.b2international.snowowl.snomed.dsl.query.queryast.NotClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model object 'Not Clause'. - * - *

      - *

      - * - * @generated - */ -public class NotClauseImpl extends UnaryRValueImpl implements NotClause { - /** - * - * - * @generated - */ - protected NotClauseImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ecoreastPackage.Literals.NOT_CLAUSE; - } - - @Override - public StringBuilder toString(StringBuilder buf) { - buf.append(" NOT "); - appendRValue(buf, getValue()); - return buf; - } - -} //NotClauseImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/NumericDataClauseImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/NumericDataClauseImpl.java deleted file mode 100644 index ff91fe95a02..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/NumericDataClauseImpl.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model object 'Numeric Data Clause'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataClauseImpl#getConcepts Concepts}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataClauseImpl#getOperator Operator}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataClauseImpl#getValue Value}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataClauseImpl#getUnitType Unit Type}
      • - *
      - *

      - * - * @generated - */ -public class NumericDataClauseImpl extends RValueImpl implements NumericDataClause { - /** - * The cached value of the '{@link #getConcepts() Concepts}' reference. - * - * - * @see #getConcepts() - * @generated - * @ordered - */ - protected RValue concepts; - - /** - * The default value of the '{@link #getOperator() Operator}' attribute. - * - * - * @see #getOperator() - * @generated - * @ordered - */ - protected static final String OPERATOR_EDEFAULT = null; - - /** - * The cached value of the '{@link #getOperator() Operator}' attribute. - * - * - * @see #getOperator() - * @generated - * @ordered - */ - protected String operator = OPERATOR_EDEFAULT; - - /** - * The default value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected static final int VALUE_EDEFAULT = 0; - - /** - * The cached value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected int value = VALUE_EDEFAULT; - - /** - * The default value of the '{@link #getUnitType() Unit Type}' attribute. - * - * - * @see #getUnitType() - * @generated - * @ordered - */ - protected static final String UNIT_TYPE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getUnitType() Unit Type}' attribute. - * - * - * @see #getUnitType() - * @generated - * @ordered - */ - protected String unitType = UNIT_TYPE_EDEFAULT; - - /** - * - * - * @generated - */ - protected NumericDataClauseImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ecoreastPackage.Literals.NUMERIC_DATA_CLAUSE; - } - - /** - * - * - * @generated - */ - public String getOperator() { - return operator; - } - - /** - * - * - * @generated - */ - public void setOperator(String newOperator) { - String oldOperator = operator; - operator = newOperator; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.NUMERIC_DATA_CLAUSE__OPERATOR, oldOperator, operator)); - } - - /** - * - * - * @generated - */ - public int getValue() { - return value; - } - - /** - * - * - * @generated - */ - public void setValue(int newValue) { - int oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.NUMERIC_DATA_CLAUSE__VALUE, oldValue, value)); - } - - /** - * - * - * @generated - */ - public String getUnitType() { - return unitType; - } - - /** - * - * - * @generated - */ - public void setUnitType(String newUnitType) { - String oldUnitType = unitType; - unitType = newUnitType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.NUMERIC_DATA_CLAUSE__UNIT_TYPE, oldUnitType, unitType)); - } - - /** - * - * - * @generated - */ - public RValue getConcepts() { - if (concepts != null && concepts.eIsProxy()) { - InternalEObject oldConcepts = (InternalEObject)concepts; - concepts = (RValue)eResolveProxy(oldConcepts); - if (concepts != oldConcepts) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ecoreastPackage.NUMERIC_DATA_CLAUSE__CONCEPTS, oldConcepts, concepts)); - } - } - return concepts; - } - - /** - * - * - * @generated - */ - public RValue basicGetConcepts() { - return concepts; - } - - /** - * - * - * @generated - */ - public void setConcepts(RValue newConcepts) { - RValue oldConcepts = concepts; - concepts = newConcepts; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.NUMERIC_DATA_CLAUSE__CONCEPTS, oldConcepts, concepts)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ecoreastPackage.NUMERIC_DATA_CLAUSE__CONCEPTS: - if (resolve) return getConcepts(); - return basicGetConcepts(); - case ecoreastPackage.NUMERIC_DATA_CLAUSE__OPERATOR: - return getOperator(); - case ecoreastPackage.NUMERIC_DATA_CLAUSE__VALUE: - return getValue(); - case ecoreastPackage.NUMERIC_DATA_CLAUSE__UNIT_TYPE: - return getUnitType(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ecoreastPackage.NUMERIC_DATA_CLAUSE__CONCEPTS: - setConcepts((RValue)newValue); - return; - case ecoreastPackage.NUMERIC_DATA_CLAUSE__OPERATOR: - setOperator((String)newValue); - return; - case ecoreastPackage.NUMERIC_DATA_CLAUSE__VALUE: - setValue((Integer)newValue); - return; - case ecoreastPackage.NUMERIC_DATA_CLAUSE__UNIT_TYPE: - setUnitType((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ecoreastPackage.NUMERIC_DATA_CLAUSE__CONCEPTS: - setConcepts((RValue)null); - return; - case ecoreastPackage.NUMERIC_DATA_CLAUSE__OPERATOR: - setOperator(OPERATOR_EDEFAULT); - return; - case ecoreastPackage.NUMERIC_DATA_CLAUSE__VALUE: - setValue(VALUE_EDEFAULT); - return; - case ecoreastPackage.NUMERIC_DATA_CLAUSE__UNIT_TYPE: - setUnitType(UNIT_TYPE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ecoreastPackage.NUMERIC_DATA_CLAUSE__CONCEPTS: - return concepts != null; - case ecoreastPackage.NUMERIC_DATA_CLAUSE__OPERATOR: - return OPERATOR_EDEFAULT == null ? operator != null : !OPERATOR_EDEFAULT.equals(operator); - case ecoreastPackage.NUMERIC_DATA_CLAUSE__VALUE: - return value != VALUE_EDEFAULT; - case ecoreastPackage.NUMERIC_DATA_CLAUSE__UNIT_TYPE: - return UNIT_TYPE_EDEFAULT == null ? unitType != null : !UNIT_TYPE_EDEFAULT.equals(unitType); - } - return super.eIsSet(featureID); - } - - @Override - public StringBuilder toString(StringBuilder buf) { - buf.append(" HAS STRENGTH"); - buf.append(" "); - buf.append(operator); - buf.append(" "); - buf.append(value); - buf.append(" "); - buf.append(unitType); - return buf; - } - -} //NumericDataClauseImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/NumericDataGroupClauseImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/NumericDataGroupClauseImpl.java deleted file mode 100644 index 2dbd3b8bb3a..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/NumericDataGroupClauseImpl.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model object 'Numeric Data Group Clause'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataGroupClauseImpl#getConcepts Concepts}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataGroupClauseImpl#getNumericData Numeric Data}
      • - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.NumericDataGroupClauseImpl#getSubstance Substance}
      • - *
      - *

      - * - * @generated - */ -public class NumericDataGroupClauseImpl extends RValueImpl implements NumericDataGroupClause { - /** - * The cached value of the '{@link #getConcepts() Concepts}' reference. - * - * - * @see #getConcepts() - * @generated - * @ordered - */ - protected RValue concepts; - - /** - * The cached value of the '{@link #getNumericData() Numeric Data}' reference. - * - * - * @see #getNumericData() - * @generated - * @ordered - */ - protected NumericDataClause numericData; - - /** - * The cached value of the '{@link #getSubstance() Substance}' reference. - * - * - * @see #getSubstance() - * @generated - * @ordered - */ - protected RValue substance; - - /** - * - * - * @generated - */ - protected NumericDataGroupClauseImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ecoreastPackage.Literals.NUMERIC_DATA_GROUP_CLAUSE; - } - - /** - * - * - * @generated - */ - public RValue getConcepts() { - if (concepts != null && concepts.eIsProxy()) { - InternalEObject oldConcepts = (InternalEObject)concepts; - concepts = (RValue)eResolveProxy(oldConcepts); - if (concepts != oldConcepts) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__CONCEPTS, oldConcepts, concepts)); - } - } - return concepts; - } - - /** - * - * - * @generated - */ - public RValue basicGetConcepts() { - return concepts; - } - - /** - * - * - * @generated - */ - public void setConcepts(RValue newConcepts) { - RValue oldConcepts = concepts; - concepts = newConcepts; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__CONCEPTS, oldConcepts, concepts)); - } - - /** - * - * - * @generated - */ - public NumericDataClause getNumericData() { - if (numericData != null && numericData.eIsProxy()) { - InternalEObject oldNumericData = (InternalEObject)numericData; - numericData = (NumericDataClause)eResolveProxy(oldNumericData); - if (numericData != oldNumericData) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__NUMERIC_DATA, oldNumericData, numericData)); - } - } - return numericData; - } - - /** - * - * - * @generated - */ - public NumericDataClause basicGetNumericData() { - return numericData; - } - - /** - * - * - * @generated - */ - public void setNumericData(NumericDataClause newNumericData) { - NumericDataClause oldNumericData = numericData; - numericData = newNumericData; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__NUMERIC_DATA, oldNumericData, numericData)); - } - - /** - * - * - * @generated - */ - public RValue getSubstance() { - if (substance != null && substance.eIsProxy()) { - InternalEObject oldSubstance = (InternalEObject)substance; - substance = (RValue)eResolveProxy(oldSubstance); - if (substance != oldSubstance) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__SUBSTANCE, oldSubstance, substance)); - } - } - return substance; - } - - /** - * - * - * @generated - */ - public RValue basicGetSubstance() { - return substance; - } - - /** - * - * - * @generated - */ - public void setSubstance(RValue newSubstance) { - RValue oldSubstance = substance; - substance = newSubstance; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__SUBSTANCE, oldSubstance, substance)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__CONCEPTS: - if (resolve) return getConcepts(); - return basicGetConcepts(); - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__NUMERIC_DATA: - if (resolve) return getNumericData(); - return basicGetNumericData(); - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__SUBSTANCE: - if (resolve) return getSubstance(); - return basicGetSubstance(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__CONCEPTS: - setConcepts((RValue)newValue); - return; - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__NUMERIC_DATA: - setNumericData((NumericDataClause)newValue); - return; - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__SUBSTANCE: - setSubstance((RValue)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__CONCEPTS: - setConcepts((RValue)null); - return; - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__NUMERIC_DATA: - setNumericData((NumericDataClause)null); - return; - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__SUBSTANCE: - setSubstance((RValue)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__CONCEPTS: - return concepts != null; - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__NUMERIC_DATA: - return numericData != null; - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE__SUBSTANCE: - return substance != null; - } - return super.eIsSet(featureID); - } - - @Override - public StringBuilder toString(StringBuilder buf) { - buf.append("NumericDataGroup: "); - buf.append(" "); - buf.append(numericData); - buf.append(" "); - buf.append(substance); - return buf; - } - - -} //NumericDataGroupClauseImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/OrClauseImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/OrClauseImpl.java deleted file mode 100644 index 1cd3f50a4f5..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/OrClauseImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -import org.eclipse.emf.ecore.EClass; - -import com.b2international.snowowl.snomed.dsl.query.queryast.OrClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model object 'Or Clause'. - * - *

      - *

      - * - * @generated - */ -public class OrClauseImpl extends BinaryRValueImpl implements OrClause { - /** - * - * - * @generated - */ - protected OrClauseImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ecoreastPackage.Literals.OR_CLAUSE; - } - - @Override - protected void appendLeftRightSeparatorForToString(StringBuilder buf) { - buf.append(" OR "); - } - -} //OrClauseImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/RValueImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/RValueImpl.java deleted file mode 100644 index ab7aa28b303..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/RValueImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.EObjectImpl; - -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model object 'RValue'. - * - *

      - *

      - * - * @generated - */ -public abstract class RValueImpl extends EObjectImpl implements RValue { - /** - * - * - * @generated - */ - protected RValueImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ecoreastPackage.Literals.RVALUE; - } - - protected void appendRValue(StringBuilder buf, RValue rValue) { - if(rValue == null) { - buf.append("null"); - } else { - rValue.toString(buf); - } - } - - public final String toString() { - return toString(new StringBuilder()).toString(); - } -} //RValueImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/RefSetImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/RefSetImpl.java deleted file mode 100644 index e44c5145122..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/RefSetImpl.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import com.b2international.snowowl.snomed.dsl.query.queryast.RefSet; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model object 'Ref Set'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.RefSetImpl#getId Id}
      • - *
      - *

      - * - * @generated - */ -public class RefSetImpl extends RValueImpl implements RefSet { - /** - * The default value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected static final String ID_EDEFAULT = null; - /** - * The cached value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected String id = ID_EDEFAULT; - - /** - * - * - * @generated - */ - protected RefSetImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ecoreastPackage.Literals.REF_SET; - } - - /** - * - * - * @generated - */ - public String getId() { - return id; - } - - /** - * - * - * @generated - */ - public void setId(String newId) { - String oldId = id; - id = newId; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.REF_SET__ID, oldId, id)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ecoreastPackage.REF_SET__ID: - return getId(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ecoreastPackage.REF_SET__ID: - setId((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ecoreastPackage.REF_SET__ID: - setId(ID_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ecoreastPackage.REF_SET__ID: - return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); - } - return super.eIsSet(featureID); - } - - public StringBuilder toString(StringBuilder buf) { - buf.append(" ^"); - buf.append(id); - return buf; - } - -} //RefSetImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/SubExpressionImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/SubExpressionImpl.java deleted file mode 100644 index 821f89a6e21..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/SubExpressionImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -import org.eclipse.emf.ecore.EClass; - -import com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model object 'Sub Expression'. - * - *

      - *

      - * - * @generated - */ -public class SubExpressionImpl extends UnaryRValueImpl implements SubExpression { - /** - * - * - * @generated - */ - protected SubExpressionImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ecoreastPackage.Literals.SUB_EXPRESSION; - } - - @Override - public StringBuilder toString(StringBuilder buf) { - buf.append(" SubExpression { "); - appendRValue(buf, getValue()); - buf.append(" }"); - return buf; - } - -} //SubExpressionImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/UnaryRValueImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/UnaryRValueImpl.java deleted file mode 100644 index 4abe9cd15c2..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/UnaryRValueImpl.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -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.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.UnaryRValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model object 'Unary RValue'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link com.b2international.snowowl.snomed.dsl.query.queryast.impl.UnaryRValueImpl#getValue Value}
      • - *
      - *

      - * - * @generated - */ -public abstract class UnaryRValueImpl extends RValueImpl implements UnaryRValue { - /** - * The cached value of the '{@link #getValue() Value}' containment reference. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected RValue value; - - /** - * - * - * @generated - */ - protected UnaryRValueImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ecoreastPackage.Literals.UNARY_RVALUE; - } - - /** - * - * - * @generated - */ - public RValue getValue() { - return value; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetValue(RValue newValue, NotificationChain msgs) { - RValue oldValue = value; - value = newValue; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ecoreastPackage.UNARY_RVALUE__VALUE, oldValue, newValue); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setValue(RValue newValue) { - if (newValue != value) { - NotificationChain msgs = null; - if (value != null) - msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ecoreastPackage.UNARY_RVALUE__VALUE, null, msgs); - if (newValue != null) - msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ecoreastPackage.UNARY_RVALUE__VALUE, null, msgs); - msgs = basicSetValue(newValue, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ecoreastPackage.UNARY_RVALUE__VALUE, newValue, newValue)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ecoreastPackage.UNARY_RVALUE__VALUE: - return basicSetValue(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ecoreastPackage.UNARY_RVALUE__VALUE: - return getValue(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ecoreastPackage.UNARY_RVALUE__VALUE: - setValue((RValue)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ecoreastPackage.UNARY_RVALUE__VALUE: - setValue((RValue)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ecoreastPackage.UNARY_RVALUE__VALUE: - return value != null; - } - return super.eIsSet(featureID); - } - -} //UnaryRValueImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/ecoreastFactoryImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/ecoreastFactoryImpl.java deleted file mode 100644 index 7e2317e7e2f..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/ecoreastFactoryImpl.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -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; - -import com.b2international.snowowl.snomed.dsl.query.queryast.AndClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.NotClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.OrClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.RefSet; -import com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression; -import com.b2international.snowowl.snomed.dsl.query.queryast.SubsumptionQuantifier; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastFactory; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class ecoreastFactoryImpl extends EFactoryImpl implements ecoreastFactory { - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static ecoreastFactory init() { - try { - ecoreastFactory theecoreastFactory = (ecoreastFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.b2international.com/snowowl/dsl/ast"); - if (theecoreastFactory != null) { - return theecoreastFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new ecoreastFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public ecoreastFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case ecoreastPackage.CONCEPT_REF: return createConceptRef(); - case ecoreastPackage.REF_SET: return createRefSet(); - case ecoreastPackage.NOT_CLAUSE: return createNotClause(); - case ecoreastPackage.SUB_EXPRESSION: return createSubExpression(); - case ecoreastPackage.AND_CLAUSE: return createAndClause(); - case ecoreastPackage.OR_CLAUSE: return createOrClause(); - case ecoreastPackage.ATTRIBUTE_CLAUSE: return createAttributeClause(); - case ecoreastPackage.ATTRIBUTE_CLAUSE_GROUP: return createAttributeClauseGroup(); - case ecoreastPackage.NUMERIC_DATA_CLAUSE: return createNumericDataClause(); - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE: return createNumericDataGroupClause(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case ecoreastPackage.SUBSUMPTION_QUANTIFIER: - return createSubsumptionQuantifierFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case ecoreastPackage.SUBSUMPTION_QUANTIFIER: - return convertSubsumptionQuantifierToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public ConceptRef createConceptRef() { - ConceptRefImpl conceptRef = new ConceptRefImpl(); - return conceptRef; - } - - /** - * - * - * @generated - */ - public RefSet createRefSet() { - RefSetImpl refSet = new RefSetImpl(); - return refSet; - } - - /** - * - * - * @generated - */ - public NotClause createNotClause() { - NotClauseImpl notClause = new NotClauseImpl(); - return notClause; - } - - /** - * - * - * @generated - */ - public SubExpression createSubExpression() { - SubExpressionImpl subExpression = new SubExpressionImpl(); - return subExpression; - } - - /** - * - * - * @generated - */ - public AndClause createAndClause() { - AndClauseImpl andClause = new AndClauseImpl(); - return andClause; - } - - /** - * - * - * @generated - */ - public OrClause createOrClause() { - OrClauseImpl orClause = new OrClauseImpl(); - return orClause; - } - - /** - * - * - * @generated - */ - public AttributeClause createAttributeClause() { - AttributeClauseImpl attributeClause = new AttributeClauseImpl(); - return attributeClause; - } - - /** - * - * - * @generated - */ - public AttributeClauseGroup createAttributeClauseGroup() { - AttributeClauseGroupImpl attributeClauseGroup = new AttributeClauseGroupImpl(); - return attributeClauseGroup; - } - - /** - * - * - * @generated - */ - public NumericDataClause createNumericDataClause() { - NumericDataClauseImpl numericDataClause = new NumericDataClauseImpl(); - return numericDataClause; - } - - /** - * - * - * @generated - */ - public NumericDataGroupClause createNumericDataGroupClause() { - NumericDataGroupClauseImpl numericDataGroupClause = new NumericDataGroupClauseImpl(); - return numericDataGroupClause; - } - - /** - * - * - * @generated - */ - public SubsumptionQuantifier createSubsumptionQuantifierFromString(EDataType eDataType, String initialValue) { - SubsumptionQuantifier result = SubsumptionQuantifier.get(initialValue); - if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); - return result; - } - - /** - * - * - * @generated - */ - public String convertSubsumptionQuantifierToString(EDataType eDataType, Object instanceValue) { - return instanceValue == null ? null : instanceValue.toString(); - } - - /** - * - * - * @generated - */ - public ecoreastPackage getecoreastPackage() { - return (ecoreastPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static ecoreastPackage getPackage() { - return ecoreastPackage.eINSTANCE; - } - -} //ecoreastFactoryImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/ecoreastPackageImpl.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/ecoreastPackageImpl.java deleted file mode 100644 index 9155373541c..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/impl/ecoreastPackageImpl.java +++ /dev/null @@ -1,624 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; - -import com.b2international.snowowl.snomed.dsl.query.queryast.AndClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup; -import com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.NotClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.OrClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.RefSet; -import com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression; -import com.b2international.snowowl.snomed.dsl.query.queryast.SubsumptionQuantifier; -import com.b2international.snowowl.snomed.dsl.query.queryast.UnaryRValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastFactory; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class ecoreastPackageImpl extends EPackageImpl implements ecoreastPackage { - /** - * - * - * @generated - */ - private EClass rValueEClass = null; - - /** - * - * - * @generated - */ - private EClass unaryRValueEClass = null; - - /** - * - * - * @generated - */ - private EClass binaryRValueEClass = null; - - /** - * - * - * @generated - */ - private EClass conceptRefEClass = null; - - /** - * - * - * @generated - */ - private EClass refSetEClass = null; - - /** - * - * - * @generated - */ - private EClass notClauseEClass = null; - - /** - * - * - * @generated - */ - private EClass subExpressionEClass = null; - - /** - * - * - * @generated - */ - private EClass andClauseEClass = null; - - /** - * - * - * @generated - */ - private EClass orClauseEClass = null; - - /** - * - * - * @generated - */ - private EClass attributeClauseEClass = null; - - /** - * - * - * @generated - */ - private EClass attributeClauseGroupEClass = null; - - /** - * - * - * @generated - */ - private EClass numericDataClauseEClass = null; - - /** - * - * - * @generated - */ - private EClass numericDataGroupClauseEClass = null; - - /** - * - * - * @generated - */ - private EEnum subsumptionQuantifierEEnum = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

      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. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#eNS_URI - * @see #init() - * @generated - */ - private ecoreastPackageImpl() { - super(eNS_URI, ecoreastFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * - *

      This method is used to initialize {@link ecoreastPackage#eINSTANCE} when that field is accessed. - * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static ecoreastPackage init() { - if (isInited) return (ecoreastPackage)EPackage.Registry.INSTANCE.getEPackage(ecoreastPackage.eNS_URI); - - // Obtain or create and register package - ecoreastPackageImpl theecoreastPackage = (ecoreastPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ecoreastPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ecoreastPackageImpl()); - - isInited = true; - - // Create package meta-data objects - theecoreastPackage.createPackageContents(); - - // Initialize created meta-data - theecoreastPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theecoreastPackage.freeze(); - - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(ecoreastPackage.eNS_URI, theecoreastPackage); - return theecoreastPackage; - } - - /** - * - * - * @generated - */ - public EClass getRValue() { - return rValueEClass; - } - - /** - * - * - * @generated - */ - public EClass getUnaryRValue() { - return unaryRValueEClass; - } - - /** - * - * - * @generated - */ - public EReference getUnaryRValue_Value() { - return (EReference)unaryRValueEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getBinaryRValue() { - return binaryRValueEClass; - } - - /** - * - * - * @generated - */ - public EReference getBinaryRValue_Left() { - return (EReference)binaryRValueEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getBinaryRValue_Right() { - return (EReference)binaryRValueEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getConceptRef() { - return conceptRefEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getConceptRef_Quantifier() { - return (EAttribute)conceptRefEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getConceptRef_ConceptId() { - return (EAttribute)conceptRefEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getConceptRef_Label() { - return (EAttribute)conceptRefEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getRefSet() { - return refSetEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getRefSet_Id() { - return (EAttribute)refSetEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getNotClause() { - return notClauseEClass; - } - - /** - * - * - * @generated - */ - public EClass getSubExpression() { - return subExpressionEClass; - } - - /** - * - * - * @generated - */ - public EClass getAndClause() { - return andClauseEClass; - } - - /** - * - * - * @generated - */ - public EClass getOrClause() { - return orClauseEClass; - } - - /** - * - * - * @generated - */ - public EClass getAttributeClause() { - return attributeClauseEClass; - } - - /** - * - * - * @generated - */ - public EClass getAttributeClauseGroup() { - return attributeClauseGroupEClass; - } - - /** - * - * - * @generated - */ - public EClass getNumericDataClause() { - return numericDataClauseEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getNumericDataClause_Operator() { - return (EAttribute)numericDataClauseEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getNumericDataClause_Value() { - return (EAttribute)numericDataClauseEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getNumericDataClause_UnitType() { - return (EAttribute)numericDataClauseEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EClass getNumericDataGroupClause() { - return numericDataGroupClauseEClass; - } - - /** - * - * - * @generated - */ - public EReference getNumericDataGroupClause_Concepts() { - return (EReference)numericDataGroupClauseEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getNumericDataGroupClause_NumericData() { - return (EReference)numericDataGroupClauseEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getNumericDataGroupClause_Substance() { - return (EReference)numericDataGroupClauseEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getNumericDataClause_Concepts() { - return (EReference)numericDataClauseEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EEnum getSubsumptionQuantifier() { - return subsumptionQuantifierEEnum; - } - - /** - * - * - * @generated - */ - public ecoreastFactory getecoreastFactory() { - return (ecoreastFactory)getEFactoryInstance(); - } - - /** - * - * - * @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. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - rValueEClass = createEClass(RVALUE); - - unaryRValueEClass = createEClass(UNARY_RVALUE); - createEReference(unaryRValueEClass, UNARY_RVALUE__VALUE); - - binaryRValueEClass = createEClass(BINARY_RVALUE); - createEReference(binaryRValueEClass, BINARY_RVALUE__LEFT); - createEReference(binaryRValueEClass, BINARY_RVALUE__RIGHT); - - conceptRefEClass = createEClass(CONCEPT_REF); - createEAttribute(conceptRefEClass, CONCEPT_REF__QUANTIFIER); - createEAttribute(conceptRefEClass, CONCEPT_REF__CONCEPT_ID); - createEAttribute(conceptRefEClass, CONCEPT_REF__LABEL); - - refSetEClass = createEClass(REF_SET); - createEAttribute(refSetEClass, REF_SET__ID); - - notClauseEClass = createEClass(NOT_CLAUSE); - - subExpressionEClass = createEClass(SUB_EXPRESSION); - - andClauseEClass = createEClass(AND_CLAUSE); - - orClauseEClass = createEClass(OR_CLAUSE); - - attributeClauseEClass = createEClass(ATTRIBUTE_CLAUSE); - - attributeClauseGroupEClass = createEClass(ATTRIBUTE_CLAUSE_GROUP); - - numericDataClauseEClass = createEClass(NUMERIC_DATA_CLAUSE); - createEReference(numericDataClauseEClass, NUMERIC_DATA_CLAUSE__CONCEPTS); - createEAttribute(numericDataClauseEClass, NUMERIC_DATA_CLAUSE__OPERATOR); - createEAttribute(numericDataClauseEClass, NUMERIC_DATA_CLAUSE__VALUE); - createEAttribute(numericDataClauseEClass, NUMERIC_DATA_CLAUSE__UNIT_TYPE); - - numericDataGroupClauseEClass = createEClass(NUMERIC_DATA_GROUP_CLAUSE); - createEReference(numericDataGroupClauseEClass, NUMERIC_DATA_GROUP_CLAUSE__CONCEPTS); - createEReference(numericDataGroupClauseEClass, NUMERIC_DATA_GROUP_CLAUSE__NUMERIC_DATA); - createEReference(numericDataGroupClauseEClass, NUMERIC_DATA_GROUP_CLAUSE__SUBSTANCE); - - // Create enums - subsumptionQuantifierEEnum = createEEnum(SUBSUMPTION_QUANTIFIER); - } - - /** - * - * - * @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. - * - * - * @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 - unaryRValueEClass.getESuperTypes().add(this.getRValue()); - binaryRValueEClass.getESuperTypes().add(this.getRValue()); - conceptRefEClass.getESuperTypes().add(this.getRValue()); - refSetEClass.getESuperTypes().add(this.getRValue()); - notClauseEClass.getESuperTypes().add(this.getUnaryRValue()); - subExpressionEClass.getESuperTypes().add(this.getUnaryRValue()); - andClauseEClass.getESuperTypes().add(this.getBinaryRValue()); - orClauseEClass.getESuperTypes().add(this.getBinaryRValue()); - attributeClauseEClass.getESuperTypes().add(this.getBinaryRValue()); - attributeClauseGroupEClass.getESuperTypes().add(this.getUnaryRValue()); - numericDataClauseEClass.getESuperTypes().add(this.getRValue()); - numericDataGroupClauseEClass.getESuperTypes().add(this.getRValue()); - - // Initialize classes and features; add operations and parameters - initEClass(rValueEClass, RValue.class, "RValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(unaryRValueEClass, UnaryRValue.class, "UnaryRValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getUnaryRValue_Value(), this.getRValue(), null, "value", null, 1, 1, UnaryRValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(binaryRValueEClass, BinaryRValue.class, "BinaryRValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getBinaryRValue_Left(), this.getRValue(), null, "left", null, 1, 1, BinaryRValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getBinaryRValue_Right(), this.getRValue(), null, "right", null, 1, 1, BinaryRValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(conceptRefEClass, ConceptRef.class, "ConceptRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getConceptRef_Quantifier(), this.getSubsumptionQuantifier(), "quantifier", null, 1, 1, ConceptRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getConceptRef_ConceptId(), ecorePackage.getEString(), "conceptId", null, 1, 1, ConceptRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getConceptRef_Label(), ecorePackage.getEString(), "label", null, 0, 1, ConceptRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(refSetEClass, RefSet.class, "RefSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getRefSet_Id(), ecorePackage.getEString(), "id", null, 1, 1, RefSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(notClauseEClass, NotClause.class, "NotClause", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(subExpressionEClass, SubExpression.class, "SubExpression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(andClauseEClass, AndClause.class, "AndClause", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(orClauseEClass, OrClause.class, "OrClause", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(attributeClauseEClass, AttributeClause.class, "AttributeClause", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(attributeClauseGroupEClass, AttributeClauseGroup.class, "AttributeClauseGroup", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(numericDataClauseEClass, NumericDataClause.class, "NumericDataClause", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getNumericDataClause_Concepts(), this.getRValue(), null, "concepts", null, 0, 1, NumericDataClause.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getNumericDataClause_Operator(), ecorePackage.getEString(), "operator", null, 1, 1, NumericDataClause.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getNumericDataClause_Value(), ecorePackage.getEInt(), "value", null, 1, 1, NumericDataClause.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getNumericDataClause_UnitType(), ecorePackage.getEString(), "unitType", null, 1, 1, NumericDataClause.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(numericDataGroupClauseEClass, NumericDataGroupClause.class, "NumericDataGroupClause", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getNumericDataGroupClause_Concepts(), this.getRValue(), null, "concepts", null, 0, 1, NumericDataGroupClause.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getNumericDataGroupClause_NumericData(), this.getNumericDataClause(), null, "numericData", null, 1, 1, NumericDataGroupClause.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getNumericDataGroupClause_Substance(), this.getRValue(), null, "substance", null, 1, 1, NumericDataGroupClause.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Initialize enums and add enum literals - initEEnum(subsumptionQuantifierEEnum, SubsumptionQuantifier.class, "SubsumptionQuantifier"); - addEEnumLiteral(subsumptionQuantifierEEnum, SubsumptionQuantifier.SELF); - addEEnumLiteral(subsumptionQuantifierEEnum, SubsumptionQuantifier.ANY_SUBTYPE); - addEEnumLiteral(subsumptionQuantifierEEnum, SubsumptionQuantifier.SELF_AND_ANY_SUBTYPE); - - // Create resource - createResource(eNS_URI); - } - -} //ecoreastPackageImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/util/ecoreastAdapterFactory.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/util/ecoreastAdapterFactory.java deleted file mode 100644 index 8b02609c9b6..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/util/ecoreastAdapterFactory.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.util; - -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; - -import com.b2international.snowowl.snomed.dsl.query.queryast.AndClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup; -import com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.NotClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.OrClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.RefSet; -import com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression; -import com.b2international.snowowl.snomed.dsl.query.queryast.UnaryRValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage - * @generated - */ -public class ecoreastAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * - * - * @generated - */ - protected static ecoreastPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public ecoreastAdapterFactory() { - if (modelPackage == null) { - modelPackage = ecoreastPackage.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. - * - * This implementation returns true if the object is either the model's package or is an instance object of the model. - * - * @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 createXXX methods. - * - * - * @generated - */ - protected ecoreastSwitch modelSwitch = - new ecoreastSwitch() { - @Override - public Adapter caseRValue(RValue object) { - return createRValueAdapter(); - } - @Override - public Adapter caseUnaryRValue(UnaryRValue object) { - return createUnaryRValueAdapter(); - } - @Override - public Adapter caseBinaryRValue(BinaryRValue object) { - return createBinaryRValueAdapter(); - } - @Override - public Adapter caseConceptRef(ConceptRef object) { - return createConceptRefAdapter(); - } - @Override - public Adapter caseRefSet(RefSet object) { - return createRefSetAdapter(); - } - @Override - public Adapter caseNotClause(NotClause object) { - return createNotClauseAdapter(); - } - @Override - public Adapter caseSubExpression(SubExpression object) { - return createSubExpressionAdapter(); - } - @Override - public Adapter caseAndClause(AndClause object) { - return createAndClauseAdapter(); - } - @Override - public Adapter caseOrClause(OrClause object) { - return createOrClauseAdapter(); - } - @Override - public Adapter caseAttributeClause(AttributeClause object) { - return createAttributeClauseAdapter(); - } - @Override - public Adapter caseAttributeClauseGroup(AttributeClauseGroup object) { - return createAttributeClauseGroupAdapter(); - } - @Override - public Adapter caseNumericDataClause(NumericDataClause object) { - return createNumericDataClauseAdapter(); - } - @Override - public Adapter caseNumericDataGroupClause(NumericDataGroupClause object) { - return createNumericDataGroupClauseAdapter(); - } - @Override - public Adapter defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * - * @param target the object to adapt. - * @return the adapter for the target. - * @generated - */ - @Override - public Adapter createAdapter(Notifier target) { - return modelSwitch.doSwitch((EObject)target); - } - - - /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.RValue RValue}'. - * - * 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. - * - * @return the new adapter. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.RValue - * @generated - */ - public Adapter createRValueAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.UnaryRValue Unary RValue}'. - * - * 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. - * - * @return the new adapter. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.UnaryRValue - * @generated - */ - public Adapter createUnaryRValueAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue Binary RValue}'. - * - * 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. - * - * @return the new adapter. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue - * @generated - */ - public Adapter createBinaryRValueAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef Concept Ref}'. - * - * 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. - * - * @return the new adapter. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef - * @generated - */ - public Adapter createConceptRefAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.RefSet Ref Set}'. - * - * 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. - * - * @return the new adapter. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.RefSet - * @generated - */ - public Adapter createRefSetAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NotClause Not Clause}'. - * - * 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. - * - * @return the new adapter. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.NotClause - * @generated - */ - public Adapter createNotClauseAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression Sub Expression}'. - * - * 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. - * - * @return the new adapter. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression - * @generated - */ - public Adapter createSubExpressionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.AndClause And Clause}'. - * - * 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. - * - * @return the new adapter. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.AndClause - * @generated - */ - public Adapter createAndClauseAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.OrClause Or Clause}'. - * - * 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. - * - * @return the new adapter. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.OrClause - * @generated - */ - public Adapter createOrClauseAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause Attribute Clause}'. - * - * 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. - * - * @return the new adapter. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause - * @generated - */ - public Adapter createAttributeClauseAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup Attribute Clause Group}'. - * - * 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. - * - * @return the new adapter. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup - * @generated - */ - public Adapter createAttributeClauseGroupAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause Numeric Data Clause}'. - * - * 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. - * - * @return the new adapter. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause - * @generated - */ - public Adapter createNumericDataClauseAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause Numeric Data Group Clause}'. - * - * 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. - * - * @return the new adapter. - * @see com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause - * @generated - */ - public Adapter createNumericDataGroupClauseAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //ecoreastAdapterFactory \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/util/ecoreastSwitch.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/util/ecoreastSwitch.java deleted file mode 100644 index 44309f9699d..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/util/ecoreastSwitch.java +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.queryast.util; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.util.Switch; - -import com.b2international.snowowl.snomed.dsl.query.queryast.AndClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup; -import com.b2international.snowowl.snomed.dsl.query.queryast.BinaryRValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.NotClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.NumericDataGroupClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.OrClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.RefSet; -import com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression; -import com.b2international.snowowl.snomed.dsl.query.queryast.UnaryRValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage; - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the caseXXX 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. - * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage - * @generated - */ -public class ecoreastSwitch extends Switch { - /** - * The cached model package - * - * - * @generated - */ - protected static ecoreastPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public ecoreastSwitch() { - if (modelPackage == null) { - modelPackage = ecoreastPackage.eINSTANCE; - } - } - - /** - * Checks whether this is a switch for the given package. - * - * - * @parameter 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 caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - @Override - protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case ecoreastPackage.RVALUE: { - RValue rValue = (RValue)theEObject; - T result = caseRValue(rValue); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ecoreastPackage.UNARY_RVALUE: { - UnaryRValue unaryRValue = (UnaryRValue)theEObject; - T result = caseUnaryRValue(unaryRValue); - if (result == null) result = caseRValue(unaryRValue); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ecoreastPackage.BINARY_RVALUE: { - BinaryRValue binaryRValue = (BinaryRValue)theEObject; - T result = caseBinaryRValue(binaryRValue); - if (result == null) result = caseRValue(binaryRValue); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ecoreastPackage.CONCEPT_REF: { - ConceptRef conceptRef = (ConceptRef)theEObject; - T result = caseConceptRef(conceptRef); - if (result == null) result = caseRValue(conceptRef); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ecoreastPackage.REF_SET: { - RefSet refSet = (RefSet)theEObject; - T result = caseRefSet(refSet); - if (result == null) result = caseRValue(refSet); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ecoreastPackage.NOT_CLAUSE: { - NotClause notClause = (NotClause)theEObject; - T result = caseNotClause(notClause); - if (result == null) result = caseUnaryRValue(notClause); - if (result == null) result = caseRValue(notClause); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ecoreastPackage.SUB_EXPRESSION: { - SubExpression subExpression = (SubExpression)theEObject; - T result = caseSubExpression(subExpression); - if (result == null) result = caseUnaryRValue(subExpression); - if (result == null) result = caseRValue(subExpression); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ecoreastPackage.AND_CLAUSE: { - AndClause andClause = (AndClause)theEObject; - T result = caseAndClause(andClause); - if (result == null) result = caseBinaryRValue(andClause); - if (result == null) result = caseRValue(andClause); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ecoreastPackage.OR_CLAUSE: { - OrClause orClause = (OrClause)theEObject; - T result = caseOrClause(orClause); - if (result == null) result = caseBinaryRValue(orClause); - if (result == null) result = caseRValue(orClause); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ecoreastPackage.ATTRIBUTE_CLAUSE: { - AttributeClause attributeClause = (AttributeClause)theEObject; - T result = caseAttributeClause(attributeClause); - if (result == null) result = caseBinaryRValue(attributeClause); - if (result == null) result = caseRValue(attributeClause); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ecoreastPackage.ATTRIBUTE_CLAUSE_GROUP: { - AttributeClauseGroup attributeClauseGroup = (AttributeClauseGroup)theEObject; - T result = caseAttributeClauseGroup(attributeClauseGroup); - if (result == null) result = caseUnaryRValue(attributeClauseGroup); - if (result == null) result = caseRValue(attributeClauseGroup); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ecoreastPackage.NUMERIC_DATA_CLAUSE: { - NumericDataClause numericDataClause = (NumericDataClause)theEObject; - T result = caseNumericDataClause(numericDataClause); - if (result == null) result = caseRValue(numericDataClause); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ecoreastPackage.NUMERIC_DATA_GROUP_CLAUSE: { - NumericDataGroupClause numericDataGroupClause = (NumericDataGroupClause)theEObject; - T result = caseNumericDataGroupClause(numericDataGroupClause); - if (result == null) result = caseRValue(numericDataGroupClause); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of 'RValue'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'RValue'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseRValue(RValue object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Unary RValue'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Unary RValue'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseUnaryRValue(UnaryRValue object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Binary RValue'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Binary RValue'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseBinaryRValue(BinaryRValue object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Concept Ref'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Concept Ref'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseConceptRef(ConceptRef object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Ref Set'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Ref Set'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseRefSet(RefSet object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Not Clause'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Not Clause'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseNotClause(NotClause object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Sub Expression'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Sub Expression'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSubExpression(SubExpression object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'And Clause'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'And Clause'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseAndClause(AndClause object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Or Clause'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Or Clause'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseOrClause(OrClause object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Attribute Clause'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Attribute Clause'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseAttributeClause(AttributeClause object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Attribute Clause Group'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Attribute Clause Group'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseAttributeClauseGroup(AttributeClauseGroup object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Numeric Data Clause'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Numeric Data Clause'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseNumericDataClause(NumericDataClause object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Numeric Data Group Clause'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Numeric Data Group Clause'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseNumericDataGroupClause(NumericDataGroupClause object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - @Override - public T defaultCase(EObject object) { - return null; - } - -} //ecoreastSwitch \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/walker/ESCGExpressionVisitor.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/walker/ESCGExpressionVisitor.java deleted file mode 100644 index 3a9eff5f85d..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/walker/ESCGExpressionVisitor.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.walker; - -import java.util.ArrayList; -import java.util.List; - -import com.b2international.commons.tree.TreeVisitor; -import com.b2international.commons.tree.emf.EObjectTreeNode; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; - -public class ESCGExpressionVisitor implements TreeVisitor { - - private List ungrouped = new ArrayList(); - private List groups = new ArrayList(); - private boolean isInGroup = false; - - @Override - public boolean visit(EObjectTreeNode node) { - - // visit only whole nodes, not {eObject, feature} pairs - if(node.getFeature() != null) { - return true; - } - - if(node.getEObject() instanceof AttributeClauseGroup) { - isInGroup = true; - } - - - return true; - } - - @Override - public boolean entering(EObjectTreeNode node) { - // visid only whole nodes, not {eObject, feature} pairs - return node.getFeature() == null; - } - - @Override - public boolean leaving(EObjectTreeNode node) { - - - if(node.getEObject() instanceof AttributeClauseGroup) { - isInGroup = false; - groups.add(((AttributeClauseGroup) node.getEObject()).getValue()); - - } - - return true; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/walker/VisitingQueryRewriter.java b/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/walker/VisitingQueryRewriter.java deleted file mode 100644 index c91241db1a9..00000000000 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/walker/VisitingQueryRewriter.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.dsl.query.walker; - -import com.b2international.commons.tree.TreeVisitor; -import com.b2international.commons.tree.emf.EObjectTreeNode; -import com.b2international.commons.tree.emf.EObjectWalker; -import com.b2international.snowowl.snomed.dsl.query.QueryRewriter; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; - -public class VisitingQueryRewriter implements QueryRewriter { - - private TreeVisitor visitor; - - @Override - public RValue rewrite(RValue root) { - EObjectWalker walker = EObjectWalker.createContainmentWalker(visitor); - walker.walk(root); - return root; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.ecl.tests/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.ecl.tests/META-INF/MANIFEST.MF index 557f748ce4b..dc82ff56d41 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl.tests/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.ecl.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Expression Constraint Language Bundle-SymbolicName: com.b2international.snowowl.snomed.ecl.tests -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy diff --git a/snomed/com.b2international.snowowl.snomed.ecl.tests/pom.xml b/snomed/com.b2international.snowowl.snomed.ecl.tests/pom.xml index a9888b324a7..3f22d99ebd7 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl.tests/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.ecl.tests/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl snomed-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.snomed.ecl.tests eclipse-test-plugin diff --git a/snomed/com.b2international.snowowl.snomed.ecl.tests/src-gen/com/b2international/snowowl/snomed/ecl/tests/EclInjectorProvider.java b/snomed/com.b2international.snowowl.snomed.ecl.tests/src-gen/com/b2international/snowowl/snomed/ecl/tests/EclInjectorProvider.java index 1d98fee7c42..41d72c0de5f 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl.tests/src-gen/com/b2international/snowowl/snomed/ecl/tests/EclInjectorProvider.java +++ b/snomed/com.b2international.snowowl.snomed.ecl.tests/src-gen/com/b2international/snowowl/snomed/ecl/tests/EclInjectorProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,6 @@ public class EclInjectorProvider implements IInjectorProvider, IRegistryConfigur @Override public Injector getInjector() { if (injector == null) { - stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); this.injector = internalCreateInjector(); stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); } @@ -68,11 +67,15 @@ public ClassLoader bindClassLoaderToInstance() { @Override public void restoreRegistry() { stateBeforeInjectorCreation.restoreGlobalState(); + stateBeforeInjectorCreation = null; } @Override public void setupRegistry() { - getInjector(); + stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + if (injector == null) { + getInjector(); + } stateAfterInjectorCreation.restoreGlobalState(); } } diff --git a/snomed/com.b2international.snowowl.snomed.ecl.tests/src/com/b2international/snowowl/snomed/ecl/tests/EclParsingTest.xtend b/snomed/com.b2international.snowowl.snomed.ecl.tests/src/com/b2international/snowowl/snomed/ecl/tests/EclParsingTest.xtend index 1bfef4121c5..8cb8a073950 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl.tests/src/com/b2international/snowowl/snomed/ecl/tests/EclParsingTest.xtend +++ b/snomed/com.b2international.snowowl.snomed.ecl.tests/src/com/b2international/snowowl/snomed/ecl/tests/EclParsingTest.xtend @@ -44,456 +44,599 @@ class EclParsingTest { } @Test - def void test_6_2_1_Self_1() { + def void test_5_4_1_UnaryOperators_1() { + ''' + < ^ 700043003 |example problem list concepts reference set| + '''.assertNoErrors + } + + @Test + def void test_5_4_2_BinaryOperators_1() { + ''' + (< 19829001|disorder of lung| OR ^ 700043003 |example problem list concepts reference set|) + MINUS ^ 450976002|disorders and diseases reference set for GP/FP reason for encounter| + '''.assertNoErrors + } + + @Test + def void test_5_4_2_BinaryOperators_1_lowerCase() { + ''' + (< 19829001|disorder of lung| or ^ 700043003 |example problem list concepts reference set|) + minus ^ 450976002|disorders and diseases reference set for GP/FP reason for encounter| + '''.assertNoErrors + } + + @Test + def void test_5_4_2_BinaryOperators_2() { + ''' + (< 19829001|disorder of lung| MINUS ^ 700043003 |example problem list concepts reference set|) MINUS + ^ 450976002|disorders and diseases reference set for GP/FP reason for encounter| + '''.assertNoErrors + } + + @Test + def void test_5_4_2_BinaryOperators_3() { + ''' + < 19829001|disorder of lung| OR ^ 700043003 |example problem list concepts reference set| OR + ^ 450976002|disorders and diseases reference set for GP/FP reason for encounter| + '''.assertNoErrors + } + + @Test + def void test_6_1_1_Self_1() { ''' 404684003 |clinical finding| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_2_2_DescendantOf_1() { + def void test_6_1_2_DescendantOf_1() { ''' < 404684003 |clinical finding| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_2_3_DescendantOrSelfOf_1() { + def void test_6_1_3_DescendantOrSelfOf_1() { ''' << 73211009 |diabetes mellitus| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_2_4_AncestorOf_1() { + def void test_6_1_4_ChildOf_1() { + ''' + 40541001 |acute pulmonary edema| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_2_5_AncestorOrSelfOf_1() { + def void test_6_1_6_AncestorOrSelfOf_1() { ''' >> 40541001|acute pulmonary edema| - '''.assertNoErrors; + '''.assertNoErrors + } + + @Test + def void test_6_1_7_ParentOf_1() { + ''' + >! 40541001 |acute pulmonary edema| + '''.assertNoErrors } @Test - def void test_6_2_6_MemberOf_1() { + def void test_6_1_8_MemberOf_1() { ''' ^ 700043003 |example problem list concepts reference set | - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_2_7_Any_1() { + def void test_6_1_9_Any_1() { ''' * - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_3_1_Attribute_1() { + def void test_6_2_1_Attribute_1() { ''' < 19829001 |disorder of lung|: 116676008 |associated morphology| = 79654002 |edema| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_3_1_Attribute_2() { + def void test_6_2_1_Attribute_2() { ''' < 19829001 |disorder of lung|: 116676008 |associated morphology| = << 79654002 |edema| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_3_1_Attribute_3() { + def void test_6_2_1_Attribute_3() { ''' < 404684003 |clinical finding|: 363698007 |finding site| = << 39057004 |pulmonary valve structure|, 116676008 |associated morphology| = << 415582006 |stenosis| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_3_1_Attribute_4() { + def void test_6_2_1_Attribute_4() { ''' * : 246075003 |causative agent| = 387517004 |paracetamol| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_3_2_AttributeGroup_1() { + def void test_6_2_2_AttributeGroup_1() { ''' < 404684003 |clinical finding|: { 363698007 |finding site| = << 39057004 |pulmonary valve structure|, 116676008 |associated morphology| = << 415582006 |stenosis|}, { 363698007 |finding site| = << 53085002 |right ventricular structure|, 116676008 |associated morphology| = << 56246009 |hypertrophy|} - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_3_3_NestedAttribute_1() { + def void test_6_2_3_AttributeConstraintOperator_1() { ''' - < 404684003 |clinical finding|: - 47429007 |associated with| = (< 404684003 |clinical finding|: - 116676008 |associated morphology| = << 55641003 |infarct|) - '''.assertNoErrors; + << 404684003 |clinical finding|: + << 47429007 |associated with| = << 267038008 |edema| + '''.assertNoErrors } @Test - def void test_6_3_4_AttributeOperator_1() { + def void test_6_2_3_AttributeConstraintOperator_2() { ''' << 404684003 |clinical finding|: - << 47429007 |associated with| = << 267038008 |edema| - '''.assertNoErrors; + >> 246075003 |causative agent| = << 267038008 |edema| + '''.assertNoErrors } @Test - def void test_6_3_5_ConcreteValues_1() { + def void test_6_2_4_ConcreteValues_1() { ''' < 27658006 |amoxicillin |: 411116001 |has dose form| = << 385049006 |capsule|, { 111115 |has basis of strength| = ( 111115 |amoxicillin only|: 111115 |strength magnitude| >= #500, 111115 |strength unit| = 258684004 |mg|)} - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_3_5_ConcreteValues_2() { + def void test_6_2_4_ConcreteValues_2() { ''' < 27658006 |amoxicillin |: 411116001 |has dose form| = << 385049006 |capsule|, { 111115 |has basis of strength| = ( 111115 |amoxicillin only|: 111115 |strength magnitude| >= #500, 111115 |strength magnitude| <= #800, 111115 |strength unit| = 258684004 |mg|)} - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_3_5_ConcreteValues_3() { + def void test_6_2_4_ConcreteValues_3() { ''' < 373873005 |pharmaceutical / biologic product|: 111115 |trade name| = "PANADOL" - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_3_6_ReverseOf_1() { + def void test_6_2_5_ReverseAttributes_1() { ''' < 105590001 |substance|: R 127489000 |has active ingredient| = 111115 |TRIPHASIL tablet| - '''.assertNoErrors; + '''.assertNoErrors + } + + @Test + def void test_6_2_6_DottedAttributes_1() { + ''' + < 91723000 |Anatomical structure| AND (< 125605004 |Fracture of bone| . 363698007 |Finding site| ) + '''.assertNoErrors + } + + @Test + def void test_6_2_6_DottedAttributes_2() { + ''' + < 125605004 |Fracture of bone| . 363698007 |Finding site| + '''.assertNoErrors + } + + @Test + def void test_6_2_6_DottedAttributes_3() { + ''' + < 105590001 |Substance| AND ( 249999999101 |TRIPHASIL tablet| . 127489000 |Has active ingredient| ) + '''.assertNoErrors + } + + @Test + def void test_6_2_6_DottedAttributes_4() { + ''' + 249999999101 |TRIPHASIL tablet| . 127489000 |Has active ingredient| + '''.assertNoErrors } @Test - def void test_6_3_7_AnyAttributeNameValue_1() { + def void test_6_2_6_DottedAttributes_5() { + ''' + < 19829001 |Disorder of lung| . < 47429007 |Associated with| . 363698007 |Finding site| + '''.assertNoErrors + } + + @Test + def void test_6_2_6_DottedAttributes_6() { + ''' + ((< 19829001 |Disorder of lung|) . < 47429007 |Associated with|) . 363698007 |Finding site| + '''.assertNoErrors + } + + @Test + def void test_6_2_7_AnyAttributeNameValue_1() { ''' < 404684003 |clinical finding|: * = 79654002 |edema| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_3_7_AnyAttributeNameValue_2() { + def void test_6_2_7_AnyAttributeNameValue_2() { ''' < 404684003 |clinical finding|: 116676008 |associated morphology| = * - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_4_1_AttributeCardinality_1() { + def void test_6_3_1_AttributeCardinality_1() { ''' < 373873005 |pharmaceutical / biologic product|: [1..3] 127489000 |has active ingredient| = < 105590001 |substance| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_4_1_AttributeCardinality_2() { + def void test_6_3_1_AttributeCardinality_2() { ''' < 373873005 |pharmaceutical / biologic product|: [1..1] 127489000 |has active ingredient| = < 105590001 |substance| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_4_1_AttributeCardinality_3() { + def void test_6_3_1_AttributeCardinality_3() { ''' < 373873005 |pharmaceutical / biologic product|: [0..1] 127489000 |has active ingredient| = < 105590001 |substance| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_4_1_AttributeCardinality_4() { + def void test_6_3_1_AttributeCardinality_4() { ''' < 373873005 |pharmaceutical / biologic product|: [1..*] 127489000 |has active ingredient| = < 105590001 |substance| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_4_1_AttributeCardinality_5() { + def void test_6_3_1_AttributeCardinality_5() { ''' < 404684003 |clinical finding|: [1..1] 363698007 |finding site| = < 91723000 |anatomical structure| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_4_1_AttributeCardinality_6() { + def void test_6_3_1_AttributeCardinality_6() { ''' < 404684003 |clinical finding|: [2..*] 363698007 |finding site| = < 91723000 |anatomical structure| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_4_1_AttributeCardinality_7() { + def void test_6_3_1_AttributeCardinality_7() { ''' < 404684003 |clinical finding|: { [2..*] 363698007 |finding site| = < 91723000 |anatomical structure| } - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_4_2_AttributeGroupCardinality_1() { + def void test_6_3_2_AttributeGroupCardinality_1() { ''' < 373873005 |pharmaceutical / biologic product|: [1..3] { [1..*] 127489000 |has active ingredient| = < 105590001 |substance|} - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_4_2_AttributeGroupCardinality_2() { + def void test_6_3_2_AttributeGroupCardinality_2() { ''' < 373873005 |pharmaceutical / biologic product|: [0..1] { 127489000 |has active ingredient| = < 105590001 |substance|} - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_4_2_AttributeGroupCardinality_3() { + def void test_6_3_2_AttributeGroupCardinality_3() { ''' < 373873005 |pharmaceutical / biologic product|: [1..*] { 127489000 |has active ingredient| = < 105590001 |substance|} - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_4_2_AttributeGroupCardinality_4() { + def void test_6_3_2_AttributeGroupCardinality_4() { ''' < 373873005 |pharmaceutical / biologic product|: [1..*] { [1..*] 127489000 |has active ingredient| = < 105590001 |substance|} - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_4_2_AttributeGroupCardinality_5() { + def void test_6_3_2_AttributeGroupCardinality_5() { ''' < 404684003 |clinical finding|: [1..1] { 363698007 |finding site| = < 91723000 |anatomical structure|} - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_4_2_AttributeGroupCardinality_6() { + def void test_6_3_2_AttributeGroupCardinality_6() { ''' < 404684003 |clinical finding|: [0..0] { [2..*] 363698007 |finding site| = < 91723000 |anatomical structure|} - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_5_1_AttributeConjunctionDisjunction_1() { + def void test_6_3_3_ReverseCardinalities_1() { ''' - < 404684003 |clinical finding|: - 363698007 |finding site| = << 39057004 |pulmonary valve structure| AND - 116676008 |associated morphology| = << 415582006 |stenosis| - '''.assertNoErrors; + < 105590001 |Substance| : [3..3] R 127489000 |Has active ingredient| = * + '''.assertNoErrors } @Test - def void test_6_5_1_AttributeConjunctionDisjunction_2() { + def void test_6_4_1_CompoundExpressionConstraints_1() { ''' - < 404684003 |clinical finding|: - 116676008 |associated morphology| = << 55641003 |infarct| OR - 42752001 |due to| = << 22298006 |myocardial infarction| - '''.assertNoErrors; + < 19829001 |disorder of lung| AND < 301867009 |edema of trunk| + '''.assertNoErrors } @Test - def void test_6_5_1_AttributeConjunctionDisjunction_3() { + def void test_6_4_1_CompoundExpressionConstraints_2() { ''' - < 404684003 |clinical finding|: - ( 363698007 |finding site| = << 39057004 |pulmonary valve structure| AND - 116676008 |associated morphology| = << 415582006 |stenosis| ) AND - 42752001 |due to| = << 445238008|malignant carcinoid tumor| - '''.assertNoErrors; + < 19829001 |disorder of lung| OR < 301867009 |edema of trunk| + '''.assertNoErrors } @Test - def void test_6_5_1_AttributeConjunctionDisjunction_4() { + def void test_6_4_1_CompoundExpressionConstraints_3() { ''' - < 404684003 |clinical finding| : - ( 363698007 |finding site| = << 39057004 |pulmonary valve structure| AND - 116676008 |associated morphology| = << 415582006 |stenosis|) OR - 42752001 |due to| = << 445238008|malignant carcinoid tumor| - '''.assertNoErrors; + < 19829001|disorder of lung| AND ^ 700043003 |example problem list concepts reference set| + '''.assertNoErrors } @Test - def void test_6_5_1_SimpleConjunctionDisjunction_1() { + def void test_6_4_1_CompoundExpressionConstraints_4() { ''' - < 19829001 |disorder of lung| AND < 301867009 |edema of trunk| - '''.assertNoErrors; + (< 19829001 |disorder of lung| AND < 301867009 |edema of trunk|) AND + ^ 700043003 |example problem list concepts reference set| + '''.assertNoErrors } @Test - def void test_6_5_1_SimpleConjunctionDisjunction_2() { + def void test_6_4_1_CompoundExpressionConstraints_5() { ''' - < 19829001 |disorder of lung| OR < 301867009 |edema of trunk| - '''.assertNoErrors; + (< 19829001 |disorder of lung| AND < 301867009 |edema of trunk|) OR + ^ 700043003 |example problem list concepts reference set| + '''.assertNoErrors + } + + @Test + def void test_6_4_1_CompoundExpressionConstraints_5_lowerCase() { + ''' + (< 19829001 |disorder of lung| and < 301867009 |edema of trunk|) or + ^ 700043003 |example problem list concepts reference set| + '''.assertNoErrors } @Test - def void test_6_5_1_SimpleConjunctionDisjunction_3() { + def void test_6_4_2_AttributeConjunctionDisjunction_1() { ''' - < 19829001|disorder of lung| AND ^ 700043003 |example problem list concepts reference set| - '''.assertNoErrors; + < 404684003 |clinical finding|: + 363698007 |finding site| = << 39057004 |pulmonary valve structure| AND + 116676008 |associated morphology| = << 415582006 |stenosis| + '''.assertNoErrors } @Test - def void test_6_5_1_SimpleConjunctionDisjunction_4() { + def void test_6_4_2_AttributeConjunctionDisjunction_2() { ''' - (< 19829001 |disorder of lung| AND < 301867009 |edema of trunk|) AND - ^ 700043003 |example problem list concepts reference set| - '''.assertNoErrors; + < 404684003 |clinical finding|: + 116676008 |associated morphology| = << 55641003 |infarct| OR + 42752001 |due to| = << 22298006 |myocardial infarction| + '''.assertNoErrors } @Test - def void test_6_5_1_SimpleConjunctionDisjunction_5() { + def void test_6_4_2_AttributeConjunctionDisjunction_3() { ''' - (< 19829001 |disorder of lung| AND < 301867009 |edema of trunk|) OR - ^ 700043003 |example problem list concepts reference set| - '''.assertNoErrors; + < 404684003 |clinical finding|: + ( 363698007 |finding site| = << 39057004 |pulmonary valve structure| AND + 116676008 |associated morphology| = << 415582006 |stenosis| ) AND + 42752001 |due to| = << 445238008|malignant carcinoid tumor| + '''.assertNoErrors } @Test - def void test_6_5_3_AttributeGroupConjunctionDisjunction_1() { + def void test_6_4_2_AttributeConjunctionDisjunction_4() { + ''' + < 404684003 |clinical finding| : + ( 363698007 |finding site| = << 39057004 |pulmonary valve structure| AND + 116676008 |associated morphology| = << 415582006 |stenosis|) OR + 42752001 |due to| = << 445238008|malignant carcinoid tumor| + '''.assertNoErrors + } + + @Test + def void test_6_4_3_AttributeGroupConjunctionDisjunction_1() { ''' < 404684003 |clinical finding|: { 363698007 |finding site| = << 39057004 |pulmonary valve structure|, 116676008 |associated morphology| = << 415582006 |stenosis|} OR { 363698007 |finding site| = << 53085002 |right ventricular structure|, 116676008 |associated morphology| = << 56246009 |hypertrophy|} - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_5_4_AttributeValueConjunctionDisjunction_1() { + def void test_6_4_4_AttributeValueConjunctionDisjunction_1() { ''' ^ 450990004 |adverse drug reactions reference set for GP/FP health issue|: 246075003 |causative agent| = (< 373873005 |pharmaceutical / biologic product| OR < 105590001 |substance|) - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_5_4_AttributeValueConjunctionDisjunction_2() { + def void test_6_4_4_AttributeValueConjunctionDisjunction_2() { ''' < 404684003 |clinical finding|: 116676008 |associated morphology| = (<< 56208002|ulcer| AND << 50960005|hemorrhage|) - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_6_1_ExclusionSimpleExpressions_1() { + def void test_6_5_1_ExclusionSimpleExpressions_1() { ''' << 19829001 |disorder of lung| MINUS << 301867009 |edema of trunk| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_6_1_ExclusionSimpleExpressions_2() { + def void test_6_5_1_ExclusionSimpleExpressions_2() { ''' << 19829001 |disorder of lung| MINUS ^ 700043003 |example problem list concepts reference set| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_6_2_ExclusionAttributeValues_1() { + def void test_6_5_2_ExclusionAttributeValues_1() { ''' < 404684003 |clinical finding|: 116676008 |associated morphology| = ((<< 56208002 |ulcer| AND << 50960005 |hemorrhage|) MINUS << 26036001 |obstruction|) - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_6_3_NotEqualToAttributeValue_1() { + def void test_6_5_3_NotEqualToAttributeValue_1() { ''' < 404684003 |clinical finding|: 116676008 |associated morphology| != << 26036001 |obstruction| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_6_3_NotEqualToAttributeValue_2() { + def void test_6_5_3_NotEqualToAttributeValue_2() { ''' < 404684003 |clinical finding|: [0..0] 116676008 |associated morphology| = << 26036001 |obstruction| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_6_3_NotEqualToAttributeValue_3() { + def void test_6_5_3_NotEqualToAttributeValue_3() { ''' < 404684003 |clinical finding|: [0..0] 116676008 |associated morphology| != << 26036001 |obstruction| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_6_3_NotEqualToAttributeValue_4() { + def void test_6_5_3_NotEqualToAttributeValue_4() { ''' < 404684003 |clinical finding|: [0..0] 116676008 |associated morphology| != << 26036001 |obstruction| and [1..*] 116676008 |associated morphology| = << 26036001 |obstruction| - '''.assertNoErrors; + '''.assertNoErrors } @Test - def void test_6_7_1_UnaryOperators_1() { + def void test_6_6_1_NestedConstraintOperators_1() { ''' - < ^ 700043003 |example problem list concepts reference set| - '''.assertNoErrors; + << (^ 700043003 |Example problem list concepts reference set| ) + '''.assertNoErrors } @Test - def void test_6_7_2_BinaryOperators_1() { + def void test_6_6_2_NestedMemberOfFunction_1() { ''' - (< 19829001|disorder of lung| OR ^ 700043003 |example problem list concepts reference set|) - MINUS ^ 450976002|disorders and diseases reference set for GP/FP reason for encounter| - '''.assertNoErrors; + ^ (< 450973005 |GP/FP health issue reference set| ) + '''.assertNoErrors } @Test - def void test_6_7_2_BinaryOperators_2() { + def void test_6_6_3_NestedCompoundExpressionConstraints_1() { ''' - (< 19829001|disorder of lung| MINUS ^ 700043003 |example problem list concepts reference set|) MINUS - ^ 450976002|disorders and diseases reference set for GP/FP reason for encounter| - '''.assertNoErrors; + (< 404684003 |Clinical finding| : + 363698007 |Finding site| = << 39057004 |Pulmonary valve structure| ) + AND ^ 700043003 |Example problem list concepts reference set| + '''.assertNoErrors } @Test - def void test_6_7_2_BinaryOperators_3() { + def void test_6_6_3_NestedCompoundExpressionConstraints_2() { ''' - < 19829001|disorder of lung| OR ^ 700043003 |example problem list concepts reference set| OR - ^ 450976002|disorders and diseases reference set for GP/FP reason for encounter| - '''.assertNoErrors; + (< 404684003 |Clinical finding| : 363698007 |Finding site| = << 39057004 |Pulmonary valve structure| ) + AND (< 64572001 |Disease| : 116676008 |Associated morphology| = << 415582006 |Stenosis| ) + '''.assertNoErrors + } + + @Test + def void test_6_6_4_NestedDottedAttributes_1() { + ''' + (<< 17636008 |Specimen collection| : + 424226004 |Using device| = << 19923001 |Catheter| ) + . 363701004 |Direct substance| + '''.assertNoErrors + } + + @Test + def void test_6_6_5_NestedRefinement_1() { + ''' + (<< 404684003 |Clinical finding (finding)| OR << 272379006 |Event (event)| ): + 255234002 |After| = << 71388002 |Procedure (procedure)| + '''.assertNoErrors + } + + @Test + def void test_6_6_6_NestedAttributeName_1() { + ''' + << 125605004 |Fracture of bone| : + [0..0] ((<< 410662002 |Concept model attribute| MINUS 363698007 |Finding site| ) MINUS 16676008 |Associated morphology| ) = * + '''.assertNoErrors + } + + @Test + def void test_6_6_7_NestedAttributeValue_1() { + ''' + < 404684003 |Clinical finding| : + 47429007 |Associated with| = (< 404684003 |Clinical finding| : + 116676008 |Associated morphology| = << 55641003 |Infarct| ) + '''.assertNoErrors } private def void assertNoErrors(CharSequence it) throws Exception { diff --git a/snomed/com.b2international.snowowl.snomed.ecl/.gitignore b/snomed/com.b2international.snowowl.snomed.ecl/.gitignore deleted file mode 100644 index 8c27cc8bc18..00000000000 --- a/snomed/com.b2international.snowowl.snomed.ecl/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.antlr-generator-3.2.0-patch.jar -plugin.xml_gen \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.ecl/.launch/Generate ECL.launch b/snomed/com.b2international.snowowl.snomed.ecl/.launch/Generate ECL.launch deleted file mode 100644 index 2b362c04132..00000000000 --- a/snomed/com.b2international.snowowl.snomed.ecl/.launch/Generate ECL.launch +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/snomed/com.b2international.snowowl.snomed.ecl/ECL_v1.3_ABNF_brief_syntax_20170717.txt b/snomed/com.b2international.snowowl.snomed.ecl/ECL_v1.3_ABNF_brief_syntax_20170717.txt new file mode 100644 index 00000000000..a6868d8a4bf --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.ecl/ECL_v1.3_ABNF_brief_syntax_20170717.txt @@ -0,0 +1,74 @@ +expressionConstraint = ws ( refinedExpressionConstraint / compoundExpressionConstraint / dottedExpressionConstraint / subExpressionConstraint ) ws +refinedExpressionConstraint = subExpressionConstraint ws ":" ws eclRefinement +compoundExpressionConstraint = conjunctionExpressionConstraint / disjunctionExpressionConstraint / exclusionExpressionConstraint +conjunctionExpressionConstraint = subExpressionConstraint 1*(ws conjunction ws subExpressionConstraint) +disjunctionExpressionConstraint = subExpressionConstraint 1*(ws disjunction ws subExpressionConstraint) +exclusionExpressionConstraint = subExpressionConstraint ws exclusion ws subExpressionConstraint +dottedExpressionConstraint = subExpressionConstraint 1*(ws dottedExpressionAttribute) +dottedExpressionAttribute = dot ws eclAttributeName +subExpressionConstraint = [constraintOperator ws] [memberOf ws] (eclFocusConcept / "(" ws expressionConstraint ws ")") +eclFocusConcept = eclConceptReference / wildCard +dot = "." +memberOf = "^" +eclConceptReference = conceptId [ws "|" ws term ws "|"] +conceptId = sctId +term = 1*nonwsNonPipe *( 1*SP 1*nonwsNonPipe ) +wildCard = "*" +constraintOperator = childOf / descendantOrSelfOf / descendantOf / parentOf / ancestorOrSelfOf / ancestorOf +descendantOf = "<" +descendantOrSelfOf = "<<" +childOf = "" +ancestorOrSelfOf = ">>" +parentOf = ">!" +conjunction = (("a"/"A") ("n"/"N") ("d"/"D") mws) / "," +disjunction = ("o"/"O") ("r"/"R") mws +exclusion = ("m"/"M") ("i"/"I") ("n"/"N") ("u"/"U") ("s"/"S") mws +eclRefinement = subRefinement ws [conjunctionRefinementSet / disjunctionRefinementSet] +conjunctionRefinementSet = 1*(ws conjunction ws subRefinement) +disjunctionRefinementSet = 1*(ws disjunction ws subRefinement) +subRefinement = eclAttributeSet / eclAttributeGroup / "(" ws eclRefinement ws ")" +eclAttributeSet = subAttributeSet ws [conjunctionAttributeSet / disjunctionAttributeSet] +conjunctionAttributeSet = 1*(ws conjunction ws subAttributeSet) +disjunctionAttributeSet = 1*(ws disjunction ws subAttributeSet) +subAttributeSet = eclAttribute / "(" ws eclAttributeSet ws ")" +eclAttributeGroup = ["[" cardinality "]" ws] "{" ws eclAttributeSet ws "}" +eclAttribute = ["[" cardinality "]" ws] [reverseFlag ws] eclAttributeName ws (expressionComparisonOperator ws subExpressionConstraint / numericComparisonOperator ws "#" numericValue / stringComparisonOperator ws QM stringValue QM) +cardinality = minValue to maxValue +minValue = nonNegativeIntegerValue +to = ".." +maxValue = nonNegativeIntegerValue / many +many = "*" +reverseFlag = "R" +eclAttributeName = subExpressionConstraint +expressionComparisonOperator = "=" / "!=" +numericComparisonOperator = "=" / "!=" / "<=" / "<" / ">=" / ">" +stringComparisonOperator = "=" / "!=" +numericValue = ["-"/"+"] (decimalValue / integerValue) +stringValue = 1*(anyNonEscapedChar / escapedChar) +integerValue = digitNonZero *digit / zero +decimalValue = integerValue "." 1*digit +nonNegativeIntegerValue = (digitNonZero *digit ) / zero +sctId = digitNonZero 5*17( digit ) +ws = *( SP / HTAB / CR / LF / comment ) ; optional white space +mws = 1*( SP / HTAB / CR / LF / comment ) ; mandatory white space +comment = "/*" *(nonStarChar / starWithNonFSlash) "*/" +nonStarChar = SP / HTAB / CR / LF / %x21-29 / %x2B-7E /UTF8-2 / UTF8-3 / UTF8-4 +starWithNonFSlash = %x2A nonFSlash +nonFSlash = SP / HTAB / CR / LF / %x21-2E / %x30-7E /UTF8-2 / UTF8-3 / UTF8-4 +SP = %x20 ; space +HTAB = %x09 ; tab +CR = %x0D ; carriage return +LF = %x0A ; line feed +QM = %x22 ; quotation mark +BS = %x5C ; back slash +digit = %x30-39 +zero = %x30 +digitNonZero = %x31-39 +nonwsNonPipe = %x21-7B / %x7D-7E / UTF8-2 / UTF8-3 / UTF8-4 +anyNonEscapedChar = SP / HTAB / CR / LF / %x20-21 / %x23-5B / %x5D-7E / UTF8-2 / UTF8-3 / UTF8-4 +escapedChar = BS QM / BS BS +UTF8-2 = %xC2-DF UTF8-tail +UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail ) +UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / %xF4 %x80-8F 2( UTF8-tail ) +UTF8-tail = %x80-BF diff --git a/snomed/com.b2international.snowowl.snomed.ecl/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.ecl/META-INF/MANIFEST.MF index 65246c0ce65..4b7774acb23 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.ecl/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Expression Constraint Language Bundle-Vendor: B2i Healthcare -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-SymbolicName: com.b2international.snowowl.snomed.ecl; singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0", diff --git a/snomed/com.b2international.snowowl.snomed.ecl/build.properties b/snomed/com.b2international.snowowl.snomed.ecl/build.properties index 4f3cd9984fb..e5274a64f85 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/build.properties +++ b/snomed/com.b2international.snowowl.snomed.ecl/build.properties @@ -5,8 +5,7 @@ bin.includes = META-INF/,\ .,\ plugin.xml,\ model/ -bin.excludes = **/*.mwe2,\ - **/*.xtend +bin.excludes = **/*.mwe2 additional.bundles = org.eclipse.xtext.xbase,\ org.eclipse.xtext.common.types,\ org.eclipse.xtext.xtext.generator,\ diff --git a/snomed/com.b2international.snowowl.snomed.ecl/model/generated/Ecl.ecore b/snomed/com.b2international.snowowl.snomed.ecl/model/generated/Ecl.ecore index 31bbd54f548..3b6a381786a 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/model/generated/Ecl.ecore +++ b/snomed/com.b2international.snowowl.snomed.ecl/model/generated/Ecl.ecore @@ -35,23 +35,23 @@ - + - - - + + - + - - + @@ -145,7 +145,7 @@ - @@ -154,16 +154,16 @@ - - + - - - + - diff --git a/snomed/com.b2international.snowowl.snomed.ecl/model/generated/Ecl.genmodel b/snomed/com.b2international.snowowl.snomed.ecl/model/generated/Ecl.genmodel index e3c68d88822..84a57f57144 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/model/generated/Ecl.genmodel +++ b/snomed/com.b2international.snowowl.snomed.ecl/model/generated/Ecl.genmodel @@ -1,9 +1,9 @@ + complianceLevel="6.0" copyrightFields="false" runtimeVersion="2.17"> @@ -31,18 +31,18 @@ - - - + + + - + - - - + + + diff --git a/snomed/com.b2international.snowowl.snomed.ecl/pom.xml b/snomed/com.b2international.snowowl.snomed.ecl/pom.xml index ba9506a6d0b..562db27c7b0 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.ecl/pom.xml @@ -6,7 +6,7 @@ com.b2international.snowowl snomed-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.snomed.ecl eclipse-plugin diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/AbstractEclRuntimeModule.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/AbstractEclRuntimeModule.java index ee0183e8f25..248c784a76d 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/AbstractEclRuntimeModule.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/AbstractEclRuntimeModule.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/Ecl.xtextbin b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/Ecl.xtextbin index 91637ff8068f4aabc206d306849f29c9dd3a9263..c42fa1de4eb2d97677bc731e9f9da05490e99e26 100644 GIT binary patch delta 1142 zcmY*X$xl;Z5O?0z1c9I-hJ!3M(TFi(Me;K{p36aNP;9!>D#%=cQf@9^fEUuJ&u`_1<))c&lSHDu^ahvi90De`pp zS*kX!6!T$9E7Mj~Rnam1P5Y`Tg$yPOO0*&y94lBTT(g`&mubeMT?x~uiw`6QWn2rg zR4QYoBrlPRMXfcrG9}p4n@U?DRj6VkNK(Gr@7o#lxtr_#J{g;+OOZ8DFaQo!!DdiZ z8H1pyQYT;wM;8FL3b>8a7+^a`AHll?yob{sz`Y!6fj`^_G%iHrG`HXDb;;PV9kP@5 zbKQDT)(Hiw7LWEuOiikBU>A376%2sg;E<$sq^Sq;RWzub?1ioGW#y?}u8Xjl+WNph zGttEn2grENi&7=kncPzTX+XEbUFE z-A1>0i|KCLba$*|#m1Dyx<=?W^E_?thG0NE%)3-!Kg@fiLc>vEWsLXR4|t!Wm#mBn z_yMO;z=s^`37!z}B&YOVA93XOIwj!8oF)LDa14SM@TtI`aXth%%`qT^QFM!?~*hL)eHB9MNNXSf9rYXzHW-ge%Xr+BNN((OazcRnEU5 C57mYM delta 802 zcmY+?&1(}u6aaAF%s`)z1_;Jw3Pyy^1S z3{0`ncmiXdPj7N?RmAz zWZiRyYV-94j=TLR?3GcSiG=vn)c~`Zjuatf=$f4w06YPP&h`Lc4ouysRi|@tS_R88dP3}rZnw{>YJ(Iq2_fp?9DTD^0H>&6sOl_w&XnJ= zBj5j|Qm%YhZI#Apu^f#wX8hEOZ2!ChGgNQZalH^r0$u=J=QvBR)UM3QX5_9^gHz2* z`frz_xo?x`%1hE7H5Fyle6hqjZR0 zw21f-3n#A=X&gJ6DdYif1l1){4=4?9w$H91v0DneEy}UJ^c{cdyX2^;@6nS#_5C3C zfVln^x7_9)O74;39*eKB-W^ZcGd>NbKNDNy{V*Yp#EZTQ;ywQWma3Ie diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/EclStandaloneSetupGenerated.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/EclStandaloneSetupGenerated.java index 8cbf3f9502c..1d8daf0fb7b 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/EclStandaloneSetupGenerated.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/EclStandaloneSetupGenerated.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AncestorOf.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AncestorOf.java index 70f46322298..2d357eba8dc 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AncestorOf.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AncestorOf.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface AncestorOf extends ExpressionConstraint /** * Returns the value of the 'Constraint' containment reference. * - *

      - * If the meaning of the 'Constraint' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Constraint' containment reference. * @see #setConstraint(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AncestorOrSelfOf.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AncestorOrSelfOf.java index 6cb5bc5d541..898f9e751ee 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AncestorOrSelfOf.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AncestorOrSelfOf.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface AncestorOrSelfOf extends ExpressionConstraint /** * Returns the value of the 'Constraint' containment reference. * - *

      - * If the meaning of the 'Constraint' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Constraint' containment reference. * @see #setConstraint(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AndExpressionConstraint.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AndExpressionConstraint.java index afd8e0708f7..79bb00fbe9f 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AndExpressionConstraint.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AndExpressionConstraint.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface AndExpressionConstraint extends ExpressionConstraint /** * Returns the value of the 'Left' containment reference. * - *

      - * If the meaning of the 'Left' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Left' containment reference. * @see #setLeft(ExpressionConstraint) @@ -64,10 +60,6 @@ public interface AndExpressionConstraint extends ExpressionConstraint /** * Returns the value of the 'Right' containment reference. * - *

      - * If the meaning of the 'Right' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Right' containment reference. * @see #setRight(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AndRefinement.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AndRefinement.java index e5278bc29b4..6805c3415c7 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AndRefinement.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AndRefinement.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,23 +33,19 @@ * @model * @generated */ -public interface AndRefinement extends Refinement +public interface AndRefinement extends EclRefinement { /** * Returns the value of the 'Left' containment reference. * - *

      - * If the meaning of the 'Left' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Left' containment reference. - * @see #setLeft(Refinement) + * @see #setLeft(EclRefinement) * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getAndRefinement_Left() * @model containment="true" * @generated */ - Refinement getLeft(); + EclRefinement getLeft(); /** * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.AndRefinement#getLeft Left}' containment reference. @@ -59,23 +55,19 @@ public interface AndRefinement extends Refinement * @see #getLeft() * @generated */ - void setLeft(Refinement value); + void setLeft(EclRefinement value); /** * Returns the value of the 'Right' containment reference. * - *

      - * If the meaning of the 'Right' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Right' containment reference. - * @see #setRight(Refinement) + * @see #setRight(EclRefinement) * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getAndRefinement_Right() * @model containment="true" * @generated */ - Refinement getRight(); + EclRefinement getRight(); /** * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.AndRefinement#getRight Right}' containment reference. @@ -85,6 +77,6 @@ public interface AndRefinement extends Refinement * @see #getRight() * @generated */ - void setRight(Refinement value); + void setRight(EclRefinement value); } // AndRefinement diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Any.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Any.java index d1de561e804..022b101589f 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Any.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Any.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeComparison.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeComparison.java index 5a5facd686d..2e276b36fd6 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeComparison.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeComparison.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface AttributeComparison extends Comparison /** * Returns the value of the 'Constraint' containment reference. * - *

      - * If the meaning of the 'Constraint' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Constraint' containment reference. * @see #setConstraint(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeConstraint.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeConstraint.java index 5cb49cc1da2..1ae9e8c1b40 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeConstraint.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeConstraint.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,15 +35,11 @@ * @model * @generated */ -public interface AttributeConstraint extends Refinement +public interface AttributeConstraint extends EclRefinement { /** * Returns the value of the 'Cardinality' containment reference. * - *

      - * If the meaning of the 'Cardinality' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Cardinality' containment reference. * @see #setCardinality(Cardinality) @@ -66,10 +62,6 @@ public interface AttributeConstraint extends Refinement /** * Returns the value of the 'Reversed' attribute. * - *

      - * If the meaning of the 'Reversed' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Reversed' attribute. * @see #setReversed(boolean) @@ -92,10 +84,6 @@ public interface AttributeConstraint extends Refinement /** * Returns the value of the 'Attribute' containment reference. * - *

      - * If the meaning of the 'Attribute' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Attribute' containment reference. * @see #setAttribute(ExpressionConstraint) @@ -118,10 +106,6 @@ public interface AttributeConstraint extends Refinement /** * Returns the value of the 'Comparison' containment reference. * - *

      - * If the meaning of the 'Comparison' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Comparison' containment reference. * @see #setComparison(Comparison) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeValueEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeValueEquals.java index da428077947..5f679bb0acc 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeValueEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeValueEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeValueNotEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeValueNotEquals.java index 54951caa1a5..628edac8cb6 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeValueNotEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeValueNotEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/BooleanValueEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/BooleanValueEquals.java index 3e1a227b916..088e7857fbb 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/BooleanValueEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/BooleanValueEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface BooleanValueEquals extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(boolean) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/BooleanValueNotEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/BooleanValueNotEquals.java index 8446c0881ad..b65203dc305 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/BooleanValueNotEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/BooleanValueNotEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface BooleanValueNotEquals extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(boolean) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Cardinality.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Cardinality.java index f7e96334d46..e2a139164ce 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Cardinality.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Cardinality.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,10 +39,6 @@ public interface Cardinality extends EObject /** * Returns the value of the 'Min' attribute. * - *

      - * If the meaning of the 'Min' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Min' attribute. * @see #setMin(int) @@ -65,10 +61,6 @@ public interface Cardinality extends EObject /** * Returns the value of the 'Max' attribute. * - *

      - * If the meaning of the 'Max' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Max' attribute. * @see #setMax(int) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ChildOf.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ChildOf.java index d8d7b01c48a..4377b0c2a2f 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ChildOf.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ChildOf.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface ChildOf extends ExpressionConstraint /** * Returns the value of the 'Constraint' containment reference. * - *

      - * If the meaning of the 'Constraint' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Constraint' containment reference. * @see #setConstraint(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Comparison.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Comparison.java index 5e0ab79e5e4..e3c0c3e8ac6 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Comparison.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Comparison.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DataTypeComparison.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DataTypeComparison.java index de26a183c78..ec5a9394ee3 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DataTypeComparison.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DataTypeComparison.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueEquals.java index 6a936fbb7b2..6d3ebe3f139 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface DecimalValueEquals extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(BigDecimal) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueGreaterThan.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueGreaterThan.java index f82bdc026a2..9dc137826bd 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueGreaterThan.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueGreaterThan.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface DecimalValueGreaterThan extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(BigDecimal) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueGreaterThanEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueGreaterThanEquals.java index 1dfb9501178..da572ea25eb 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueGreaterThanEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueGreaterThanEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface DecimalValueGreaterThanEquals extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(BigDecimal) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueLessThan.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueLessThan.java index 43ee0fcd09e..c157a217500 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueLessThan.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueLessThan.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface DecimalValueLessThan extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(BigDecimal) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueLessThanEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueLessThanEquals.java index c4f9a6758ad..73a60fcf8c6 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueLessThanEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueLessThanEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface DecimalValueLessThanEquals extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(BigDecimal) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueNotEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueNotEquals.java index cab0f5baacb..9ed1b938994 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueNotEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DecimalValueNotEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface DecimalValueNotEquals extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(BigDecimal) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DescendantOf.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DescendantOf.java index 4d316094be6..2806727002d 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DescendantOf.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DescendantOf.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface DescendantOf extends ExpressionConstraint /** * Returns the value of the 'Constraint' containment reference. * - *

      - * If the meaning of the 'Constraint' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Constraint' containment reference. * @see #setConstraint(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DescendantOrSelfOf.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DescendantOrSelfOf.java index 6788652b8b7..92a2c69c5db 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DescendantOrSelfOf.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DescendantOrSelfOf.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface DescendantOrSelfOf extends ExpressionConstraint /** * Returns the value of the 'Constraint' containment reference. * - *

      - * If the meaning of the 'Constraint' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Constraint' containment reference. * @see #setConstraint(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DottedExpressionConstraint.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DottedExpressionConstraint.java index 813a3c142b1..afe69783761 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DottedExpressionConstraint.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/DottedExpressionConstraint.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface DottedExpressionConstraint extends ExpressionConstraint /** * Returns the value of the 'Constraint' containment reference. * - *

      - * If the meaning of the 'Constraint' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Constraint' containment reference. * @see #setConstraint(ExpressionConstraint) @@ -64,10 +60,6 @@ public interface DottedExpressionConstraint extends ExpressionConstraint /** * Returns the value of the 'Attribute' containment reference. * - *

      - * If the meaning of the 'Attribute' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Attribute' containment reference. * @see #setAttribute(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeGroup.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclAttributeGroup.java similarity index 68% rename from snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeGroup.java rename to snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclAttributeGroup.java index b56de7a9e55..1388f216d6a 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/AttributeGroup.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclAttributeGroup.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,34 +25,30 @@ * The following features are supported: *

      *
        - *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup#getCardinality Cardinality}
      • - *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup#getRefinement Refinement}
      • + *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup#getCardinality Cardinality}
      • + *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup#getRefinement Refinement}
      • *
      * - * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getAttributeGroup() + * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getEclAttributeGroup() * @model * @generated */ -public interface AttributeGroup extends Refinement +public interface EclAttributeGroup extends EclRefinement { /** * Returns the value of the 'Cardinality' containment reference. * - *

      - * If the meaning of the 'Cardinality' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Cardinality' containment reference. * @see #setCardinality(Cardinality) - * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getAttributeGroup_Cardinality() + * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getEclAttributeGroup_Cardinality() * @model containment="true" * @generated */ Cardinality getCardinality(); /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup#getCardinality Cardinality}' containment reference. + * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup#getCardinality Cardinality}' containment reference. * * * @param value the new value of the 'Cardinality' containment reference. @@ -64,27 +60,23 @@ public interface AttributeGroup extends Refinement /** * Returns the value of the 'Refinement' containment reference. * - *

      - * If the meaning of the 'Refinement' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Refinement' containment reference. - * @see #setRefinement(Refinement) - * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getAttributeGroup_Refinement() + * @see #setRefinement(EclRefinement) + * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getEclAttributeGroup_Refinement() * @model containment="true" * @generated */ - Refinement getRefinement(); + EclRefinement getRefinement(); /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup#getRefinement Refinement}' containment reference. + * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup#getRefinement Refinement}' containment reference. * * * @param value the new value of the 'Refinement' containment reference. * @see #getRefinement() * @generated */ - void setRefinement(Refinement value); + void setRefinement(EclRefinement value); -} // AttributeGroup +} // EclAttributeGroup diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ConceptReference.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclConceptReference.java similarity index 71% rename from snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ConceptReference.java rename to snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclConceptReference.java index 8dcd299005e..468bfe4c961 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ConceptReference.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclConceptReference.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,34 +25,30 @@ * The following features are supported: *

      *
        - *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.ConceptReference#getId Id}
      • - *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.ConceptReference#getTerm Term}
      • + *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference#getId Id}
      • + *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference#getTerm Term}
      • *
      * - * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getConceptReference() + * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getEclConceptReference() * @model * @generated */ -public interface ConceptReference extends ExpressionConstraint +public interface EclConceptReference extends ExpressionConstraint { /** * Returns the value of the 'Id' attribute. * - *

      - * If the meaning of the 'Id' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Id' attribute. * @see #setId(String) - * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getConceptReference_Id() + * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getEclConceptReference_Id() * @model * @generated */ String getId(); /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.ConceptReference#getId Id}' attribute. + * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference#getId Id}' attribute. * * * @param value the new value of the 'Id' attribute. @@ -64,21 +60,17 @@ public interface ConceptReference extends ExpressionConstraint /** * Returns the value of the 'Term' attribute. * - *

      - * If the meaning of the 'Term' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Term' attribute. * @see #setTerm(String) - * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getConceptReference_Term() + * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getEclConceptReference_Term() * @model * @generated */ String getTerm(); /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.ConceptReference#getTerm Term}' attribute. + * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference#getTerm Term}' attribute. * * * @param value the new value of the 'Term' attribute. @@ -87,4 +79,4 @@ public interface ConceptReference extends ExpressionConstraint */ void setTerm(String value); -} // ConceptReference +} // EclConceptReference diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclFactory.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclFactory.java index b0bee78ec58..b4d51dbaa08 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclFactory.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclFactory.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -123,7 +123,7 @@ public interface EclFactory extends EFactory * @return a new object of class 'Concept Reference'. * @generated */ - ConceptReference createConceptReference(); + EclConceptReference createEclConceptReference(); /** * Returns a new object of class 'Any'. @@ -141,7 +141,7 @@ public interface EclFactory extends EFactory * @return a new object of class 'Refinement'. * @generated */ - Refinement createRefinement(); + EclRefinement createEclRefinement(); /** * Returns a new object of class 'Nested Refinement'. @@ -159,7 +159,7 @@ public interface EclFactory extends EFactory * @return a new object of class 'Attribute Group'. * @generated */ - AttributeGroup createAttributeGroup(); + EclAttributeGroup createEclAttributeGroup(); /** * Returns a new object of class 'Attribute Constraint'. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclPackage.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclPackage.java index 3579c584321..ea4475839f5 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclPackage.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclPackage.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -313,14 +313,14 @@ public interface EclPackage extends EPackage int MEMBER_OF_FEATURE_COUNT = EXPRESSION_CONSTRAINT_FEATURE_COUNT + 1; /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.ConceptReferenceImpl Concept Reference}' class. + * The meta object id for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.EclConceptReferenceImpl Concept Reference}' class. * * - * @see com.b2international.snowowl.snomed.ecl.ecl.impl.ConceptReferenceImpl - * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclPackageImpl#getConceptReference() + * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclConceptReferenceImpl + * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclPackageImpl#getEclConceptReference() * @generated */ - int CONCEPT_REFERENCE = 9; + int ECL_CONCEPT_REFERENCE = 9; /** * The feature id for the 'Id' attribute. @@ -329,7 +329,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int CONCEPT_REFERENCE__ID = EXPRESSION_CONSTRAINT_FEATURE_COUNT + 0; + int ECL_CONCEPT_REFERENCE__ID = EXPRESSION_CONSTRAINT_FEATURE_COUNT + 0; /** * The feature id for the 'Term' attribute. @@ -338,7 +338,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int CONCEPT_REFERENCE__TERM = EXPRESSION_CONSTRAINT_FEATURE_COUNT + 1; + int ECL_CONCEPT_REFERENCE__TERM = EXPRESSION_CONSTRAINT_FEATURE_COUNT + 1; /** * The number of structural features of the 'Concept Reference' class. @@ -347,7 +347,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int CONCEPT_REFERENCE_FEATURE_COUNT = EXPRESSION_CONSTRAINT_FEATURE_COUNT + 2; + int ECL_CONCEPT_REFERENCE_FEATURE_COUNT = EXPRESSION_CONSTRAINT_FEATURE_COUNT + 2; /** * The meta object id for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.AnyImpl Any}' class. @@ -369,14 +369,14 @@ public interface EclPackage extends EPackage int ANY_FEATURE_COUNT = EXPRESSION_CONSTRAINT_FEATURE_COUNT + 0; /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.RefinementImpl Refinement}' class. + * The meta object id for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.EclRefinementImpl Refinement}' class. * * - * @see com.b2international.snowowl.snomed.ecl.ecl.impl.RefinementImpl - * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclPackageImpl#getRefinement() + * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclRefinementImpl + * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclPackageImpl#getEclRefinement() * @generated */ - int REFINEMENT = 11; + int ECL_REFINEMENT = 11; /** * The number of structural features of the 'Refinement' class. @@ -385,7 +385,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int REFINEMENT_FEATURE_COUNT = 0; + int ECL_REFINEMENT_FEATURE_COUNT = 0; /** * The meta object id for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.NestedRefinementImpl Nested Refinement}' class. @@ -404,7 +404,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int NESTED_REFINEMENT__NESTED = REFINEMENT_FEATURE_COUNT + 0; + int NESTED_REFINEMENT__NESTED = ECL_REFINEMENT_FEATURE_COUNT + 0; /** * The number of structural features of the 'Nested Refinement' class. @@ -413,17 +413,17 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int NESTED_REFINEMENT_FEATURE_COUNT = REFINEMENT_FEATURE_COUNT + 1; + int NESTED_REFINEMENT_FEATURE_COUNT = ECL_REFINEMENT_FEATURE_COUNT + 1; /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.AttributeGroupImpl Attribute Group}' class. + * The meta object id for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.EclAttributeGroupImpl Attribute Group}' class. * * - * @see com.b2international.snowowl.snomed.ecl.ecl.impl.AttributeGroupImpl - * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclPackageImpl#getAttributeGroup() + * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclAttributeGroupImpl + * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclPackageImpl#getEclAttributeGroup() * @generated */ - int ATTRIBUTE_GROUP = 13; + int ECL_ATTRIBUTE_GROUP = 13; /** * The feature id for the 'Cardinality' containment reference. @@ -432,7 +432,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int ATTRIBUTE_GROUP__CARDINALITY = REFINEMENT_FEATURE_COUNT + 0; + int ECL_ATTRIBUTE_GROUP__CARDINALITY = ECL_REFINEMENT_FEATURE_COUNT + 0; /** * The feature id for the 'Refinement' containment reference. @@ -441,7 +441,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int ATTRIBUTE_GROUP__REFINEMENT = REFINEMENT_FEATURE_COUNT + 1; + int ECL_ATTRIBUTE_GROUP__REFINEMENT = ECL_REFINEMENT_FEATURE_COUNT + 1; /** * The number of structural features of the 'Attribute Group' class. @@ -450,7 +450,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int ATTRIBUTE_GROUP_FEATURE_COUNT = REFINEMENT_FEATURE_COUNT + 2; + int ECL_ATTRIBUTE_GROUP_FEATURE_COUNT = ECL_REFINEMENT_FEATURE_COUNT + 2; /** * The meta object id for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.AttributeConstraintImpl Attribute Constraint}' class. @@ -469,7 +469,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int ATTRIBUTE_CONSTRAINT__CARDINALITY = REFINEMENT_FEATURE_COUNT + 0; + int ATTRIBUTE_CONSTRAINT__CARDINALITY = ECL_REFINEMENT_FEATURE_COUNT + 0; /** * The feature id for the 'Reversed' attribute. @@ -478,7 +478,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int ATTRIBUTE_CONSTRAINT__REVERSED = REFINEMENT_FEATURE_COUNT + 1; + int ATTRIBUTE_CONSTRAINT__REVERSED = ECL_REFINEMENT_FEATURE_COUNT + 1; /** * The feature id for the 'Attribute' containment reference. @@ -487,7 +487,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int ATTRIBUTE_CONSTRAINT__ATTRIBUTE = REFINEMENT_FEATURE_COUNT + 2; + int ATTRIBUTE_CONSTRAINT__ATTRIBUTE = ECL_REFINEMENT_FEATURE_COUNT + 2; /** * The feature id for the 'Comparison' containment reference. @@ -496,7 +496,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int ATTRIBUTE_CONSTRAINT__COMPARISON = REFINEMENT_FEATURE_COUNT + 3; + int ATTRIBUTE_CONSTRAINT__COMPARISON = ECL_REFINEMENT_FEATURE_COUNT + 3; /** * The number of structural features of the 'Attribute Constraint' class. @@ -505,7 +505,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int ATTRIBUTE_CONSTRAINT_FEATURE_COUNT = REFINEMENT_FEATURE_COUNT + 4; + int ATTRIBUTE_CONSTRAINT_FEATURE_COUNT = ECL_REFINEMENT_FEATURE_COUNT + 4; /** * The meta object id for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.CardinalityImpl Cardinality}' class. @@ -1344,7 +1344,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int OR_REFINEMENT__LEFT = REFINEMENT_FEATURE_COUNT + 0; + int OR_REFINEMENT__LEFT = ECL_REFINEMENT_FEATURE_COUNT + 0; /** * The feature id for the 'Right' containment reference. @@ -1353,7 +1353,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int OR_REFINEMENT__RIGHT = REFINEMENT_FEATURE_COUNT + 1; + int OR_REFINEMENT__RIGHT = ECL_REFINEMENT_FEATURE_COUNT + 1; /** * The number of structural features of the 'Or Refinement' class. @@ -1362,7 +1362,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int OR_REFINEMENT_FEATURE_COUNT = REFINEMENT_FEATURE_COUNT + 2; + int OR_REFINEMENT_FEATURE_COUNT = ECL_REFINEMENT_FEATURE_COUNT + 2; /** * The meta object id for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.AndRefinementImpl And Refinement}' class. @@ -1381,7 +1381,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int AND_REFINEMENT__LEFT = REFINEMENT_FEATURE_COUNT + 0; + int AND_REFINEMENT__LEFT = ECL_REFINEMENT_FEATURE_COUNT + 0; /** * The feature id for the 'Right' containment reference. @@ -1390,7 +1390,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int AND_REFINEMENT__RIGHT = REFINEMENT_FEATURE_COUNT + 1; + int AND_REFINEMENT__RIGHT = ECL_REFINEMENT_FEATURE_COUNT + 1; /** * The number of structural features of the 'And Refinement' class. @@ -1399,7 +1399,7 @@ public interface EclPackage extends EPackage * @generated * @ordered */ - int AND_REFINEMENT_FEATURE_COUNT = REFINEMENT_FEATURE_COUNT + 2; + int AND_REFINEMENT_FEATURE_COUNT = ECL_REFINEMENT_FEATURE_COUNT + 2; /** @@ -1581,36 +1581,36 @@ public interface EclPackage extends EPackage EReference getMemberOf_Constraint(); /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ecl.ecl.ConceptReference Concept Reference}'. + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference Concept Reference}'. * * * @return the meta object for class 'Concept Reference'. - * @see com.b2international.snowowl.snomed.ecl.ecl.ConceptReference + * @see com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference * @generated */ - EClass getConceptReference(); + EClass getEclConceptReference(); /** - * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.ecl.ecl.ConceptReference#getId Id}'. + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference#getId Id}'. * * * @return the meta object for the attribute 'Id'. - * @see com.b2international.snowowl.snomed.ecl.ecl.ConceptReference#getId() - * @see #getConceptReference() + * @see com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference#getId() + * @see #getEclConceptReference() * @generated */ - EAttribute getConceptReference_Id(); + EAttribute getEclConceptReference_Id(); /** - * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.ecl.ecl.ConceptReference#getTerm Term}'. + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference#getTerm Term}'. * * * @return the meta object for the attribute 'Term'. - * @see com.b2international.snowowl.snomed.ecl.ecl.ConceptReference#getTerm() - * @see #getConceptReference() + * @see com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference#getTerm() + * @see #getEclConceptReference() * @generated */ - EAttribute getConceptReference_Term(); + EAttribute getEclConceptReference_Term(); /** * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ecl.ecl.Any Any}'. @@ -1623,14 +1623,14 @@ public interface EclPackage extends EPackage EClass getAny(); /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ecl.ecl.Refinement Refinement}'. + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ecl.ecl.EclRefinement Refinement}'. * * * @return the meta object for class 'Refinement'. - * @see com.b2international.snowowl.snomed.ecl.ecl.Refinement + * @see com.b2international.snowowl.snomed.ecl.ecl.EclRefinement * @generated */ - EClass getRefinement(); + EClass getEclRefinement(); /** * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ecl.ecl.NestedRefinement Nested Refinement}'. @@ -1654,36 +1654,36 @@ public interface EclPackage extends EPackage EReference getNestedRefinement_Nested(); /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup Attribute Group}'. + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup Attribute Group}'. * * * @return the meta object for class 'Attribute Group'. - * @see com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup + * @see com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup * @generated */ - EClass getAttributeGroup(); + EClass getEclAttributeGroup(); /** - * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup#getCardinality Cardinality}'. + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup#getCardinality Cardinality}'. * * * @return the meta object for the containment reference 'Cardinality'. - * @see com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup#getCardinality() - * @see #getAttributeGroup() + * @see com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup#getCardinality() + * @see #getEclAttributeGroup() * @generated */ - EReference getAttributeGroup_Cardinality(); + EReference getEclAttributeGroup_Cardinality(); /** - * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup#getRefinement Refinement}'. + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup#getRefinement Refinement}'. * * * @return the meta object for the containment reference 'Refinement'. - * @see com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup#getRefinement() - * @see #getAttributeGroup() + * @see com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup#getRefinement() + * @see #getEclAttributeGroup() * @generated */ - EReference getAttributeGroup_Refinement(); + EReference getEclAttributeGroup_Refinement(); /** * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ecl.ecl.AttributeConstraint Attribute Constraint}'. @@ -2591,14 +2591,14 @@ interface Literals EReference MEMBER_OF__CONSTRAINT = eINSTANCE.getMemberOf_Constraint(); /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.ConceptReferenceImpl Concept Reference}' class. + * The meta object literal for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.EclConceptReferenceImpl Concept Reference}' class. * * - * @see com.b2international.snowowl.snomed.ecl.ecl.impl.ConceptReferenceImpl - * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclPackageImpl#getConceptReference() + * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclConceptReferenceImpl + * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclPackageImpl#getEclConceptReference() * @generated */ - EClass CONCEPT_REFERENCE = eINSTANCE.getConceptReference(); + EClass ECL_CONCEPT_REFERENCE = eINSTANCE.getEclConceptReference(); /** * The meta object literal for the 'Id' attribute feature. @@ -2606,7 +2606,7 @@ interface Literals * * @generated */ - EAttribute CONCEPT_REFERENCE__ID = eINSTANCE.getConceptReference_Id(); + EAttribute ECL_CONCEPT_REFERENCE__ID = eINSTANCE.getEclConceptReference_Id(); /** * The meta object literal for the 'Term' attribute feature. @@ -2614,7 +2614,7 @@ interface Literals * * @generated */ - EAttribute CONCEPT_REFERENCE__TERM = eINSTANCE.getConceptReference_Term(); + EAttribute ECL_CONCEPT_REFERENCE__TERM = eINSTANCE.getEclConceptReference_Term(); /** * The meta object literal for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.AnyImpl Any}' class. @@ -2627,14 +2627,14 @@ interface Literals EClass ANY = eINSTANCE.getAny(); /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.RefinementImpl Refinement}' class. + * The meta object literal for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.EclRefinementImpl Refinement}' class. * * - * @see com.b2international.snowowl.snomed.ecl.ecl.impl.RefinementImpl - * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclPackageImpl#getRefinement() + * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclRefinementImpl + * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclPackageImpl#getEclRefinement() * @generated */ - EClass REFINEMENT = eINSTANCE.getRefinement(); + EClass ECL_REFINEMENT = eINSTANCE.getEclRefinement(); /** * The meta object literal for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.NestedRefinementImpl Nested Refinement}' class. @@ -2655,14 +2655,14 @@ interface Literals EReference NESTED_REFINEMENT__NESTED = eINSTANCE.getNestedRefinement_Nested(); /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.AttributeGroupImpl Attribute Group}' class. + * The meta object literal for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.EclAttributeGroupImpl Attribute Group}' class. * * - * @see com.b2international.snowowl.snomed.ecl.ecl.impl.AttributeGroupImpl - * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclPackageImpl#getAttributeGroup() + * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclAttributeGroupImpl + * @see com.b2international.snowowl.snomed.ecl.ecl.impl.EclPackageImpl#getEclAttributeGroup() * @generated */ - EClass ATTRIBUTE_GROUP = eINSTANCE.getAttributeGroup(); + EClass ECL_ATTRIBUTE_GROUP = eINSTANCE.getEclAttributeGroup(); /** * The meta object literal for the 'Cardinality' containment reference feature. @@ -2670,7 +2670,7 @@ interface Literals * * @generated */ - EReference ATTRIBUTE_GROUP__CARDINALITY = eINSTANCE.getAttributeGroup_Cardinality(); + EReference ECL_ATTRIBUTE_GROUP__CARDINALITY = eINSTANCE.getEclAttributeGroup_Cardinality(); /** * The meta object literal for the 'Refinement' containment reference feature. @@ -2678,7 +2678,7 @@ interface Literals * * @generated */ - EReference ATTRIBUTE_GROUP__REFINEMENT = eINSTANCE.getAttributeGroup_Refinement(); + EReference ECL_ATTRIBUTE_GROUP__REFINEMENT = eINSTANCE.getEclAttributeGroup_Refinement(); /** * The meta object literal for the '{@link com.b2international.snowowl.snomed.ecl.ecl.impl.AttributeConstraintImpl Attribute Constraint}' class. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Refinement.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclRefinement.java similarity index 86% rename from snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Refinement.java rename to snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclRefinement.java index c7a69aef6fe..9ae1b942395 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Refinement.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclRefinement.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,10 +23,10 @@ * * * - * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getRefinement() + * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getEclRefinement() * @model * @generated */ -public interface Refinement extends EObject +public interface EclRefinement extends EObject { -} // Refinement +} // EclRefinement diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ExclusionExpressionConstraint.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ExclusionExpressionConstraint.java index f47a78c9b0a..88cf4ebddc4 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ExclusionExpressionConstraint.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ExclusionExpressionConstraint.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface ExclusionExpressionConstraint extends ExpressionConstraint /** * Returns the value of the 'Left' containment reference. * - *

      - * If the meaning of the 'Left' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Left' containment reference. * @see #setLeft(ExpressionConstraint) @@ -64,10 +60,6 @@ public interface ExclusionExpressionConstraint extends ExpressionConstraint /** * Returns the value of the 'Right' containment reference. * - *

      - * If the meaning of the 'Right' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Right' containment reference. * @see #setRight(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ExpressionConstraint.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ExpressionConstraint.java index 0aeb31ddbd3..20ef787b6b4 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ExpressionConstraint.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ExpressionConstraint.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueEquals.java index 8c78d12c608..66c6db6c357 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface IntegerValueEquals extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(int) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueGreaterThan.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueGreaterThan.java index 94a82235cab..6a306c5e8d3 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueGreaterThan.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueGreaterThan.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface IntegerValueGreaterThan extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(int) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueGreaterThanEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueGreaterThanEquals.java index 1c178c85e64..801ad5131cc 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueGreaterThanEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueGreaterThanEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface IntegerValueGreaterThanEquals extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(int) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueLessThan.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueLessThan.java index f456c0df2e2..1ee7c9a4f85 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueLessThan.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueLessThan.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface IntegerValueLessThan extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(int) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueLessThanEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueLessThanEquals.java index c2eca9a47eb..422beb320fe 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueLessThanEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueLessThanEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface IntegerValueLessThanEquals extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(int) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueNotEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueNotEquals.java index bc501e44124..2ac270c65c4 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueNotEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/IntegerValueNotEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface IntegerValueNotEquals extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(int) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/MemberOf.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/MemberOf.java index 853ac3f3f43..84c27f3f726 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/MemberOf.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/MemberOf.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface MemberOf extends ExpressionConstraint /** * Returns the value of the 'Constraint' containment reference. * - *

      - * If the meaning of the 'Constraint' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Constraint' containment reference. * @see #setConstraint(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/NestedExpression.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/NestedExpression.java index 1aff61d7b56..a86c4e13311 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/NestedExpression.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/NestedExpression.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface NestedExpression extends ExpressionConstraint /** * Returns the value of the 'Nested' containment reference. * - *

      - * If the meaning of the 'Nested' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Nested' containment reference. * @see #setNested(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/NestedRefinement.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/NestedRefinement.java index 691fa32ece1..2adbb9b3381 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/NestedRefinement.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/NestedRefinement.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,23 +32,19 @@ * @model * @generated */ -public interface NestedRefinement extends Refinement +public interface NestedRefinement extends EclRefinement { /** * Returns the value of the 'Nested' containment reference. * - *

      - * If the meaning of the 'Nested' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Nested' containment reference. - * @see #setNested(Refinement) + * @see #setNested(EclRefinement) * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getNestedRefinement_Nested() * @model containment="true" * @generated */ - Refinement getNested(); + EclRefinement getNested(); /** * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.NestedRefinement#getNested Nested}' containment reference. @@ -58,6 +54,6 @@ public interface NestedRefinement extends Refinement * @see #getNested() * @generated */ - void setNested(Refinement value); + void setNested(EclRefinement value); } // NestedRefinement diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/OrExpressionConstraint.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/OrExpressionConstraint.java index c4f9e615317..06293439ef6 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/OrExpressionConstraint.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/OrExpressionConstraint.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface OrExpressionConstraint extends ExpressionConstraint /** * Returns the value of the 'Left' containment reference. * - *

      - * If the meaning of the 'Left' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Left' containment reference. * @see #setLeft(ExpressionConstraint) @@ -64,10 +60,6 @@ public interface OrExpressionConstraint extends ExpressionConstraint /** * Returns the value of the 'Right' containment reference. * - *

      - * If the meaning of the 'Right' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Right' containment reference. * @see #setRight(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/OrRefinement.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/OrRefinement.java index 5527d9726c4..f2d0d705625 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/OrRefinement.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/OrRefinement.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,23 +33,19 @@ * @model * @generated */ -public interface OrRefinement extends Refinement +public interface OrRefinement extends EclRefinement { /** * Returns the value of the 'Left' containment reference. * - *

      - * If the meaning of the 'Left' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Left' containment reference. - * @see #setLeft(Refinement) + * @see #setLeft(EclRefinement) * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getOrRefinement_Left() * @model containment="true" * @generated */ - Refinement getLeft(); + EclRefinement getLeft(); /** * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.OrRefinement#getLeft Left}' containment reference. @@ -59,23 +55,19 @@ public interface OrRefinement extends Refinement * @see #getLeft() * @generated */ - void setLeft(Refinement value); + void setLeft(EclRefinement value); /** * Returns the value of the 'Right' containment reference. * - *

      - * If the meaning of the 'Right' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Right' containment reference. - * @see #setRight(Refinement) + * @see #setRight(EclRefinement) * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getOrRefinement_Right() * @model containment="true" * @generated */ - Refinement getRight(); + EclRefinement getRight(); /** * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.OrRefinement#getRight Right}' containment reference. @@ -85,6 +77,6 @@ public interface OrRefinement extends Refinement * @see #getRight() * @generated */ - void setRight(Refinement value); + void setRight(EclRefinement value); } // OrRefinement diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ParentOf.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ParentOf.java index f8a6d42caf0..07196f53ed8 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ParentOf.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/ParentOf.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface ParentOf extends ExpressionConstraint /** * Returns the value of the 'Constraint' containment reference. * - *

      - * If the meaning of the 'Constraint' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Constraint' containment reference. * @see #setConstraint(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/RefinedExpressionConstraint.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/RefinedExpressionConstraint.java index 331e783dd9d..bc4ec9e5cfa 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/RefinedExpressionConstraint.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/RefinedExpressionConstraint.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface RefinedExpressionConstraint extends ExpressionConstraint /** * Returns the value of the 'Constraint' containment reference. * - *

      - * If the meaning of the 'Constraint' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Constraint' containment reference. * @see #setConstraint(ExpressionConstraint) @@ -64,18 +60,14 @@ public interface RefinedExpressionConstraint extends ExpressionConstraint /** * Returns the value of the 'Refinement' containment reference. * - *

      - * If the meaning of the 'Refinement' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Refinement' containment reference. - * @see #setRefinement(Refinement) + * @see #setRefinement(EclRefinement) * @see com.b2international.snowowl.snomed.ecl.ecl.EclPackage#getRefinedExpressionConstraint_Refinement() * @model containment="true" * @generated */ - Refinement getRefinement(); + EclRefinement getRefinement(); /** * Sets the value of the '{@link com.b2international.snowowl.snomed.ecl.ecl.RefinedExpressionConstraint#getRefinement Refinement}' containment reference. @@ -85,6 +77,6 @@ public interface RefinedExpressionConstraint extends ExpressionConstraint * @see #getRefinement() * @generated */ - void setRefinement(Refinement value); + void setRefinement(EclRefinement value); } // RefinedExpressionConstraint diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Script.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Script.java index 15d6ce482ba..9f43b7efad8 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Script.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/Script.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface Script extends EObject /** * Returns the value of the 'Constraint' containment reference. * - *

      - * If the meaning of the 'Constraint' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Constraint' containment reference. * @see #setConstraint(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/StringValueEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/StringValueEquals.java index 22dc151cd80..c61300821db 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/StringValueEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/StringValueEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface StringValueEquals extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(String) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/StringValueNotEquals.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/StringValueNotEquals.java index 73c29b6e8ed..29782b6d40d 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/StringValueNotEquals.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/StringValueNotEquals.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface StringValueNotEquals extends DataTypeComparison /** * Returns the value of the 'Value' attribute. * - *

      - * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' attribute. * @see #setValue(String) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AncestorOfImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AncestorOfImpl.java index e2da084c133..7940a7d5a2e 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AncestorOfImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AncestorOfImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getConstraint() { return constraint; @@ -105,6 +106,7 @@ public NotificationChain basicSetConstraint(ExpressionConstraint newConstraint, * * @generated */ + @Override public void setConstraint(ExpressionConstraint newConstraint) { if (newConstraint != constraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AncestorOrSelfOfImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AncestorOrSelfOfImpl.java index bd30df0878f..09d05e0d42a 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AncestorOrSelfOfImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AncestorOrSelfOfImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getConstraint() { return constraint; @@ -105,6 +106,7 @@ public NotificationChain basicSetConstraint(ExpressionConstraint newConstraint, * * @generated */ + @Override public void setConstraint(ExpressionConstraint newConstraint) { if (newConstraint != constraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AndExpressionConstraintImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AndExpressionConstraintImpl.java index e7df68be209..caf841b2a10 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AndExpressionConstraintImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AndExpressionConstraintImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,6 +89,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getLeft() { return left; @@ -116,6 +117,7 @@ public NotificationChain basicSetLeft(ExpressionConstraint newLeft, Notification * * @generated */ + @Override public void setLeft(ExpressionConstraint newLeft) { if (newLeft != left) @@ -137,6 +139,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public ExpressionConstraint getRight() { return right; @@ -164,6 +167,7 @@ public NotificationChain basicSetRight(ExpressionConstraint newRight, Notificati * * @generated */ + @Override public void setRight(ExpressionConstraint newRight) { if (newRight != right) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AndRefinementImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AndRefinementImpl.java index df22c663243..a480abbfbd9 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AndRefinementImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AndRefinementImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import com.b2international.snowowl.snomed.ecl.ecl.AndRefinement; import com.b2international.snowowl.snomed.ecl.ecl.EclPackage; -import com.b2international.snowowl.snomed.ecl.ecl.Refinement; +import com.b2international.snowowl.snomed.ecl.ecl.EclRefinement; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -41,7 +41,7 @@ * * @generated */ -public class AndRefinementImpl extends RefinementImpl implements AndRefinement +public class AndRefinementImpl extends EclRefinementImpl implements AndRefinement { /** * The cached value of the '{@link #getLeft() Left}' containment reference. @@ -51,7 +51,7 @@ public class AndRefinementImpl extends RefinementImpl implements AndRefinement * @generated * @ordered */ - protected Refinement left; + protected EclRefinement left; /** * The cached value of the '{@link #getRight() Right}' containment reference. @@ -61,7 +61,7 @@ public class AndRefinementImpl extends RefinementImpl implements AndRefinement * @generated * @ordered */ - protected Refinement right; + protected EclRefinement right; /** * @@ -89,7 +89,8 @@ protected EClass eStaticClass() * * @generated */ - public Refinement getLeft() + @Override + public EclRefinement getLeft() { return left; } @@ -99,9 +100,9 @@ public Refinement getLeft() * * @generated */ - public NotificationChain basicSetLeft(Refinement newLeft, NotificationChain msgs) + public NotificationChain basicSetLeft(EclRefinement newLeft, NotificationChain msgs) { - Refinement oldLeft = left; + EclRefinement oldLeft = left; left = newLeft; if (eNotificationRequired()) { @@ -116,7 +117,8 @@ public NotificationChain basicSetLeft(Refinement newLeft, NotificationChain msgs * * @generated */ - public void setLeft(Refinement newLeft) + @Override + public void setLeft(EclRefinement newLeft) { if (newLeft != left) { @@ -137,7 +139,8 @@ else if (eNotificationRequired()) * * @generated */ - public Refinement getRight() + @Override + public EclRefinement getRight() { return right; } @@ -147,9 +150,9 @@ public Refinement getRight() * * @generated */ - public NotificationChain basicSetRight(Refinement newRight, NotificationChain msgs) + public NotificationChain basicSetRight(EclRefinement newRight, NotificationChain msgs) { - Refinement oldRight = right; + EclRefinement oldRight = right; right = newRight; if (eNotificationRequired()) { @@ -164,7 +167,8 @@ public NotificationChain basicSetRight(Refinement newRight, NotificationChain ms * * @generated */ - public void setRight(Refinement newRight) + @Override + public void setRight(EclRefinement newRight) { if (newRight != right) { @@ -227,10 +231,10 @@ public void eSet(int featureID, Object newValue) switch (featureID) { case EclPackage.AND_REFINEMENT__LEFT: - setLeft((Refinement)newValue); + setLeft((EclRefinement)newValue); return; case EclPackage.AND_REFINEMENT__RIGHT: - setRight((Refinement)newValue); + setRight((EclRefinement)newValue); return; } super.eSet(featureID, newValue); @@ -247,10 +251,10 @@ public void eUnset(int featureID) switch (featureID) { case EclPackage.AND_REFINEMENT__LEFT: - setLeft((Refinement)null); + setLeft((EclRefinement)null); return; case EclPackage.AND_REFINEMENT__RIGHT: - setRight((Refinement)null); + setRight((EclRefinement)null); return; } super.eUnset(featureID); diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AnyImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AnyImpl.java index 980b322d5bc..d52c5abff09 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AnyImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AnyImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeComparisonImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeComparisonImpl.java index 7b13db0e7bc..a44afa99170 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeComparisonImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeComparisonImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getConstraint() { return constraint; @@ -105,6 +106,7 @@ public NotificationChain basicSetConstraint(ExpressionConstraint newConstraint, * * @generated */ + @Override public void setConstraint(ExpressionConstraint newConstraint) { if (newConstraint != constraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeConstraintImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeConstraintImpl.java index 6add0c95b3a..0ea0db4b0f6 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeConstraintImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeConstraintImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,7 @@ * * @generated */ -public class AttributeConstraintImpl extends RefinementImpl implements AttributeConstraint +public class AttributeConstraintImpl extends EclRefinementImpl implements AttributeConstraint { /** * The cached value of the '{@link #getCardinality() Cardinality}' containment reference. @@ -123,6 +123,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public Cardinality getCardinality() { return cardinality; @@ -150,6 +151,7 @@ public NotificationChain basicSetCardinality(Cardinality newCardinality, Notific * * @generated */ + @Override public void setCardinality(Cardinality newCardinality) { if (newCardinality != cardinality) @@ -171,6 +173,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public boolean isReversed() { return reversed; @@ -181,6 +184,7 @@ public boolean isReversed() * * @generated */ + @Override public void setReversed(boolean newReversed) { boolean oldReversed = reversed; @@ -194,6 +198,7 @@ public void setReversed(boolean newReversed) * * @generated */ + @Override public ExpressionConstraint getAttribute() { return attribute; @@ -221,6 +226,7 @@ public NotificationChain basicSetAttribute(ExpressionConstraint newAttribute, No * * @generated */ + @Override public void setAttribute(ExpressionConstraint newAttribute) { if (newAttribute != attribute) @@ -242,6 +248,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public Comparison getComparison() { return comparison; @@ -269,6 +276,7 @@ public NotificationChain basicSetComparison(Comparison newComparison, Notificati * * @generated */ + @Override public void setComparison(Comparison newComparison) { if (newComparison != comparison) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeValueEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeValueEqualsImpl.java index e155a000b5b..163fa75eaeb 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeValueEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeValueEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeValueNotEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeValueNotEqualsImpl.java index f427b6da91e..1cea1bc4de8 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeValueNotEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeValueNotEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/BooleanValueEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/BooleanValueEqualsImpl.java index 3078a867e7b..21a23042c35 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/BooleanValueEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/BooleanValueEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public boolean isValue() { return value; @@ -95,6 +96,7 @@ public boolean isValue() * * @generated */ + @Override public void setValue(boolean newValue) { boolean oldValue = value; @@ -179,7 +181,7 @@ public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (value: "); result.append(value); result.append(')'); diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/BooleanValueNotEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/BooleanValueNotEqualsImpl.java index 54c1cf59773..7fa1f3f85ba 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/BooleanValueNotEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/BooleanValueNotEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public boolean isValue() { return value; @@ -95,6 +96,7 @@ public boolean isValue() * * @generated */ + @Override public void setValue(boolean newValue) { boolean oldValue = value; @@ -179,7 +181,7 @@ public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (value: "); result.append(value); result.append(')'); diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/CardinalityImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/CardinalityImpl.java index 2597454fcbb..f0ac9be7271 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/CardinalityImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/CardinalityImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -107,6 +107,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public int getMin() { return min; @@ -117,6 +118,7 @@ public int getMin() * * @generated */ + @Override public void setMin(int newMin) { int oldMin = min; @@ -130,6 +132,7 @@ public void setMin(int newMin) * * @generated */ + @Override public int getMax() { return max; @@ -140,6 +143,7 @@ public int getMax() * * @generated */ + @Override public void setMax(int newMax) { int oldMax = max; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ChildOfImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ChildOfImpl.java index 0ffc75ec2a3..4aaac3d8bbf 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ChildOfImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ChildOfImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getConstraint() { return constraint; @@ -105,6 +106,7 @@ public NotificationChain basicSetConstraint(ExpressionConstraint newConstraint, * * @generated */ + @Override public void setConstraint(ExpressionConstraint newConstraint) { if (newConstraint != constraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ComparisonImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ComparisonImpl.java index 33c6721b32c..f47333bba57 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ComparisonImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ComparisonImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DataTypeComparisonImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DataTypeComparisonImpl.java index 7a7bf610a25..789f6c05e4b 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DataTypeComparisonImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DataTypeComparisonImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueEqualsImpl.java index cc2aeda26aa..3dc3075d020 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,6 +87,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public BigDecimal getValue() { return value; @@ -97,6 +98,7 @@ public BigDecimal getValue() * * @generated */ + @Override public void setValue(BigDecimal newValue) { BigDecimal oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueGreaterThanEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueGreaterThanEqualsImpl.java index 869d9cecd03..affe7687c5d 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueGreaterThanEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueGreaterThanEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,6 +87,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public BigDecimal getValue() { return value; @@ -97,6 +98,7 @@ public BigDecimal getValue() * * @generated */ + @Override public void setValue(BigDecimal newValue) { BigDecimal oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueGreaterThanImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueGreaterThanImpl.java index 29926bb036a..d4838ed5420 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueGreaterThanImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueGreaterThanImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,6 +87,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public BigDecimal getValue() { return value; @@ -97,6 +98,7 @@ public BigDecimal getValue() * * @generated */ + @Override public void setValue(BigDecimal newValue) { BigDecimal oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueLessThanEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueLessThanEqualsImpl.java index eecad24f17f..220412095bc 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueLessThanEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueLessThanEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,6 +87,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public BigDecimal getValue() { return value; @@ -97,6 +98,7 @@ public BigDecimal getValue() * * @generated */ + @Override public void setValue(BigDecimal newValue) { BigDecimal oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueLessThanImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueLessThanImpl.java index f31be7ba823..a70e462e2ad 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueLessThanImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueLessThanImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,6 +87,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public BigDecimal getValue() { return value; @@ -97,6 +98,7 @@ public BigDecimal getValue() * * @generated */ + @Override public void setValue(BigDecimal newValue) { BigDecimal oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueNotEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueNotEqualsImpl.java index 1b09fbd5691..f416a9c23a2 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueNotEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DecimalValueNotEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,6 +87,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public BigDecimal getValue() { return value; @@ -97,6 +98,7 @@ public BigDecimal getValue() * * @generated */ + @Override public void setValue(BigDecimal newValue) { BigDecimal oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DescendantOfImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DescendantOfImpl.java index 5daf3c0cd84..b1220b5af63 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DescendantOfImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DescendantOfImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getConstraint() { return constraint; @@ -105,6 +106,7 @@ public NotificationChain basicSetConstraint(ExpressionConstraint newConstraint, * * @generated */ + @Override public void setConstraint(ExpressionConstraint newConstraint) { if (newConstraint != constraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DescendantOrSelfOfImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DescendantOrSelfOfImpl.java index 7f66129d809..c02aeb40949 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DescendantOrSelfOfImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DescendantOrSelfOfImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getConstraint() { return constraint; @@ -105,6 +106,7 @@ public NotificationChain basicSetConstraint(ExpressionConstraint newConstraint, * * @generated */ + @Override public void setConstraint(ExpressionConstraint newConstraint) { if (newConstraint != constraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DottedExpressionConstraintImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DottedExpressionConstraintImpl.java index 1324e7acf74..cc16d5a877f 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DottedExpressionConstraintImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/DottedExpressionConstraintImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,6 +89,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getConstraint() { return constraint; @@ -116,6 +117,7 @@ public NotificationChain basicSetConstraint(ExpressionConstraint newConstraint, * * @generated */ + @Override public void setConstraint(ExpressionConstraint newConstraint) { if (newConstraint != constraint) @@ -137,6 +139,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public ExpressionConstraint getAttribute() { return attribute; @@ -164,6 +167,7 @@ public NotificationChain basicSetAttribute(ExpressionConstraint newAttribute, No * * @generated */ + @Override public void setAttribute(ExpressionConstraint newAttribute) { if (newAttribute != attribute) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeGroupImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclAttributeGroupImpl.java similarity index 73% rename from snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeGroupImpl.java rename to snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclAttributeGroupImpl.java index a25bc301f8c..c10a68942d2 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/AttributeGroupImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclAttributeGroupImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,10 @@ */ package com.b2international.snowowl.snomed.ecl.ecl.impl; -import com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup; import com.b2international.snowowl.snomed.ecl.ecl.Cardinality; +import com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup; import com.b2international.snowowl.snomed.ecl.ecl.EclPackage; -import com.b2international.snowowl.snomed.ecl.ecl.Refinement; +import com.b2international.snowowl.snomed.ecl.ecl.EclRefinement; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -36,13 +36,13 @@ * The following features are implemented: *

      *
        - *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.impl.AttributeGroupImpl#getCardinality Cardinality}
      • - *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.impl.AttributeGroupImpl#getRefinement Refinement}
      • + *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.impl.EclAttributeGroupImpl#getCardinality Cardinality}
      • + *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.impl.EclAttributeGroupImpl#getRefinement Refinement}
      • *
      * * @generated */ -public class AttributeGroupImpl extends RefinementImpl implements AttributeGroup +public class EclAttributeGroupImpl extends EclRefinementImpl implements EclAttributeGroup { /** * The cached value of the '{@link #getCardinality() Cardinality}' containment reference. @@ -62,14 +62,14 @@ public class AttributeGroupImpl extends RefinementImpl implements AttributeGroup * @generated * @ordered */ - protected Refinement refinement; + protected EclRefinement refinement; /** * * * @generated */ - protected AttributeGroupImpl() + protected EclAttributeGroupImpl() { super(); } @@ -82,7 +82,7 @@ protected AttributeGroupImpl() @Override protected EClass eStaticClass() { - return EclPackage.Literals.ATTRIBUTE_GROUP; + return EclPackage.Literals.ECL_ATTRIBUTE_GROUP; } /** @@ -90,6 +90,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public Cardinality getCardinality() { return cardinality; @@ -106,7 +107,7 @@ public NotificationChain basicSetCardinality(Cardinality newCardinality, Notific cardinality = newCardinality; if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EclPackage.ATTRIBUTE_GROUP__CARDINALITY, oldCardinality, newCardinality); + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EclPackage.ECL_ATTRIBUTE_GROUP__CARDINALITY, oldCardinality, newCardinality); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; @@ -117,20 +118,21 @@ public NotificationChain basicSetCardinality(Cardinality newCardinality, Notific * * @generated */ + @Override public void setCardinality(Cardinality newCardinality) { if (newCardinality != cardinality) { NotificationChain msgs = null; if (cardinality != null) - msgs = ((InternalEObject)cardinality).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EclPackage.ATTRIBUTE_GROUP__CARDINALITY, null, msgs); + msgs = ((InternalEObject)cardinality).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EclPackage.ECL_ATTRIBUTE_GROUP__CARDINALITY, null, msgs); if (newCardinality != null) - msgs = ((InternalEObject)newCardinality).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EclPackage.ATTRIBUTE_GROUP__CARDINALITY, null, msgs); + msgs = ((InternalEObject)newCardinality).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EclPackage.ECL_ATTRIBUTE_GROUP__CARDINALITY, null, msgs); msgs = basicSetCardinality(newCardinality, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EclPackage.ATTRIBUTE_GROUP__CARDINALITY, newCardinality, newCardinality)); + eNotify(new ENotificationImpl(this, Notification.SET, EclPackage.ECL_ATTRIBUTE_GROUP__CARDINALITY, newCardinality, newCardinality)); } /** @@ -138,7 +140,8 @@ else if (eNotificationRequired()) * * @generated */ - public Refinement getRefinement() + @Override + public EclRefinement getRefinement() { return refinement; } @@ -148,13 +151,13 @@ public Refinement getRefinement() * * @generated */ - public NotificationChain basicSetRefinement(Refinement newRefinement, NotificationChain msgs) + public NotificationChain basicSetRefinement(EclRefinement newRefinement, NotificationChain msgs) { - Refinement oldRefinement = refinement; + EclRefinement oldRefinement = refinement; refinement = newRefinement; if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EclPackage.ATTRIBUTE_GROUP__REFINEMENT, oldRefinement, newRefinement); + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EclPackage.ECL_ATTRIBUTE_GROUP__REFINEMENT, oldRefinement, newRefinement); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; @@ -165,20 +168,21 @@ public NotificationChain basicSetRefinement(Refinement newRefinement, Notificati * * @generated */ - public void setRefinement(Refinement newRefinement) + @Override + public void setRefinement(EclRefinement newRefinement) { if (newRefinement != refinement) { NotificationChain msgs = null; if (refinement != null) - msgs = ((InternalEObject)refinement).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EclPackage.ATTRIBUTE_GROUP__REFINEMENT, null, msgs); + msgs = ((InternalEObject)refinement).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EclPackage.ECL_ATTRIBUTE_GROUP__REFINEMENT, null, msgs); if (newRefinement != null) - msgs = ((InternalEObject)newRefinement).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EclPackage.ATTRIBUTE_GROUP__REFINEMENT, null, msgs); + msgs = ((InternalEObject)newRefinement).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EclPackage.ECL_ATTRIBUTE_GROUP__REFINEMENT, null, msgs); msgs = basicSetRefinement(newRefinement, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EclPackage.ATTRIBUTE_GROUP__REFINEMENT, newRefinement, newRefinement)); + eNotify(new ENotificationImpl(this, Notification.SET, EclPackage.ECL_ATTRIBUTE_GROUP__REFINEMENT, newRefinement, newRefinement)); } /** @@ -191,9 +195,9 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, { switch (featureID) { - case EclPackage.ATTRIBUTE_GROUP__CARDINALITY: + case EclPackage.ECL_ATTRIBUTE_GROUP__CARDINALITY: return basicSetCardinality(null, msgs); - case EclPackage.ATTRIBUTE_GROUP__REFINEMENT: + case EclPackage.ECL_ATTRIBUTE_GROUP__REFINEMENT: return basicSetRefinement(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); @@ -209,9 +213,9 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case EclPackage.ATTRIBUTE_GROUP__CARDINALITY: + case EclPackage.ECL_ATTRIBUTE_GROUP__CARDINALITY: return getCardinality(); - case EclPackage.ATTRIBUTE_GROUP__REFINEMENT: + case EclPackage.ECL_ATTRIBUTE_GROUP__REFINEMENT: return getRefinement(); } return super.eGet(featureID, resolve, coreType); @@ -227,11 +231,11 @@ public void eSet(int featureID, Object newValue) { switch (featureID) { - case EclPackage.ATTRIBUTE_GROUP__CARDINALITY: + case EclPackage.ECL_ATTRIBUTE_GROUP__CARDINALITY: setCardinality((Cardinality)newValue); return; - case EclPackage.ATTRIBUTE_GROUP__REFINEMENT: - setRefinement((Refinement)newValue); + case EclPackage.ECL_ATTRIBUTE_GROUP__REFINEMENT: + setRefinement((EclRefinement)newValue); return; } super.eSet(featureID, newValue); @@ -247,11 +251,11 @@ public void eUnset(int featureID) { switch (featureID) { - case EclPackage.ATTRIBUTE_GROUP__CARDINALITY: + case EclPackage.ECL_ATTRIBUTE_GROUP__CARDINALITY: setCardinality((Cardinality)null); return; - case EclPackage.ATTRIBUTE_GROUP__REFINEMENT: - setRefinement((Refinement)null); + case EclPackage.ECL_ATTRIBUTE_GROUP__REFINEMENT: + setRefinement((EclRefinement)null); return; } super.eUnset(featureID); @@ -267,12 +271,12 @@ public boolean eIsSet(int featureID) { switch (featureID) { - case EclPackage.ATTRIBUTE_GROUP__CARDINALITY: + case EclPackage.ECL_ATTRIBUTE_GROUP__CARDINALITY: return cardinality != null; - case EclPackage.ATTRIBUTE_GROUP__REFINEMENT: + case EclPackage.ECL_ATTRIBUTE_GROUP__REFINEMENT: return refinement != null; } return super.eIsSet(featureID); } -} //AttributeGroupImpl +} //EclAttributeGroupImpl diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ConceptReferenceImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclConceptReferenceImpl.java similarity index 83% rename from snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ConceptReferenceImpl.java rename to snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclConceptReferenceImpl.java index d0cd8cfcd03..30d07f01e8e 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ConceptReferenceImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclConceptReferenceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ */ package com.b2international.snowowl.snomed.ecl.ecl.impl; -import com.b2international.snowowl.snomed.ecl.ecl.ConceptReference; +import com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference; import com.b2international.snowowl.snomed.ecl.ecl.EclPackage; import org.eclipse.emf.common.notify.Notification; @@ -32,13 +32,13 @@ * The following features are implemented: *

      *
        - *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.impl.ConceptReferenceImpl#getId Id}
      • - *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.impl.ConceptReferenceImpl#getTerm Term}
      • + *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.impl.EclConceptReferenceImpl#getId Id}
      • + *
      • {@link com.b2international.snowowl.snomed.ecl.ecl.impl.EclConceptReferenceImpl#getTerm Term}
      • *
      * * @generated */ -public class ConceptReferenceImpl extends ExpressionConstraintImpl implements ConceptReference +public class EclConceptReferenceImpl extends ExpressionConstraintImpl implements EclConceptReference { /** * The default value of the '{@link #getId() Id}' attribute. @@ -85,7 +85,7 @@ public class ConceptReferenceImpl extends ExpressionConstraintImpl implements Co * * @generated */ - protected ConceptReferenceImpl() + protected EclConceptReferenceImpl() { super(); } @@ -98,7 +98,7 @@ protected ConceptReferenceImpl() @Override protected EClass eStaticClass() { - return EclPackage.Literals.CONCEPT_REFERENCE; + return EclPackage.Literals.ECL_CONCEPT_REFERENCE; } /** @@ -106,6 +106,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public String getId() { return id; @@ -116,12 +117,13 @@ public String getId() * * @generated */ + @Override public void setId(String newId) { String oldId = id; id = newId; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EclPackage.CONCEPT_REFERENCE__ID, oldId, id)); + eNotify(new ENotificationImpl(this, Notification.SET, EclPackage.ECL_CONCEPT_REFERENCE__ID, oldId, id)); } /** @@ -129,6 +131,7 @@ public void setId(String newId) * * @generated */ + @Override public String getTerm() { return term; @@ -139,12 +142,13 @@ public String getTerm() * * @generated */ + @Override public void setTerm(String newTerm) { String oldTerm = term; term = newTerm; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, EclPackage.CONCEPT_REFERENCE__TERM, oldTerm, term)); + eNotify(new ENotificationImpl(this, Notification.SET, EclPackage.ECL_CONCEPT_REFERENCE__TERM, oldTerm, term)); } /** @@ -157,9 +161,9 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case EclPackage.CONCEPT_REFERENCE__ID: + case EclPackage.ECL_CONCEPT_REFERENCE__ID: return getId(); - case EclPackage.CONCEPT_REFERENCE__TERM: + case EclPackage.ECL_CONCEPT_REFERENCE__TERM: return getTerm(); } return super.eGet(featureID, resolve, coreType); @@ -175,10 +179,10 @@ public void eSet(int featureID, Object newValue) { switch (featureID) { - case EclPackage.CONCEPT_REFERENCE__ID: + case EclPackage.ECL_CONCEPT_REFERENCE__ID: setId((String)newValue); return; - case EclPackage.CONCEPT_REFERENCE__TERM: + case EclPackage.ECL_CONCEPT_REFERENCE__TERM: setTerm((String)newValue); return; } @@ -195,10 +199,10 @@ public void eUnset(int featureID) { switch (featureID) { - case EclPackage.CONCEPT_REFERENCE__ID: + case EclPackage.ECL_CONCEPT_REFERENCE__ID: setId(ID_EDEFAULT); return; - case EclPackage.CONCEPT_REFERENCE__TERM: + case EclPackage.ECL_CONCEPT_REFERENCE__TERM: setTerm(TERM_EDEFAULT); return; } @@ -215,9 +219,9 @@ public boolean eIsSet(int featureID) { switch (featureID) { - case EclPackage.CONCEPT_REFERENCE__ID: + case EclPackage.ECL_CONCEPT_REFERENCE__ID: return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); - case EclPackage.CONCEPT_REFERENCE__TERM: + case EclPackage.ECL_CONCEPT_REFERENCE__TERM: return TERM_EDEFAULT == null ? term != null : !TERM_EDEFAULT.equals(term); } return super.eIsSet(featureID); @@ -242,4 +246,4 @@ public String toString() return result.toString(); } -} //ConceptReferenceImpl +} //EclConceptReferenceImpl diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclFactoryImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclFactoryImpl.java index eeb80c730ff..e6c76ea8842 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclFactoryImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclFactoryImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -86,11 +86,11 @@ public EObject create(EClass eClass) case EclPackage.ANCESTOR_OF: return createAncestorOf(); case EclPackage.ANCESTOR_OR_SELF_OF: return createAncestorOrSelfOf(); case EclPackage.MEMBER_OF: return createMemberOf(); - case EclPackage.CONCEPT_REFERENCE: return createConceptReference(); + case EclPackage.ECL_CONCEPT_REFERENCE: return createEclConceptReference(); case EclPackage.ANY: return createAny(); - case EclPackage.REFINEMENT: return createRefinement(); + case EclPackage.ECL_REFINEMENT: return createEclRefinement(); case EclPackage.NESTED_REFINEMENT: return createNestedRefinement(); - case EclPackage.ATTRIBUTE_GROUP: return createAttributeGroup(); + case EclPackage.ECL_ATTRIBUTE_GROUP: return createEclAttributeGroup(); case EclPackage.ATTRIBUTE_CONSTRAINT: return createAttributeConstraint(); case EclPackage.CARDINALITY: return createCardinality(); case EclPackage.COMPARISON: return createComparison(); @@ -132,6 +132,7 @@ public EObject create(EClass eClass) * * @generated */ + @Override public Script createScript() { ScriptImpl script = new ScriptImpl(); @@ -143,6 +144,7 @@ public Script createScript() * * @generated */ + @Override public ExpressionConstraint createExpressionConstraint() { ExpressionConstraintImpl expressionConstraint = new ExpressionConstraintImpl(); @@ -154,6 +156,7 @@ public ExpressionConstraint createExpressionConstraint() * * @generated */ + @Override public ChildOf createChildOf() { ChildOfImpl childOf = new ChildOfImpl(); @@ -165,6 +168,7 @@ public ChildOf createChildOf() * * @generated */ + @Override public DescendantOf createDescendantOf() { DescendantOfImpl descendantOf = new DescendantOfImpl(); @@ -176,6 +180,7 @@ public DescendantOf createDescendantOf() * * @generated */ + @Override public DescendantOrSelfOf createDescendantOrSelfOf() { DescendantOrSelfOfImpl descendantOrSelfOf = new DescendantOrSelfOfImpl(); @@ -187,6 +192,7 @@ public DescendantOrSelfOf createDescendantOrSelfOf() * * @generated */ + @Override public ParentOf createParentOf() { ParentOfImpl parentOf = new ParentOfImpl(); @@ -198,6 +204,7 @@ public ParentOf createParentOf() * * @generated */ + @Override public AncestorOf createAncestorOf() { AncestorOfImpl ancestorOf = new AncestorOfImpl(); @@ -209,6 +216,7 @@ public AncestorOf createAncestorOf() * * @generated */ + @Override public AncestorOrSelfOf createAncestorOrSelfOf() { AncestorOrSelfOfImpl ancestorOrSelfOf = new AncestorOrSelfOfImpl(); @@ -220,6 +228,7 @@ public AncestorOrSelfOf createAncestorOrSelfOf() * * @generated */ + @Override public MemberOf createMemberOf() { MemberOfImpl memberOf = new MemberOfImpl(); @@ -231,10 +240,11 @@ public MemberOf createMemberOf() * * @generated */ - public ConceptReference createConceptReference() + @Override + public EclConceptReference createEclConceptReference() { - ConceptReferenceImpl conceptReference = new ConceptReferenceImpl(); - return conceptReference; + EclConceptReferenceImpl eclConceptReference = new EclConceptReferenceImpl(); + return eclConceptReference; } /** @@ -242,6 +252,7 @@ public ConceptReference createConceptReference() * * @generated */ + @Override public Any createAny() { AnyImpl any = new AnyImpl(); @@ -253,10 +264,11 @@ public Any createAny() * * @generated */ - public Refinement createRefinement() + @Override + public EclRefinement createEclRefinement() { - RefinementImpl refinement = new RefinementImpl(); - return refinement; + EclRefinementImpl eclRefinement = new EclRefinementImpl(); + return eclRefinement; } /** @@ -264,6 +276,7 @@ public Refinement createRefinement() * * @generated */ + @Override public NestedRefinement createNestedRefinement() { NestedRefinementImpl nestedRefinement = new NestedRefinementImpl(); @@ -275,10 +288,11 @@ public NestedRefinement createNestedRefinement() * * @generated */ - public AttributeGroup createAttributeGroup() + @Override + public EclAttributeGroup createEclAttributeGroup() { - AttributeGroupImpl attributeGroup = new AttributeGroupImpl(); - return attributeGroup; + EclAttributeGroupImpl eclAttributeGroup = new EclAttributeGroupImpl(); + return eclAttributeGroup; } /** @@ -286,6 +300,7 @@ public AttributeGroup createAttributeGroup() * * @generated */ + @Override public AttributeConstraint createAttributeConstraint() { AttributeConstraintImpl attributeConstraint = new AttributeConstraintImpl(); @@ -297,6 +312,7 @@ public AttributeConstraint createAttributeConstraint() * * @generated */ + @Override public Cardinality createCardinality() { CardinalityImpl cardinality = new CardinalityImpl(); @@ -308,6 +324,7 @@ public Cardinality createCardinality() * * @generated */ + @Override public Comparison createComparison() { ComparisonImpl comparison = new ComparisonImpl(); @@ -319,6 +336,7 @@ public Comparison createComparison() * * @generated */ + @Override public AttributeComparison createAttributeComparison() { AttributeComparisonImpl attributeComparison = new AttributeComparisonImpl(); @@ -330,6 +348,7 @@ public AttributeComparison createAttributeComparison() * * @generated */ + @Override public DataTypeComparison createDataTypeComparison() { DataTypeComparisonImpl dataTypeComparison = new DataTypeComparisonImpl(); @@ -341,6 +360,7 @@ public DataTypeComparison createDataTypeComparison() * * @generated */ + @Override public AttributeValueEquals createAttributeValueEquals() { AttributeValueEqualsImpl attributeValueEquals = new AttributeValueEqualsImpl(); @@ -352,6 +372,7 @@ public AttributeValueEquals createAttributeValueEquals() * * @generated */ + @Override public AttributeValueNotEquals createAttributeValueNotEquals() { AttributeValueNotEqualsImpl attributeValueNotEquals = new AttributeValueNotEqualsImpl(); @@ -363,6 +384,7 @@ public AttributeValueNotEquals createAttributeValueNotEquals() * * @generated */ + @Override public BooleanValueEquals createBooleanValueEquals() { BooleanValueEqualsImpl booleanValueEquals = new BooleanValueEqualsImpl(); @@ -374,6 +396,7 @@ public BooleanValueEquals createBooleanValueEquals() * * @generated */ + @Override public BooleanValueNotEquals createBooleanValueNotEquals() { BooleanValueNotEqualsImpl booleanValueNotEquals = new BooleanValueNotEqualsImpl(); @@ -385,6 +408,7 @@ public BooleanValueNotEquals createBooleanValueNotEquals() * * @generated */ + @Override public StringValueEquals createStringValueEquals() { StringValueEqualsImpl stringValueEquals = new StringValueEqualsImpl(); @@ -396,6 +420,7 @@ public StringValueEquals createStringValueEquals() * * @generated */ + @Override public StringValueNotEquals createStringValueNotEquals() { StringValueNotEqualsImpl stringValueNotEquals = new StringValueNotEqualsImpl(); @@ -407,6 +432,7 @@ public StringValueNotEquals createStringValueNotEquals() * * @generated */ + @Override public IntegerValueEquals createIntegerValueEquals() { IntegerValueEqualsImpl integerValueEquals = new IntegerValueEqualsImpl(); @@ -418,6 +444,7 @@ public IntegerValueEquals createIntegerValueEquals() * * @generated */ + @Override public IntegerValueNotEquals createIntegerValueNotEquals() { IntegerValueNotEqualsImpl integerValueNotEquals = new IntegerValueNotEqualsImpl(); @@ -429,6 +456,7 @@ public IntegerValueNotEquals createIntegerValueNotEquals() * * @generated */ + @Override public IntegerValueGreaterThan createIntegerValueGreaterThan() { IntegerValueGreaterThanImpl integerValueGreaterThan = new IntegerValueGreaterThanImpl(); @@ -440,6 +468,7 @@ public IntegerValueGreaterThan createIntegerValueGreaterThan() * * @generated */ + @Override public IntegerValueLessThan createIntegerValueLessThan() { IntegerValueLessThanImpl integerValueLessThan = new IntegerValueLessThanImpl(); @@ -451,6 +480,7 @@ public IntegerValueLessThan createIntegerValueLessThan() * * @generated */ + @Override public IntegerValueGreaterThanEquals createIntegerValueGreaterThanEquals() { IntegerValueGreaterThanEqualsImpl integerValueGreaterThanEquals = new IntegerValueGreaterThanEqualsImpl(); @@ -462,6 +492,7 @@ public IntegerValueGreaterThanEquals createIntegerValueGreaterThanEquals() * * @generated */ + @Override public IntegerValueLessThanEquals createIntegerValueLessThanEquals() { IntegerValueLessThanEqualsImpl integerValueLessThanEquals = new IntegerValueLessThanEqualsImpl(); @@ -473,6 +504,7 @@ public IntegerValueLessThanEquals createIntegerValueLessThanEquals() * * @generated */ + @Override public DecimalValueEquals createDecimalValueEquals() { DecimalValueEqualsImpl decimalValueEquals = new DecimalValueEqualsImpl(); @@ -484,6 +516,7 @@ public DecimalValueEquals createDecimalValueEquals() * * @generated */ + @Override public DecimalValueNotEquals createDecimalValueNotEquals() { DecimalValueNotEqualsImpl decimalValueNotEquals = new DecimalValueNotEqualsImpl(); @@ -495,6 +528,7 @@ public DecimalValueNotEquals createDecimalValueNotEquals() * * @generated */ + @Override public DecimalValueGreaterThan createDecimalValueGreaterThan() { DecimalValueGreaterThanImpl decimalValueGreaterThan = new DecimalValueGreaterThanImpl(); @@ -506,6 +540,7 @@ public DecimalValueGreaterThan createDecimalValueGreaterThan() * * @generated */ + @Override public DecimalValueLessThan createDecimalValueLessThan() { DecimalValueLessThanImpl decimalValueLessThan = new DecimalValueLessThanImpl(); @@ -517,6 +552,7 @@ public DecimalValueLessThan createDecimalValueLessThan() * * @generated */ + @Override public DecimalValueGreaterThanEquals createDecimalValueGreaterThanEquals() { DecimalValueGreaterThanEqualsImpl decimalValueGreaterThanEquals = new DecimalValueGreaterThanEqualsImpl(); @@ -528,6 +564,7 @@ public DecimalValueGreaterThanEquals createDecimalValueGreaterThanEquals() * * @generated */ + @Override public DecimalValueLessThanEquals createDecimalValueLessThanEquals() { DecimalValueLessThanEqualsImpl decimalValueLessThanEquals = new DecimalValueLessThanEqualsImpl(); @@ -539,6 +576,7 @@ public DecimalValueLessThanEquals createDecimalValueLessThanEquals() * * @generated */ + @Override public NestedExpression createNestedExpression() { NestedExpressionImpl nestedExpression = new NestedExpressionImpl(); @@ -550,6 +588,7 @@ public NestedExpression createNestedExpression() * * @generated */ + @Override public OrExpressionConstraint createOrExpressionConstraint() { OrExpressionConstraintImpl orExpressionConstraint = new OrExpressionConstraintImpl(); @@ -561,6 +600,7 @@ public OrExpressionConstraint createOrExpressionConstraint() * * @generated */ + @Override public AndExpressionConstraint createAndExpressionConstraint() { AndExpressionConstraintImpl andExpressionConstraint = new AndExpressionConstraintImpl(); @@ -572,6 +612,7 @@ public AndExpressionConstraint createAndExpressionConstraint() * * @generated */ + @Override public ExclusionExpressionConstraint createExclusionExpressionConstraint() { ExclusionExpressionConstraintImpl exclusionExpressionConstraint = new ExclusionExpressionConstraintImpl(); @@ -583,6 +624,7 @@ public ExclusionExpressionConstraint createExclusionExpressionConstraint() * * @generated */ + @Override public RefinedExpressionConstraint createRefinedExpressionConstraint() { RefinedExpressionConstraintImpl refinedExpressionConstraint = new RefinedExpressionConstraintImpl(); @@ -594,6 +636,7 @@ public RefinedExpressionConstraint createRefinedExpressionConstraint() * * @generated */ + @Override public DottedExpressionConstraint createDottedExpressionConstraint() { DottedExpressionConstraintImpl dottedExpressionConstraint = new DottedExpressionConstraintImpl(); @@ -605,6 +648,7 @@ public DottedExpressionConstraint createDottedExpressionConstraint() * * @generated */ + @Override public OrRefinement createOrRefinement() { OrRefinementImpl orRefinement = new OrRefinementImpl(); @@ -616,6 +660,7 @@ public OrRefinement createOrRefinement() * * @generated */ + @Override public AndRefinement createAndRefinement() { AndRefinementImpl andRefinement = new AndRefinementImpl(); @@ -627,6 +672,7 @@ public AndRefinement createAndRefinement() * * @generated */ + @Override public EclPackage getEclPackage() { return (EclPackage)getEPackage(); diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclPackageImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclPackageImpl.java index 0c04622ac40..678a14c5efc 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclPackageImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclPackageImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ import com.b2international.snowowl.snomed.ecl.ecl.Any; import com.b2international.snowowl.snomed.ecl.ecl.AttributeComparison; import com.b2international.snowowl.snomed.ecl.ecl.AttributeConstraint; -import com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup; import com.b2international.snowowl.snomed.ecl.ecl.AttributeValueEquals; import com.b2international.snowowl.snomed.ecl.ecl.AttributeValueNotEquals; import com.b2international.snowowl.snomed.ecl.ecl.BooleanValueEquals; @@ -30,7 +29,6 @@ import com.b2international.snowowl.snomed.ecl.ecl.Cardinality; import com.b2international.snowowl.snomed.ecl.ecl.ChildOf; import com.b2international.snowowl.snomed.ecl.ecl.Comparison; -import com.b2international.snowowl.snomed.ecl.ecl.ConceptReference; import com.b2international.snowowl.snomed.ecl.ecl.DataTypeComparison; import com.b2international.snowowl.snomed.ecl.ecl.DecimalValueEquals; import com.b2international.snowowl.snomed.ecl.ecl.DecimalValueGreaterThan; @@ -41,8 +39,11 @@ import com.b2international.snowowl.snomed.ecl.ecl.DescendantOf; import com.b2international.snowowl.snomed.ecl.ecl.DescendantOrSelfOf; import com.b2international.snowowl.snomed.ecl.ecl.DottedExpressionConstraint; +import com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup; +import com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference; import com.b2international.snowowl.snomed.ecl.ecl.EclFactory; import com.b2international.snowowl.snomed.ecl.ecl.EclPackage; +import com.b2international.snowowl.snomed.ecl.ecl.EclRefinement; import com.b2international.snowowl.snomed.ecl.ecl.ExclusionExpressionConstraint; import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint; import com.b2international.snowowl.snomed.ecl.ecl.IntegerValueEquals; @@ -58,7 +59,6 @@ import com.b2international.snowowl.snomed.ecl.ecl.OrRefinement; import com.b2international.snowowl.snomed.ecl.ecl.ParentOf; import com.b2international.snowowl.snomed.ecl.ecl.RefinedExpressionConstraint; -import com.b2international.snowowl.snomed.ecl.ecl.Refinement; import com.b2international.snowowl.snomed.ecl.ecl.Script; import com.b2international.snowowl.snomed.ecl.ecl.StringValueEquals; import com.b2international.snowowl.snomed.ecl.ecl.StringValueNotEquals; @@ -146,7 +146,7 @@ public class EclPackageImpl extends EPackageImpl implements EclPackage * * @generated */ - private EClass conceptReferenceEClass = null; + private EClass eclConceptReferenceEClass = null; /** * @@ -160,7 +160,7 @@ public class EclPackageImpl extends EPackageImpl implements EclPackage * * @generated */ - private EClass refinementEClass = null; + private EClass eclRefinementEClass = null; /** * @@ -174,7 +174,7 @@ public class EclPackageImpl extends EPackageImpl implements EclPackage * * @generated */ - private EClass attributeGroupEClass = null; + private EClass eclAttributeGroupEClass = null; /** * @@ -461,6 +461,7 @@ public static EclPackage init() * * @generated */ + @Override public EClass getScript() { return scriptEClass; @@ -471,6 +472,7 @@ public EClass getScript() * * @generated */ + @Override public EReference getScript_Constraint() { return (EReference)scriptEClass.getEStructuralFeatures().get(0); @@ -481,6 +483,7 @@ public EReference getScript_Constraint() * * @generated */ + @Override public EClass getExpressionConstraint() { return expressionConstraintEClass; @@ -491,6 +494,7 @@ public EClass getExpressionConstraint() * * @generated */ + @Override public EClass getChildOf() { return childOfEClass; @@ -501,6 +505,7 @@ public EClass getChildOf() * * @generated */ + @Override public EReference getChildOf_Constraint() { return (EReference)childOfEClass.getEStructuralFeatures().get(0); @@ -511,6 +516,7 @@ public EReference getChildOf_Constraint() * * @generated */ + @Override public EClass getDescendantOf() { return descendantOfEClass; @@ -521,6 +527,7 @@ public EClass getDescendantOf() * * @generated */ + @Override public EReference getDescendantOf_Constraint() { return (EReference)descendantOfEClass.getEStructuralFeatures().get(0); @@ -531,6 +538,7 @@ public EReference getDescendantOf_Constraint() * * @generated */ + @Override public EClass getDescendantOrSelfOf() { return descendantOrSelfOfEClass; @@ -541,6 +549,7 @@ public EClass getDescendantOrSelfOf() * * @generated */ + @Override public EReference getDescendantOrSelfOf_Constraint() { return (EReference)descendantOrSelfOfEClass.getEStructuralFeatures().get(0); @@ -551,6 +560,7 @@ public EReference getDescendantOrSelfOf_Constraint() * * @generated */ + @Override public EClass getParentOf() { return parentOfEClass; @@ -561,6 +571,7 @@ public EClass getParentOf() * * @generated */ + @Override public EReference getParentOf_Constraint() { return (EReference)parentOfEClass.getEStructuralFeatures().get(0); @@ -571,6 +582,7 @@ public EReference getParentOf_Constraint() * * @generated */ + @Override public EClass getAncestorOf() { return ancestorOfEClass; @@ -581,6 +593,7 @@ public EClass getAncestorOf() * * @generated */ + @Override public EReference getAncestorOf_Constraint() { return (EReference)ancestorOfEClass.getEStructuralFeatures().get(0); @@ -591,6 +604,7 @@ public EReference getAncestorOf_Constraint() * * @generated */ + @Override public EClass getAncestorOrSelfOf() { return ancestorOrSelfOfEClass; @@ -601,6 +615,7 @@ public EClass getAncestorOrSelfOf() * * @generated */ + @Override public EReference getAncestorOrSelfOf_Constraint() { return (EReference)ancestorOrSelfOfEClass.getEStructuralFeatures().get(0); @@ -611,6 +626,7 @@ public EReference getAncestorOrSelfOf_Constraint() * * @generated */ + @Override public EClass getMemberOf() { return memberOfEClass; @@ -621,6 +637,7 @@ public EClass getMemberOf() * * @generated */ + @Override public EReference getMemberOf_Constraint() { return (EReference)memberOfEClass.getEStructuralFeatures().get(0); @@ -631,9 +648,10 @@ public EReference getMemberOf_Constraint() * * @generated */ - public EClass getConceptReference() + @Override + public EClass getEclConceptReference() { - return conceptReferenceEClass; + return eclConceptReferenceEClass; } /** @@ -641,9 +659,10 @@ public EClass getConceptReference() * * @generated */ - public EAttribute getConceptReference_Id() + @Override + public EAttribute getEclConceptReference_Id() { - return (EAttribute)conceptReferenceEClass.getEStructuralFeatures().get(0); + return (EAttribute)eclConceptReferenceEClass.getEStructuralFeatures().get(0); } /** @@ -651,9 +670,10 @@ public EAttribute getConceptReference_Id() * * @generated */ - public EAttribute getConceptReference_Term() + @Override + public EAttribute getEclConceptReference_Term() { - return (EAttribute)conceptReferenceEClass.getEStructuralFeatures().get(1); + return (EAttribute)eclConceptReferenceEClass.getEStructuralFeatures().get(1); } /** @@ -661,6 +681,7 @@ public EAttribute getConceptReference_Term() * * @generated */ + @Override public EClass getAny() { return anyEClass; @@ -671,9 +692,10 @@ public EClass getAny() * * @generated */ - public EClass getRefinement() + @Override + public EClass getEclRefinement() { - return refinementEClass; + return eclRefinementEClass; } /** @@ -681,6 +703,7 @@ public EClass getRefinement() * * @generated */ + @Override public EClass getNestedRefinement() { return nestedRefinementEClass; @@ -691,6 +714,7 @@ public EClass getNestedRefinement() * * @generated */ + @Override public EReference getNestedRefinement_Nested() { return (EReference)nestedRefinementEClass.getEStructuralFeatures().get(0); @@ -701,9 +725,10 @@ public EReference getNestedRefinement_Nested() * * @generated */ - public EClass getAttributeGroup() + @Override + public EClass getEclAttributeGroup() { - return attributeGroupEClass; + return eclAttributeGroupEClass; } /** @@ -711,9 +736,10 @@ public EClass getAttributeGroup() * * @generated */ - public EReference getAttributeGroup_Cardinality() + @Override + public EReference getEclAttributeGroup_Cardinality() { - return (EReference)attributeGroupEClass.getEStructuralFeatures().get(0); + return (EReference)eclAttributeGroupEClass.getEStructuralFeatures().get(0); } /** @@ -721,9 +747,10 @@ public EReference getAttributeGroup_Cardinality() * * @generated */ - public EReference getAttributeGroup_Refinement() + @Override + public EReference getEclAttributeGroup_Refinement() { - return (EReference)attributeGroupEClass.getEStructuralFeatures().get(1); + return (EReference)eclAttributeGroupEClass.getEStructuralFeatures().get(1); } /** @@ -731,6 +758,7 @@ public EReference getAttributeGroup_Refinement() * * @generated */ + @Override public EClass getAttributeConstraint() { return attributeConstraintEClass; @@ -741,6 +769,7 @@ public EClass getAttributeConstraint() * * @generated */ + @Override public EReference getAttributeConstraint_Cardinality() { return (EReference)attributeConstraintEClass.getEStructuralFeatures().get(0); @@ -751,6 +780,7 @@ public EReference getAttributeConstraint_Cardinality() * * @generated */ + @Override public EAttribute getAttributeConstraint_Reversed() { return (EAttribute)attributeConstraintEClass.getEStructuralFeatures().get(1); @@ -761,6 +791,7 @@ public EAttribute getAttributeConstraint_Reversed() * * @generated */ + @Override public EReference getAttributeConstraint_Attribute() { return (EReference)attributeConstraintEClass.getEStructuralFeatures().get(2); @@ -771,6 +802,7 @@ public EReference getAttributeConstraint_Attribute() * * @generated */ + @Override public EReference getAttributeConstraint_Comparison() { return (EReference)attributeConstraintEClass.getEStructuralFeatures().get(3); @@ -781,6 +813,7 @@ public EReference getAttributeConstraint_Comparison() * * @generated */ + @Override public EClass getCardinality() { return cardinalityEClass; @@ -791,6 +824,7 @@ public EClass getCardinality() * * @generated */ + @Override public EAttribute getCardinality_Min() { return (EAttribute)cardinalityEClass.getEStructuralFeatures().get(0); @@ -801,6 +835,7 @@ public EAttribute getCardinality_Min() * * @generated */ + @Override public EAttribute getCardinality_Max() { return (EAttribute)cardinalityEClass.getEStructuralFeatures().get(1); @@ -811,6 +846,7 @@ public EAttribute getCardinality_Max() * * @generated */ + @Override public EClass getComparison() { return comparisonEClass; @@ -821,6 +857,7 @@ public EClass getComparison() * * @generated */ + @Override public EClass getAttributeComparison() { return attributeComparisonEClass; @@ -831,6 +868,7 @@ public EClass getAttributeComparison() * * @generated */ + @Override public EReference getAttributeComparison_Constraint() { return (EReference)attributeComparisonEClass.getEStructuralFeatures().get(0); @@ -841,6 +879,7 @@ public EReference getAttributeComparison_Constraint() * * @generated */ + @Override public EClass getDataTypeComparison() { return dataTypeComparisonEClass; @@ -851,6 +890,7 @@ public EClass getDataTypeComparison() * * @generated */ + @Override public EClass getAttributeValueEquals() { return attributeValueEqualsEClass; @@ -861,6 +901,7 @@ public EClass getAttributeValueEquals() * * @generated */ + @Override public EClass getAttributeValueNotEquals() { return attributeValueNotEqualsEClass; @@ -871,6 +912,7 @@ public EClass getAttributeValueNotEquals() * * @generated */ + @Override public EClass getBooleanValueEquals() { return booleanValueEqualsEClass; @@ -881,6 +923,7 @@ public EClass getBooleanValueEquals() * * @generated */ + @Override public EAttribute getBooleanValueEquals_Value() { return (EAttribute)booleanValueEqualsEClass.getEStructuralFeatures().get(0); @@ -891,6 +934,7 @@ public EAttribute getBooleanValueEquals_Value() * * @generated */ + @Override public EClass getBooleanValueNotEquals() { return booleanValueNotEqualsEClass; @@ -901,6 +945,7 @@ public EClass getBooleanValueNotEquals() * * @generated */ + @Override public EAttribute getBooleanValueNotEquals_Value() { return (EAttribute)booleanValueNotEqualsEClass.getEStructuralFeatures().get(0); @@ -911,6 +956,7 @@ public EAttribute getBooleanValueNotEquals_Value() * * @generated */ + @Override public EClass getStringValueEquals() { return stringValueEqualsEClass; @@ -921,6 +967,7 @@ public EClass getStringValueEquals() * * @generated */ + @Override public EAttribute getStringValueEquals_Value() { return (EAttribute)stringValueEqualsEClass.getEStructuralFeatures().get(0); @@ -931,6 +978,7 @@ public EAttribute getStringValueEquals_Value() * * @generated */ + @Override public EClass getStringValueNotEquals() { return stringValueNotEqualsEClass; @@ -941,6 +989,7 @@ public EClass getStringValueNotEquals() * * @generated */ + @Override public EAttribute getStringValueNotEquals_Value() { return (EAttribute)stringValueNotEqualsEClass.getEStructuralFeatures().get(0); @@ -951,6 +1000,7 @@ public EAttribute getStringValueNotEquals_Value() * * @generated */ + @Override public EClass getIntegerValueEquals() { return integerValueEqualsEClass; @@ -961,6 +1011,7 @@ public EClass getIntegerValueEquals() * * @generated */ + @Override public EAttribute getIntegerValueEquals_Value() { return (EAttribute)integerValueEqualsEClass.getEStructuralFeatures().get(0); @@ -971,6 +1022,7 @@ public EAttribute getIntegerValueEquals_Value() * * @generated */ + @Override public EClass getIntegerValueNotEquals() { return integerValueNotEqualsEClass; @@ -981,6 +1033,7 @@ public EClass getIntegerValueNotEquals() * * @generated */ + @Override public EAttribute getIntegerValueNotEquals_Value() { return (EAttribute)integerValueNotEqualsEClass.getEStructuralFeatures().get(0); @@ -991,6 +1044,7 @@ public EAttribute getIntegerValueNotEquals_Value() * * @generated */ + @Override public EClass getIntegerValueGreaterThan() { return integerValueGreaterThanEClass; @@ -1001,6 +1055,7 @@ public EClass getIntegerValueGreaterThan() * * @generated */ + @Override public EAttribute getIntegerValueGreaterThan_Value() { return (EAttribute)integerValueGreaterThanEClass.getEStructuralFeatures().get(0); @@ -1011,6 +1066,7 @@ public EAttribute getIntegerValueGreaterThan_Value() * * @generated */ + @Override public EClass getIntegerValueLessThan() { return integerValueLessThanEClass; @@ -1021,6 +1077,7 @@ public EClass getIntegerValueLessThan() * * @generated */ + @Override public EAttribute getIntegerValueLessThan_Value() { return (EAttribute)integerValueLessThanEClass.getEStructuralFeatures().get(0); @@ -1031,6 +1088,7 @@ public EAttribute getIntegerValueLessThan_Value() * * @generated */ + @Override public EClass getIntegerValueGreaterThanEquals() { return integerValueGreaterThanEqualsEClass; @@ -1041,6 +1099,7 @@ public EClass getIntegerValueGreaterThanEquals() * * @generated */ + @Override public EAttribute getIntegerValueGreaterThanEquals_Value() { return (EAttribute)integerValueGreaterThanEqualsEClass.getEStructuralFeatures().get(0); @@ -1051,6 +1110,7 @@ public EAttribute getIntegerValueGreaterThanEquals_Value() * * @generated */ + @Override public EClass getIntegerValueLessThanEquals() { return integerValueLessThanEqualsEClass; @@ -1061,6 +1121,7 @@ public EClass getIntegerValueLessThanEquals() * * @generated */ + @Override public EAttribute getIntegerValueLessThanEquals_Value() { return (EAttribute)integerValueLessThanEqualsEClass.getEStructuralFeatures().get(0); @@ -1071,6 +1132,7 @@ public EAttribute getIntegerValueLessThanEquals_Value() * * @generated */ + @Override public EClass getDecimalValueEquals() { return decimalValueEqualsEClass; @@ -1081,6 +1143,7 @@ public EClass getDecimalValueEquals() * * @generated */ + @Override public EAttribute getDecimalValueEquals_Value() { return (EAttribute)decimalValueEqualsEClass.getEStructuralFeatures().get(0); @@ -1091,6 +1154,7 @@ public EAttribute getDecimalValueEquals_Value() * * @generated */ + @Override public EClass getDecimalValueNotEquals() { return decimalValueNotEqualsEClass; @@ -1101,6 +1165,7 @@ public EClass getDecimalValueNotEquals() * * @generated */ + @Override public EAttribute getDecimalValueNotEquals_Value() { return (EAttribute)decimalValueNotEqualsEClass.getEStructuralFeatures().get(0); @@ -1111,6 +1176,7 @@ public EAttribute getDecimalValueNotEquals_Value() * * @generated */ + @Override public EClass getDecimalValueGreaterThan() { return decimalValueGreaterThanEClass; @@ -1121,6 +1187,7 @@ public EClass getDecimalValueGreaterThan() * * @generated */ + @Override public EAttribute getDecimalValueGreaterThan_Value() { return (EAttribute)decimalValueGreaterThanEClass.getEStructuralFeatures().get(0); @@ -1131,6 +1198,7 @@ public EAttribute getDecimalValueGreaterThan_Value() * * @generated */ + @Override public EClass getDecimalValueLessThan() { return decimalValueLessThanEClass; @@ -1141,6 +1209,7 @@ public EClass getDecimalValueLessThan() * * @generated */ + @Override public EAttribute getDecimalValueLessThan_Value() { return (EAttribute)decimalValueLessThanEClass.getEStructuralFeatures().get(0); @@ -1151,6 +1220,7 @@ public EAttribute getDecimalValueLessThan_Value() * * @generated */ + @Override public EClass getDecimalValueGreaterThanEquals() { return decimalValueGreaterThanEqualsEClass; @@ -1161,6 +1231,7 @@ public EClass getDecimalValueGreaterThanEquals() * * @generated */ + @Override public EAttribute getDecimalValueGreaterThanEquals_Value() { return (EAttribute)decimalValueGreaterThanEqualsEClass.getEStructuralFeatures().get(0); @@ -1171,6 +1242,7 @@ public EAttribute getDecimalValueGreaterThanEquals_Value() * * @generated */ + @Override public EClass getDecimalValueLessThanEquals() { return decimalValueLessThanEqualsEClass; @@ -1181,6 +1253,7 @@ public EClass getDecimalValueLessThanEquals() * * @generated */ + @Override public EAttribute getDecimalValueLessThanEquals_Value() { return (EAttribute)decimalValueLessThanEqualsEClass.getEStructuralFeatures().get(0); @@ -1191,6 +1264,7 @@ public EAttribute getDecimalValueLessThanEquals_Value() * * @generated */ + @Override public EClass getNestedExpression() { return nestedExpressionEClass; @@ -1201,6 +1275,7 @@ public EClass getNestedExpression() * * @generated */ + @Override public EReference getNestedExpression_Nested() { return (EReference)nestedExpressionEClass.getEStructuralFeatures().get(0); @@ -1211,6 +1286,7 @@ public EReference getNestedExpression_Nested() * * @generated */ + @Override public EClass getOrExpressionConstraint() { return orExpressionConstraintEClass; @@ -1221,6 +1297,7 @@ public EClass getOrExpressionConstraint() * * @generated */ + @Override public EReference getOrExpressionConstraint_Left() { return (EReference)orExpressionConstraintEClass.getEStructuralFeatures().get(0); @@ -1231,6 +1308,7 @@ public EReference getOrExpressionConstraint_Left() * * @generated */ + @Override public EReference getOrExpressionConstraint_Right() { return (EReference)orExpressionConstraintEClass.getEStructuralFeatures().get(1); @@ -1241,6 +1319,7 @@ public EReference getOrExpressionConstraint_Right() * * @generated */ + @Override public EClass getAndExpressionConstraint() { return andExpressionConstraintEClass; @@ -1251,6 +1330,7 @@ public EClass getAndExpressionConstraint() * * @generated */ + @Override public EReference getAndExpressionConstraint_Left() { return (EReference)andExpressionConstraintEClass.getEStructuralFeatures().get(0); @@ -1261,6 +1341,7 @@ public EReference getAndExpressionConstraint_Left() * * @generated */ + @Override public EReference getAndExpressionConstraint_Right() { return (EReference)andExpressionConstraintEClass.getEStructuralFeatures().get(1); @@ -1271,6 +1352,7 @@ public EReference getAndExpressionConstraint_Right() * * @generated */ + @Override public EClass getExclusionExpressionConstraint() { return exclusionExpressionConstraintEClass; @@ -1281,6 +1363,7 @@ public EClass getExclusionExpressionConstraint() * * @generated */ + @Override public EReference getExclusionExpressionConstraint_Left() { return (EReference)exclusionExpressionConstraintEClass.getEStructuralFeatures().get(0); @@ -1291,6 +1374,7 @@ public EReference getExclusionExpressionConstraint_Left() * * @generated */ + @Override public EReference getExclusionExpressionConstraint_Right() { return (EReference)exclusionExpressionConstraintEClass.getEStructuralFeatures().get(1); @@ -1301,6 +1385,7 @@ public EReference getExclusionExpressionConstraint_Right() * * @generated */ + @Override public EClass getRefinedExpressionConstraint() { return refinedExpressionConstraintEClass; @@ -1311,6 +1396,7 @@ public EClass getRefinedExpressionConstraint() * * @generated */ + @Override public EReference getRefinedExpressionConstraint_Constraint() { return (EReference)refinedExpressionConstraintEClass.getEStructuralFeatures().get(0); @@ -1321,6 +1407,7 @@ public EReference getRefinedExpressionConstraint_Constraint() * * @generated */ + @Override public EReference getRefinedExpressionConstraint_Refinement() { return (EReference)refinedExpressionConstraintEClass.getEStructuralFeatures().get(1); @@ -1331,6 +1418,7 @@ public EReference getRefinedExpressionConstraint_Refinement() * * @generated */ + @Override public EClass getDottedExpressionConstraint() { return dottedExpressionConstraintEClass; @@ -1341,6 +1429,7 @@ public EClass getDottedExpressionConstraint() * * @generated */ + @Override public EReference getDottedExpressionConstraint_Constraint() { return (EReference)dottedExpressionConstraintEClass.getEStructuralFeatures().get(0); @@ -1351,6 +1440,7 @@ public EReference getDottedExpressionConstraint_Constraint() * * @generated */ + @Override public EReference getDottedExpressionConstraint_Attribute() { return (EReference)dottedExpressionConstraintEClass.getEStructuralFeatures().get(1); @@ -1361,6 +1451,7 @@ public EReference getDottedExpressionConstraint_Attribute() * * @generated */ + @Override public EClass getOrRefinement() { return orRefinementEClass; @@ -1371,6 +1462,7 @@ public EClass getOrRefinement() * * @generated */ + @Override public EReference getOrRefinement_Left() { return (EReference)orRefinementEClass.getEStructuralFeatures().get(0); @@ -1381,6 +1473,7 @@ public EReference getOrRefinement_Left() * * @generated */ + @Override public EReference getOrRefinement_Right() { return (EReference)orRefinementEClass.getEStructuralFeatures().get(1); @@ -1391,6 +1484,7 @@ public EReference getOrRefinement_Right() * * @generated */ + @Override public EClass getAndRefinement() { return andRefinementEClass; @@ -1401,6 +1495,7 @@ public EClass getAndRefinement() * * @generated */ + @Override public EReference getAndRefinement_Left() { return (EReference)andRefinementEClass.getEStructuralFeatures().get(0); @@ -1411,6 +1506,7 @@ public EReference getAndRefinement_Left() * * @generated */ + @Override public EReference getAndRefinement_Right() { return (EReference)andRefinementEClass.getEStructuralFeatures().get(1); @@ -1421,6 +1517,7 @@ public EReference getAndRefinement_Right() * * @generated */ + @Override public EclFactory getEclFactory() { return (EclFactory)getEFactoryInstance(); @@ -1472,20 +1569,20 @@ public void createPackageContents() memberOfEClass = createEClass(MEMBER_OF); createEReference(memberOfEClass, MEMBER_OF__CONSTRAINT); - conceptReferenceEClass = createEClass(CONCEPT_REFERENCE); - createEAttribute(conceptReferenceEClass, CONCEPT_REFERENCE__ID); - createEAttribute(conceptReferenceEClass, CONCEPT_REFERENCE__TERM); + eclConceptReferenceEClass = createEClass(ECL_CONCEPT_REFERENCE); + createEAttribute(eclConceptReferenceEClass, ECL_CONCEPT_REFERENCE__ID); + createEAttribute(eclConceptReferenceEClass, ECL_CONCEPT_REFERENCE__TERM); anyEClass = createEClass(ANY); - refinementEClass = createEClass(REFINEMENT); + eclRefinementEClass = createEClass(ECL_REFINEMENT); nestedRefinementEClass = createEClass(NESTED_REFINEMENT); createEReference(nestedRefinementEClass, NESTED_REFINEMENT__NESTED); - attributeGroupEClass = createEClass(ATTRIBUTE_GROUP); - createEReference(attributeGroupEClass, ATTRIBUTE_GROUP__CARDINALITY); - createEReference(attributeGroupEClass, ATTRIBUTE_GROUP__REFINEMENT); + eclAttributeGroupEClass = createEClass(ECL_ATTRIBUTE_GROUP); + createEReference(eclAttributeGroupEClass, ECL_ATTRIBUTE_GROUP__CARDINALITY); + createEReference(eclAttributeGroupEClass, ECL_ATTRIBUTE_GROUP__REFINEMENT); attributeConstraintEClass = createEClass(ATTRIBUTE_CONSTRAINT); createEReference(attributeConstraintEClass, ATTRIBUTE_CONSTRAINT__CARDINALITY); @@ -1624,11 +1721,11 @@ public void initializePackageContents() ancestorOfEClass.getESuperTypes().add(this.getExpressionConstraint()); ancestorOrSelfOfEClass.getESuperTypes().add(this.getExpressionConstraint()); memberOfEClass.getESuperTypes().add(this.getExpressionConstraint()); - conceptReferenceEClass.getESuperTypes().add(this.getExpressionConstraint()); + eclConceptReferenceEClass.getESuperTypes().add(this.getExpressionConstraint()); anyEClass.getESuperTypes().add(this.getExpressionConstraint()); - nestedRefinementEClass.getESuperTypes().add(this.getRefinement()); - attributeGroupEClass.getESuperTypes().add(this.getRefinement()); - attributeConstraintEClass.getESuperTypes().add(this.getRefinement()); + nestedRefinementEClass.getESuperTypes().add(this.getEclRefinement()); + eclAttributeGroupEClass.getESuperTypes().add(this.getEclRefinement()); + attributeConstraintEClass.getESuperTypes().add(this.getEclRefinement()); attributeComparisonEClass.getESuperTypes().add(this.getComparison()); dataTypeComparisonEClass.getESuperTypes().add(this.getComparison()); attributeValueEqualsEClass.getESuperTypes().add(this.getAttributeComparison()); @@ -1655,8 +1752,8 @@ public void initializePackageContents() exclusionExpressionConstraintEClass.getESuperTypes().add(this.getExpressionConstraint()); refinedExpressionConstraintEClass.getESuperTypes().add(this.getExpressionConstraint()); dottedExpressionConstraintEClass.getESuperTypes().add(this.getExpressionConstraint()); - orRefinementEClass.getESuperTypes().add(this.getRefinement()); - andRefinementEClass.getESuperTypes().add(this.getRefinement()); + orRefinementEClass.getESuperTypes().add(this.getEclRefinement()); + andRefinementEClass.getESuperTypes().add(this.getEclRefinement()); // Initialize classes and features; add operations and parameters initEClass(scriptEClass, Script.class, "Script", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -1685,20 +1782,20 @@ public void initializePackageContents() initEClass(memberOfEClass, MemberOf.class, "MemberOf", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getMemberOf_Constraint(), this.getExpressionConstraint(), null, "constraint", null, 0, 1, MemberOf.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(conceptReferenceEClass, ConceptReference.class, "ConceptReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getConceptReference_Id(), ecorePackage.getEString(), "id", null, 0, 1, ConceptReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getConceptReference_Term(), ecorePackage.getEString(), "term", null, 0, 1, ConceptReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(eclConceptReferenceEClass, EclConceptReference.class, "EclConceptReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getEclConceptReference_Id(), ecorePackage.getEString(), "id", null, 0, 1, EclConceptReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getEclConceptReference_Term(), ecorePackage.getEString(), "term", null, 0, 1, EclConceptReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(anyEClass, Any.class, "Any", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEClass(refinementEClass, Refinement.class, "Refinement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(eclRefinementEClass, EclRefinement.class, "EclRefinement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(nestedRefinementEClass, NestedRefinement.class, "NestedRefinement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getNestedRefinement_Nested(), this.getRefinement(), null, "nested", null, 0, 1, NestedRefinement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getNestedRefinement_Nested(), this.getEclRefinement(), null, "nested", null, 0, 1, NestedRefinement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(attributeGroupEClass, AttributeGroup.class, "AttributeGroup", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getAttributeGroup_Cardinality(), this.getCardinality(), null, "cardinality", null, 0, 1, AttributeGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getAttributeGroup_Refinement(), this.getRefinement(), null, "refinement", null, 0, 1, AttributeGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(eclAttributeGroupEClass, EclAttributeGroup.class, "EclAttributeGroup", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getEclAttributeGroup_Cardinality(), this.getCardinality(), null, "cardinality", null, 0, 1, EclAttributeGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getEclAttributeGroup_Refinement(), this.getEclRefinement(), null, "refinement", null, 0, 1, EclAttributeGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(attributeConstraintEClass, AttributeConstraint.class, "AttributeConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getAttributeConstraint_Cardinality(), this.getCardinality(), null, "cardinality", null, 0, 1, AttributeConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); @@ -1786,19 +1883,19 @@ public void initializePackageContents() initEClass(refinedExpressionConstraintEClass, RefinedExpressionConstraint.class, "RefinedExpressionConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getRefinedExpressionConstraint_Constraint(), this.getExpressionConstraint(), null, "constraint", null, 0, 1, RefinedExpressionConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getRefinedExpressionConstraint_Refinement(), this.getRefinement(), null, "refinement", null, 0, 1, RefinedExpressionConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getRefinedExpressionConstraint_Refinement(), this.getEclRefinement(), null, "refinement", null, 0, 1, RefinedExpressionConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(dottedExpressionConstraintEClass, DottedExpressionConstraint.class, "DottedExpressionConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getDottedExpressionConstraint_Constraint(), this.getExpressionConstraint(), null, "constraint", null, 0, 1, DottedExpressionConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getDottedExpressionConstraint_Attribute(), this.getExpressionConstraint(), null, "attribute", null, 0, 1, DottedExpressionConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(orRefinementEClass, OrRefinement.class, "OrRefinement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getOrRefinement_Left(), this.getRefinement(), null, "left", null, 0, 1, OrRefinement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getOrRefinement_Right(), this.getRefinement(), null, "right", null, 0, 1, OrRefinement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOrRefinement_Left(), this.getEclRefinement(), null, "left", null, 0, 1, OrRefinement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOrRefinement_Right(), this.getEclRefinement(), null, "right", null, 0, 1, OrRefinement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(andRefinementEClass, AndRefinement.class, "AndRefinement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getAndRefinement_Left(), this.getRefinement(), null, "left", null, 0, 1, AndRefinement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getAndRefinement_Right(), this.getRefinement(), null, "right", null, 0, 1, AndRefinement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAndRefinement_Left(), this.getEclRefinement(), null, "left", null, 0, 1, AndRefinement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAndRefinement_Right(), this.getEclRefinement(), null, "right", null, 0, 1, AndRefinement.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); diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/RefinementImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclRefinementImpl.java similarity index 78% rename from snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/RefinementImpl.java rename to snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclRefinementImpl.java index b52e8fbac75..e0d6c2986e8 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/RefinementImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/EclRefinementImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package com.b2international.snowowl.snomed.ecl.ecl.impl; import com.b2international.snowowl.snomed.ecl.ecl.EclPackage; -import com.b2international.snowowl.snomed.ecl.ecl.Refinement; +import com.b2international.snowowl.snomed.ecl.ecl.EclRefinement; import org.eclipse.emf.ecore.EClass; @@ -29,14 +29,14 @@ * * @generated */ -public class RefinementImpl extends MinimalEObjectImpl.Container implements Refinement +public class EclRefinementImpl extends MinimalEObjectImpl.Container implements EclRefinement { /** * * * @generated */ - protected RefinementImpl() + protected EclRefinementImpl() { super(); } @@ -49,7 +49,7 @@ protected RefinementImpl() @Override protected EClass eStaticClass() { - return EclPackage.Literals.REFINEMENT; + return EclPackage.Literals.ECL_REFINEMENT; } -} //RefinementImpl +} //EclRefinementImpl diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ExclusionExpressionConstraintImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ExclusionExpressionConstraintImpl.java index 3518cc8e4ce..277fa195cc9 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ExclusionExpressionConstraintImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ExclusionExpressionConstraintImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,6 +89,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getLeft() { return left; @@ -116,6 +117,7 @@ public NotificationChain basicSetLeft(ExpressionConstraint newLeft, Notification * * @generated */ + @Override public void setLeft(ExpressionConstraint newLeft) { if (newLeft != left) @@ -137,6 +139,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public ExpressionConstraint getRight() { return right; @@ -164,6 +167,7 @@ public NotificationChain basicSetRight(ExpressionConstraint newRight, Notificati * * @generated */ + @Override public void setRight(ExpressionConstraint newRight) { if (newRight != right) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ExpressionConstraintImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ExpressionConstraintImpl.java index 0e85238c7d5..0c2e7b28c16 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ExpressionConstraintImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ExpressionConstraintImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueEqualsImpl.java index 9fe07a877a8..b86ece61d65 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public int getValue() { return value; @@ -95,6 +96,7 @@ public int getValue() * * @generated */ + @Override public void setValue(int newValue) { int oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueGreaterThanEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueGreaterThanEqualsImpl.java index 83f67169f14..6b1cf5590c8 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueGreaterThanEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueGreaterThanEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public int getValue() { return value; @@ -95,6 +96,7 @@ public int getValue() * * @generated */ + @Override public void setValue(int newValue) { int oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueGreaterThanImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueGreaterThanImpl.java index 930eb0bd68b..f9d30858f6a 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueGreaterThanImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueGreaterThanImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public int getValue() { return value; @@ -95,6 +96,7 @@ public int getValue() * * @generated */ + @Override public void setValue(int newValue) { int oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueLessThanEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueLessThanEqualsImpl.java index 5f973e6d0b6..df2d5e24194 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueLessThanEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueLessThanEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public int getValue() { return value; @@ -95,6 +96,7 @@ public int getValue() * * @generated */ + @Override public void setValue(int newValue) { int oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueLessThanImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueLessThanImpl.java index 4385018495e..f2019ec7fee 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueLessThanImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueLessThanImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public int getValue() { return value; @@ -95,6 +96,7 @@ public int getValue() * * @generated */ + @Override public void setValue(int newValue) { int oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueNotEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueNotEqualsImpl.java index b8662811442..dadfb433b22 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueNotEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/IntegerValueNotEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public int getValue() { return value; @@ -95,6 +96,7 @@ public int getValue() * * @generated */ + @Override public void setValue(int newValue) { int oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/MemberOfImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/MemberOfImpl.java index d941963fd56..cdb478e64c5 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/MemberOfImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/MemberOfImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getConstraint() { return constraint; @@ -105,6 +106,7 @@ public NotificationChain basicSetConstraint(ExpressionConstraint newConstraint, * * @generated */ + @Override public void setConstraint(ExpressionConstraint newConstraint) { if (newConstraint != constraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/NestedExpressionImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/NestedExpressionImpl.java index 751de315e9f..0b6fcecfd09 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/NestedExpressionImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/NestedExpressionImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getNested() { return nested; @@ -105,6 +106,7 @@ public NotificationChain basicSetNested(ExpressionConstraint newNested, Notifica * * @generated */ + @Override public void setNested(ExpressionConstraint newNested) { if (newNested != nested) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/NestedRefinementImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/NestedRefinementImpl.java index 58bde9a271c..edaaf1d0c35 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/NestedRefinementImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/NestedRefinementImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ package com.b2international.snowowl.snomed.ecl.ecl.impl; import com.b2international.snowowl.snomed.ecl.ecl.EclPackage; +import com.b2international.snowowl.snomed.ecl.ecl.EclRefinement; import com.b2international.snowowl.snomed.ecl.ecl.NestedRefinement; -import com.b2international.snowowl.snomed.ecl.ecl.Refinement; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -40,7 +40,7 @@ * * @generated */ -public class NestedRefinementImpl extends RefinementImpl implements NestedRefinement +public class NestedRefinementImpl extends EclRefinementImpl implements NestedRefinement { /** * The cached value of the '{@link #getNested() Nested}' containment reference. @@ -50,7 +50,7 @@ public class NestedRefinementImpl extends RefinementImpl implements NestedRefine * @generated * @ordered */ - protected Refinement nested; + protected EclRefinement nested; /** * @@ -78,7 +78,8 @@ protected EClass eStaticClass() * * @generated */ - public Refinement getNested() + @Override + public EclRefinement getNested() { return nested; } @@ -88,9 +89,9 @@ public Refinement getNested() * * @generated */ - public NotificationChain basicSetNested(Refinement newNested, NotificationChain msgs) + public NotificationChain basicSetNested(EclRefinement newNested, NotificationChain msgs) { - Refinement oldNested = nested; + EclRefinement oldNested = nested; nested = newNested; if (eNotificationRequired()) { @@ -105,7 +106,8 @@ public NotificationChain basicSetNested(Refinement newNested, NotificationChain * * @generated */ - public void setNested(Refinement newNested) + @Override + public void setNested(EclRefinement newNested) { if (newNested != nested) { @@ -164,7 +166,7 @@ public void eSet(int featureID, Object newValue) switch (featureID) { case EclPackage.NESTED_REFINEMENT__NESTED: - setNested((Refinement)newValue); + setNested((EclRefinement)newValue); return; } super.eSet(featureID, newValue); @@ -181,7 +183,7 @@ public void eUnset(int featureID) switch (featureID) { case EclPackage.NESTED_REFINEMENT__NESTED: - setNested((Refinement)null); + setNested((EclRefinement)null); return; } super.eUnset(featureID); diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/OrExpressionConstraintImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/OrExpressionConstraintImpl.java index fabab455485..4f491ac84b6 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/OrExpressionConstraintImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/OrExpressionConstraintImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,6 +89,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getLeft() { return left; @@ -116,6 +117,7 @@ public NotificationChain basicSetLeft(ExpressionConstraint newLeft, Notification * * @generated */ + @Override public void setLeft(ExpressionConstraint newLeft) { if (newLeft != left) @@ -137,6 +139,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public ExpressionConstraint getRight() { return right; @@ -164,6 +167,7 @@ public NotificationChain basicSetRight(ExpressionConstraint newRight, Notificati * * @generated */ + @Override public void setRight(ExpressionConstraint newRight) { if (newRight != right) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/OrRefinementImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/OrRefinementImpl.java index 934156affbd..dd4c53c8cd6 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/OrRefinementImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/OrRefinementImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ package com.b2international.snowowl.snomed.ecl.ecl.impl; import com.b2international.snowowl.snomed.ecl.ecl.EclPackage; +import com.b2international.snowowl.snomed.ecl.ecl.EclRefinement; import com.b2international.snowowl.snomed.ecl.ecl.OrRefinement; -import com.b2international.snowowl.snomed.ecl.ecl.Refinement; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -41,7 +41,7 @@ * * @generated */ -public class OrRefinementImpl extends RefinementImpl implements OrRefinement +public class OrRefinementImpl extends EclRefinementImpl implements OrRefinement { /** * The cached value of the '{@link #getLeft() Left}' containment reference. @@ -51,7 +51,7 @@ public class OrRefinementImpl extends RefinementImpl implements OrRefinement * @generated * @ordered */ - protected Refinement left; + protected EclRefinement left; /** * The cached value of the '{@link #getRight() Right}' containment reference. @@ -61,7 +61,7 @@ public class OrRefinementImpl extends RefinementImpl implements OrRefinement * @generated * @ordered */ - protected Refinement right; + protected EclRefinement right; /** * @@ -89,7 +89,8 @@ protected EClass eStaticClass() * * @generated */ - public Refinement getLeft() + @Override + public EclRefinement getLeft() { return left; } @@ -99,9 +100,9 @@ public Refinement getLeft() * * @generated */ - public NotificationChain basicSetLeft(Refinement newLeft, NotificationChain msgs) + public NotificationChain basicSetLeft(EclRefinement newLeft, NotificationChain msgs) { - Refinement oldLeft = left; + EclRefinement oldLeft = left; left = newLeft; if (eNotificationRequired()) { @@ -116,7 +117,8 @@ public NotificationChain basicSetLeft(Refinement newLeft, NotificationChain msgs * * @generated */ - public void setLeft(Refinement newLeft) + @Override + public void setLeft(EclRefinement newLeft) { if (newLeft != left) { @@ -137,7 +139,8 @@ else if (eNotificationRequired()) * * @generated */ - public Refinement getRight() + @Override + public EclRefinement getRight() { return right; } @@ -147,9 +150,9 @@ public Refinement getRight() * * @generated */ - public NotificationChain basicSetRight(Refinement newRight, NotificationChain msgs) + public NotificationChain basicSetRight(EclRefinement newRight, NotificationChain msgs) { - Refinement oldRight = right; + EclRefinement oldRight = right; right = newRight; if (eNotificationRequired()) { @@ -164,7 +167,8 @@ public NotificationChain basicSetRight(Refinement newRight, NotificationChain ms * * @generated */ - public void setRight(Refinement newRight) + @Override + public void setRight(EclRefinement newRight) { if (newRight != right) { @@ -227,10 +231,10 @@ public void eSet(int featureID, Object newValue) switch (featureID) { case EclPackage.OR_REFINEMENT__LEFT: - setLeft((Refinement)newValue); + setLeft((EclRefinement)newValue); return; case EclPackage.OR_REFINEMENT__RIGHT: - setRight((Refinement)newValue); + setRight((EclRefinement)newValue); return; } super.eSet(featureID, newValue); @@ -247,10 +251,10 @@ public void eUnset(int featureID) switch (featureID) { case EclPackage.OR_REFINEMENT__LEFT: - setLeft((Refinement)null); + setLeft((EclRefinement)null); return; case EclPackage.OR_REFINEMENT__RIGHT: - setRight((Refinement)null); + setRight((EclRefinement)null); return; } super.eUnset(featureID); diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ParentOfImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ParentOfImpl.java index 4f2de97c1ac..7b026a76fc6 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ParentOfImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ParentOfImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getConstraint() { return constraint; @@ -105,6 +106,7 @@ public NotificationChain basicSetConstraint(ExpressionConstraint newConstraint, * * @generated */ + @Override public void setConstraint(ExpressionConstraint newConstraint) { if (newConstraint != constraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/RefinedExpressionConstraintImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/RefinedExpressionConstraintImpl.java index a24208e7a22..c66dbecdf29 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/RefinedExpressionConstraintImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/RefinedExpressionConstraintImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,9 +16,9 @@ package com.b2international.snowowl.snomed.ecl.ecl.impl; import com.b2international.snowowl.snomed.ecl.ecl.EclPackage; +import com.b2international.snowowl.snomed.ecl.ecl.EclRefinement; import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint; import com.b2international.snowowl.snomed.ecl.ecl.RefinedExpressionConstraint; -import com.b2international.snowowl.snomed.ecl.ecl.Refinement; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -62,7 +62,7 @@ public class RefinedExpressionConstraintImpl extends ExpressionConstraintImpl im * @generated * @ordered */ - protected Refinement refinement; + protected EclRefinement refinement; /** * @@ -90,6 +90,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getConstraint() { return constraint; @@ -117,6 +118,7 @@ public NotificationChain basicSetConstraint(ExpressionConstraint newConstraint, * * @generated */ + @Override public void setConstraint(ExpressionConstraint newConstraint) { if (newConstraint != constraint) @@ -138,7 +140,8 @@ else if (eNotificationRequired()) * * @generated */ - public Refinement getRefinement() + @Override + public EclRefinement getRefinement() { return refinement; } @@ -148,9 +151,9 @@ public Refinement getRefinement() * * @generated */ - public NotificationChain basicSetRefinement(Refinement newRefinement, NotificationChain msgs) + public NotificationChain basicSetRefinement(EclRefinement newRefinement, NotificationChain msgs) { - Refinement oldRefinement = refinement; + EclRefinement oldRefinement = refinement; refinement = newRefinement; if (eNotificationRequired()) { @@ -165,7 +168,8 @@ public NotificationChain basicSetRefinement(Refinement newRefinement, Notificati * * @generated */ - public void setRefinement(Refinement newRefinement) + @Override + public void setRefinement(EclRefinement newRefinement) { if (newRefinement != refinement) { @@ -231,7 +235,7 @@ public void eSet(int featureID, Object newValue) setConstraint((ExpressionConstraint)newValue); return; case EclPackage.REFINED_EXPRESSION_CONSTRAINT__REFINEMENT: - setRefinement((Refinement)newValue); + setRefinement((EclRefinement)newValue); return; } super.eSet(featureID, newValue); @@ -251,7 +255,7 @@ public void eUnset(int featureID) setConstraint((ExpressionConstraint)null); return; case EclPackage.REFINED_EXPRESSION_CONSTRAINT__REFINEMENT: - setRefinement((Refinement)null); + setRefinement((EclRefinement)null); return; } super.eUnset(featureID); diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ScriptImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ScriptImpl.java index 6824b30cdf0..074b349bde8 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ScriptImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/ScriptImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,6 +79,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getConstraint() { return constraint; @@ -106,6 +107,7 @@ public NotificationChain basicSetConstraint(ExpressionConstraint newConstraint, * * @generated */ + @Override public void setConstraint(ExpressionConstraint newConstraint) { if (newConstraint != constraint) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/StringValueEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/StringValueEqualsImpl.java index 198415425f7..45b3d116cc5 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/StringValueEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/StringValueEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public String getValue() { return value; @@ -95,6 +96,7 @@ public String getValue() * * @generated */ + @Override public void setValue(String newValue) { String oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/StringValueNotEqualsImpl.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/StringValueNotEqualsImpl.java index b2ea2723ca7..98e1a85e722 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/StringValueNotEqualsImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/impl/StringValueNotEqualsImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public String getValue() { return value; @@ -95,6 +96,7 @@ public String getValue() * * @generated */ + @Override public void setValue(String newValue) { String oldValue = value; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/util/EclAdapterFactory.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/util/EclAdapterFactory.java index f5d81444c9f..9569d9bc844 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/util/EclAdapterFactory.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/util/EclAdapterFactory.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -133,9 +133,9 @@ public Adapter caseMemberOf(MemberOf object) return createMemberOfAdapter(); } @Override - public Adapter caseConceptReference(ConceptReference object) + public Adapter caseEclConceptReference(EclConceptReference object) { - return createConceptReferenceAdapter(); + return createEclConceptReferenceAdapter(); } @Override public Adapter caseAny(Any object) @@ -143,9 +143,9 @@ public Adapter caseAny(Any object) return createAnyAdapter(); } @Override - public Adapter caseRefinement(Refinement object) + public Adapter caseEclRefinement(EclRefinement object) { - return createRefinementAdapter(); + return createEclRefinementAdapter(); } @Override public Adapter caseNestedRefinement(NestedRefinement object) @@ -153,9 +153,9 @@ public Adapter caseNestedRefinement(NestedRefinement object) return createNestedRefinementAdapter(); } @Override - public Adapter caseAttributeGroup(AttributeGroup object) + public Adapter caseEclAttributeGroup(EclAttributeGroup object) { - return createAttributeGroupAdapter(); + return createEclAttributeGroupAdapter(); } @Override public Adapter caseAttributeConstraint(AttributeConstraint object) @@ -470,16 +470,16 @@ public Adapter createMemberOfAdapter() } /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.ecl.ecl.ConceptReference Concept Reference}'. + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference Concept Reference}'. * * 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. * * @return the new adapter. - * @see com.b2international.snowowl.snomed.ecl.ecl.ConceptReference + * @see com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference * @generated */ - public Adapter createConceptReferenceAdapter() + public Adapter createEclConceptReferenceAdapter() { return null; } @@ -500,16 +500,16 @@ public Adapter createAnyAdapter() } /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.ecl.ecl.Refinement Refinement}'. + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.ecl.ecl.EclRefinement Refinement}'. * * 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. * * @return the new adapter. - * @see com.b2international.snowowl.snomed.ecl.ecl.Refinement + * @see com.b2international.snowowl.snomed.ecl.ecl.EclRefinement * @generated */ - public Adapter createRefinementAdapter() + public Adapter createEclRefinementAdapter() { return null; } @@ -530,16 +530,16 @@ public Adapter createNestedRefinementAdapter() } /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup Attribute Group}'. + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup Attribute Group}'. * * 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. * * @return the new adapter. - * @see com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup + * @see com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup * @generated */ - public Adapter createAttributeGroupAdapter() + public Adapter createEclAttributeGroupAdapter() { return null; } diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/util/EclSwitch.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/util/EclSwitch.java index 15bf76309d0..53e982508f2 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/util/EclSwitch.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/util/EclSwitch.java @@ -1,5 +1,5 @@ /** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -155,11 +155,11 @@ protected T doSwitch(int classifierID, EObject theEObject) if (result == null) result = defaultCase(theEObject); return result; } - case EclPackage.CONCEPT_REFERENCE: + case EclPackage.ECL_CONCEPT_REFERENCE: { - ConceptReference conceptReference = (ConceptReference)theEObject; - T result = caseConceptReference(conceptReference); - if (result == null) result = caseExpressionConstraint(conceptReference); + EclConceptReference eclConceptReference = (EclConceptReference)theEObject; + T result = caseEclConceptReference(eclConceptReference); + if (result == null) result = caseExpressionConstraint(eclConceptReference); if (result == null) result = defaultCase(theEObject); return result; } @@ -171,10 +171,10 @@ protected T doSwitch(int classifierID, EObject theEObject) if (result == null) result = defaultCase(theEObject); return result; } - case EclPackage.REFINEMENT: + case EclPackage.ECL_REFINEMENT: { - Refinement refinement = (Refinement)theEObject; - T result = caseRefinement(refinement); + EclRefinement eclRefinement = (EclRefinement)theEObject; + T result = caseEclRefinement(eclRefinement); if (result == null) result = defaultCase(theEObject); return result; } @@ -182,15 +182,15 @@ protected T doSwitch(int classifierID, EObject theEObject) { NestedRefinement nestedRefinement = (NestedRefinement)theEObject; T result = caseNestedRefinement(nestedRefinement); - if (result == null) result = caseRefinement(nestedRefinement); + if (result == null) result = caseEclRefinement(nestedRefinement); if (result == null) result = defaultCase(theEObject); return result; } - case EclPackage.ATTRIBUTE_GROUP: + case EclPackage.ECL_ATTRIBUTE_GROUP: { - AttributeGroup attributeGroup = (AttributeGroup)theEObject; - T result = caseAttributeGroup(attributeGroup); - if (result == null) result = caseRefinement(attributeGroup); + EclAttributeGroup eclAttributeGroup = (EclAttributeGroup)theEObject; + T result = caseEclAttributeGroup(eclAttributeGroup); + if (result == null) result = caseEclRefinement(eclAttributeGroup); if (result == null) result = defaultCase(theEObject); return result; } @@ -198,7 +198,7 @@ protected T doSwitch(int classifierID, EObject theEObject) { AttributeConstraint attributeConstraint = (AttributeConstraint)theEObject; T result = caseAttributeConstraint(attributeConstraint); - if (result == null) result = caseRefinement(attributeConstraint); + if (result == null) result = caseEclRefinement(attributeConstraint); if (result == null) result = defaultCase(theEObject); return result; } @@ -446,7 +446,7 @@ protected T doSwitch(int classifierID, EObject theEObject) { OrRefinement orRefinement = (OrRefinement)theEObject; T result = caseOrRefinement(orRefinement); - if (result == null) result = caseRefinement(orRefinement); + if (result == null) result = caseEclRefinement(orRefinement); if (result == null) result = defaultCase(theEObject); return result; } @@ -454,7 +454,7 @@ protected T doSwitch(int classifierID, EObject theEObject) { AndRefinement andRefinement = (AndRefinement)theEObject; T result = caseAndRefinement(andRefinement); - if (result == null) result = caseRefinement(andRefinement); + if (result == null) result = caseEclRefinement(andRefinement); if (result == null) result = defaultCase(theEObject); return result; } @@ -617,7 +617,7 @@ public T caseMemberOf(MemberOf object) * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseConceptReference(ConceptReference object) + public T caseEclConceptReference(EclConceptReference object) { return null; } @@ -649,7 +649,7 @@ public T caseAny(Any object) * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseRefinement(Refinement object) + public T caseEclRefinement(EclRefinement object) { return null; } @@ -681,7 +681,7 @@ public T caseNestedRefinement(NestedRefinement object) * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseAttributeGroup(AttributeGroup object) + public T caseEclAttributeGroup(EclAttributeGroup object) { return null; } diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/EclAntlrTokenFileProvider.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/EclAntlrTokenFileProvider.java index fc246f438e4..19ebdb04551 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/EclAntlrTokenFileProvider.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/EclAntlrTokenFileProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/EclParser.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/EclParser.java index 0b2a3407461..78a6ec3bd0d 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/EclParser.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/EclParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/internal/InternalEclParser.g b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/internal/InternalEclParser.g index 9534ee8915e..02aca1f8311 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/internal/InternalEclParser.g +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/internal/InternalEclParser.g @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -185,9 +185,9 @@ ruleOrExpressionConstraint returns [EObject current=null] $current); } ) - otherlv_2=OR + this_DISJUNCTION_2=RULE_DISJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getOrExpressionConstraintAccess().getORKeyword_1_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrExpressionConstraintAccess().getDISJUNCTIONTerminalRuleCall_1_1()); } ( ( @@ -251,14 +251,14 @@ ruleAndExpressionConstraint returns [EObject current=null] } ) ( - otherlv_2=AND + this_CONJUNCTION_2=RULE_CONJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getAndExpressionConstraintAccess().getANDKeyword_1_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndExpressionConstraintAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); } | - otherlv_3=Comma + this_COMMA_3=RULE_COMMA { - newLeafNode(otherlv_3, grammarAccess.getAndExpressionConstraintAccess().getCommaKeyword_1_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getAndExpressionConstraintAccess().getCOMMATerminalRuleCall_1_1_1()); } ) ( @@ -322,9 +322,9 @@ ruleExclusionExpressionConstraint returns [EObject current=null] $current); } ) - otherlv_2=MINUS + this_EXCLUSION_2=RULE_EXCLUSION { - newLeafNode(otherlv_2, grammarAccess.getExclusionExpressionConstraintAccess().getMINUSKeyword_1_1()); + newLeafNode(this_EXCLUSION_2, grammarAccess.getExclusionExpressionConstraintAccess().getEXCLUSIONTerminalRuleCall_1_1()); } ( ( @@ -394,9 +394,9 @@ ruleRefinedExpressionConstraint returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getRefinedExpressionConstraintAccess().getRefinementRefinementParserRuleCall_1_2_0()); + newCompositeNode(grammarAccess.getRefinedExpressionConstraintAccess().getRefinementEclRefinementParserRuleCall_1_2_0()); } - lv_refinement_3_0=ruleRefinement + lv_refinement_3_0=ruleEclRefinement { if ($current==null) { $current = createModelElementForParent(grammarAccess.getRefinedExpressionConstraintRule()); @@ -405,7 +405,7 @@ ruleRefinedExpressionConstraint returns [EObject current=null] $current, "refinement", lv_refinement_3_0, - "com.b2international.snowowl.snomed.ecl.Ecl.Refinement"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclRefinement"); afterParserOrEnumRuleCall(); } ) @@ -571,25 +571,25 @@ ruleSubExpressionConstraint returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getFocusConceptParserRuleCall_6()); + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getEclFocusConceptParserRuleCall_6()); } - this_FocusConcept_6=ruleFocusConcept + this_EclFocusConcept_6=ruleEclFocusConcept { - $current = $this_FocusConcept_6.current; + $current = $this_EclFocusConcept_6.current; afterParserOrEnumRuleCall(); } ) ; -// Entry rule entryRuleFocusConcept -entryRuleFocusConcept returns [EObject current=null]: - { newCompositeNode(grammarAccess.getFocusConceptRule()); } - iv_ruleFocusConcept=ruleFocusConcept - { $current=$iv_ruleFocusConcept.current; } +// Entry rule entryRuleEclFocusConcept +entryRuleEclFocusConcept returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclFocusConceptRule()); } + iv_ruleEclFocusConcept=ruleEclFocusConcept + { $current=$iv_ruleEclFocusConcept.current; } EOF; -// Rule FocusConcept -ruleFocusConcept returns [EObject current=null] +// Rule EclFocusConcept +ruleEclFocusConcept returns [EObject current=null] @init { enterRule(); } @@ -601,7 +601,7 @@ ruleFocusConcept returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getFocusConceptAccess().getMemberOfParserRuleCall_0()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getMemberOfParserRuleCall_0()); } this_MemberOf_0=ruleMemberOf { @@ -613,11 +613,11 @@ ruleFocusConcept returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getFocusConceptAccess().getConceptReferenceParserRuleCall_1()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getEclConceptReferenceParserRuleCall_1()); } - this_ConceptReference_1=ruleConceptReference + this_EclConceptReference_1=ruleEclConceptReference { - $current = $this_ConceptReference_1.current; + $current = $this_EclConceptReference_1.current; afterParserOrEnumRuleCall(); } | @@ -625,7 +625,7 @@ ruleFocusConcept returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getFocusConceptAccess().getAnyParserRuleCall_2()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getAnyParserRuleCall_2()); } this_Any_2=ruleAny { @@ -637,7 +637,7 @@ ruleFocusConcept returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getFocusConceptAccess().getNestedExpressionParserRuleCall_3()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getNestedExpressionParserRuleCall_3()); } this_NestedExpression_3=ruleNestedExpression { @@ -670,9 +670,9 @@ ruleChildOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getChildOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getChildOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } - lv_constraint_1_0=ruleFocusConcept + lv_constraint_1_0=ruleEclFocusConcept { if ($current==null) { $current = createModelElementForParent(grammarAccess.getChildOfRule()); @@ -681,7 +681,7 @@ ruleChildOf returns [EObject current=null] $current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } ) @@ -712,9 +712,9 @@ ruleDescendantOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getDescendantOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getDescendantOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } - lv_constraint_1_0=ruleFocusConcept + lv_constraint_1_0=ruleEclFocusConcept { if ($current==null) { $current = createModelElementForParent(grammarAccess.getDescendantOfRule()); @@ -723,7 +723,7 @@ ruleDescendantOf returns [EObject current=null] $current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } ) @@ -754,9 +754,9 @@ ruleDescendantOrSelfOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getDescendantOrSelfOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getDescendantOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } - lv_constraint_1_0=ruleFocusConcept + lv_constraint_1_0=ruleEclFocusConcept { if ($current==null) { $current = createModelElementForParent(grammarAccess.getDescendantOrSelfOfRule()); @@ -765,7 +765,7 @@ ruleDescendantOrSelfOf returns [EObject current=null] $current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } ) @@ -796,9 +796,9 @@ ruleParentOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getParentOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getParentOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } - lv_constraint_1_0=ruleFocusConcept + lv_constraint_1_0=ruleEclFocusConcept { if ($current==null) { $current = createModelElementForParent(grammarAccess.getParentOfRule()); @@ -807,7 +807,7 @@ ruleParentOf returns [EObject current=null] $current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } ) @@ -838,9 +838,9 @@ ruleAncestorOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getAncestorOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getAncestorOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } - lv_constraint_1_0=ruleFocusConcept + lv_constraint_1_0=ruleEclFocusConcept { if ($current==null) { $current = createModelElementForParent(grammarAccess.getAncestorOfRule()); @@ -849,7 +849,7 @@ ruleAncestorOf returns [EObject current=null] $current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } ) @@ -880,9 +880,9 @@ ruleAncestorOrSelfOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getAncestorOrSelfOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getAncestorOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } - lv_constraint_1_0=ruleFocusConcept + lv_constraint_1_0=ruleEclFocusConcept { if ($current==null) { $current = createModelElementForParent(grammarAccess.getAncestorOrSelfOfRule()); @@ -891,7 +891,7 @@ ruleAncestorOrSelfOf returns [EObject current=null] $current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } ) @@ -923,9 +923,9 @@ ruleMemberOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintConceptReferenceParserRuleCall_1_0_0()); + newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintEclConceptReferenceParserRuleCall_1_0_0()); } - lv_constraint_1_1=ruleConceptReference + lv_constraint_1_1=ruleEclConceptReference { if ($current==null) { $current = createModelElementForParent(grammarAccess.getMemberOfRule()); @@ -934,7 +934,7 @@ ruleMemberOf returns [EObject current=null] $current, "constraint", lv_constraint_1_1, - "com.b2international.snowowl.snomed.ecl.Ecl.ConceptReference"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclConceptReference"); afterParserOrEnumRuleCall(); } | @@ -975,15 +975,15 @@ ruleMemberOf returns [EObject current=null] ) ; -// Entry rule entryRuleConceptReference -entryRuleConceptReference returns [EObject current=null]: - { newCompositeNode(grammarAccess.getConceptReferenceRule()); } - iv_ruleConceptReference=ruleConceptReference - { $current=$iv_ruleConceptReference.current; } +// Entry rule entryRuleEclConceptReference +entryRuleEclConceptReference returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclConceptReferenceRule()); } + iv_ruleEclConceptReference=ruleEclConceptReference + { $current=$iv_ruleEclConceptReference.current; } EOF; -// Rule ConceptReference -ruleConceptReference returns [EObject current=null] +// Rule EclConceptReference +ruleEclConceptReference returns [EObject current=null] @init { enterRule(); } @@ -994,12 +994,12 @@ ruleConceptReference returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getConceptReferenceAccess().getIdSnomedIdentifierParserRuleCall_0_0()); + newCompositeNode(grammarAccess.getEclConceptReferenceAccess().getIdSnomedIdentifierParserRuleCall_0_0()); } lv_id_0_0=ruleSnomedIdentifier { if ($current==null) { - $current = createModelElementForParent(grammarAccess.getConceptReferenceRule()); + $current = createModelElementForParent(grammarAccess.getEclConceptReferenceRule()); } set( $current, @@ -1014,11 +1014,11 @@ ruleConceptReference returns [EObject current=null] ( lv_term_1_0=RULE_TERM_STRING { - newLeafNode(lv_term_1_0, grammarAccess.getConceptReferenceAccess().getTermTERM_STRINGTerminalRuleCall_1_0()); + newLeafNode(lv_term_1_0, grammarAccess.getEclConceptReferenceAccess().getTermTERM_STRINGTerminalRuleCall_1_0()); } { if ($current==null) { - $current = createModelElement(grammarAccess.getConceptReferenceRule()); + $current = createModelElement(grammarAccess.getEclConceptReferenceRule()); } setWithLastConsumed( $current, @@ -1064,15 +1064,15 @@ ruleAny returns [EObject current=null] ) ; -// Entry rule entryRuleRefinement -entryRuleRefinement returns [EObject current=null]: - { newCompositeNode(grammarAccess.getRefinementRule()); } - iv_ruleRefinement=ruleRefinement - { $current=$iv_ruleRefinement.current; } +// Entry rule entryRuleEclRefinement +entryRuleEclRefinement returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclRefinementRule()); } + iv_ruleEclRefinement=ruleEclRefinement + { $current=$iv_ruleEclRefinement.current; } EOF; -// Rule Refinement -ruleRefinement returns [EObject current=null] +// Rule EclRefinement +ruleEclRefinement returns [EObject current=null] @init { enterRule(); } @@ -1083,7 +1083,7 @@ ruleRefinement returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getRefinementAccess().getOrRefinementParserRuleCall()); + newCompositeNode(grammarAccess.getEclRefinementAccess().getOrRefinementParserRuleCall()); } this_OrRefinement_0=ruleOrRefinement { @@ -1120,7 +1120,7 @@ ruleOrRefinement returns [EObject current=null] afterParserOrEnumRuleCall(); } ( - (OR)=> + (RULE_DISJUNCTION)=> ( ( { @@ -1132,9 +1132,9 @@ ruleOrRefinement returns [EObject current=null] $current); } ) - otherlv_2=OR + this_DISJUNCTION_2=RULE_DISJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getOrRefinementAccess().getORKeyword_1_0_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrRefinementAccess().getDISJUNCTIONTerminalRuleCall_1_0_1()); } ( ( @@ -1188,7 +1188,7 @@ ruleAndRefinement returns [EObject current=null] afterParserOrEnumRuleCall(); } ( - (AND | Comma)=> + (RULE_CONJUNCTION | RULE_COMMA)=> ( ( { @@ -1201,14 +1201,14 @@ ruleAndRefinement returns [EObject current=null] } ) ( - otherlv_2=AND + this_CONJUNCTION_2=RULE_CONJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getAndRefinementAccess().getANDKeyword_1_0_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndRefinementAccess().getCONJUNCTIONTerminalRuleCall_1_0_1_0()); } | - otherlv_3=Comma + this_COMMA_3=RULE_COMMA { - newLeafNode(otherlv_3, grammarAccess.getAndRefinementAccess().getCommaKeyword_1_0_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getAndRefinementAccess().getCOMMATerminalRuleCall_1_0_1_1()); } ) ( @@ -1267,11 +1267,11 @@ ruleSubRefinement returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getSubRefinementAccess().getAttributeGroupParserRuleCall_1()); + newCompositeNode(grammarAccess.getSubRefinementAccess().getEclAttributeGroupParserRuleCall_1()); } - this_AttributeGroup_1=ruleAttributeGroup + this_EclAttributeGroup_1=ruleEclAttributeGroup { - $current = $this_AttributeGroup_1.current; + $current = $this_EclAttributeGroup_1.current; afterParserOrEnumRuleCall(); } | @@ -1312,9 +1312,9 @@ ruleNestedRefinement returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getNestedRefinementAccess().getNestedRefinementParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getNestedRefinementAccess().getNestedEclRefinementParserRuleCall_1_0()); } - lv_nested_1_0=ruleRefinement + lv_nested_1_0=ruleEclRefinement { if ($current==null) { $current = createModelElementForParent(grammarAccess.getNestedRefinementRule()); @@ -1323,7 +1323,7 @@ ruleNestedRefinement returns [EObject current=null] $current, "nested", lv_nested_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.Refinement"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclRefinement"); afterParserOrEnumRuleCall(); } ) @@ -1335,15 +1335,15 @@ ruleNestedRefinement returns [EObject current=null] ) ; -// Entry rule entryRuleAttributeGroup -entryRuleAttributeGroup returns [EObject current=null]: - { newCompositeNode(grammarAccess.getAttributeGroupRule()); } - iv_ruleAttributeGroup=ruleAttributeGroup - { $current=$iv_ruleAttributeGroup.current; } +// Entry rule entryRuleEclAttributeGroup +entryRuleEclAttributeGroup returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclAttributeGroupRule()); } + iv_ruleEclAttributeGroup=ruleEclAttributeGroup + { $current=$iv_ruleEclAttributeGroup.current; } EOF; -// Rule AttributeGroup -ruleAttributeGroup returns [EObject current=null] +// Rule EclAttributeGroup +ruleEclAttributeGroup returns [EObject current=null] @init { enterRule(); } @@ -1354,12 +1354,12 @@ ruleAttributeGroup returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getAttributeGroupAccess().getCardinalityCardinalityParserRuleCall_0_0()); + newCompositeNode(grammarAccess.getEclAttributeGroupAccess().getCardinalityCardinalityParserRuleCall_0_0()); } lv_cardinality_0_0=ruleCardinality { if ($current==null) { - $current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + $current = createModelElementForParent(grammarAccess.getEclAttributeGroupRule()); } set( $current, @@ -1372,43 +1372,43 @@ ruleAttributeGroup returns [EObject current=null] )? this_CURLY_OPEN_1=RULE_CURLY_OPEN { - newLeafNode(this_CURLY_OPEN_1, grammarAccess.getAttributeGroupAccess().getCURLY_OPENTerminalRuleCall_1()); + newLeafNode(this_CURLY_OPEN_1, grammarAccess.getEclAttributeGroupAccess().getCURLY_OPENTerminalRuleCall_1()); } ( ( { - newCompositeNode(grammarAccess.getAttributeGroupAccess().getRefinementAttributeSetParserRuleCall_2_0()); + newCompositeNode(grammarAccess.getEclAttributeGroupAccess().getRefinementEclAttributeSetParserRuleCall_2_0()); } - lv_refinement_2_0=ruleAttributeSet + lv_refinement_2_0=ruleEclAttributeSet { if ($current==null) { - $current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + $current = createModelElementForParent(grammarAccess.getEclAttributeGroupRule()); } set( $current, "refinement", lv_refinement_2_0, - "com.b2international.snowowl.snomed.ecl.Ecl.AttributeSet"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeSet"); afterParserOrEnumRuleCall(); } ) ) this_CURLY_CLOSE_3=RULE_CURLY_CLOSE { - newLeafNode(this_CURLY_CLOSE_3, grammarAccess.getAttributeGroupAccess().getCURLY_CLOSETerminalRuleCall_3()); + newLeafNode(this_CURLY_CLOSE_3, grammarAccess.getEclAttributeGroupAccess().getCURLY_CLOSETerminalRuleCall_3()); } ) ; -// Entry rule entryRuleAttributeSet -entryRuleAttributeSet returns [EObject current=null]: - { newCompositeNode(grammarAccess.getAttributeSetRule()); } - iv_ruleAttributeSet=ruleAttributeSet - { $current=$iv_ruleAttributeSet.current; } +// Entry rule entryRuleEclAttributeSet +entryRuleEclAttributeSet returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclAttributeSetRule()); } + iv_ruleEclAttributeSet=ruleEclAttributeSet + { $current=$iv_ruleEclAttributeSet.current; } EOF; -// Rule AttributeSet -ruleAttributeSet returns [EObject current=null] +// Rule EclAttributeSet +ruleEclAttributeSet returns [EObject current=null] @init { enterRule(); } @@ -1419,7 +1419,7 @@ ruleAttributeSet returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getAttributeSetAccess().getOrAttributeSetParserRuleCall()); + newCompositeNode(grammarAccess.getEclAttributeSetAccess().getOrAttributeSetParserRuleCall()); } this_OrAttributeSet_0=ruleOrAttributeSet { @@ -1466,9 +1466,9 @@ ruleOrAttributeSet returns [EObject current=null] $current); } ) - otherlv_2=OR + this_DISJUNCTION_2=RULE_DISJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getOrAttributeSetAccess().getORKeyword_1_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrAttributeSetAccess().getDISJUNCTIONTerminalRuleCall_1_1()); } ( ( @@ -1532,14 +1532,14 @@ ruleAndAttributeSet returns [EObject current=null] } ) ( - otherlv_2=AND + this_CONJUNCTION_2=RULE_CONJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getAndAttributeSetAccess().getANDKeyword_1_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndAttributeSetAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); } | - otherlv_3=Comma + this_COMMA_3=RULE_COMMA { - newLeafNode(otherlv_3, grammarAccess.getAndAttributeSetAccess().getCommaKeyword_1_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getAndAttributeSetAccess().getCOMMATerminalRuleCall_1_1_1()); } ) ( @@ -1630,9 +1630,9 @@ ruleNestedAttributeSet returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getNestedAttributeSetAccess().getNestedAttributeSetParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getNestedAttributeSetAccess().getNestedEclAttributeSetParserRuleCall_1_0()); } - lv_nested_1_0=ruleAttributeSet + lv_nested_1_0=ruleEclAttributeSet { if ($current==null) { $current = createModelElementForParent(grammarAccess.getNestedAttributeSetRule()); @@ -1641,7 +1641,7 @@ ruleNestedAttributeSet returns [EObject current=null] $current, "nested", lv_nested_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.AttributeSet"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeSet"); afterParserOrEnumRuleCall(); } ) diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/internal/InternalEclParser.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/internal/InternalEclParser.java index f2a7d643e8e..872854135ca 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/internal/InternalEclParser.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/internal/InternalEclParser.java @@ -22,48 +22,47 @@ @SuppressWarnings("all") public class InternalEclParser extends AbstractInternalAntlrParser { public static final String[] tokenNames = new String[] { - "", "", "", "", "MINUS", "False", "True", "AND", "OR", "Comma", "RULE_TERM_STRING", "RULE_REVERSED", "RULE_TO", "RULE_ZERO", "RULE_DIGIT_NONZERO", "RULE_COLON", "RULE_CURLY_OPEN", "RULE_CURLY_CLOSE", "RULE_ROUND_OPEN", "RULE_ROUND_CLOSE", "RULE_SQUARE_OPEN", "RULE_SQUARE_CLOSE", "RULE_PLUS", "RULE_DASH", "RULE_CARET", "RULE_NOT", "RULE_DOT", "RULE_WILDCARD", "RULE_EQUAL", "RULE_NOT_EQUAL", "RULE_LT", "RULE_GT", "RULE_DBL_LT", "RULE_DBL_GT", "RULE_LT_EM", "RULE_GT_EM", "RULE_GTE", "RULE_LTE", "RULE_HASH", "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_STRING" + "", "", "", "", "False", "True", "RULE_TERM_STRING", "RULE_REVERSED", "RULE_TO", "RULE_COMMA", "RULE_CONJUNCTION", "RULE_DISJUNCTION", "RULE_EXCLUSION", "RULE_ZERO", "RULE_DIGIT_NONZERO", "RULE_COLON", "RULE_CURLY_OPEN", "RULE_CURLY_CLOSE", "RULE_ROUND_OPEN", "RULE_ROUND_CLOSE", "RULE_SQUARE_OPEN", "RULE_SQUARE_CLOSE", "RULE_PLUS", "RULE_DASH", "RULE_CARET", "RULE_DOT", "RULE_WILDCARD", "RULE_EQUAL", "RULE_NOT_EQUAL", "RULE_LT", "RULE_GT", "RULE_DBL_LT", "RULE_DBL_GT", "RULE_LT_EM", "RULE_GT_EM", "RULE_GTE", "RULE_LTE", "RULE_HASH", "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_STRING" }; - public static final int RULE_LTE=37; + public static final int RULE_LTE=36; public static final int RULE_DIGIT_NONZERO=14; public static final int RULE_CURLY_OPEN=16; - public static final int RULE_TO=12; + public static final int RULE_TO=8; public static final int RULE_ROUND_CLOSE=19; - public static final int RULE_DBL_GT=33; - public static final int True=6; - public static final int RULE_GT=31; - public static final int RULE_STRING=42; - public static final int False=5; - public static final int RULE_NOT=25; - public static final int RULE_REVERSED=11; - public static final int MINUS=4; - public static final int RULE_GTE=36; - public static final int RULE_SL_COMMENT=41; - public static final int Comma=9; - public static final int RULE_HASH=38; + public static final int RULE_DBL_GT=32; + public static final int True=5; + public static final int RULE_GT=30; + public static final int RULE_STRING=41; + public static final int False=4; + public static final int RULE_REVERSED=7; + public static final int RULE_GTE=35; + public static final int RULE_SL_COMMENT=40; + public static final int RULE_HASH=37; public static final int RULE_ROUND_OPEN=18; public static final int RULE_DASH=23; - public static final int RULE_DBL_LT=32; + public static final int RULE_DBL_LT=31; public static final int RULE_PLUS=22; - public static final int RULE_NOT_EQUAL=29; - public static final int RULE_DOT=26; + public static final int RULE_NOT_EQUAL=28; + public static final int RULE_DOT=25; public static final int EOF=-1; public static final int RULE_SQUARE_CLOSE=21; - public static final int OR=8; public static final int RULE_SQUARE_OPEN=20; - public static final int RULE_EQUAL=28; - public static final int RULE_LT_EM=34; - public static final int RULE_GT_EM=35; - public static final int RULE_WS=39; + public static final int RULE_EQUAL=27; + public static final int RULE_COMMA=9; + public static final int RULE_LT_EM=33; + public static final int RULE_GT_EM=34; + public static final int RULE_WS=38; + public static final int RULE_EXCLUSION=12; public static final int RULE_CURLY_CLOSE=17; public static final int RULE_ZERO=13; public static final int RULE_COLON=15; public static final int RULE_CARET=24; - public static final int RULE_LT=30; - public static final int AND=7; - public static final int RULE_ML_COMMENT=40; - public static final int RULE_WILDCARD=27; - public static final int RULE_TERM_STRING=10; + public static final int RULE_LT=29; + public static final int RULE_CONJUNCTION=10; + public static final int RULE_ML_COMMENT=39; + public static final int RULE_WILDCARD=26; + public static final int RULE_DISJUNCTION=11; + public static final int RULE_TERM_STRING=6; // delegates // delegators @@ -393,11 +392,11 @@ public final EObject entryRuleOrExpressionConstraint() throws RecognitionExcepti // $ANTLR start "ruleOrExpressionConstraint" - // InternalEclParser.g:158:1: ruleOrExpressionConstraint returns [EObject current=null] : (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) ; + // InternalEclParser.g:158:1: ruleOrExpressionConstraint returns [EObject current=null] : (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) ; public final EObject ruleOrExpressionConstraint() throws RecognitionException { EObject current = null; - Token otherlv_2=null; + Token this_DISJUNCTION_2=null; EObject this_AndExpressionConstraint_0 = null; EObject lv_right_3_0 = null; @@ -407,11 +406,11 @@ public final EObject ruleOrExpressionConstraint() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:164:2: ( (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) ) - // InternalEclParser.g:165:2: (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) + // InternalEclParser.g:164:2: ( (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) ) + // InternalEclParser.g:165:2: (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) { - // InternalEclParser.g:165:2: (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) - // InternalEclParser.g:166:3: this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* + // InternalEclParser.g:165:2: (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) + // InternalEclParser.g:166:3: this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* { if ( state.backtracking==0 ) { @@ -434,20 +433,20 @@ public final EObject ruleOrExpressionConstraint() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalEclParser.g:177:3: ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* + // InternalEclParser.g:177:3: ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* loop2: do { int alt2=2; int LA2_0 = input.LA(1); - if ( (LA2_0==OR) ) { + if ( (LA2_0==RULE_DISJUNCTION) ) { alt2=1; } switch (alt2) { case 1 : - // InternalEclParser.g:178:4: () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) + // InternalEclParser.g:178:4: () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) { // InternalEclParser.g:178:4: () // InternalEclParser.g:179:5: @@ -467,10 +466,10 @@ public final EObject ruleOrExpressionConstraint() throws RecognitionException { } - otherlv_2=(Token)match(input,OR,FollowSets000.FOLLOW_4); if (state.failed) return current; + this_DISJUNCTION_2=(Token)match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getOrExpressionConstraintAccess().getORKeyword_1_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrExpressionConstraintAccess().getDISJUNCTIONTerminalRuleCall_1_1()); } // InternalEclParser.g:192:4: ( (lv_right_3_0= ruleAndExpressionConstraint ) ) @@ -582,12 +581,12 @@ public final EObject entryRuleAndExpressionConstraint() throws RecognitionExcept // $ANTLR start "ruleAndExpressionConstraint" - // InternalEclParser.g:223:1: ruleAndExpressionConstraint returns [EObject current=null] : (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) ; + // InternalEclParser.g:223:1: ruleAndExpressionConstraint returns [EObject current=null] : (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) ; public final EObject ruleAndExpressionConstraint() throws RecognitionException { EObject current = null; - Token otherlv_2=null; - Token otherlv_3=null; + Token this_CONJUNCTION_2=null; + Token this_COMMA_3=null; EObject this_ExclusionExpressionConstraint_0 = null; EObject lv_right_4_0 = null; @@ -597,11 +596,11 @@ public final EObject ruleAndExpressionConstraint() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:229:2: ( (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) ) - // InternalEclParser.g:230:2: (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) + // InternalEclParser.g:229:2: ( (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) ) + // InternalEclParser.g:230:2: (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) { - // InternalEclParser.g:230:2: (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) - // InternalEclParser.g:231:3: this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* + // InternalEclParser.g:230:2: (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) + // InternalEclParser.g:231:3: this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* { if ( state.backtracking==0 ) { @@ -624,20 +623,20 @@ public final EObject ruleAndExpressionConstraint() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalEclParser.g:242:3: ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* + // InternalEclParser.g:242:3: ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* loop4: do { int alt4=2; int LA4_0 = input.LA(1); - if ( (LA4_0==AND||LA4_0==Comma) ) { + if ( ((LA4_0>=RULE_COMMA && LA4_0<=RULE_CONJUNCTION)) ) { alt4=1; } switch (alt4) { case 1 : - // InternalEclParser.g:243:4: () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) + // InternalEclParser.g:243:4: () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) { // InternalEclParser.g:243:4: () // InternalEclParser.g:244:5: @@ -657,14 +656,14 @@ public final EObject ruleAndExpressionConstraint() throws RecognitionException { } - // InternalEclParser.g:253:4: (otherlv_2= AND | otherlv_3= Comma ) + // InternalEclParser.g:253:4: (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) int alt3=2; int LA3_0 = input.LA(1); - if ( (LA3_0==AND) ) { + if ( (LA3_0==RULE_CONJUNCTION) ) { alt3=1; } - else if ( (LA3_0==Comma) ) { + else if ( (LA3_0==RULE_COMMA) ) { alt3=2; } else { @@ -676,24 +675,24 @@ else if ( (LA3_0==Comma) ) { } switch (alt3) { case 1 : - // InternalEclParser.g:254:5: otherlv_2= AND + // InternalEclParser.g:254:5: this_CONJUNCTION_2= RULE_CONJUNCTION { - otherlv_2=(Token)match(input,AND,FollowSets000.FOLLOW_4); if (state.failed) return current; + this_CONJUNCTION_2=(Token)match(input,RULE_CONJUNCTION,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getAndExpressionConstraintAccess().getANDKeyword_1_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndExpressionConstraintAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); } } break; case 2 : - // InternalEclParser.g:259:5: otherlv_3= Comma + // InternalEclParser.g:259:5: this_COMMA_3= RULE_COMMA { - otherlv_3=(Token)match(input,Comma,FollowSets000.FOLLOW_4); if (state.failed) return current; + this_COMMA_3=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_3, grammarAccess.getAndExpressionConstraintAccess().getCommaKeyword_1_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getAndExpressionConstraintAccess().getCOMMATerminalRuleCall_1_1_1()); } @@ -811,11 +810,11 @@ public final EObject entryRuleExclusionExpressionConstraint() throws Recognition // $ANTLR start "ruleExclusionExpressionConstraint" - // InternalEclParser.g:295:1: ruleExclusionExpressionConstraint returns [EObject current=null] : (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) ; + // InternalEclParser.g:295:1: ruleExclusionExpressionConstraint returns [EObject current=null] : (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) ; public final EObject ruleExclusionExpressionConstraint() throws RecognitionException { EObject current = null; - Token otherlv_2=null; + Token this_EXCLUSION_2=null; EObject this_RefinedExpressionConstraint_0 = null; EObject lv_right_3_0 = null; @@ -825,11 +824,11 @@ public final EObject ruleExclusionExpressionConstraint() throws RecognitionExcep enterRule(); try { - // InternalEclParser.g:301:2: ( (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) ) - // InternalEclParser.g:302:2: (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) + // InternalEclParser.g:301:2: ( (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) ) + // InternalEclParser.g:302:2: (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) { - // InternalEclParser.g:302:2: (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) - // InternalEclParser.g:303:3: this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? + // InternalEclParser.g:302:2: (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) + // InternalEclParser.g:303:3: this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? { if ( state.backtracking==0 ) { @@ -852,16 +851,16 @@ public final EObject ruleExclusionExpressionConstraint() throws RecognitionExcep afterParserOrEnumRuleCall(); } - // InternalEclParser.g:314:3: ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? + // InternalEclParser.g:314:3: ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? int alt5=2; int LA5_0 = input.LA(1); - if ( (LA5_0==MINUS) ) { + if ( (LA5_0==RULE_EXCLUSION) ) { alt5=1; } switch (alt5) { case 1 : - // InternalEclParser.g:315:4: () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) + // InternalEclParser.g:315:4: () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) { // InternalEclParser.g:315:4: () // InternalEclParser.g:316:5: @@ -881,10 +880,10 @@ public final EObject ruleExclusionExpressionConstraint() throws RecognitionExcep } - otherlv_2=(Token)match(input,MINUS,FollowSets000.FOLLOW_4); if (state.failed) return current; + this_EXCLUSION_2=(Token)match(input,RULE_EXCLUSION,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getExclusionExpressionConstraintAccess().getMINUSKeyword_1_1()); + newLeafNode(this_EXCLUSION_2, grammarAccess.getExclusionExpressionConstraintAccess().getEXCLUSIONTerminalRuleCall_1_1()); } // InternalEclParser.g:329:4: ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) @@ -993,7 +992,7 @@ public final EObject entryRuleRefinedExpressionConstraint() throws RecognitionEx // $ANTLR start "ruleRefinedExpressionConstraint" - // InternalEclParser.g:360:1: ruleRefinedExpressionConstraint returns [EObject current=null] : (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) )? ) ; + // InternalEclParser.g:360:1: ruleRefinedExpressionConstraint returns [EObject current=null] : (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? ) ; public final EObject ruleRefinedExpressionConstraint() throws RecognitionException { EObject current = null; @@ -1007,11 +1006,11 @@ public final EObject ruleRefinedExpressionConstraint() throws RecognitionExcepti enterRule(); try { - // InternalEclParser.g:366:2: ( (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) )? ) ) - // InternalEclParser.g:367:2: (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) )? ) + // InternalEclParser.g:366:2: ( (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? ) ) + // InternalEclParser.g:367:2: (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? ) { - // InternalEclParser.g:367:2: (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) )? ) - // InternalEclParser.g:368:3: this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) )? + // InternalEclParser.g:367:2: (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? ) + // InternalEclParser.g:368:3: this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? { if ( state.backtracking==0 ) { @@ -1034,7 +1033,7 @@ public final EObject ruleRefinedExpressionConstraint() throws RecognitionExcepti afterParserOrEnumRuleCall(); } - // InternalEclParser.g:379:3: ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) )? + // InternalEclParser.g:379:3: ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? int alt6=2; int LA6_0 = input.LA(1); @@ -1043,7 +1042,7 @@ public final EObject ruleRefinedExpressionConstraint() throws RecognitionExcepti } switch (alt6) { case 1 : - // InternalEclParser.g:380:4: () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) + // InternalEclParser.g:380:4: () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) { // InternalEclParser.g:380:4: () // InternalEclParser.g:381:5: @@ -1069,19 +1068,19 @@ public final EObject ruleRefinedExpressionConstraint() throws RecognitionExcepti newLeafNode(this_COLON_2, grammarAccess.getRefinedExpressionConstraintAccess().getCOLONTerminalRuleCall_1_1()); } - // InternalEclParser.g:394:4: ( (lv_refinement_3_0= ruleRefinement ) ) - // InternalEclParser.g:395:5: (lv_refinement_3_0= ruleRefinement ) + // InternalEclParser.g:394:4: ( (lv_refinement_3_0= ruleEclRefinement ) ) + // InternalEclParser.g:395:5: (lv_refinement_3_0= ruleEclRefinement ) { - // InternalEclParser.g:395:5: (lv_refinement_3_0= ruleRefinement ) - // InternalEclParser.g:396:6: lv_refinement_3_0= ruleRefinement + // InternalEclParser.g:395:5: (lv_refinement_3_0= ruleEclRefinement ) + // InternalEclParser.g:396:6: lv_refinement_3_0= ruleEclRefinement { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getRefinedExpressionConstraintAccess().getRefinementRefinementParserRuleCall_1_2_0()); + newCompositeNode(grammarAccess.getRefinedExpressionConstraintAccess().getRefinementEclRefinementParserRuleCall_1_2_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_refinement_3_0=ruleRefinement(); + lv_refinement_3_0=ruleEclRefinement(); state._fsp--; if (state.failed) return current; @@ -1094,7 +1093,7 @@ public final EObject ruleRefinedExpressionConstraint() throws RecognitionExcepti current, "refinement", lv_refinement_3_0, - "com.b2international.snowowl.snomed.ecl.Ecl.Refinement"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclRefinement"); afterParserOrEnumRuleCall(); } @@ -1364,7 +1363,7 @@ public final EObject entryRuleSubExpressionConstraint() throws RecognitionExcept // $ANTLR start "ruleSubExpressionConstraint" - // InternalEclParser.g:490:1: ruleSubExpressionConstraint returns [EObject current=null] : (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_FocusConcept_6= ruleFocusConcept ) ; + // InternalEclParser.g:490:1: ruleSubExpressionConstraint returns [EObject current=null] : (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_EclFocusConcept_6= ruleEclFocusConcept ) ; public final EObject ruleSubExpressionConstraint() throws RecognitionException { EObject current = null; @@ -1380,17 +1379,17 @@ public final EObject ruleSubExpressionConstraint() throws RecognitionException { EObject this_AncestorOrSelfOf_5 = null; - EObject this_FocusConcept_6 = null; + EObject this_EclFocusConcept_6 = null; enterRule(); try { - // InternalEclParser.g:496:2: ( (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_FocusConcept_6= ruleFocusConcept ) ) - // InternalEclParser.g:497:2: (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_FocusConcept_6= ruleFocusConcept ) + // InternalEclParser.g:496:2: ( (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_EclFocusConcept_6= ruleEclFocusConcept ) ) + // InternalEclParser.g:497:2: (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_EclFocusConcept_6= ruleEclFocusConcept ) { - // InternalEclParser.g:497:2: (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_FocusConcept_6= ruleFocusConcept ) + // InternalEclParser.g:497:2: (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_EclFocusConcept_6= ruleEclFocusConcept ) int alt8=7; switch ( input.LA(1) ) { case RULE_LT_EM: @@ -1603,7 +1602,7 @@ public final EObject ruleSubExpressionConstraint() throws RecognitionException { } break; case 7 : - // InternalEclParser.g:570:3: this_FocusConcept_6= ruleFocusConcept + // InternalEclParser.g:570:3: this_EclFocusConcept_6= ruleEclFocusConcept { if ( state.backtracking==0 ) { @@ -1612,17 +1611,17 @@ public final EObject ruleSubExpressionConstraint() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getFocusConceptParserRuleCall_6()); + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getEclFocusConceptParserRuleCall_6()); } pushFollow(FollowSets000.FOLLOW_2); - this_FocusConcept_6=ruleFocusConcept(); + this_EclFocusConcept_6=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current = this_FocusConcept_6; + current = this_EclFocusConcept_6; afterParserOrEnumRuleCall(); } @@ -1653,28 +1652,28 @@ public final EObject ruleSubExpressionConstraint() throws RecognitionException { // $ANTLR end "ruleSubExpressionConstraint" - // $ANTLR start "entryRuleFocusConcept" - // InternalEclParser.g:585:1: entryRuleFocusConcept returns [EObject current=null] : iv_ruleFocusConcept= ruleFocusConcept EOF ; - public final EObject entryRuleFocusConcept() throws RecognitionException { + // $ANTLR start "entryRuleEclFocusConcept" + // InternalEclParser.g:585:1: entryRuleEclFocusConcept returns [EObject current=null] : iv_ruleEclFocusConcept= ruleEclFocusConcept EOF ; + public final EObject entryRuleEclFocusConcept() throws RecognitionException { EObject current = null; - EObject iv_ruleFocusConcept = null; + EObject iv_ruleEclFocusConcept = null; try { - // InternalEclParser.g:585:53: (iv_ruleFocusConcept= ruleFocusConcept EOF ) - // InternalEclParser.g:586:2: iv_ruleFocusConcept= ruleFocusConcept EOF + // InternalEclParser.g:585:56: (iv_ruleEclFocusConcept= ruleEclFocusConcept EOF ) + // InternalEclParser.g:586:2: iv_ruleEclFocusConcept= ruleEclFocusConcept EOF { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getFocusConceptRule()); + newCompositeNode(grammarAccess.getEclFocusConceptRule()); } pushFollow(FollowSets000.FOLLOW_1); - iv_ruleFocusConcept=ruleFocusConcept(); + iv_ruleEclFocusConcept=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current =iv_ruleFocusConcept; + current =iv_ruleEclFocusConcept; } match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; @@ -1690,17 +1689,17 @@ public final EObject entryRuleFocusConcept() throws RecognitionException { } return current; } - // $ANTLR end "entryRuleFocusConcept" + // $ANTLR end "entryRuleEclFocusConcept" - // $ANTLR start "ruleFocusConcept" - // InternalEclParser.g:592:1: ruleFocusConcept returns [EObject current=null] : (this_MemberOf_0= ruleMemberOf | this_ConceptReference_1= ruleConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) ; - public final EObject ruleFocusConcept() throws RecognitionException { + // $ANTLR start "ruleEclFocusConcept" + // InternalEclParser.g:592:1: ruleEclFocusConcept returns [EObject current=null] : (this_MemberOf_0= ruleMemberOf | this_EclConceptReference_1= ruleEclConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) ; + public final EObject ruleEclFocusConcept() throws RecognitionException { EObject current = null; EObject this_MemberOf_0 = null; - EObject this_ConceptReference_1 = null; + EObject this_EclConceptReference_1 = null; EObject this_Any_2 = null; @@ -1711,10 +1710,10 @@ public final EObject ruleFocusConcept() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:598:2: ( (this_MemberOf_0= ruleMemberOf | this_ConceptReference_1= ruleConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) ) - // InternalEclParser.g:599:2: (this_MemberOf_0= ruleMemberOf | this_ConceptReference_1= ruleConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) + // InternalEclParser.g:598:2: ( (this_MemberOf_0= ruleMemberOf | this_EclConceptReference_1= ruleEclConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) ) + // InternalEclParser.g:599:2: (this_MemberOf_0= ruleMemberOf | this_EclConceptReference_1= ruleEclConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) { - // InternalEclParser.g:599:2: (this_MemberOf_0= ruleMemberOf | this_ConceptReference_1= ruleConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) + // InternalEclParser.g:599:2: (this_MemberOf_0= ruleMemberOf | this_EclConceptReference_1= ruleEclConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) int alt9=4; switch ( input.LA(1) ) { case RULE_CARET: @@ -1756,7 +1755,7 @@ public final EObject ruleFocusConcept() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getFocusConceptAccess().getMemberOfParserRuleCall_0()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getMemberOfParserRuleCall_0()); } pushFollow(FollowSets000.FOLLOW_2); @@ -1774,7 +1773,7 @@ public final EObject ruleFocusConcept() throws RecognitionException { } break; case 2 : - // InternalEclParser.g:612:3: this_ConceptReference_1= ruleConceptReference + // InternalEclParser.g:612:3: this_EclConceptReference_1= ruleEclConceptReference { if ( state.backtracking==0 ) { @@ -1783,17 +1782,17 @@ public final EObject ruleFocusConcept() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getFocusConceptAccess().getConceptReferenceParserRuleCall_1()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getEclConceptReferenceParserRuleCall_1()); } pushFollow(FollowSets000.FOLLOW_2); - this_ConceptReference_1=ruleConceptReference(); + this_EclConceptReference_1=ruleEclConceptReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current = this_ConceptReference_1; + current = this_EclConceptReference_1; afterParserOrEnumRuleCall(); } @@ -1810,7 +1809,7 @@ public final EObject ruleFocusConcept() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getFocusConceptAccess().getAnyParserRuleCall_2()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getAnyParserRuleCall_2()); } pushFollow(FollowSets000.FOLLOW_2); @@ -1837,7 +1836,7 @@ public final EObject ruleFocusConcept() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getFocusConceptAccess().getNestedExpressionParserRuleCall_3()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getNestedExpressionParserRuleCall_3()); } pushFollow(FollowSets000.FOLLOW_2); @@ -1875,7 +1874,7 @@ public final EObject ruleFocusConcept() throws RecognitionException { } return current; } - // $ANTLR end "ruleFocusConcept" + // $ANTLR end "ruleEclFocusConcept" // $ANTLR start "entryRuleChildOf" @@ -1919,7 +1918,7 @@ public final EObject entryRuleChildOf() throws RecognitionException { // $ANTLR start "ruleChildOf" - // InternalEclParser.g:658:1: ruleChildOf returns [EObject current=null] : (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ; + // InternalEclParser.g:658:1: ruleChildOf returns [EObject current=null] : (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; public final EObject ruleChildOf() throws RecognitionException { EObject current = null; @@ -1931,11 +1930,11 @@ public final EObject ruleChildOf() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:664:2: ( (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ) - // InternalEclParser.g:665:2: (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) + // InternalEclParser.g:664:2: ( (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalEclParser.g:665:2: (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) { - // InternalEclParser.g:665:2: (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) - // InternalEclParser.g:666:3: this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) + // InternalEclParser.g:665:2: (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalEclParser.g:666:3: this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) { this_LT_EM_0=(Token)match(input,RULE_LT_EM,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -1943,19 +1942,19 @@ public final EObject ruleChildOf() throws RecognitionException { newLeafNode(this_LT_EM_0, grammarAccess.getChildOfAccess().getLT_EMTerminalRuleCall_0()); } - // InternalEclParser.g:670:3: ( (lv_constraint_1_0= ruleFocusConcept ) ) - // InternalEclParser.g:671:4: (lv_constraint_1_0= ruleFocusConcept ) + // InternalEclParser.g:670:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalEclParser.g:671:4: (lv_constraint_1_0= ruleEclFocusConcept ) { - // InternalEclParser.g:671:4: (lv_constraint_1_0= ruleFocusConcept ) - // InternalEclParser.g:672:5: lv_constraint_1_0= ruleFocusConcept + // InternalEclParser.g:671:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalEclParser.g:672:5: lv_constraint_1_0= ruleEclFocusConcept { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getChildOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getChildOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_0=ruleFocusConcept(); + lv_constraint_1_0=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; @@ -1968,7 +1967,7 @@ public final EObject ruleChildOf() throws RecognitionException { current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } @@ -2043,7 +2042,7 @@ public final EObject entryRuleDescendantOf() throws RecognitionException { // $ANTLR start "ruleDescendantOf" - // InternalEclParser.g:700:1: ruleDescendantOf returns [EObject current=null] : (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ; + // InternalEclParser.g:700:1: ruleDescendantOf returns [EObject current=null] : (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; public final EObject ruleDescendantOf() throws RecognitionException { EObject current = null; @@ -2055,11 +2054,11 @@ public final EObject ruleDescendantOf() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:706:2: ( (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ) - // InternalEclParser.g:707:2: (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) + // InternalEclParser.g:706:2: ( (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalEclParser.g:707:2: (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) { - // InternalEclParser.g:707:2: (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) - // InternalEclParser.g:708:3: this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) + // InternalEclParser.g:707:2: (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalEclParser.g:708:3: this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) { this_LT_0=(Token)match(input,RULE_LT,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -2067,19 +2066,19 @@ public final EObject ruleDescendantOf() throws RecognitionException { newLeafNode(this_LT_0, grammarAccess.getDescendantOfAccess().getLTTerminalRuleCall_0()); } - // InternalEclParser.g:712:3: ( (lv_constraint_1_0= ruleFocusConcept ) ) - // InternalEclParser.g:713:4: (lv_constraint_1_0= ruleFocusConcept ) + // InternalEclParser.g:712:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalEclParser.g:713:4: (lv_constraint_1_0= ruleEclFocusConcept ) { - // InternalEclParser.g:713:4: (lv_constraint_1_0= ruleFocusConcept ) - // InternalEclParser.g:714:5: lv_constraint_1_0= ruleFocusConcept + // InternalEclParser.g:713:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalEclParser.g:714:5: lv_constraint_1_0= ruleEclFocusConcept { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getDescendantOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getDescendantOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_0=ruleFocusConcept(); + lv_constraint_1_0=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; @@ -2092,7 +2091,7 @@ public final EObject ruleDescendantOf() throws RecognitionException { current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } @@ -2167,7 +2166,7 @@ public final EObject entryRuleDescendantOrSelfOf() throws RecognitionException { // $ANTLR start "ruleDescendantOrSelfOf" - // InternalEclParser.g:742:1: ruleDescendantOrSelfOf returns [EObject current=null] : (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ; + // InternalEclParser.g:742:1: ruleDescendantOrSelfOf returns [EObject current=null] : (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; public final EObject ruleDescendantOrSelfOf() throws RecognitionException { EObject current = null; @@ -2179,11 +2178,11 @@ public final EObject ruleDescendantOrSelfOf() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:748:2: ( (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ) - // InternalEclParser.g:749:2: (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) + // InternalEclParser.g:748:2: ( (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalEclParser.g:749:2: (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) { - // InternalEclParser.g:749:2: (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) - // InternalEclParser.g:750:3: this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) + // InternalEclParser.g:749:2: (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalEclParser.g:750:3: this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) { this_DBL_LT_0=(Token)match(input,RULE_DBL_LT,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -2191,19 +2190,19 @@ public final EObject ruleDescendantOrSelfOf() throws RecognitionException { newLeafNode(this_DBL_LT_0, grammarAccess.getDescendantOrSelfOfAccess().getDBL_LTTerminalRuleCall_0()); } - // InternalEclParser.g:754:3: ( (lv_constraint_1_0= ruleFocusConcept ) ) - // InternalEclParser.g:755:4: (lv_constraint_1_0= ruleFocusConcept ) + // InternalEclParser.g:754:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalEclParser.g:755:4: (lv_constraint_1_0= ruleEclFocusConcept ) { - // InternalEclParser.g:755:4: (lv_constraint_1_0= ruleFocusConcept ) - // InternalEclParser.g:756:5: lv_constraint_1_0= ruleFocusConcept + // InternalEclParser.g:755:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalEclParser.g:756:5: lv_constraint_1_0= ruleEclFocusConcept { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getDescendantOrSelfOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getDescendantOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_0=ruleFocusConcept(); + lv_constraint_1_0=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; @@ -2216,7 +2215,7 @@ public final EObject ruleDescendantOrSelfOf() throws RecognitionException { current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } @@ -2291,7 +2290,7 @@ public final EObject entryRuleParentOf() throws RecognitionException { // $ANTLR start "ruleParentOf" - // InternalEclParser.g:784:1: ruleParentOf returns [EObject current=null] : (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ; + // InternalEclParser.g:784:1: ruleParentOf returns [EObject current=null] : (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; public final EObject ruleParentOf() throws RecognitionException { EObject current = null; @@ -2303,11 +2302,11 @@ public final EObject ruleParentOf() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:790:2: ( (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ) - // InternalEclParser.g:791:2: (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) + // InternalEclParser.g:790:2: ( (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalEclParser.g:791:2: (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) { - // InternalEclParser.g:791:2: (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) - // InternalEclParser.g:792:3: this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) + // InternalEclParser.g:791:2: (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalEclParser.g:792:3: this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) { this_GT_EM_0=(Token)match(input,RULE_GT_EM,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -2315,19 +2314,19 @@ public final EObject ruleParentOf() throws RecognitionException { newLeafNode(this_GT_EM_0, grammarAccess.getParentOfAccess().getGT_EMTerminalRuleCall_0()); } - // InternalEclParser.g:796:3: ( (lv_constraint_1_0= ruleFocusConcept ) ) - // InternalEclParser.g:797:4: (lv_constraint_1_0= ruleFocusConcept ) + // InternalEclParser.g:796:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalEclParser.g:797:4: (lv_constraint_1_0= ruleEclFocusConcept ) { - // InternalEclParser.g:797:4: (lv_constraint_1_0= ruleFocusConcept ) - // InternalEclParser.g:798:5: lv_constraint_1_0= ruleFocusConcept + // InternalEclParser.g:797:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalEclParser.g:798:5: lv_constraint_1_0= ruleEclFocusConcept { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getParentOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getParentOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_0=ruleFocusConcept(); + lv_constraint_1_0=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; @@ -2340,7 +2339,7 @@ public final EObject ruleParentOf() throws RecognitionException { current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } @@ -2415,7 +2414,7 @@ public final EObject entryRuleAncestorOf() throws RecognitionException { // $ANTLR start "ruleAncestorOf" - // InternalEclParser.g:826:1: ruleAncestorOf returns [EObject current=null] : (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ; + // InternalEclParser.g:826:1: ruleAncestorOf returns [EObject current=null] : (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; public final EObject ruleAncestorOf() throws RecognitionException { EObject current = null; @@ -2427,11 +2426,11 @@ public final EObject ruleAncestorOf() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:832:2: ( (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ) - // InternalEclParser.g:833:2: (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) + // InternalEclParser.g:832:2: ( (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalEclParser.g:833:2: (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) { - // InternalEclParser.g:833:2: (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) - // InternalEclParser.g:834:3: this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) + // InternalEclParser.g:833:2: (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalEclParser.g:834:3: this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) { this_GT_0=(Token)match(input,RULE_GT,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -2439,19 +2438,19 @@ public final EObject ruleAncestorOf() throws RecognitionException { newLeafNode(this_GT_0, grammarAccess.getAncestorOfAccess().getGTTerminalRuleCall_0()); } - // InternalEclParser.g:838:3: ( (lv_constraint_1_0= ruleFocusConcept ) ) - // InternalEclParser.g:839:4: (lv_constraint_1_0= ruleFocusConcept ) + // InternalEclParser.g:838:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalEclParser.g:839:4: (lv_constraint_1_0= ruleEclFocusConcept ) { - // InternalEclParser.g:839:4: (lv_constraint_1_0= ruleFocusConcept ) - // InternalEclParser.g:840:5: lv_constraint_1_0= ruleFocusConcept + // InternalEclParser.g:839:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalEclParser.g:840:5: lv_constraint_1_0= ruleEclFocusConcept { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAncestorOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getAncestorOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_0=ruleFocusConcept(); + lv_constraint_1_0=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; @@ -2464,7 +2463,7 @@ public final EObject ruleAncestorOf() throws RecognitionException { current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } @@ -2539,7 +2538,7 @@ public final EObject entryRuleAncestorOrSelfOf() throws RecognitionException { // $ANTLR start "ruleAncestorOrSelfOf" - // InternalEclParser.g:868:1: ruleAncestorOrSelfOf returns [EObject current=null] : (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ; + // InternalEclParser.g:868:1: ruleAncestorOrSelfOf returns [EObject current=null] : (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; public final EObject ruleAncestorOrSelfOf() throws RecognitionException { EObject current = null; @@ -2551,11 +2550,11 @@ public final EObject ruleAncestorOrSelfOf() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:874:2: ( (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ) - // InternalEclParser.g:875:2: (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) + // InternalEclParser.g:874:2: ( (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalEclParser.g:875:2: (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) { - // InternalEclParser.g:875:2: (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) - // InternalEclParser.g:876:3: this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) + // InternalEclParser.g:875:2: (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalEclParser.g:876:3: this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) { this_DBL_GT_0=(Token)match(input,RULE_DBL_GT,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -2563,19 +2562,19 @@ public final EObject ruleAncestorOrSelfOf() throws RecognitionException { newLeafNode(this_DBL_GT_0, grammarAccess.getAncestorOrSelfOfAccess().getDBL_GTTerminalRuleCall_0()); } - // InternalEclParser.g:880:3: ( (lv_constraint_1_0= ruleFocusConcept ) ) - // InternalEclParser.g:881:4: (lv_constraint_1_0= ruleFocusConcept ) + // InternalEclParser.g:880:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalEclParser.g:881:4: (lv_constraint_1_0= ruleEclFocusConcept ) { - // InternalEclParser.g:881:4: (lv_constraint_1_0= ruleFocusConcept ) - // InternalEclParser.g:882:5: lv_constraint_1_0= ruleFocusConcept + // InternalEclParser.g:881:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalEclParser.g:882:5: lv_constraint_1_0= ruleEclFocusConcept { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAncestorOrSelfOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getAncestorOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_0=ruleFocusConcept(); + lv_constraint_1_0=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; @@ -2588,7 +2587,7 @@ public final EObject ruleAncestorOrSelfOf() throws RecognitionException { current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } @@ -2663,7 +2662,7 @@ public final EObject entryRuleMemberOf() throws RecognitionException { // $ANTLR start "ruleMemberOf" - // InternalEclParser.g:910:1: ruleMemberOf returns [EObject current=null] : (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) ; + // InternalEclParser.g:910:1: ruleMemberOf returns [EObject current=null] : (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) ; public final EObject ruleMemberOf() throws RecognitionException { EObject current = null; @@ -2679,11 +2678,11 @@ public final EObject ruleMemberOf() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:916:2: ( (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) ) - // InternalEclParser.g:917:2: (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) + // InternalEclParser.g:916:2: ( (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) ) + // InternalEclParser.g:917:2: (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) { - // InternalEclParser.g:917:2: (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) - // InternalEclParser.g:918:3: this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) + // InternalEclParser.g:917:2: (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) + // InternalEclParser.g:918:3: this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) { this_CARET_0=(Token)match(input,RULE_CARET,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -2691,13 +2690,13 @@ public final EObject ruleMemberOf() throws RecognitionException { newLeafNode(this_CARET_0, grammarAccess.getMemberOfAccess().getCARETTerminalRuleCall_0()); } - // InternalEclParser.g:922:3: ( ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) - // InternalEclParser.g:923:4: ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) + // InternalEclParser.g:922:3: ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) + // InternalEclParser.g:923:4: ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) { - // InternalEclParser.g:923:4: ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) - // InternalEclParser.g:924:5: (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) + // InternalEclParser.g:923:4: ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) + // InternalEclParser.g:924:5: (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) { - // InternalEclParser.g:924:5: (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) + // InternalEclParser.g:924:5: (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) int alt10=3; switch ( input.LA(1) ) { case RULE_DIGIT_NONZERO: @@ -2725,15 +2724,15 @@ public final EObject ruleMemberOf() throws RecognitionException { switch (alt10) { case 1 : - // InternalEclParser.g:925:6: lv_constraint_1_1= ruleConceptReference + // InternalEclParser.g:925:6: lv_constraint_1_1= ruleEclConceptReference { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintConceptReferenceParserRuleCall_1_0_0()); + newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintEclConceptReferenceParserRuleCall_1_0_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_1=ruleConceptReference(); + lv_constraint_1_1=ruleEclConceptReference(); state._fsp--; if (state.failed) return current; @@ -2746,7 +2745,7 @@ public final EObject ruleMemberOf() throws RecognitionException { current, "constraint", lv_constraint_1_1, - "com.b2international.snowowl.snomed.ecl.Ecl.ConceptReference"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclConceptReference"); afterParserOrEnumRuleCall(); } @@ -2844,28 +2843,28 @@ public final EObject ruleMemberOf() throws RecognitionException { // $ANTLR end "ruleMemberOf" - // $ANTLR start "entryRuleConceptReference" - // InternalEclParser.g:979:1: entryRuleConceptReference returns [EObject current=null] : iv_ruleConceptReference= ruleConceptReference EOF ; - public final EObject entryRuleConceptReference() throws RecognitionException { + // $ANTLR start "entryRuleEclConceptReference" + // InternalEclParser.g:979:1: entryRuleEclConceptReference returns [EObject current=null] : iv_ruleEclConceptReference= ruleEclConceptReference EOF ; + public final EObject entryRuleEclConceptReference() throws RecognitionException { EObject current = null; - EObject iv_ruleConceptReference = null; + EObject iv_ruleEclConceptReference = null; try { - // InternalEclParser.g:979:57: (iv_ruleConceptReference= ruleConceptReference EOF ) - // InternalEclParser.g:980:2: iv_ruleConceptReference= ruleConceptReference EOF + // InternalEclParser.g:979:60: (iv_ruleEclConceptReference= ruleEclConceptReference EOF ) + // InternalEclParser.g:980:2: iv_ruleEclConceptReference= ruleEclConceptReference EOF { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getConceptReferenceRule()); + newCompositeNode(grammarAccess.getEclConceptReferenceRule()); } pushFollow(FollowSets000.FOLLOW_1); - iv_ruleConceptReference=ruleConceptReference(); + iv_ruleEclConceptReference=ruleEclConceptReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current =iv_ruleConceptReference; + current =iv_ruleEclConceptReference; } match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; @@ -2881,12 +2880,12 @@ public final EObject entryRuleConceptReference() throws RecognitionException { } return current; } - // $ANTLR end "entryRuleConceptReference" + // $ANTLR end "entryRuleEclConceptReference" - // $ANTLR start "ruleConceptReference" - // InternalEclParser.g:986:1: ruleConceptReference returns [EObject current=null] : ( ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? ) ; - public final EObject ruleConceptReference() throws RecognitionException { + // $ANTLR start "ruleEclConceptReference" + // InternalEclParser.g:986:1: ruleEclConceptReference returns [EObject current=null] : ( ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? ) ; + public final EObject ruleEclConceptReference() throws RecognitionException { EObject current = null; Token lv_term_1_0=null; @@ -2911,7 +2910,7 @@ public final EObject ruleConceptReference() throws RecognitionException { { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getConceptReferenceAccess().getIdSnomedIdentifierParserRuleCall_0_0()); + newCompositeNode(grammarAccess.getEclConceptReferenceAccess().getIdSnomedIdentifierParserRuleCall_0_0()); } pushFollow(FollowSets000.FOLLOW_10); @@ -2922,7 +2921,7 @@ public final EObject ruleConceptReference() throws RecognitionException { if ( state.backtracking==0 ) { if (current==null) { - current = createModelElementForParent(grammarAccess.getConceptReferenceRule()); + current = createModelElementForParent(grammarAccess.getEclConceptReferenceRule()); } set( current, @@ -2955,13 +2954,13 @@ public final EObject ruleConceptReference() throws RecognitionException { lv_term_1_0=(Token)match(input,RULE_TERM_STRING,FollowSets000.FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(lv_term_1_0, grammarAccess.getConceptReferenceAccess().getTermTERM_STRINGTerminalRuleCall_1_0()); + newLeafNode(lv_term_1_0, grammarAccess.getEclConceptReferenceAccess().getTermTERM_STRINGTerminalRuleCall_1_0()); } if ( state.backtracking==0 ) { if (current==null) { - current = createModelElement(grammarAccess.getConceptReferenceRule()); + current = createModelElement(grammarAccess.getEclConceptReferenceRule()); } setWithLastConsumed( current, @@ -3000,7 +2999,7 @@ public final EObject ruleConceptReference() throws RecognitionException { } return current; } - // $ANTLR end "ruleConceptReference" + // $ANTLR end "ruleEclConceptReference" // $ANTLR start "entryRuleAny" @@ -3108,28 +3107,28 @@ public final EObject ruleAny() throws RecognitionException { // $ANTLR end "ruleAny" - // $ANTLR start "entryRuleRefinement" - // InternalEclParser.g:1068:1: entryRuleRefinement returns [EObject current=null] : iv_ruleRefinement= ruleRefinement EOF ; - public final EObject entryRuleRefinement() throws RecognitionException { + // $ANTLR start "entryRuleEclRefinement" + // InternalEclParser.g:1068:1: entryRuleEclRefinement returns [EObject current=null] : iv_ruleEclRefinement= ruleEclRefinement EOF ; + public final EObject entryRuleEclRefinement() throws RecognitionException { EObject current = null; - EObject iv_ruleRefinement = null; + EObject iv_ruleEclRefinement = null; try { - // InternalEclParser.g:1068:51: (iv_ruleRefinement= ruleRefinement EOF ) - // InternalEclParser.g:1069:2: iv_ruleRefinement= ruleRefinement EOF + // InternalEclParser.g:1068:54: (iv_ruleEclRefinement= ruleEclRefinement EOF ) + // InternalEclParser.g:1069:2: iv_ruleEclRefinement= ruleEclRefinement EOF { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getRefinementRule()); + newCompositeNode(grammarAccess.getEclRefinementRule()); } pushFollow(FollowSets000.FOLLOW_1); - iv_ruleRefinement=ruleRefinement(); + iv_ruleEclRefinement=ruleEclRefinement(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current =iv_ruleRefinement; + current =iv_ruleEclRefinement; } match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; @@ -3145,12 +3144,12 @@ public final EObject entryRuleRefinement() throws RecognitionException { } return current; } - // $ANTLR end "entryRuleRefinement" + // $ANTLR end "entryRuleEclRefinement" - // $ANTLR start "ruleRefinement" - // InternalEclParser.g:1075:1: ruleRefinement returns [EObject current=null] : this_OrRefinement_0= ruleOrRefinement ; - public final EObject ruleRefinement() throws RecognitionException { + // $ANTLR start "ruleEclRefinement" + // InternalEclParser.g:1075:1: ruleEclRefinement returns [EObject current=null] : this_OrRefinement_0= ruleOrRefinement ; + public final EObject ruleEclRefinement() throws RecognitionException { EObject current = null; EObject this_OrRefinement_0 = null; @@ -3170,7 +3169,7 @@ public final EObject ruleRefinement() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getRefinementAccess().getOrRefinementParserRuleCall()); + newCompositeNode(grammarAccess.getEclRefinementAccess().getOrRefinementParserRuleCall()); } pushFollow(FollowSets000.FOLLOW_2); @@ -3202,7 +3201,7 @@ public final EObject ruleRefinement() throws RecognitionException { } return current; } - // $ANTLR end "ruleRefinement" + // $ANTLR end "ruleEclRefinement" // $ANTLR start "entryRuleOrRefinement" @@ -3246,11 +3245,11 @@ public final EObject entryRuleOrRefinement() throws RecognitionException { // $ANTLR start "ruleOrRefinement" - // InternalEclParser.g:1103:1: ruleOrRefinement returns [EObject current=null] : (this_AndRefinement_0= ruleAndRefinement ( ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) ; + // InternalEclParser.g:1103:1: ruleOrRefinement returns [EObject current=null] : (this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) ; public final EObject ruleOrRefinement() throws RecognitionException { EObject current = null; - Token otherlv_2=null; + Token this_DISJUNCTION_2=null; EObject this_AndRefinement_0 = null; EObject lv_right_3_0 = null; @@ -3260,11 +3259,11 @@ public final EObject ruleOrRefinement() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:1109:2: ( (this_AndRefinement_0= ruleAndRefinement ( ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) ) - // InternalEclParser.g:1110:2: (this_AndRefinement_0= ruleAndRefinement ( ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) + // InternalEclParser.g:1109:2: ( (this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) ) + // InternalEclParser.g:1110:2: (this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) { - // InternalEclParser.g:1110:2: (this_AndRefinement_0= ruleAndRefinement ( ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) - // InternalEclParser.g:1111:3: this_AndRefinement_0= ruleAndRefinement ( ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) )* + // InternalEclParser.g:1110:2: (this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) + // InternalEclParser.g:1111:3: this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* { if ( state.backtracking==0 ) { @@ -3287,13 +3286,13 @@ public final EObject ruleOrRefinement() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalEclParser.g:1122:3: ( ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) )* + // InternalEclParser.g:1122:3: ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* loop12: do { int alt12=2; int LA12_0 = input.LA(1); - if ( (LA12_0==OR) ) { + if ( (LA12_0==RULE_DISJUNCTION) ) { int LA12_4 = input.LA(2); if ( (synpred20_InternalEclParser()) ) { @@ -3306,10 +3305,10 @@ public final EObject ruleOrRefinement() throws RecognitionException { switch (alt12) { case 1 : - // InternalEclParser.g:1123:4: ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) + // InternalEclParser.g:1123:4: ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) { - // InternalEclParser.g:1124:4: ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) - // InternalEclParser.g:1125:5: () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) + // InternalEclParser.g:1124:4: ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) + // InternalEclParser.g:1125:5: () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) { // InternalEclParser.g:1125:5: () // InternalEclParser.g:1126:6: @@ -3329,10 +3328,10 @@ public final EObject ruleOrRefinement() throws RecognitionException { } - otherlv_2=(Token)match(input,OR,FollowSets000.FOLLOW_8); if (state.failed) return current; + this_DISJUNCTION_2=(Token)match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_8); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getOrRefinementAccess().getORKeyword_1_0_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrRefinementAccess().getDISJUNCTIONTerminalRuleCall_1_0_1()); } // InternalEclParser.g:1139:5: ( (lv_right_3_0= ruleAndRefinement ) ) @@ -3447,12 +3446,12 @@ public final EObject entryRuleAndRefinement() throws RecognitionException { // $ANTLR start "ruleAndRefinement" - // InternalEclParser.g:1171:1: ruleAndRefinement returns [EObject current=null] : (this_SubRefinement_0= ruleSubRefinement ( ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) ; + // InternalEclParser.g:1171:1: ruleAndRefinement returns [EObject current=null] : (this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) ; public final EObject ruleAndRefinement() throws RecognitionException { EObject current = null; - Token otherlv_2=null; - Token otherlv_3=null; + Token this_CONJUNCTION_2=null; + Token this_COMMA_3=null; EObject this_SubRefinement_0 = null; EObject lv_right_4_0 = null; @@ -3462,11 +3461,11 @@ public final EObject ruleAndRefinement() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:1177:2: ( (this_SubRefinement_0= ruleSubRefinement ( ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) ) - // InternalEclParser.g:1178:2: (this_SubRefinement_0= ruleSubRefinement ( ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) + // InternalEclParser.g:1177:2: ( (this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) ) + // InternalEclParser.g:1178:2: (this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) { - // InternalEclParser.g:1178:2: (this_SubRefinement_0= ruleSubRefinement ( ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) - // InternalEclParser.g:1179:3: this_SubRefinement_0= ruleSubRefinement ( ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* + // InternalEclParser.g:1178:2: (this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) + // InternalEclParser.g:1179:3: this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* { if ( state.backtracking==0 ) { @@ -3489,13 +3488,13 @@ public final EObject ruleAndRefinement() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalEclParser.g:1190:3: ( ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* + // InternalEclParser.g:1190:3: ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* loop14: do { int alt14=2; int LA14_0 = input.LA(1); - if ( (LA14_0==AND) ) { + if ( (LA14_0==RULE_CONJUNCTION) ) { int LA14_3 = input.LA(2); if ( (synpred22_InternalEclParser()) ) { @@ -3504,7 +3503,7 @@ public final EObject ruleAndRefinement() throws RecognitionException { } - else if ( (LA14_0==Comma) ) { + else if ( (LA14_0==RULE_COMMA) ) { int LA14_4 = input.LA(2); if ( (synpred22_InternalEclParser()) ) { @@ -3517,10 +3516,10 @@ else if ( (LA14_0==Comma) ) { switch (alt14) { case 1 : - // InternalEclParser.g:1191:4: ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) + // InternalEclParser.g:1191:4: ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) { - // InternalEclParser.g:1192:4: ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) - // InternalEclParser.g:1193:5: () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) + // InternalEclParser.g:1192:4: ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) + // InternalEclParser.g:1193:5: () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) { // InternalEclParser.g:1193:5: () // InternalEclParser.g:1194:6: @@ -3540,14 +3539,14 @@ else if ( (LA14_0==Comma) ) { } - // InternalEclParser.g:1203:5: (otherlv_2= AND | otherlv_3= Comma ) + // InternalEclParser.g:1203:5: (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) int alt13=2; int LA13_0 = input.LA(1); - if ( (LA13_0==AND) ) { + if ( (LA13_0==RULE_CONJUNCTION) ) { alt13=1; } - else if ( (LA13_0==Comma) ) { + else if ( (LA13_0==RULE_COMMA) ) { alt13=2; } else { @@ -3559,24 +3558,24 @@ else if ( (LA13_0==Comma) ) { } switch (alt13) { case 1 : - // InternalEclParser.g:1204:6: otherlv_2= AND + // InternalEclParser.g:1204:6: this_CONJUNCTION_2= RULE_CONJUNCTION { - otherlv_2=(Token)match(input,AND,FollowSets000.FOLLOW_8); if (state.failed) return current; + this_CONJUNCTION_2=(Token)match(input,RULE_CONJUNCTION,FollowSets000.FOLLOW_8); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getAndRefinementAccess().getANDKeyword_1_0_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndRefinementAccess().getCONJUNCTIONTerminalRuleCall_1_0_1_0()); } } break; case 2 : - // InternalEclParser.g:1209:6: otherlv_3= Comma + // InternalEclParser.g:1209:6: this_COMMA_3= RULE_COMMA { - otherlv_3=(Token)match(input,Comma,FollowSets000.FOLLOW_8); if (state.failed) return current; + this_COMMA_3=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_8); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_3, grammarAccess.getAndRefinementAccess().getCommaKeyword_1_0_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getAndRefinementAccess().getCOMMATerminalRuleCall_1_0_1_1()); } @@ -3697,13 +3696,13 @@ public final EObject entryRuleSubRefinement() throws RecognitionException { // $ANTLR start "ruleSubRefinement" - // InternalEclParser.g:1246:1: ruleSubRefinement returns [EObject current=null] : (this_AttributeConstraint_0= ruleAttributeConstraint | this_AttributeGroup_1= ruleAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) ; + // InternalEclParser.g:1246:1: ruleSubRefinement returns [EObject current=null] : (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) ; public final EObject ruleSubRefinement() throws RecognitionException { EObject current = null; EObject this_AttributeConstraint_0 = null; - EObject this_AttributeGroup_1 = null; + EObject this_EclAttributeGroup_1 = null; EObject this_NestedRefinement_2 = null; @@ -3712,10 +3711,10 @@ public final EObject ruleSubRefinement() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:1252:2: ( (this_AttributeConstraint_0= ruleAttributeConstraint | this_AttributeGroup_1= ruleAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) ) - // InternalEclParser.g:1253:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_AttributeGroup_1= ruleAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) + // InternalEclParser.g:1252:2: ( (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) ) + // InternalEclParser.g:1253:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) { - // InternalEclParser.g:1253:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_AttributeGroup_1= ruleAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) + // InternalEclParser.g:1253:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) int alt15=3; alt15 = dfa15.predict(input); switch (alt15) { @@ -3747,7 +3746,7 @@ public final EObject ruleSubRefinement() throws RecognitionException { } break; case 2 : - // InternalEclParser.g:1266:3: this_AttributeGroup_1= ruleAttributeGroup + // InternalEclParser.g:1266:3: this_EclAttributeGroup_1= ruleEclAttributeGroup { if ( state.backtracking==0 ) { @@ -3756,17 +3755,17 @@ public final EObject ruleSubRefinement() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getSubRefinementAccess().getAttributeGroupParserRuleCall_1()); + newCompositeNode(grammarAccess.getSubRefinementAccess().getEclAttributeGroupParserRuleCall_1()); } pushFollow(FollowSets000.FOLLOW_2); - this_AttributeGroup_1=ruleAttributeGroup(); + this_EclAttributeGroup_1=ruleEclAttributeGroup(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current = this_AttributeGroup_1; + current = this_EclAttributeGroup_1; afterParserOrEnumRuleCall(); } @@ -3865,7 +3864,7 @@ public final EObject entryRuleNestedRefinement() throws RecognitionException { // $ANTLR start "ruleNestedRefinement" - // InternalEclParser.g:1300:1: ruleNestedRefinement returns [EObject current=null] : (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ; + // InternalEclParser.g:1300:1: ruleNestedRefinement returns [EObject current=null] : (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ; public final EObject ruleNestedRefinement() throws RecognitionException { EObject current = null; @@ -3878,11 +3877,11 @@ public final EObject ruleNestedRefinement() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:1306:2: ( (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ) - // InternalEclParser.g:1307:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + // InternalEclParser.g:1306:2: ( (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ) + // InternalEclParser.g:1307:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) { - // InternalEclParser.g:1307:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) - // InternalEclParser.g:1308:3: this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE + // InternalEclParser.g:1307:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + // InternalEclParser.g:1308:3: this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE { this_ROUND_OPEN_0=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_8); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -3890,19 +3889,19 @@ public final EObject ruleNestedRefinement() throws RecognitionException { newLeafNode(this_ROUND_OPEN_0, grammarAccess.getNestedRefinementAccess().getROUND_OPENTerminalRuleCall_0()); } - // InternalEclParser.g:1312:3: ( (lv_nested_1_0= ruleRefinement ) ) - // InternalEclParser.g:1313:4: (lv_nested_1_0= ruleRefinement ) + // InternalEclParser.g:1312:3: ( (lv_nested_1_0= ruleEclRefinement ) ) + // InternalEclParser.g:1313:4: (lv_nested_1_0= ruleEclRefinement ) { - // InternalEclParser.g:1313:4: (lv_nested_1_0= ruleRefinement ) - // InternalEclParser.g:1314:5: lv_nested_1_0= ruleRefinement + // InternalEclParser.g:1313:4: (lv_nested_1_0= ruleEclRefinement ) + // InternalEclParser.g:1314:5: lv_nested_1_0= ruleEclRefinement { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getNestedRefinementAccess().getNestedRefinementParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getNestedRefinementAccess().getNestedEclRefinementParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_11); - lv_nested_1_0=ruleRefinement(); + lv_nested_1_0=ruleEclRefinement(); state._fsp--; if (state.failed) return current; @@ -3915,7 +3914,7 @@ public final EObject ruleNestedRefinement() throws RecognitionException { current, "nested", lv_nested_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.Refinement"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclRefinement"); afterParserOrEnumRuleCall(); } @@ -3955,28 +3954,28 @@ public final EObject ruleNestedRefinement() throws RecognitionException { // $ANTLR end "ruleNestedRefinement" - // $ANTLR start "entryRuleAttributeGroup" - // InternalEclParser.g:1339:1: entryRuleAttributeGroup returns [EObject current=null] : iv_ruleAttributeGroup= ruleAttributeGroup EOF ; - public final EObject entryRuleAttributeGroup() throws RecognitionException { + // $ANTLR start "entryRuleEclAttributeGroup" + // InternalEclParser.g:1339:1: entryRuleEclAttributeGroup returns [EObject current=null] : iv_ruleEclAttributeGroup= ruleEclAttributeGroup EOF ; + public final EObject entryRuleEclAttributeGroup() throws RecognitionException { EObject current = null; - EObject iv_ruleAttributeGroup = null; + EObject iv_ruleEclAttributeGroup = null; try { - // InternalEclParser.g:1339:55: (iv_ruleAttributeGroup= ruleAttributeGroup EOF ) - // InternalEclParser.g:1340:2: iv_ruleAttributeGroup= ruleAttributeGroup EOF + // InternalEclParser.g:1339:58: (iv_ruleEclAttributeGroup= ruleEclAttributeGroup EOF ) + // InternalEclParser.g:1340:2: iv_ruleEclAttributeGroup= ruleEclAttributeGroup EOF { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAttributeGroupRule()); + newCompositeNode(grammarAccess.getEclAttributeGroupRule()); } pushFollow(FollowSets000.FOLLOW_1); - iv_ruleAttributeGroup=ruleAttributeGroup(); + iv_ruleEclAttributeGroup=ruleEclAttributeGroup(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current =iv_ruleAttributeGroup; + current =iv_ruleEclAttributeGroup; } match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; @@ -3992,12 +3991,12 @@ public final EObject entryRuleAttributeGroup() throws RecognitionException { } return current; } - // $ANTLR end "entryRuleAttributeGroup" + // $ANTLR end "entryRuleEclAttributeGroup" - // $ANTLR start "ruleAttributeGroup" - // InternalEclParser.g:1346:1: ruleAttributeGroup returns [EObject current=null] : ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) ; - public final EObject ruleAttributeGroup() throws RecognitionException { + // $ANTLR start "ruleEclAttributeGroup" + // InternalEclParser.g:1346:1: ruleEclAttributeGroup returns [EObject current=null] : ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) ; + public final EObject ruleEclAttributeGroup() throws RecognitionException { EObject current = null; Token this_CURLY_OPEN_1=null; @@ -4011,11 +4010,11 @@ public final EObject ruleAttributeGroup() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:1352:2: ( ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) ) - // InternalEclParser.g:1353:2: ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) + // InternalEclParser.g:1352:2: ( ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) ) + // InternalEclParser.g:1353:2: ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) { - // InternalEclParser.g:1353:2: ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) - // InternalEclParser.g:1354:3: ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE + // InternalEclParser.g:1353:2: ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) + // InternalEclParser.g:1354:3: ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE { // InternalEclParser.g:1354:3: ( (lv_cardinality_0_0= ruleCardinality ) )? int alt16=2; @@ -4033,7 +4032,7 @@ public final EObject ruleAttributeGroup() throws RecognitionException { { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAttributeGroupAccess().getCardinalityCardinalityParserRuleCall_0_0()); + newCompositeNode(grammarAccess.getEclAttributeGroupAccess().getCardinalityCardinalityParserRuleCall_0_0()); } pushFollow(FollowSets000.FOLLOW_12); @@ -4044,7 +4043,7 @@ public final EObject ruleAttributeGroup() throws RecognitionException { if ( state.backtracking==0 ) { if (current==null) { - current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + current = createModelElementForParent(grammarAccess.getEclAttributeGroupRule()); } set( current, @@ -4066,35 +4065,35 @@ public final EObject ruleAttributeGroup() throws RecognitionException { this_CURLY_OPEN_1=(Token)match(input,RULE_CURLY_OPEN,FollowSets000.FOLLOW_13); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(this_CURLY_OPEN_1, grammarAccess.getAttributeGroupAccess().getCURLY_OPENTerminalRuleCall_1()); + newLeafNode(this_CURLY_OPEN_1, grammarAccess.getEclAttributeGroupAccess().getCURLY_OPENTerminalRuleCall_1()); } - // InternalEclParser.g:1377:3: ( (lv_refinement_2_0= ruleAttributeSet ) ) - // InternalEclParser.g:1378:4: (lv_refinement_2_0= ruleAttributeSet ) + // InternalEclParser.g:1377:3: ( (lv_refinement_2_0= ruleEclAttributeSet ) ) + // InternalEclParser.g:1378:4: (lv_refinement_2_0= ruleEclAttributeSet ) { - // InternalEclParser.g:1378:4: (lv_refinement_2_0= ruleAttributeSet ) - // InternalEclParser.g:1379:5: lv_refinement_2_0= ruleAttributeSet + // InternalEclParser.g:1378:4: (lv_refinement_2_0= ruleEclAttributeSet ) + // InternalEclParser.g:1379:5: lv_refinement_2_0= ruleEclAttributeSet { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAttributeGroupAccess().getRefinementAttributeSetParserRuleCall_2_0()); + newCompositeNode(grammarAccess.getEclAttributeGroupAccess().getRefinementEclAttributeSetParserRuleCall_2_0()); } pushFollow(FollowSets000.FOLLOW_14); - lv_refinement_2_0=ruleAttributeSet(); + lv_refinement_2_0=ruleEclAttributeSet(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { - current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + current = createModelElementForParent(grammarAccess.getEclAttributeGroupRule()); } set( current, "refinement", lv_refinement_2_0, - "com.b2international.snowowl.snomed.ecl.Ecl.AttributeSet"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeSet"); afterParserOrEnumRuleCall(); } @@ -4107,7 +4106,7 @@ public final EObject ruleAttributeGroup() throws RecognitionException { this_CURLY_CLOSE_3=(Token)match(input,RULE_CURLY_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(this_CURLY_CLOSE_3, grammarAccess.getAttributeGroupAccess().getCURLY_CLOSETerminalRuleCall_3()); + newLeafNode(this_CURLY_CLOSE_3, grammarAccess.getEclAttributeGroupAccess().getCURLY_CLOSETerminalRuleCall_3()); } @@ -4131,31 +4130,31 @@ public final EObject ruleAttributeGroup() throws RecognitionException { } return current; } - // $ANTLR end "ruleAttributeGroup" + // $ANTLR end "ruleEclAttributeGroup" - // $ANTLR start "entryRuleAttributeSet" - // InternalEclParser.g:1404:1: entryRuleAttributeSet returns [EObject current=null] : iv_ruleAttributeSet= ruleAttributeSet EOF ; - public final EObject entryRuleAttributeSet() throws RecognitionException { + // $ANTLR start "entryRuleEclAttributeSet" + // InternalEclParser.g:1404:1: entryRuleEclAttributeSet returns [EObject current=null] : iv_ruleEclAttributeSet= ruleEclAttributeSet EOF ; + public final EObject entryRuleEclAttributeSet() throws RecognitionException { EObject current = null; - EObject iv_ruleAttributeSet = null; + EObject iv_ruleEclAttributeSet = null; try { - // InternalEclParser.g:1404:53: (iv_ruleAttributeSet= ruleAttributeSet EOF ) - // InternalEclParser.g:1405:2: iv_ruleAttributeSet= ruleAttributeSet EOF + // InternalEclParser.g:1404:56: (iv_ruleEclAttributeSet= ruleEclAttributeSet EOF ) + // InternalEclParser.g:1405:2: iv_ruleEclAttributeSet= ruleEclAttributeSet EOF { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAttributeSetRule()); + newCompositeNode(grammarAccess.getEclAttributeSetRule()); } pushFollow(FollowSets000.FOLLOW_1); - iv_ruleAttributeSet=ruleAttributeSet(); + iv_ruleEclAttributeSet=ruleEclAttributeSet(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current =iv_ruleAttributeSet; + current =iv_ruleEclAttributeSet; } match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; @@ -4171,12 +4170,12 @@ public final EObject entryRuleAttributeSet() throws RecognitionException { } return current; } - // $ANTLR end "entryRuleAttributeSet" + // $ANTLR end "entryRuleEclAttributeSet" - // $ANTLR start "ruleAttributeSet" - // InternalEclParser.g:1411:1: ruleAttributeSet returns [EObject current=null] : this_OrAttributeSet_0= ruleOrAttributeSet ; - public final EObject ruleAttributeSet() throws RecognitionException { + // $ANTLR start "ruleEclAttributeSet" + // InternalEclParser.g:1411:1: ruleEclAttributeSet returns [EObject current=null] : this_OrAttributeSet_0= ruleOrAttributeSet ; + public final EObject ruleEclAttributeSet() throws RecognitionException { EObject current = null; EObject this_OrAttributeSet_0 = null; @@ -4196,7 +4195,7 @@ public final EObject ruleAttributeSet() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAttributeSetAccess().getOrAttributeSetParserRuleCall()); + newCompositeNode(grammarAccess.getEclAttributeSetAccess().getOrAttributeSetParserRuleCall()); } pushFollow(FollowSets000.FOLLOW_2); @@ -4228,7 +4227,7 @@ public final EObject ruleAttributeSet() throws RecognitionException { } return current; } - // $ANTLR end "ruleAttributeSet" + // $ANTLR end "ruleEclAttributeSet" // $ANTLR start "entryRuleOrAttributeSet" @@ -4272,11 +4271,11 @@ public final EObject entryRuleOrAttributeSet() throws RecognitionException { // $ANTLR start "ruleOrAttributeSet" - // InternalEclParser.g:1439:1: ruleOrAttributeSet returns [EObject current=null] : (this_AndAttributeSet_0= ruleAndAttributeSet ( () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) ; + // InternalEclParser.g:1439:1: ruleOrAttributeSet returns [EObject current=null] : (this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) ; public final EObject ruleOrAttributeSet() throws RecognitionException { EObject current = null; - Token otherlv_2=null; + Token this_DISJUNCTION_2=null; EObject this_AndAttributeSet_0 = null; EObject lv_right_3_0 = null; @@ -4286,11 +4285,11 @@ public final EObject ruleOrAttributeSet() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:1445:2: ( (this_AndAttributeSet_0= ruleAndAttributeSet ( () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) ) - // InternalEclParser.g:1446:2: (this_AndAttributeSet_0= ruleAndAttributeSet ( () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) + // InternalEclParser.g:1445:2: ( (this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) ) + // InternalEclParser.g:1446:2: (this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) { - // InternalEclParser.g:1446:2: (this_AndAttributeSet_0= ruleAndAttributeSet ( () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) - // InternalEclParser.g:1447:3: this_AndAttributeSet_0= ruleAndAttributeSet ( () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) )* + // InternalEclParser.g:1446:2: (this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) + // InternalEclParser.g:1447:3: this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* { if ( state.backtracking==0 ) { @@ -4313,20 +4312,20 @@ public final EObject ruleOrAttributeSet() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalEclParser.g:1458:3: ( () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) )* + // InternalEclParser.g:1458:3: ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* loop17: do { int alt17=2; int LA17_0 = input.LA(1); - if ( (LA17_0==OR) ) { + if ( (LA17_0==RULE_DISJUNCTION) ) { alt17=1; } switch (alt17) { case 1 : - // InternalEclParser.g:1459:4: () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) + // InternalEclParser.g:1459:4: () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) { // InternalEclParser.g:1459:4: () // InternalEclParser.g:1460:5: @@ -4346,10 +4345,10 @@ public final EObject ruleOrAttributeSet() throws RecognitionException { } - otherlv_2=(Token)match(input,OR,FollowSets000.FOLLOW_13); if (state.failed) return current; + this_DISJUNCTION_2=(Token)match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_13); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getOrAttributeSetAccess().getORKeyword_1_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrAttributeSetAccess().getDISJUNCTIONTerminalRuleCall_1_1()); } // InternalEclParser.g:1473:4: ( (lv_right_3_0= ruleAndAttributeSet ) ) @@ -4461,12 +4460,12 @@ public final EObject entryRuleAndAttributeSet() throws RecognitionException { // $ANTLR start "ruleAndAttributeSet" - // InternalEclParser.g:1504:1: ruleAndAttributeSet returns [EObject current=null] : (this_SubAttributeSet_0= ruleSubAttributeSet ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) ; + // InternalEclParser.g:1504:1: ruleAndAttributeSet returns [EObject current=null] : (this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) ; public final EObject ruleAndAttributeSet() throws RecognitionException { EObject current = null; - Token otherlv_2=null; - Token otherlv_3=null; + Token this_CONJUNCTION_2=null; + Token this_COMMA_3=null; EObject this_SubAttributeSet_0 = null; EObject lv_right_4_0 = null; @@ -4476,11 +4475,11 @@ public final EObject ruleAndAttributeSet() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:1510:2: ( (this_SubAttributeSet_0= ruleSubAttributeSet ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) ) - // InternalEclParser.g:1511:2: (this_SubAttributeSet_0= ruleSubAttributeSet ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) + // InternalEclParser.g:1510:2: ( (this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) ) + // InternalEclParser.g:1511:2: (this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) { - // InternalEclParser.g:1511:2: (this_SubAttributeSet_0= ruleSubAttributeSet ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) - // InternalEclParser.g:1512:3: this_SubAttributeSet_0= ruleSubAttributeSet ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* + // InternalEclParser.g:1511:2: (this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) + // InternalEclParser.g:1512:3: this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* { if ( state.backtracking==0 ) { @@ -4503,20 +4502,20 @@ public final EObject ruleAndAttributeSet() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalEclParser.g:1523:3: ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* + // InternalEclParser.g:1523:3: ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* loop19: do { int alt19=2; int LA19_0 = input.LA(1); - if ( (LA19_0==AND||LA19_0==Comma) ) { + if ( ((LA19_0>=RULE_COMMA && LA19_0<=RULE_CONJUNCTION)) ) { alt19=1; } switch (alt19) { case 1 : - // InternalEclParser.g:1524:4: () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) + // InternalEclParser.g:1524:4: () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) { // InternalEclParser.g:1524:4: () // InternalEclParser.g:1525:5: @@ -4536,14 +4535,14 @@ public final EObject ruleAndAttributeSet() throws RecognitionException { } - // InternalEclParser.g:1534:4: (otherlv_2= AND | otherlv_3= Comma ) + // InternalEclParser.g:1534:4: (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) int alt18=2; int LA18_0 = input.LA(1); - if ( (LA18_0==AND) ) { + if ( (LA18_0==RULE_CONJUNCTION) ) { alt18=1; } - else if ( (LA18_0==Comma) ) { + else if ( (LA18_0==RULE_COMMA) ) { alt18=2; } else { @@ -4555,24 +4554,24 @@ else if ( (LA18_0==Comma) ) { } switch (alt18) { case 1 : - // InternalEclParser.g:1535:5: otherlv_2= AND + // InternalEclParser.g:1535:5: this_CONJUNCTION_2= RULE_CONJUNCTION { - otherlv_2=(Token)match(input,AND,FollowSets000.FOLLOW_13); if (state.failed) return current; + this_CONJUNCTION_2=(Token)match(input,RULE_CONJUNCTION,FollowSets000.FOLLOW_13); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getAndAttributeSetAccess().getANDKeyword_1_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndAttributeSetAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); } } break; case 2 : - // InternalEclParser.g:1540:5: otherlv_3= Comma + // InternalEclParser.g:1540:5: this_COMMA_3= RULE_COMMA { - otherlv_3=(Token)match(input,Comma,FollowSets000.FOLLOW_13); if (state.failed) return current; + this_COMMA_3=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_13); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_3, grammarAccess.getAndAttributeSetAccess().getCommaKeyword_1_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getAndAttributeSetAccess().getCOMMATerminalRuleCall_1_1_1()); } @@ -4829,7 +4828,7 @@ public final EObject entryRuleNestedAttributeSet() throws RecognitionException { // $ANTLR start "ruleNestedAttributeSet" - // InternalEclParser.g:1618:1: ruleNestedAttributeSet returns [EObject current=null] : (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ; + // InternalEclParser.g:1618:1: ruleNestedAttributeSet returns [EObject current=null] : (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ; public final EObject ruleNestedAttributeSet() throws RecognitionException { EObject current = null; @@ -4842,11 +4841,11 @@ public final EObject ruleNestedAttributeSet() throws RecognitionException { enterRule(); try { - // InternalEclParser.g:1624:2: ( (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ) - // InternalEclParser.g:1625:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + // InternalEclParser.g:1624:2: ( (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ) + // InternalEclParser.g:1625:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) { - // InternalEclParser.g:1625:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) - // InternalEclParser.g:1626:3: this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE + // InternalEclParser.g:1625:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + // InternalEclParser.g:1626:3: this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE { this_ROUND_OPEN_0=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_13); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -4854,19 +4853,19 @@ public final EObject ruleNestedAttributeSet() throws RecognitionException { newLeafNode(this_ROUND_OPEN_0, grammarAccess.getNestedAttributeSetAccess().getROUND_OPENTerminalRuleCall_0()); } - // InternalEclParser.g:1630:3: ( (lv_nested_1_0= ruleAttributeSet ) ) - // InternalEclParser.g:1631:4: (lv_nested_1_0= ruleAttributeSet ) + // InternalEclParser.g:1630:3: ( (lv_nested_1_0= ruleEclAttributeSet ) ) + // InternalEclParser.g:1631:4: (lv_nested_1_0= ruleEclAttributeSet ) { - // InternalEclParser.g:1631:4: (lv_nested_1_0= ruleAttributeSet ) - // InternalEclParser.g:1632:5: lv_nested_1_0= ruleAttributeSet + // InternalEclParser.g:1631:4: (lv_nested_1_0= ruleEclAttributeSet ) + // InternalEclParser.g:1632:5: lv_nested_1_0= ruleEclAttributeSet { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getNestedAttributeSetAccess().getNestedAttributeSetParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getNestedAttributeSetAccess().getNestedEclAttributeSetParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_11); - lv_nested_1_0=ruleAttributeSet(); + lv_nested_1_0=ruleEclAttributeSet(); state._fsp--; if (state.failed) return current; @@ -4879,7 +4878,7 @@ public final EObject ruleNestedAttributeSet() throws RecognitionException { current, "nested", lv_nested_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.AttributeSet"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeSet"); afterParserOrEnumRuleCall(); } @@ -10050,10 +10049,10 @@ else if ( (LA37_0==False) ) { // $ANTLR start synpred20_InternalEclParser public final void synpred20_InternalEclParser_fragment() throws RecognitionException { - // InternalEclParser.g:1123:4: ( OR ) - // InternalEclParser.g:1123:5: OR + // InternalEclParser.g:1123:4: ( RULE_DISJUNCTION ) + // InternalEclParser.g:1123:5: RULE_DISJUNCTION { - match(input,OR,FollowSets000.FOLLOW_2); if (state.failed) return ; + match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_2); if (state.failed) return ; } } @@ -10061,10 +10060,10 @@ public final void synpred20_InternalEclParser_fragment() throws RecognitionExcep // $ANTLR start synpred22_InternalEclParser public final void synpred22_InternalEclParser_fragment() throws RecognitionException { - // InternalEclParser.g:1191:4: ( AND | Comma ) + // InternalEclParser.g:1191:4: ( RULE_CONJUNCTION | RULE_COMMA ) // InternalEclParser.g: { - if ( input.LA(1)==AND||input.LA(1)==Comma ) { + if ( (input.LA(1)>=RULE_COMMA && input.LA(1)<=RULE_CONJUNCTION) ) { input.consume(); state.errorRecovery=false;state.failed=false; } @@ -10104,11 +10103,11 @@ public final void synpred24_InternalEclParser_fragment() throws RecognitionExcep // $ANTLR start synpred25_InternalEclParser public final void synpred25_InternalEclParser_fragment() throws RecognitionException { - EObject this_AttributeGroup_1 = null; + EObject this_EclAttributeGroup_1 = null; - // InternalEclParser.g:1266:3: (this_AttributeGroup_1= ruleAttributeGroup ) - // InternalEclParser.g:1266:3: this_AttributeGroup_1= ruleAttributeGroup + // InternalEclParser.g:1266:3: (this_EclAttributeGroup_1= ruleEclAttributeGroup ) + // InternalEclParser.g:1266:3: this_EclAttributeGroup_1= ruleEclAttributeGroup { if ( state.backtracking==0 ) { @@ -10116,7 +10115,7 @@ public final void synpred25_InternalEclParser_fragment() throws RecognitionExcep } pushFollow(FollowSets000.FOLLOW_2); - this_AttributeGroup_1=ruleAttributeGroup(); + this_EclAttributeGroup_1=ruleEclAttributeGroup(); state._fsp--; if (state.failed) return ; @@ -10226,12 +10225,12 @@ public final boolean synpred25_InternalEclParser() { protected DFA20 dfa20 = new DFA20(this); protected DFA25 dfa25 = new DFA25(this); static final String dfa_1s = "\17\uffff"; - static final String dfa_2s = "\1\13\1\0\12\uffff\1\0\2\uffff"; - static final String dfa_3s = "\1\43\1\0\12\uffff\1\0\2\uffff"; + static final String dfa_2s = "\1\7\1\0\12\uffff\1\0\2\uffff"; + static final String dfa_3s = "\1\42\1\0\12\uffff\1\0\2\uffff"; static final String dfa_4s = "\2\uffff\1\1\12\uffff\1\2\1\3"; static final String dfa_5s = "\1\uffff\1\0\12\uffff\1\1\2\uffff}>"; static final String[] dfa_6s = { - "\1\2\2\uffff\1\2\1\uffff\1\15\1\uffff\1\14\1\uffff\1\1\3\uffff\1\2\2\uffff\1\2\2\uffff\6\2", + "\1\2\6\uffff\1\2\1\uffff\1\15\1\uffff\1\14\1\uffff\1\1\3\uffff\1\2\1\uffff\1\2\2\uffff\6\2", "\1\uffff", "", "", @@ -10269,7 +10268,7 @@ public DFA15(BaseRecognizer recognizer) { this.transition = dfa_6; } public String getDescription() { - return "1253:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_AttributeGroup_1= ruleAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement )"; + return "1253:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement )"; } public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { TokenStream input = (TokenStream)_input; @@ -10314,12 +10313,12 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc } } static final String dfa_7s = "\16\uffff"; - static final String dfa_8s = "\1\13\13\uffff\1\0\1\uffff"; - static final String dfa_9s = "\1\43\13\uffff\1\0\1\uffff"; + static final String dfa_8s = "\1\7\13\uffff\1\0\1\uffff"; + static final String dfa_9s = "\1\42\13\uffff\1\0\1\uffff"; static final String dfa_10s = "\1\uffff\1\1\13\uffff\1\2"; static final String dfa_11s = "\14\uffff\1\0\1\uffff}>"; static final String[] dfa_12s = { - "\1\1\2\uffff\1\1\3\uffff\1\14\1\uffff\1\1\3\uffff\1\1\2\uffff\1\1\2\uffff\6\1", + "\1\1\6\uffff\1\1\3\uffff\1\14\1\uffff\1\1\3\uffff\1\1\1\uffff\1\1\2\uffff\6\1", "", "", "", @@ -10387,8 +10386,8 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc } static final String dfa_13s = "\101\uffff"; static final String dfa_14s = "\23\uffff\2\51\2\uffff\2\55\2\uffff\2\62\2\uffff\2\65\2\uffff\2\71\2\uffff\2\75\2\uffff\2\51\2\uffff\2\55\2\uffff\2\62\2\uffff\2\65\2\uffff\2\71\2\uffff\2\75"; - static final String dfa_15s = "\1\34\2\5\4\46\1\uffff\1\15\3\uffff\7\15\2\4\2\15\2\4\2\15\2\4\2\15\2\4\2\15\2\4\2\15\2\4\2\uffff\2\4\2\uffff\2\4\2\uffff\2\4\2\uffff\2\4\2\uffff\2\4\2\uffff\2\4"; - static final String dfa_16s = "\1\45\2\52\4\46\1\uffff\1\27\3\uffff\5\27\2\16\2\32\2\16\2\32\2\16\2\32\2\16\2\32\2\16\2\32\2\16\2\32\2\uffff\2\32\2\uffff\2\32\2\uffff\2\32\2\uffff\2\32\2\uffff\2\32\2\uffff\2\32"; + static final String dfa_15s = "\1\33\2\4\4\45\1\uffff\1\15\3\uffff\7\15\2\11\2\15\2\11\2\15\2\11\2\15\2\11\2\15\2\11\2\15\2\11\2\uffff\2\11\2\uffff\2\11\2\uffff\2\11\2\uffff\2\11\2\uffff\2\11\2\uffff\2\11"; + static final String dfa_16s = "\1\44\2\51\4\45\1\uffff\1\27\3\uffff\5\27\2\16\2\31\2\16\2\31\2\16\2\31\2\16\2\31\2\16\2\31\2\16\2\31\2\uffff\2\31\2\uffff\2\31\2\uffff\2\31\2\uffff\2\31\2\uffff\2\31\2\uffff\2\31"; static final String dfa_17s = "\7\uffff\1\3\1\uffff\1\1\1\4\1\2\35\uffff\1\5\1\13\2\uffff\1\6\1\14\2\uffff\1\15\1\7\2\uffff\1\10\1\16\2\uffff\1\11\1\17\2\uffff\1\12\1\20\2\uffff"; static final String dfa_18s = "\101\uffff}>"; static final String[] dfa_19s = { @@ -10411,52 +10410,52 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc "\1\47\1\50\7\uffff\1\45\1\46", "\1\23\1\24", "\1\23\1\24", - "\1\51\2\uffff\3\51\7\uffff\1\51\1\uffff\1\51\6\uffff\1\52", - "\1\51\2\uffff\3\51\3\uffff\1\54\1\53\2\uffff\1\51\1\uffff\1\51\6\uffff\1\52", + "\4\51\4\uffff\1\51\1\uffff\1\51\5\uffff\1\52", + "\4\51\1\54\1\53\2\uffff\1\51\1\uffff\1\51\5\uffff\1\52", "\1\27\1\30", "\1\27\1\30", - "\1\55\2\uffff\3\55\7\uffff\1\55\1\uffff\1\55\6\uffff\1\56", - "\1\55\2\uffff\3\55\3\uffff\1\60\1\57\2\uffff\1\55\1\uffff\1\55\6\uffff\1\56", + "\4\55\4\uffff\1\55\1\uffff\1\55\5\uffff\1\56", + "\4\55\1\60\1\57\2\uffff\1\55\1\uffff\1\55\5\uffff\1\56", "\1\33\1\34", "\1\33\1\34", - "\1\62\2\uffff\3\62\7\uffff\1\62\1\uffff\1\62\6\uffff\1\61", - "\1\62\2\uffff\3\62\3\uffff\1\64\1\63\2\uffff\1\62\1\uffff\1\62\6\uffff\1\61", + "\4\62\4\uffff\1\62\1\uffff\1\62\5\uffff\1\61", + "\4\62\1\64\1\63\2\uffff\1\62\1\uffff\1\62\5\uffff\1\61", "\1\37\1\40", "\1\37\1\40", - "\1\65\2\uffff\3\65\7\uffff\1\65\1\uffff\1\65\6\uffff\1\66", - "\1\65\2\uffff\3\65\3\uffff\1\70\1\67\2\uffff\1\65\1\uffff\1\65\6\uffff\1\66", + "\4\65\4\uffff\1\65\1\uffff\1\65\5\uffff\1\66", + "\4\65\1\70\1\67\2\uffff\1\65\1\uffff\1\65\5\uffff\1\66", "\1\43\1\44", "\1\43\1\44", - "\1\71\2\uffff\3\71\7\uffff\1\71\1\uffff\1\71\6\uffff\1\72", - "\1\71\2\uffff\3\71\3\uffff\1\74\1\73\2\uffff\1\71\1\uffff\1\71\6\uffff\1\72", + "\4\71\4\uffff\1\71\1\uffff\1\71\5\uffff\1\72", + "\4\71\1\74\1\73\2\uffff\1\71\1\uffff\1\71\5\uffff\1\72", "\1\47\1\50", "\1\47\1\50", - "\1\75\2\uffff\3\75\7\uffff\1\75\1\uffff\1\75\6\uffff\1\76", - "\1\75\2\uffff\3\75\3\uffff\1\100\1\77\2\uffff\1\75\1\uffff\1\75\6\uffff\1\76", + "\4\75\4\uffff\1\75\1\uffff\1\75\5\uffff\1\76", + "\4\75\1\100\1\77\2\uffff\1\75\1\uffff\1\75\5\uffff\1\76", "", "", - "\1\51\2\uffff\3\51\3\uffff\1\54\1\53\2\uffff\1\51\1\uffff\1\51\6\uffff\1\52", - "\1\51\2\uffff\3\51\3\uffff\1\54\1\53\2\uffff\1\51\1\uffff\1\51\6\uffff\1\52", + "\4\51\1\54\1\53\2\uffff\1\51\1\uffff\1\51\5\uffff\1\52", + "\4\51\1\54\1\53\2\uffff\1\51\1\uffff\1\51\5\uffff\1\52", "", "", - "\1\55\2\uffff\3\55\3\uffff\1\60\1\57\2\uffff\1\55\1\uffff\1\55\6\uffff\1\56", - "\1\55\2\uffff\3\55\3\uffff\1\60\1\57\2\uffff\1\55\1\uffff\1\55\6\uffff\1\56", + "\4\55\1\60\1\57\2\uffff\1\55\1\uffff\1\55\5\uffff\1\56", + "\4\55\1\60\1\57\2\uffff\1\55\1\uffff\1\55\5\uffff\1\56", "", "", - "\1\62\2\uffff\3\62\3\uffff\1\64\1\63\2\uffff\1\62\1\uffff\1\62\6\uffff\1\61", - "\1\62\2\uffff\3\62\3\uffff\1\64\1\63\2\uffff\1\62\1\uffff\1\62\6\uffff\1\61", + "\4\62\1\64\1\63\2\uffff\1\62\1\uffff\1\62\5\uffff\1\61", + "\4\62\1\64\1\63\2\uffff\1\62\1\uffff\1\62\5\uffff\1\61", "", "", - "\1\65\2\uffff\3\65\3\uffff\1\70\1\67\2\uffff\1\65\1\uffff\1\65\6\uffff\1\66", - "\1\65\2\uffff\3\65\3\uffff\1\70\1\67\2\uffff\1\65\1\uffff\1\65\6\uffff\1\66", + "\4\65\1\70\1\67\2\uffff\1\65\1\uffff\1\65\5\uffff\1\66", + "\4\65\1\70\1\67\2\uffff\1\65\1\uffff\1\65\5\uffff\1\66", "", "", - "\1\71\2\uffff\3\71\3\uffff\1\74\1\73\2\uffff\1\71\1\uffff\1\71\6\uffff\1\72", - "\1\71\2\uffff\3\71\3\uffff\1\74\1\73\2\uffff\1\71\1\uffff\1\71\6\uffff\1\72", + "\4\71\1\74\1\73\2\uffff\1\71\1\uffff\1\71\5\uffff\1\72", + "\4\71\1\74\1\73\2\uffff\1\71\1\uffff\1\71\5\uffff\1\72", "", "", - "\1\75\2\uffff\3\75\3\uffff\1\100\1\77\2\uffff\1\75\1\uffff\1\75\6\uffff\1\76", - "\1\75\2\uffff\3\75\3\uffff\1\100\1\77\2\uffff\1\75\1\uffff\1\75\6\uffff\1\76" + "\4\75\1\100\1\77\2\uffff\1\75\1\uffff\1\75\5\uffff\1\76", + "\4\75\1\100\1\77\2\uffff\1\75\1\uffff\1\75\5\uffff\1\76" }; static final short[] dfa_13 = DFA.unpackEncodedString(dfa_13s); @@ -10490,30 +10489,30 @@ public String getDescription() { private static class FollowSets000 { public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000000000000102L}); - public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000FC9044000L}); - public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000000282L}); - public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000000012L}); + public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000000000000802L}); + public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x00000007E5044000L}); + public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000000602L}); + public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000001002L}); public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000008002L}); - public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000FC9154800L}); - public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000004000002L}); - public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000000402L}); + public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x00000007E5154080L}); + public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000002000002L}); + public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000000042L}); public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0000000000080000L}); public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000000000010000L}); - public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000FC9144800L}); + public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x00000007E5144080L}); public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000000020000L}); - public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0000000FC9044800L}); - public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x00000030F0000000L}); + public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x00000007E5044080L}); + public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x0000001878000000L}); public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x0000000000006000L}); - public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000000001000L}); - public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0000000008006000L}); + public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000000000100L}); + public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0000000004006000L}); public static final BitSet FOLLOW_20 = new BitSet(new long[]{0x0000000000200000L}); - public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x0000000000000060L}); - public static final BitSet FOLLOW_22 = new BitSet(new long[]{0x0000040000000000L}); - public static final BitSet FOLLOW_23 = new BitSet(new long[]{0x0000004000000000L}); + public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x0000000000000030L}); + public static final BitSet FOLLOW_22 = new BitSet(new long[]{0x0000020000000000L}); + public static final BitSet FOLLOW_23 = new BitSet(new long[]{0x0000002000000000L}); public static final BitSet FOLLOW_24 = new BitSet(new long[]{0x0000000000C06000L}); public static final BitSet FOLLOW_25 = new BitSet(new long[]{0x0000000000006002L}); - public static final BitSet FOLLOW_26 = new BitSet(new long[]{0x0000000004000000L}); + public static final BitSet FOLLOW_26 = new BitSet(new long[]{0x0000000002000000L}); } diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/internal/InternalEclParser.tokens b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/internal/InternalEclParser.tokens index e3c08951c2a..bc8e3537e08 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/internal/InternalEclParser.tokens +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/internal/InternalEclParser.tokens @@ -1,39 +1,38 @@ -','=9 -'AND'=7 -'MINUS'=4 -'OR'=8 -'false'=5 -'true'=6 +'false'=4 +'true'=5 RULE_CARET=24 RULE_COLON=15 +RULE_COMMA=9 +RULE_CONJUNCTION=10 RULE_CURLY_CLOSE=17 RULE_CURLY_OPEN=16 RULE_DASH=23 -RULE_DBL_GT=33 -RULE_DBL_LT=32 +RULE_DBL_GT=32 +RULE_DBL_LT=31 RULE_DIGIT_NONZERO=14 -RULE_DOT=26 -RULE_EQUAL=28 -RULE_GT=31 -RULE_GTE=36 -RULE_GT_EM=35 -RULE_HASH=38 -RULE_LT=30 -RULE_LTE=37 -RULE_LT_EM=34 -RULE_ML_COMMENT=40 -RULE_NOT=25 -RULE_NOT_EQUAL=29 +RULE_DISJUNCTION=11 +RULE_DOT=25 +RULE_EQUAL=27 +RULE_EXCLUSION=12 +RULE_GT=30 +RULE_GTE=35 +RULE_GT_EM=34 +RULE_HASH=37 +RULE_LT=29 +RULE_LTE=36 +RULE_LT_EM=33 +RULE_ML_COMMENT=39 +RULE_NOT_EQUAL=28 RULE_PLUS=22 -RULE_REVERSED=11 +RULE_REVERSED=7 RULE_ROUND_CLOSE=19 RULE_ROUND_OPEN=18 -RULE_SL_COMMENT=41 +RULE_SL_COMMENT=40 RULE_SQUARE_CLOSE=21 RULE_SQUARE_OPEN=20 -RULE_STRING=42 -RULE_TERM_STRING=10 -RULE_TO=12 -RULE_WILDCARD=27 -RULE_WS=39 +RULE_STRING=41 +RULE_TERM_STRING=6 +RULE_TO=8 +RULE_WILDCARD=26 +RULE_WS=38 RULE_ZERO=13 diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/lexer/InternalEclLexer.g b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/lexer/InternalEclLexer.g index 70761207c67..d447f2cead0 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/lexer/InternalEclLexer.g +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/lexer/InternalEclLexer.g @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,24 +23,24 @@ package com.b2international.snowowl.snomed.ecl.parser.antlr.lexer; import org.eclipse.xtext.parser.antlr.Lexer; } -MINUS : ('M'|'m')('I'|'i')('N'|'n')('U'|'u')('S'|'s'); - False : ('F'|'f')('A'|'a')('L'|'l')('S'|'s')('E'|'e'); True : ('T'|'t')('R'|'r')('U'|'u')('E'|'e'); -AND : ('A'|'a')('N'|'n')('D'|'d'); - -OR : ('O'|'o')('R'|'r'); - -Comma : ','; - RULE_TERM_STRING : '|' ~('|')* '|'; RULE_REVERSED : 'R'; RULE_TO : '..'; +RULE_COMMA : ','; + +RULE_CONJUNCTION : ('a'|'A') ('n'|'N') ('d'|'D'); + +RULE_DISJUNCTION : ('o'|'O') ('r'|'R'); + +RULE_EXCLUSION : ('m'|'M') ('i'|'I') ('n'|'N') ('u'|'U') ('s'|'S'); + RULE_ZERO : '0'; RULE_DIGIT_NONZERO : '1'..'9'; @@ -65,8 +65,6 @@ RULE_DASH : '-'; RULE_CARET : '^'; -RULE_NOT : '!'; - RULE_DOT : '.'; RULE_WILDCARD : '*'; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/lexer/InternalEclLexer.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/lexer/InternalEclLexer.java index fa34722e6e7..da00c86b786 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/lexer/InternalEclLexer.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/lexer/InternalEclLexer.java @@ -12,46 +12,45 @@ @SuppressWarnings("all") public class InternalEclLexer extends Lexer { - public static final int RULE_LTE=37; + public static final int RULE_LTE=36; public static final int RULE_DIGIT_NONZERO=14; public static final int RULE_CURLY_OPEN=16; - public static final int RULE_TO=12; + public static final int RULE_TO=8; public static final int RULE_ROUND_CLOSE=19; - public static final int RULE_DBL_GT=33; - public static final int True=6; - public static final int RULE_GT=31; - public static final int RULE_STRING=42; - public static final int False=5; - public static final int RULE_NOT=25; - public static final int RULE_REVERSED=11; - public static final int MINUS=4; - public static final int RULE_GTE=36; - public static final int RULE_SL_COMMENT=41; - public static final int Comma=9; - public static final int RULE_HASH=38; + public static final int RULE_DBL_GT=32; + public static final int True=5; + public static final int RULE_GT=30; + public static final int RULE_STRING=41; + public static final int False=4; + public static final int RULE_REVERSED=7; + public static final int RULE_GTE=35; + public static final int RULE_SL_COMMENT=40; + public static final int RULE_HASH=37; public static final int RULE_ROUND_OPEN=18; public static final int RULE_DASH=23; - public static final int RULE_DBL_LT=32; + public static final int RULE_DBL_LT=31; public static final int RULE_PLUS=22; - public static final int RULE_NOT_EQUAL=29; - public static final int RULE_DOT=26; + public static final int RULE_NOT_EQUAL=28; + public static final int RULE_DOT=25; public static final int EOF=-1; public static final int RULE_SQUARE_CLOSE=21; - public static final int OR=8; public static final int RULE_SQUARE_OPEN=20; - public static final int RULE_EQUAL=28; - public static final int RULE_LT_EM=34; - public static final int RULE_GT_EM=35; - public static final int RULE_WS=39; + public static final int RULE_EQUAL=27; + public static final int RULE_COMMA=9; + public static final int RULE_LT_EM=33; + public static final int RULE_GT_EM=34; + public static final int RULE_WS=38; + public static final int RULE_EXCLUSION=12; public static final int RULE_CURLY_CLOSE=17; public static final int RULE_ZERO=13; public static final int RULE_COLON=15; public static final int RULE_CARET=24; - public static final int RULE_LT=30; - public static final int AND=7; - public static final int RULE_ML_COMMENT=40; - public static final int RULE_WILDCARD=27; - public static final int RULE_TERM_STRING=10; + public static final int RULE_LT=29; + public static final int RULE_CONJUNCTION=10; + public static final int RULE_ML_COMMENT=39; + public static final int RULE_WILDCARD=26; + public static final int RULE_DISJUNCTION=11; + public static final int RULE_TERM_STRING=6; // delegates // delegators @@ -66,15 +65,15 @@ public InternalEclLexer(CharStream input, RecognizerSharedState state) { } public String getGrammarFileName() { return "InternalEclLexer.g"; } - // $ANTLR start "MINUS" - public final void mMINUS() throws RecognitionException { + // $ANTLR start "False" + public final void mFalse() throws RecognitionException { try { - int _type = MINUS; + int _type = False; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:26:7: ( ( 'M' | 'm' ) ( 'I' | 'i' ) ( 'N' | 'n' ) ( 'U' | 'u' ) ( 'S' | 's' ) ) - // InternalEclLexer.g:26:9: ( 'M' | 'm' ) ( 'I' | 'i' ) ( 'N' | 'n' ) ( 'U' | 'u' ) ( 'S' | 's' ) + // InternalEclLexer.g:26:7: ( ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) ) + // InternalEclLexer.g:26:9: ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) { - if ( input.LA(1)=='M'||input.LA(1)=='m' ) { + if ( input.LA(1)=='F'||input.LA(1)=='f' ) { input.consume(); } @@ -83,7 +82,7 @@ public final void mMINUS() throws RecognitionException { recover(mse); throw mse;} - if ( input.LA(1)=='I'||input.LA(1)=='i' ) { + if ( input.LA(1)=='A'||input.LA(1)=='a' ) { input.consume(); } @@ -92,7 +91,7 @@ public final void mMINUS() throws RecognitionException { recover(mse); throw mse;} - if ( input.LA(1)=='N'||input.LA(1)=='n' ) { + if ( input.LA(1)=='L'||input.LA(1)=='l' ) { input.consume(); } @@ -101,7 +100,7 @@ public final void mMINUS() throws RecognitionException { recover(mse); throw mse;} - if ( input.LA(1)=='U'||input.LA(1)=='u' ) { + if ( input.LA(1)=='S'||input.LA(1)=='s' ) { input.consume(); } @@ -110,7 +109,7 @@ public final void mMINUS() throws RecognitionException { recover(mse); throw mse;} - if ( input.LA(1)=='S'||input.LA(1)=='s' ) { + if ( input.LA(1)=='E'||input.LA(1)=='e' ) { input.consume(); } @@ -128,26 +127,17 @@ public final void mMINUS() throws RecognitionException { finally { } } - // $ANTLR end "MINUS" + // $ANTLR end "False" - // $ANTLR start "False" - public final void mFalse() throws RecognitionException { + // $ANTLR start "True" + public final void mTrue() throws RecognitionException { try { - int _type = False; + int _type = True; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:28:7: ( ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) ) - // InternalEclLexer.g:28:9: ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) + // InternalEclLexer.g:28:6: ( ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) ) + // InternalEclLexer.g:28:8: ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) { - if ( input.LA(1)=='F'||input.LA(1)=='f' ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - if ( input.LA(1)=='A'||input.LA(1)=='a' ) { + if ( input.LA(1)=='T'||input.LA(1)=='t' ) { input.consume(); } @@ -156,7 +146,7 @@ public final void mFalse() throws RecognitionException { recover(mse); throw mse;} - if ( input.LA(1)=='L'||input.LA(1)=='l' ) { + if ( input.LA(1)=='R'||input.LA(1)=='r' ) { input.consume(); } @@ -165,7 +155,7 @@ public final void mFalse() throws RecognitionException { recover(mse); throw mse;} - if ( input.LA(1)=='S'||input.LA(1)=='s' ) { + if ( input.LA(1)=='U'||input.LA(1)=='u' ) { input.consume(); } @@ -192,52 +182,112 @@ public final void mFalse() throws RecognitionException { finally { } } - // $ANTLR end "False" + // $ANTLR end "True" - // $ANTLR start "True" - public final void mTrue() throws RecognitionException { + // $ANTLR start "RULE_TERM_STRING" + public final void mRULE_TERM_STRING() throws RecognitionException { try { - int _type = True; + int _type = RULE_TERM_STRING; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:30:6: ( ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) ) - // InternalEclLexer.g:30:8: ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) + // InternalEclLexer.g:30:18: ( '|' (~ ( '|' ) )* '|' ) + // InternalEclLexer.g:30:20: '|' (~ ( '|' ) )* '|' { - if ( input.LA(1)=='T'||input.LA(1)=='t' ) { - input.consume(); + match('|'); + // InternalEclLexer.g:30:24: (~ ( '|' ) )* + loop1: + do { + int alt1=2; + int LA1_0 = input.LA(1); - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} + if ( ((LA1_0>='\u0000' && LA1_0<='{')||(LA1_0>='}' && LA1_0<='\uFFFF')) ) { + alt1=1; + } - if ( input.LA(1)=='R'||input.LA(1)=='r' ) { - input.consume(); + + switch (alt1) { + case 1 : + // InternalEclLexer.g:30:24: ~ ( '|' ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='{')||(input.LA(1)>='}' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop1; + } + } while (true); + + match('|'); } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - if ( input.LA(1)=='U'||input.LA(1)=='u' ) { - input.consume(); + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_TERM_STRING" + + // $ANTLR start "RULE_REVERSED" + public final void mRULE_REVERSED() throws RecognitionException { + try { + int _type = RULE_REVERSED; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEclLexer.g:32:15: ( 'R' ) + // InternalEclLexer.g:32:17: 'R' + { + match('R'); } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - if ( input.LA(1)=='E'||input.LA(1)=='e' ) { - input.consume(); + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_REVERSED" + + // $ANTLR start "RULE_TO" + public final void mRULE_TO() throws RecognitionException { + try { + int _type = RULE_TO; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEclLexer.g:34:9: ( '..' ) + // InternalEclLexer.g:34:11: '..' + { + match(".."); + } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_TO" + + // $ANTLR start "RULE_COMMA" + public final void mRULE_COMMA() throws RecognitionException { + try { + int _type = RULE_COMMA; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEclLexer.g:36:12: ( ',' ) + // InternalEclLexer.g:36:14: ',' + { + match(','); } @@ -247,15 +297,15 @@ public final void mTrue() throws RecognitionException { finally { } } - // $ANTLR end "True" + // $ANTLR end "RULE_COMMA" - // $ANTLR start "AND" - public final void mAND() throws RecognitionException { + // $ANTLR start "RULE_CONJUNCTION" + public final void mRULE_CONJUNCTION() throws RecognitionException { try { - int _type = AND; + int _type = RULE_CONJUNCTION; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:32:5: ( ( 'A' | 'a' ) ( 'N' | 'n' ) ( 'D' | 'd' ) ) - // InternalEclLexer.g:32:7: ( 'A' | 'a' ) ( 'N' | 'n' ) ( 'D' | 'd' ) + // InternalEclLexer.g:38:18: ( ( 'a' | 'A' ) ( 'n' | 'N' ) ( 'd' | 'D' ) ) + // InternalEclLexer.g:38:20: ( 'a' | 'A' ) ( 'n' | 'N' ) ( 'd' | 'D' ) { if ( input.LA(1)=='A'||input.LA(1)=='a' ) { input.consume(); @@ -293,15 +343,15 @@ public final void mAND() throws RecognitionException { finally { } } - // $ANTLR end "AND" + // $ANTLR end "RULE_CONJUNCTION" - // $ANTLR start "OR" - public final void mOR() throws RecognitionException { + // $ANTLR start "RULE_DISJUNCTION" + public final void mRULE_DISJUNCTION() throws RecognitionException { try { - int _type = OR; + int _type = RULE_DISJUNCTION; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:34:4: ( ( 'O' | 'o' ) ( 'R' | 'r' ) ) - // InternalEclLexer.g:34:6: ( 'O' | 'o' ) ( 'R' | 'r' ) + // InternalEclLexer.g:40:18: ( ( 'o' | 'O' ) ( 'r' | 'R' ) ) + // InternalEclLexer.g:40:20: ( 'o' | 'O' ) ( 'r' | 'R' ) { if ( input.LA(1)=='O'||input.LA(1)=='o' ) { input.consume(); @@ -330,111 +380,60 @@ public final void mOR() throws RecognitionException { finally { } } - // $ANTLR end "OR" + // $ANTLR end "RULE_DISJUNCTION" - // $ANTLR start "Comma" - public final void mComma() throws RecognitionException { + // $ANTLR start "RULE_EXCLUSION" + public final void mRULE_EXCLUSION() throws RecognitionException { try { - int _type = Comma; + int _type = RULE_EXCLUSION; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:36:7: ( ',' ) - // InternalEclLexer.g:36:9: ',' + // InternalEclLexer.g:42:16: ( ( 'm' | 'M' ) ( 'i' | 'I' ) ( 'n' | 'N' ) ( 'u' | 'U' ) ( 's' | 'S' ) ) + // InternalEclLexer.g:42:18: ( 'm' | 'M' ) ( 'i' | 'I' ) ( 'n' | 'N' ) ( 'u' | 'U' ) ( 's' | 'S' ) { - match(','); + if ( input.LA(1)=='M'||input.LA(1)=='m' ) { + input.consume(); } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "Comma" - - // $ANTLR start "RULE_TERM_STRING" - public final void mRULE_TERM_STRING() throws RecognitionException { - try { - int _type = RULE_TERM_STRING; - int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:38:18: ( '|' (~ ( '|' ) )* '|' ) - // InternalEclLexer.g:38:20: '|' (~ ( '|' ) )* '|' - { - match('|'); - // InternalEclLexer.g:38:24: (~ ( '|' ) )* - loop1: - do { - int alt1=2; - int LA1_0 = input.LA(1); - - if ( ((LA1_0>='\u0000' && LA1_0<='{')||(LA1_0>='}' && LA1_0<='\uFFFF')) ) { - alt1=1; - } - - - switch (alt1) { - case 1 : - // InternalEclLexer.g:38:24: ~ ( '|' ) - { - if ( (input.LA(1)>='\u0000' && input.LA(1)<='{')||(input.LA(1)>='}' && input.LA(1)<='\uFFFF') ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - - } - break; + if ( input.LA(1)=='I'||input.LA(1)=='i' ) { + input.consume(); - default : - break loop1; - } - } while (true); + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} - match('|'); + if ( input.LA(1)=='N'||input.LA(1)=='n' ) { + input.consume(); } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_TERM_STRING" - - // $ANTLR start "RULE_REVERSED" - public final void mRULE_REVERSED() throws RecognitionException { - try { - int _type = RULE_REVERSED; - int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:40:15: ( 'R' ) - // InternalEclLexer.g:40:17: 'R' - { - match('R'); + if ( input.LA(1)=='U'||input.LA(1)=='u' ) { + input.consume(); } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_REVERSED" + if ( input.LA(1)=='S'||input.LA(1)=='s' ) { + input.consume(); - // $ANTLR start "RULE_TO" - public final void mRULE_TO() throws RecognitionException { - try { - int _type = RULE_TO; - int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:42:9: ( '..' ) - // InternalEclLexer.g:42:11: '..' - { - match(".."); + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} } @@ -445,7 +444,7 @@ public final void mRULE_TO() throws RecognitionException { finally { } } - // $ANTLR end "RULE_TO" + // $ANTLR end "RULE_EXCLUSION" // $ANTLR start "RULE_ZERO" public final void mRULE_ZERO() throws RecognitionException { @@ -687,33 +686,13 @@ public final void mRULE_CARET() throws RecognitionException { } // $ANTLR end "RULE_CARET" - // $ANTLR start "RULE_NOT" - public final void mRULE_NOT() throws RecognitionException { - try { - int _type = RULE_NOT; - int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:68:10: ( '!' ) - // InternalEclLexer.g:68:12: '!' - { - match('!'); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_NOT" - // $ANTLR start "RULE_DOT" public final void mRULE_DOT() throws RecognitionException { try { int _type = RULE_DOT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:70:10: ( '.' ) - // InternalEclLexer.g:70:12: '.' + // InternalEclLexer.g:68:10: ( '.' ) + // InternalEclLexer.g:68:12: '.' { match('.'); @@ -732,8 +711,8 @@ public final void mRULE_WILDCARD() throws RecognitionException { try { int _type = RULE_WILDCARD; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:72:15: ( '*' ) - // InternalEclLexer.g:72:17: '*' + // InternalEclLexer.g:70:15: ( '*' ) + // InternalEclLexer.g:70:17: '*' { match('*'); @@ -752,8 +731,8 @@ public final void mRULE_EQUAL() throws RecognitionException { try { int _type = RULE_EQUAL; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:74:12: ( '=' ) - // InternalEclLexer.g:74:14: '=' + // InternalEclLexer.g:72:12: ( '=' ) + // InternalEclLexer.g:72:14: '=' { match('='); @@ -772,8 +751,8 @@ public final void mRULE_NOT_EQUAL() throws RecognitionException { try { int _type = RULE_NOT_EQUAL; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:76:16: ( '!=' ) - // InternalEclLexer.g:76:18: '!=' + // InternalEclLexer.g:74:16: ( '!=' ) + // InternalEclLexer.g:74:18: '!=' { match("!="); @@ -793,8 +772,8 @@ public final void mRULE_LT() throws RecognitionException { try { int _type = RULE_LT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:78:9: ( '<' ) - // InternalEclLexer.g:78:11: '<' + // InternalEclLexer.g:76:9: ( '<' ) + // InternalEclLexer.g:76:11: '<' { match('<'); @@ -813,8 +792,8 @@ public final void mRULE_GT() throws RecognitionException { try { int _type = RULE_GT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:80:9: ( '>' ) - // InternalEclLexer.g:80:11: '>' + // InternalEclLexer.g:78:9: ( '>' ) + // InternalEclLexer.g:78:11: '>' { match('>'); @@ -833,8 +812,8 @@ public final void mRULE_DBL_LT() throws RecognitionException { try { int _type = RULE_DBL_LT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:82:13: ( '<<' ) - // InternalEclLexer.g:82:15: '<<' + // InternalEclLexer.g:80:13: ( '<<' ) + // InternalEclLexer.g:80:15: '<<' { match("<<"); @@ -854,8 +833,8 @@ public final void mRULE_DBL_GT() throws RecognitionException { try { int _type = RULE_DBL_GT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:84:13: ( '>>' ) - // InternalEclLexer.g:84:15: '>>' + // InternalEclLexer.g:82:13: ( '>>' ) + // InternalEclLexer.g:82:15: '>>' { match(">>"); @@ -875,8 +854,8 @@ public final void mRULE_LT_EM() throws RecognitionException { try { int _type = RULE_LT_EM; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:86:12: ( '!' ) - // InternalEclLexer.g:88:14: '>!' + // InternalEclLexer.g:86:12: ( '>!' ) + // InternalEclLexer.g:86:14: '>!' { match(">!"); @@ -917,8 +896,8 @@ public final void mRULE_GTE() throws RecognitionException { try { int _type = RULE_GTE; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:90:10: ( '>=' ) - // InternalEclLexer.g:90:12: '>=' + // InternalEclLexer.g:88:10: ( '>=' ) + // InternalEclLexer.g:88:12: '>=' { match(">="); @@ -938,8 +917,8 @@ public final void mRULE_LTE() throws RecognitionException { try { int _type = RULE_LTE; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:92:10: ( '<=' ) - // InternalEclLexer.g:92:12: '<=' + // InternalEclLexer.g:90:10: ( '<=' ) + // InternalEclLexer.g:90:12: '<=' { match("<="); @@ -959,8 +938,8 @@ public final void mRULE_HASH() throws RecognitionException { try { int _type = RULE_HASH; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:94:11: ( '#' ) - // InternalEclLexer.g:94:13: '#' + // InternalEclLexer.g:92:11: ( '#' ) + // InternalEclLexer.g:92:13: '#' { match('#'); @@ -979,8 +958,8 @@ public final void mRULE_WS() throws RecognitionException { try { int _type = RULE_WS; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:96:9: ( ( ' ' | '\\t' | '\\n' | '\\r' ) ) - // InternalEclLexer.g:96:11: ( ' ' | '\\t' | '\\n' | '\\r' ) + // InternalEclLexer.g:94:9: ( ( ' ' | '\\t' | '\\n' | '\\r' ) ) + // InternalEclLexer.g:94:11: ( ' ' | '\\t' | '\\n' | '\\r' ) { if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { input.consume(); @@ -1007,12 +986,12 @@ public final void mRULE_ML_COMMENT() throws RecognitionException { try { int _type = RULE_ML_COMMENT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:98:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) - // InternalEclLexer.g:98:19: '/*' ( options {greedy=false; } : . )* '*/' + // InternalEclLexer.g:96:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) + // InternalEclLexer.g:96:19: '/*' ( options {greedy=false; } : . )* '*/' { match("/*"); - // InternalEclLexer.g:98:24: ( options {greedy=false; } : . )* + // InternalEclLexer.g:96:24: ( options {greedy=false; } : . )* loop2: do { int alt2=2; @@ -1037,7 +1016,7 @@ else if ( ((LA2_0>='\u0000' && LA2_0<=')')||(LA2_0>='+' && LA2_0<='\uFFFF')) ) { switch (alt2) { case 1 : - // InternalEclLexer.g:98:52: . + // InternalEclLexer.g:96:52: . { matchAny(); @@ -1067,12 +1046,12 @@ public final void mRULE_SL_COMMENT() throws RecognitionException { try { int _type = RULE_SL_COMMENT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:100:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) - // InternalEclLexer.g:100:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? + // InternalEclLexer.g:98:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) + // InternalEclLexer.g:98:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? { match("//"); - // InternalEclLexer.g:100:24: (~ ( ( '\\n' | '\\r' ) ) )* + // InternalEclLexer.g:98:24: (~ ( ( '\\n' | '\\r' ) ) )* loop3: do { int alt3=2; @@ -1085,7 +1064,7 @@ public final void mRULE_SL_COMMENT() throws RecognitionException { switch (alt3) { case 1 : - // InternalEclLexer.g:100:24: ~ ( ( '\\n' | '\\r' ) ) + // InternalEclLexer.g:98:24: ~ ( ( '\\n' | '\\r' ) ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { input.consume(); @@ -1105,7 +1084,7 @@ public final void mRULE_SL_COMMENT() throws RecognitionException { } } while (true); - // InternalEclLexer.g:100:40: ( ( '\\r' )? '\\n' )? + // InternalEclLexer.g:98:40: ( ( '\\r' )? '\\n' )? int alt5=2; int LA5_0 = input.LA(1); @@ -1114,9 +1093,9 @@ public final void mRULE_SL_COMMENT() throws RecognitionException { } switch (alt5) { case 1 : - // InternalEclLexer.g:100:41: ( '\\r' )? '\\n' + // InternalEclLexer.g:98:41: ( '\\r' )? '\\n' { - // InternalEclLexer.g:100:41: ( '\\r' )? + // InternalEclLexer.g:98:41: ( '\\r' )? int alt4=2; int LA4_0 = input.LA(1); @@ -1125,7 +1104,7 @@ public final void mRULE_SL_COMMENT() throws RecognitionException { } switch (alt4) { case 1 : - // InternalEclLexer.g:100:41: '\\r' + // InternalEclLexer.g:98:41: '\\r' { match('\r'); @@ -1157,10 +1136,10 @@ public final void mRULE_STRING() throws RecognitionException { try { int _type = RULE_STRING; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalEclLexer.g:102:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) - // InternalEclLexer.g:102:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + // InternalEclLexer.g:100:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) + // InternalEclLexer.g:100:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) { - // InternalEclLexer.g:102:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + // InternalEclLexer.g:100:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) int alt8=2; int LA8_0 = input.LA(1); @@ -1178,10 +1157,10 @@ else if ( (LA8_0=='\'') ) { } switch (alt8) { case 1 : - // InternalEclLexer.g:102:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' + // InternalEclLexer.g:100:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' { match('\"'); - // InternalEclLexer.g:102:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* + // InternalEclLexer.g:100:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* loop6: do { int alt6=3; @@ -1197,7 +1176,7 @@ else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>= switch (alt6) { case 1 : - // InternalEclLexer.g:102:21: '\\\\' . + // InternalEclLexer.g:100:21: '\\\\' . { match('\\'); matchAny(); @@ -1205,7 +1184,7 @@ else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>= } break; case 2 : - // InternalEclLexer.g:102:28: ~ ( ( '\\\\' | '\"' ) ) + // InternalEclLexer.g:100:28: ~ ( ( '\\\\' | '\"' ) ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { input.consume(); @@ -1230,10 +1209,10 @@ else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>= } break; case 2 : - // InternalEclLexer.g:102:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' + // InternalEclLexer.g:100:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' { match('\''); - // InternalEclLexer.g:102:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* + // InternalEclLexer.g:100:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* loop7: do { int alt7=3; @@ -1249,7 +1228,7 @@ else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>= switch (alt7) { case 1 : - // InternalEclLexer.g:102:54: '\\\\' . + // InternalEclLexer.g:100:54: '\\\\' . { match('\\'); matchAny(); @@ -1257,7 +1236,7 @@ else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>= } break; case 2 : - // InternalEclLexer.g:102:61: ~ ( ( '\\\\' | '\\'' ) ) + // InternalEclLexer.g:100:61: ~ ( ( '\\\\' | '\\'' ) ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { input.consume(); @@ -1296,278 +1275,271 @@ else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>= // $ANTLR end "RULE_STRING" public void mTokens() throws RecognitionException { - // InternalEclLexer.g:1:8: ( MINUS | False | True | AND | OR | Comma | RULE_TERM_STRING | RULE_REVERSED | RULE_TO | RULE_ZERO | RULE_DIGIT_NONZERO | RULE_COLON | RULE_CURLY_OPEN | RULE_CURLY_CLOSE | RULE_ROUND_OPEN | RULE_ROUND_CLOSE | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE | RULE_PLUS | RULE_DASH | RULE_CARET | RULE_NOT | RULE_DOT | RULE_WILDCARD | RULE_EQUAL | RULE_NOT_EQUAL | RULE_LT | RULE_GT | RULE_DBL_LT | RULE_DBL_GT | RULE_LT_EM | RULE_GT_EM | RULE_GTE | RULE_LTE | RULE_HASH | RULE_WS | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_STRING ) - int alt9=39; + // InternalEclLexer.g:1:8: ( False | True | RULE_TERM_STRING | RULE_REVERSED | RULE_TO | RULE_COMMA | RULE_CONJUNCTION | RULE_DISJUNCTION | RULE_EXCLUSION | RULE_ZERO | RULE_DIGIT_NONZERO | RULE_COLON | RULE_CURLY_OPEN | RULE_CURLY_CLOSE | RULE_ROUND_OPEN | RULE_ROUND_CLOSE | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE | RULE_PLUS | RULE_DASH | RULE_CARET | RULE_DOT | RULE_WILDCARD | RULE_EQUAL | RULE_NOT_EQUAL | RULE_LT | RULE_GT | RULE_DBL_LT | RULE_DBL_GT | RULE_LT_EM | RULE_GT_EM | RULE_GTE | RULE_LTE | RULE_HASH | RULE_WS | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_STRING ) + int alt9=38; alt9 = dfa9.predict(input); switch (alt9) { case 1 : - // InternalEclLexer.g:1:10: MINUS + // InternalEclLexer.g:1:10: False { - mMINUS(); + mFalse(); } break; case 2 : - // InternalEclLexer.g:1:16: False + // InternalEclLexer.g:1:16: True { - mFalse(); + mTrue(); } break; case 3 : - // InternalEclLexer.g:1:22: True + // InternalEclLexer.g:1:21: RULE_TERM_STRING { - mTrue(); + mRULE_TERM_STRING(); } break; case 4 : - // InternalEclLexer.g:1:27: AND + // InternalEclLexer.g:1:38: RULE_REVERSED { - mAND(); + mRULE_REVERSED(); } break; case 5 : - // InternalEclLexer.g:1:31: OR + // InternalEclLexer.g:1:52: RULE_TO { - mOR(); + mRULE_TO(); } break; case 6 : - // InternalEclLexer.g:1:34: Comma + // InternalEclLexer.g:1:60: RULE_COMMA { - mComma(); + mRULE_COMMA(); } break; case 7 : - // InternalEclLexer.g:1:40: RULE_TERM_STRING + // InternalEclLexer.g:1:71: RULE_CONJUNCTION { - mRULE_TERM_STRING(); + mRULE_CONJUNCTION(); } break; case 8 : - // InternalEclLexer.g:1:57: RULE_REVERSED + // InternalEclLexer.g:1:88: RULE_DISJUNCTION { - mRULE_REVERSED(); + mRULE_DISJUNCTION(); } break; case 9 : - // InternalEclLexer.g:1:71: RULE_TO + // InternalEclLexer.g:1:105: RULE_EXCLUSION { - mRULE_TO(); + mRULE_EXCLUSION(); } break; case 10 : - // InternalEclLexer.g:1:79: RULE_ZERO + // InternalEclLexer.g:1:120: RULE_ZERO { mRULE_ZERO(); } break; case 11 : - // InternalEclLexer.g:1:89: RULE_DIGIT_NONZERO + // InternalEclLexer.g:1:130: RULE_DIGIT_NONZERO { mRULE_DIGIT_NONZERO(); } break; case 12 : - // InternalEclLexer.g:1:108: RULE_COLON + // InternalEclLexer.g:1:149: RULE_COLON { mRULE_COLON(); } break; case 13 : - // InternalEclLexer.g:1:119: RULE_CURLY_OPEN + // InternalEclLexer.g:1:160: RULE_CURLY_OPEN { mRULE_CURLY_OPEN(); } break; case 14 : - // InternalEclLexer.g:1:135: RULE_CURLY_CLOSE + // InternalEclLexer.g:1:176: RULE_CURLY_CLOSE { mRULE_CURLY_CLOSE(); } break; case 15 : - // InternalEclLexer.g:1:152: RULE_ROUND_OPEN + // InternalEclLexer.g:1:193: RULE_ROUND_OPEN { mRULE_ROUND_OPEN(); } break; case 16 : - // InternalEclLexer.g:1:168: RULE_ROUND_CLOSE + // InternalEclLexer.g:1:209: RULE_ROUND_CLOSE { mRULE_ROUND_CLOSE(); } break; case 17 : - // InternalEclLexer.g:1:185: RULE_SQUARE_OPEN + // InternalEclLexer.g:1:226: RULE_SQUARE_OPEN { mRULE_SQUARE_OPEN(); } break; case 18 : - // InternalEclLexer.g:1:202: RULE_SQUARE_CLOSE + // InternalEclLexer.g:1:243: RULE_SQUARE_CLOSE { mRULE_SQUARE_CLOSE(); } break; case 19 : - // InternalEclLexer.g:1:220: RULE_PLUS + // InternalEclLexer.g:1:261: RULE_PLUS { mRULE_PLUS(); } break; case 20 : - // InternalEclLexer.g:1:230: RULE_DASH + // InternalEclLexer.g:1:271: RULE_DASH { mRULE_DASH(); } break; case 21 : - // InternalEclLexer.g:1:240: RULE_CARET + // InternalEclLexer.g:1:281: RULE_CARET { mRULE_CARET(); } break; case 22 : - // InternalEclLexer.g:1:251: RULE_NOT - { - mRULE_NOT(); - - } - break; - case 23 : - // InternalEclLexer.g:1:260: RULE_DOT + // InternalEclLexer.g:1:292: RULE_DOT { mRULE_DOT(); } break; - case 24 : - // InternalEclLexer.g:1:269: RULE_WILDCARD + case 23 : + // InternalEclLexer.g:1:301: RULE_WILDCARD { mRULE_WILDCARD(); } break; - case 25 : - // InternalEclLexer.g:1:283: RULE_EQUAL + case 24 : + // InternalEclLexer.g:1:315: RULE_EQUAL { mRULE_EQUAL(); } break; - case 26 : - // InternalEclLexer.g:1:294: RULE_NOT_EQUAL + case 25 : + // InternalEclLexer.g:1:326: RULE_NOT_EQUAL { mRULE_NOT_EQUAL(); } break; - case 27 : - // InternalEclLexer.g:1:309: RULE_LT + case 26 : + // InternalEclLexer.g:1:341: RULE_LT { mRULE_LT(); } break; - case 28 : - // InternalEclLexer.g:1:317: RULE_GT + case 27 : + // InternalEclLexer.g:1:349: RULE_GT { mRULE_GT(); } break; - case 29 : - // InternalEclLexer.g:1:325: RULE_DBL_LT + case 28 : + // InternalEclLexer.g:1:357: RULE_DBL_LT { mRULE_DBL_LT(); } break; - case 30 : - // InternalEclLexer.g:1:337: RULE_DBL_GT + case 29 : + // InternalEclLexer.g:1:369: RULE_DBL_GT { mRULE_DBL_GT(); } break; - case 31 : - // InternalEclLexer.g:1:349: RULE_LT_EM + case 30 : + // InternalEclLexer.g:1:381: RULE_LT_EM { mRULE_LT_EM(); } break; - case 32 : - // InternalEclLexer.g:1:360: RULE_GT_EM + case 31 : + // InternalEclLexer.g:1:392: RULE_GT_EM { mRULE_GT_EM(); } break; - case 33 : - // InternalEclLexer.g:1:371: RULE_GTE + case 32 : + // InternalEclLexer.g:1:403: RULE_GTE { mRULE_GTE(); } break; - case 34 : - // InternalEclLexer.g:1:380: RULE_LTE + case 33 : + // InternalEclLexer.g:1:412: RULE_LTE { mRULE_LTE(); } break; - case 35 : - // InternalEclLexer.g:1:389: RULE_HASH + case 34 : + // InternalEclLexer.g:1:421: RULE_HASH { mRULE_HASH(); } break; - case 36 : - // InternalEclLexer.g:1:399: RULE_WS + case 35 : + // InternalEclLexer.g:1:431: RULE_WS { mRULE_WS(); } break; - case 37 : - // InternalEclLexer.g:1:407: RULE_ML_COMMENT + case 36 : + // InternalEclLexer.g:1:439: RULE_ML_COMMENT { mRULE_ML_COMMENT(); } break; - case 38 : - // InternalEclLexer.g:1:423: RULE_SL_COMMENT + case 37 : + // InternalEclLexer.g:1:455: RULE_SL_COMMENT { mRULE_SL_COMMENT(); } break; - case 39 : - // InternalEclLexer.g:1:439: RULE_STRING + case 38 : + // InternalEclLexer.g:1:471: RULE_STRING { mRULE_STRING(); @@ -1581,64 +1553,65 @@ public void mTokens() throws RecognitionException { protected DFA9 dfa9 = new DFA9(this); static final String DFA9_eotS = - "\11\uffff\1\40\14\uffff\1\42\2\uffff\1\46\1\52\22\uffff"; + "\5\uffff\1\40\23\uffff\1\44\1\50\20\uffff"; static final String DFA9_eofS = - "\55\uffff"; + "\53\uffff"; static final String DFA9_minS = - "\1\11\10\uffff\1\56\14\uffff\1\75\2\uffff\2\41\2\uffff\1\52\17\uffff"; + "\1\11\4\uffff\1\56\23\uffff\2\41\2\uffff\1\52\15\uffff"; static final String DFA9_maxS = - "\1\175\10\uffff\1\56\14\uffff\1\75\2\uffff\1\75\1\76\2\uffff\1\57\17\uffff"; + "\1\175\4\uffff\1\56\23\uffff\1\75\1\76\2\uffff\1\57\15\uffff"; static final String DFA9_acceptS = - "\1\uffff\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\uffff\1\12\1\13\1\14\1\15\1\16\1\17\1\20\1\21\1\22\1\23\1\24\1\25\1\uffff\1\30\1\31\2\uffff\1\43\1\44\1\uffff\1\47\1\11\1\27\1\32\1\26\1\35\1\37\1\42\1\33\1\36\1\40\1\41\1\34\1\45\1\46"; + "\1\uffff\1\1\1\2\1\3\1\4\1\uffff\1\6\1\7\1\10\1\11\1\12\1\13\1\14\1\15\1\16\1\17\1\20\1\21\1\22\1\23\1\24\1\25\1\27\1\30\1\31\2\uffff\1\42\1\43\1\uffff\1\46\1\5\1\26\1\34\1\36\1\41\1\32\1\35\1\37\1\40\1\33\1\44\1\45"; static final String DFA9_specialS = - "\55\uffff}>"; - static final String[] DFA9_transitionS = { - "\2\34\2\uffff\1\34\22\uffff\1\34\1\26\1\36\1\33\3\uffff\1\36\1\17\1\20\1\27\1\23\1\6\1\24\1\11\1\35\1\12\11\13\1\14\1\uffff\1\31\1\30\1\32\2\uffff\1\4\4\uffff\1\2\6\uffff\1\1\1\uffff\1\5\2\uffff\1\10\1\uffff\1\3\6\uffff\1\21\1\uffff\1\22\1\25\2\uffff\1\4\4\uffff\1\2\6\uffff\1\1\1\uffff\1\5\4\uffff\1\3\6\uffff\1\15\1\7\1\16", - "", - "", - "", - "", - "", - "", - "", - "", - "\1\37", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "\1\41", - "", - "", - "\1\44\32\uffff\1\43\1\45", - "\1\50\33\uffff\1\51\1\47", - "", - "", - "\1\53\4\uffff\1\54", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - }; + "\53\uffff}>"; + static final String[] DFA9_transitionS = DFA9_transitionS_.DFA9_transitionS; + private static final class DFA9_transitionS_ { + static final String[] DFA9_transitionS = { + "\2\34\2\uffff\1\34\22\uffff\1\34\1\30\1\36\1\33\3\uffff\1\36\1\17\1\20\1\26\1\23\1\6\1\24\1\5\1\35\1\12\11\13\1\14\1\uffff\1\31\1\27\1\32\2\uffff\1\7\4\uffff\1\1\6\uffff\1\11\1\uffff\1\10\2\uffff\1\4\1\uffff\1\2\6\uffff\1\21\1\uffff\1\22\1\25\2\uffff\1\7\4\uffff\1\1\6\uffff\1\11\1\uffff\1\10\4\uffff\1\2\6\uffff\1\15\1\3\1\16", + "", + "", + "", + "", + "\1\37", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\1\42\32\uffff\1\41\1\43", + "\1\46\33\uffff\1\47\1\45", + "", + "", + "\1\51\4\uffff\1\52", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + }; + } static final short[] DFA9_eot = DFA.unpackEncodedString(DFA9_eotS); static final short[] DFA9_eof = DFA.unpackEncodedString(DFA9_eofS); @@ -1670,7 +1643,7 @@ public DFA9(BaseRecognizer recognizer) { this.transition = DFA9_transition; } public String getDescription() { - return "1:1: Tokens : ( MINUS | False | True | AND | OR | Comma | RULE_TERM_STRING | RULE_REVERSED | RULE_TO | RULE_ZERO | RULE_DIGIT_NONZERO | RULE_COLON | RULE_CURLY_OPEN | RULE_CURLY_CLOSE | RULE_ROUND_OPEN | RULE_ROUND_CLOSE | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE | RULE_PLUS | RULE_DASH | RULE_CARET | RULE_NOT | RULE_DOT | RULE_WILDCARD | RULE_EQUAL | RULE_NOT_EQUAL | RULE_LT | RULE_GT | RULE_DBL_LT | RULE_DBL_GT | RULE_LT_EM | RULE_GT_EM | RULE_GTE | RULE_LTE | RULE_HASH | RULE_WS | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_STRING );"; + return "1:1: Tokens : ( False | True | RULE_TERM_STRING | RULE_REVERSED | RULE_TO | RULE_COMMA | RULE_CONJUNCTION | RULE_DISJUNCTION | RULE_EXCLUSION | RULE_ZERO | RULE_DIGIT_NONZERO | RULE_COLON | RULE_CURLY_OPEN | RULE_CURLY_CLOSE | RULE_ROUND_OPEN | RULE_ROUND_CLOSE | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE | RULE_PLUS | RULE_DASH | RULE_CARET | RULE_DOT | RULE_WILDCARD | RULE_EQUAL | RULE_NOT_EQUAL | RULE_LT | RULE_GT | RULE_DBL_LT | RULE_DBL_GT | RULE_LT_EM | RULE_GT_EM | RULE_GTE | RULE_LTE | RULE_HASH | RULE_WS | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_STRING );"; } } diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/lexer/InternalEclLexer.tokens b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/lexer/InternalEclLexer.tokens index aff87bd47b9..d41f80078b9 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/lexer/InternalEclLexer.tokens +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/parser/antlr/lexer/InternalEclLexer.tokens @@ -1,39 +1,38 @@ -AND=7 -Comma=9 -False=5 -MINUS=4 -OR=8 +False=4 RULE_CARET=24 RULE_COLON=15 +RULE_COMMA=9 +RULE_CONJUNCTION=10 RULE_CURLY_CLOSE=17 RULE_CURLY_OPEN=16 RULE_DASH=23 -RULE_DBL_GT=33 -RULE_DBL_LT=32 +RULE_DBL_GT=32 +RULE_DBL_LT=31 RULE_DIGIT_NONZERO=14 -RULE_DOT=26 -RULE_EQUAL=28 -RULE_GT=31 -RULE_GTE=36 -RULE_GT_EM=35 -RULE_HASH=38 -RULE_LT=30 -RULE_LTE=37 -RULE_LT_EM=34 -RULE_ML_COMMENT=40 -RULE_NOT=25 -RULE_NOT_EQUAL=29 +RULE_DISJUNCTION=11 +RULE_DOT=25 +RULE_EQUAL=27 +RULE_EXCLUSION=12 +RULE_GT=30 +RULE_GTE=35 +RULE_GT_EM=34 +RULE_HASH=37 +RULE_LT=29 +RULE_LTE=36 +RULE_LT_EM=33 +RULE_ML_COMMENT=39 +RULE_NOT_EQUAL=28 RULE_PLUS=22 -RULE_REVERSED=11 +RULE_REVERSED=7 RULE_ROUND_CLOSE=19 RULE_ROUND_OPEN=18 -RULE_SL_COMMENT=41 +RULE_SL_COMMENT=40 RULE_SQUARE_CLOSE=21 RULE_SQUARE_OPEN=20 -RULE_STRING=42 -RULE_TERM_STRING=10 -RULE_TO=12 -RULE_WILDCARD=27 -RULE_WS=39 +RULE_STRING=41 +RULE_TERM_STRING=6 +RULE_TO=8 +RULE_WILDCARD=26 +RULE_WS=38 RULE_ZERO=13 -True=6 +True=5 diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/scoping/AbstractEclScopeProvider.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/scoping/AbstractEclScopeProvider.java index 5393eca7a83..0a832c64eca 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/scoping/AbstractEclScopeProvider.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/scoping/AbstractEclScopeProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/EclSemanticSequencer.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/AbstractEclSemanticSequencer.java similarity index 93% rename from snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/EclSemanticSequencer.java rename to snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/AbstractEclSemanticSequencer.java index aacaf41cb57..bed6cfa4374 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/EclSemanticSequencer.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/AbstractEclSemanticSequencer.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,14 +21,12 @@ import com.b2international.snowowl.snomed.ecl.ecl.AndRefinement; import com.b2international.snowowl.snomed.ecl.ecl.Any; import com.b2international.snowowl.snomed.ecl.ecl.AttributeConstraint; -import com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup; import com.b2international.snowowl.snomed.ecl.ecl.AttributeValueEquals; import com.b2international.snowowl.snomed.ecl.ecl.AttributeValueNotEquals; import com.b2international.snowowl.snomed.ecl.ecl.BooleanValueEquals; import com.b2international.snowowl.snomed.ecl.ecl.BooleanValueNotEquals; import com.b2international.snowowl.snomed.ecl.ecl.Cardinality; import com.b2international.snowowl.snomed.ecl.ecl.ChildOf; -import com.b2international.snowowl.snomed.ecl.ecl.ConceptReference; import com.b2international.snowowl.snomed.ecl.ecl.DecimalValueEquals; import com.b2international.snowowl.snomed.ecl.ecl.DecimalValueGreaterThan; import com.b2international.snowowl.snomed.ecl.ecl.DecimalValueGreaterThanEquals; @@ -38,6 +36,8 @@ import com.b2international.snowowl.snomed.ecl.ecl.DescendantOf; import com.b2international.snowowl.snomed.ecl.ecl.DescendantOrSelfOf; import com.b2international.snowowl.snomed.ecl.ecl.DottedExpressionConstraint; +import com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup; +import com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference; import com.b2international.snowowl.snomed.ecl.ecl.EclPackage; import com.b2international.snowowl.snomed.ecl.ecl.ExclusionExpressionConstraint; import com.b2international.snowowl.snomed.ecl.ecl.IntegerValueEquals; @@ -70,7 +70,7 @@ import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient; @SuppressWarnings("all") -public class EclSemanticSequencer extends AbstractDelegatingSemanticSequencer { +public abstract class AbstractEclSemanticSequencer extends AbstractDelegatingSemanticSequencer { @Inject private EclGrammarAccess grammarAccess; @@ -93,7 +93,7 @@ public void sequence(ISerializationContext context, EObject semanticObject) { sequence_AndExpressionConstraint(context, (AndExpressionConstraint) semanticObject); return; case EclPackage.AND_REFINEMENT: - if (rule == grammarAccess.getAttributeSetRule() + if (rule == grammarAccess.getEclAttributeSetRule() || rule == grammarAccess.getOrAttributeSetRule() || action == grammarAccess.getOrAttributeSetAccess().getOrRefinementLeftAction_1_0() || rule == grammarAccess.getAndAttributeSetRule() @@ -101,7 +101,7 @@ public void sequence(ISerializationContext context, EObject semanticObject) { sequence_AndAttributeSet(context, (AndRefinement) semanticObject); return; } - else if (rule == grammarAccess.getRefinementRule() + else if (rule == grammarAccess.getEclRefinementRule() || rule == grammarAccess.getOrRefinementRule() || action == grammarAccess.getOrRefinementAccess().getOrRefinementLeftAction_1_0_0() || rule == grammarAccess.getAndRefinementRule() @@ -116,9 +116,6 @@ else if (rule == grammarAccess.getRefinementRule() case EclPackage.ATTRIBUTE_CONSTRAINT: sequence_AttributeConstraint(context, (AttributeConstraint) semanticObject); return; - case EclPackage.ATTRIBUTE_GROUP: - sequence_AttributeGroup(context, (AttributeGroup) semanticObject); - return; case EclPackage.ATTRIBUTE_VALUE_EQUALS: sequence_AttributeValueEquals(context, (AttributeValueEquals) semanticObject); return; @@ -137,9 +134,6 @@ else if (rule == grammarAccess.getRefinementRule() case EclPackage.CHILD_OF: sequence_ChildOf(context, (ChildOf) semanticObject); return; - case EclPackage.CONCEPT_REFERENCE: - sequence_ConceptReference(context, (ConceptReference) semanticObject); - return; case EclPackage.DECIMAL_VALUE_EQUALS: sequence_DecimalValueEquals(context, (DecimalValueEquals) semanticObject); return; @@ -167,6 +161,12 @@ else if (rule == grammarAccess.getRefinementRule() case EclPackage.DOTTED_EXPRESSION_CONSTRAINT: sequence_DottedExpressionConstraint(context, (DottedExpressionConstraint) semanticObject); return; + case EclPackage.ECL_ATTRIBUTE_GROUP: + sequence_EclAttributeGroup(context, (EclAttributeGroup) semanticObject); + return; + case EclPackage.ECL_CONCEPT_REFERENCE: + sequence_EclConceptReference(context, (EclConceptReference) semanticObject); + return; case EclPackage.EXCLUSION_EXPRESSION_CONSTRAINT: sequence_ExclusionExpressionConstraint(context, (ExclusionExpressionConstraint) semanticObject); return; @@ -195,7 +195,7 @@ else if (rule == grammarAccess.getRefinementRule() sequence_NestedExpression(context, (NestedExpression) semanticObject); return; case EclPackage.NESTED_REFINEMENT: - if (rule == grammarAccess.getAttributeSetRule() + if (rule == grammarAccess.getEclAttributeSetRule() || rule == grammarAccess.getOrAttributeSetRule() || action == grammarAccess.getOrAttributeSetAccess().getOrRefinementLeftAction_1_0() || rule == grammarAccess.getAndAttributeSetRule() @@ -205,7 +205,7 @@ else if (rule == grammarAccess.getRefinementRule() sequence_NestedAttributeSet(context, (NestedRefinement) semanticObject); return; } - else if (rule == grammarAccess.getRefinementRule() + else if (rule == grammarAccess.getEclRefinementRule() || rule == grammarAccess.getOrRefinementRule() || action == grammarAccess.getOrRefinementAccess().getOrRefinementLeftAction_1_0_0() || rule == grammarAccess.getAndRefinementRule() @@ -220,13 +220,13 @@ else if (rule == grammarAccess.getRefinementRule() sequence_OrExpressionConstraint(context, (OrExpressionConstraint) semanticObject); return; case EclPackage.OR_REFINEMENT: - if (rule == grammarAccess.getAttributeSetRule() + if (rule == grammarAccess.getEclAttributeSetRule() || rule == grammarAccess.getOrAttributeSetRule() || action == grammarAccess.getOrAttributeSetAccess().getOrRefinementLeftAction_1_0()) { sequence_OrAttributeSet(context, (OrRefinement) semanticObject); return; } - else if (rule == grammarAccess.getRefinementRule() + else if (rule == grammarAccess.getEclRefinementRule() || rule == grammarAccess.getOrRefinementRule() || action == grammarAccess.getOrRefinementAccess().getOrRefinementLeftAction_1_0_0()) { sequence_OrRefinement(context, (OrRefinement) semanticObject); @@ -270,7 +270,7 @@ else if (rule == grammarAccess.getRefinementRule() * AncestorOf returns AncestorOf * * Constraint: - * constraint=FocusConcept + * constraint=EclFocusConcept */ protected void sequence_AncestorOf(ISerializationContext context, AncestorOf semanticObject) { if (errorAcceptor != null) { @@ -278,7 +278,7 @@ protected void sequence_AncestorOf(ISerializationContext context, AncestorOf sem errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EclPackage.Literals.ANCESTOR_OF__CONSTRAINT)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); - feeder.accept(grammarAccess.getAncestorOfAccess().getConstraintFocusConceptParserRuleCall_1_0(), semanticObject.getConstraint()); + feeder.accept(grammarAccess.getAncestorOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0(), semanticObject.getConstraint()); feeder.finish(); } @@ -300,7 +300,7 @@ protected void sequence_AncestorOf(ISerializationContext context, AncestorOf sem * AncestorOrSelfOf returns AncestorOrSelfOf * * Constraint: - * constraint=FocusConcept + * constraint=EclFocusConcept */ protected void sequence_AncestorOrSelfOf(ISerializationContext context, AncestorOrSelfOf semanticObject) { if (errorAcceptor != null) { @@ -308,14 +308,14 @@ protected void sequence_AncestorOrSelfOf(ISerializationContext context, Ancestor errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EclPackage.Literals.ANCESTOR_OR_SELF_OF__CONSTRAINT)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); - feeder.accept(grammarAccess.getAncestorOrSelfOfAccess().getConstraintFocusConceptParserRuleCall_1_0(), semanticObject.getConstraint()); + feeder.accept(grammarAccess.getAncestorOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0(), semanticObject.getConstraint()); feeder.finish(); } /** * Contexts: - * AttributeSet returns AndRefinement + * EclAttributeSet returns AndRefinement * OrAttributeSet returns AndRefinement * OrAttributeSet.OrRefinement_1_0 returns AndRefinement * AndAttributeSet returns AndRefinement @@ -365,7 +365,7 @@ protected void sequence_AndExpressionConstraint(ISerializationContext context, A /** * Contexts: - * Refinement returns AndRefinement + * EclRefinement returns AndRefinement * OrRefinement returns AndRefinement * OrRefinement.OrRefinement_1_0_0 returns AndRefinement * AndRefinement returns AndRefinement @@ -402,7 +402,7 @@ protected void sequence_AndRefinement(ISerializationContext context, AndRefineme * DottedExpressionConstraint returns Any * DottedExpressionConstraint.DottedExpressionConstraint_1_0 returns Any * SubExpressionConstraint returns Any - * FocusConcept returns Any + * EclFocusConcept returns Any * Any returns Any * * Constraint: @@ -415,13 +415,13 @@ protected void sequence_Any(ISerializationContext context, Any semanticObject) { /** * Contexts: - * Refinement returns AttributeConstraint + * EclRefinement returns AttributeConstraint * OrRefinement returns AttributeConstraint * OrRefinement.OrRefinement_1_0_0 returns AttributeConstraint * AndRefinement returns AttributeConstraint * AndRefinement.AndRefinement_1_0_0 returns AttributeConstraint * SubRefinement returns AttributeConstraint - * AttributeSet returns AttributeConstraint + * EclAttributeSet returns AttributeConstraint * OrAttributeSet returns AttributeConstraint * OrAttributeSet.OrRefinement_1_0 returns AttributeConstraint * AndAttributeSet returns AttributeConstraint @@ -437,24 +437,6 @@ protected void sequence_AttributeConstraint(ISerializationContext context, Attri } - /** - * Contexts: - * Refinement returns AttributeGroup - * OrRefinement returns AttributeGroup - * OrRefinement.OrRefinement_1_0_0 returns AttributeGroup - * AndRefinement returns AttributeGroup - * AndRefinement.AndRefinement_1_0_0 returns AttributeGroup - * SubRefinement returns AttributeGroup - * AttributeGroup returns AttributeGroup - * - * Constraint: - * (cardinality=Cardinality? refinement=AttributeSet) - */ - protected void sequence_AttributeGroup(ISerializationContext context, AttributeGroup semanticObject) { - genericSequencer.createSequence(context, semanticObject); - } - - /** * Contexts: * Comparison returns AttributeValueEquals @@ -573,7 +555,7 @@ protected void sequence_Cardinality(ISerializationContext context, Cardinality s * ChildOf returns ChildOf * * Constraint: - * constraint=FocusConcept + * constraint=EclFocusConcept */ protected void sequence_ChildOf(ISerializationContext context, ChildOf semanticObject) { if (errorAcceptor != null) { @@ -581,36 +563,11 @@ protected void sequence_ChildOf(ISerializationContext context, ChildOf semanticO errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EclPackage.Literals.CHILD_OF__CONSTRAINT)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); - feeder.accept(grammarAccess.getChildOfAccess().getConstraintFocusConceptParserRuleCall_1_0(), semanticObject.getConstraint()); + feeder.accept(grammarAccess.getChildOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0(), semanticObject.getConstraint()); feeder.finish(); } - /** - * Contexts: - * ExpressionConstraint returns ConceptReference - * OrExpressionConstraint returns ConceptReference - * OrExpressionConstraint.OrExpressionConstraint_1_0 returns ConceptReference - * AndExpressionConstraint returns ConceptReference - * AndExpressionConstraint.AndExpressionConstraint_1_0 returns ConceptReference - * ExclusionExpressionConstraint returns ConceptReference - * ExclusionExpressionConstraint.ExclusionExpressionConstraint_1_0 returns ConceptReference - * RefinedExpressionConstraint returns ConceptReference - * RefinedExpressionConstraint.RefinedExpressionConstraint_1_0 returns ConceptReference - * DottedExpressionConstraint returns ConceptReference - * DottedExpressionConstraint.DottedExpressionConstraint_1_0 returns ConceptReference - * SubExpressionConstraint returns ConceptReference - * FocusConcept returns ConceptReference - * ConceptReference returns ConceptReference - * - * Constraint: - * (id=SnomedIdentifier term=TERM_STRING?) - */ - protected void sequence_ConceptReference(ISerializationContext context, ConceptReference semanticObject) { - genericSequencer.createSequence(context, semanticObject); - } - - /** * Contexts: * Comparison returns DecimalValueEquals @@ -748,7 +705,7 @@ protected void sequence_DecimalValueNotEquals(ISerializationContext context, Dec * DescendantOf returns DescendantOf * * Constraint: - * constraint=FocusConcept + * constraint=EclFocusConcept */ protected void sequence_DescendantOf(ISerializationContext context, DescendantOf semanticObject) { if (errorAcceptor != null) { @@ -756,7 +713,7 @@ protected void sequence_DescendantOf(ISerializationContext context, DescendantOf errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EclPackage.Literals.DESCENDANT_OF__CONSTRAINT)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); - feeder.accept(grammarAccess.getDescendantOfAccess().getConstraintFocusConceptParserRuleCall_1_0(), semanticObject.getConstraint()); + feeder.accept(grammarAccess.getDescendantOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0(), semanticObject.getConstraint()); feeder.finish(); } @@ -778,7 +735,7 @@ protected void sequence_DescendantOf(ISerializationContext context, DescendantOf * DescendantOrSelfOf returns DescendantOrSelfOf * * Constraint: - * constraint=FocusConcept + * constraint=EclFocusConcept */ protected void sequence_DescendantOrSelfOf(ISerializationContext context, DescendantOrSelfOf semanticObject) { if (errorAcceptor != null) { @@ -786,7 +743,7 @@ protected void sequence_DescendantOrSelfOf(ISerializationContext context, Descen errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EclPackage.Literals.DESCENDANT_OR_SELF_OF__CONSTRAINT)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); - feeder.accept(grammarAccess.getDescendantOrSelfOfAccess().getConstraintFocusConceptParserRuleCall_1_0(), semanticObject.getConstraint()); + feeder.accept(grammarAccess.getDescendantOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0(), semanticObject.getConstraint()); feeder.finish(); } @@ -822,6 +779,49 @@ protected void sequence_DottedExpressionConstraint(ISerializationContext context } + /** + * Contexts: + * EclRefinement returns EclAttributeGroup + * OrRefinement returns EclAttributeGroup + * OrRefinement.OrRefinement_1_0_0 returns EclAttributeGroup + * AndRefinement returns EclAttributeGroup + * AndRefinement.AndRefinement_1_0_0 returns EclAttributeGroup + * SubRefinement returns EclAttributeGroup + * EclAttributeGroup returns EclAttributeGroup + * + * Constraint: + * (cardinality=Cardinality? refinement=EclAttributeSet) + */ + protected void sequence_EclAttributeGroup(ISerializationContext context, EclAttributeGroup semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * ExpressionConstraint returns EclConceptReference + * OrExpressionConstraint returns EclConceptReference + * OrExpressionConstraint.OrExpressionConstraint_1_0 returns EclConceptReference + * AndExpressionConstraint returns EclConceptReference + * AndExpressionConstraint.AndExpressionConstraint_1_0 returns EclConceptReference + * ExclusionExpressionConstraint returns EclConceptReference + * ExclusionExpressionConstraint.ExclusionExpressionConstraint_1_0 returns EclConceptReference + * RefinedExpressionConstraint returns EclConceptReference + * RefinedExpressionConstraint.RefinedExpressionConstraint_1_0 returns EclConceptReference + * DottedExpressionConstraint returns EclConceptReference + * DottedExpressionConstraint.DottedExpressionConstraint_1_0 returns EclConceptReference + * SubExpressionConstraint returns EclConceptReference + * EclFocusConcept returns EclConceptReference + * EclConceptReference returns EclConceptReference + * + * Constraint: + * (id=SnomedIdentifier term=TERM_STRING?) + */ + protected void sequence_EclConceptReference(ISerializationContext context, EclConceptReference semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + /** * Contexts: * ExpressionConstraint returns ExclusionExpressionConstraint @@ -982,11 +982,11 @@ protected void sequence_IntegerValueNotEquals(ISerializationContext context, Int * DottedExpressionConstraint returns MemberOf * DottedExpressionConstraint.DottedExpressionConstraint_1_0 returns MemberOf * SubExpressionConstraint returns MemberOf - * FocusConcept returns MemberOf + * EclFocusConcept returns MemberOf * MemberOf returns MemberOf * * Constraint: - * (constraint=ConceptReference | constraint=Any | constraint=NestedExpression) + * (constraint=EclConceptReference | constraint=Any | constraint=NestedExpression) */ protected void sequence_MemberOf(ISerializationContext context, MemberOf semanticObject) { genericSequencer.createSequence(context, semanticObject); @@ -995,7 +995,7 @@ protected void sequence_MemberOf(ISerializationContext context, MemberOf semanti /** * Contexts: - * AttributeSet returns NestedRefinement + * EclAttributeSet returns NestedRefinement * OrAttributeSet returns NestedRefinement * OrAttributeSet.OrRefinement_1_0 returns NestedRefinement * AndAttributeSet returns NestedRefinement @@ -1004,7 +1004,7 @@ protected void sequence_MemberOf(ISerializationContext context, MemberOf semanti * NestedAttributeSet returns NestedRefinement * * Constraint: - * nested=AttributeSet + * nested=EclAttributeSet */ protected void sequence_NestedAttributeSet(ISerializationContext context, NestedRefinement semanticObject) { if (errorAcceptor != null) { @@ -1012,7 +1012,7 @@ protected void sequence_NestedAttributeSet(ISerializationContext context, Nested errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EclPackage.Literals.NESTED_REFINEMENT__NESTED)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); - feeder.accept(grammarAccess.getNestedAttributeSetAccess().getNestedAttributeSetParserRuleCall_1_0(), semanticObject.getNested()); + feeder.accept(grammarAccess.getNestedAttributeSetAccess().getNestedEclAttributeSetParserRuleCall_1_0(), semanticObject.getNested()); feeder.finish(); } @@ -1031,7 +1031,7 @@ protected void sequence_NestedAttributeSet(ISerializationContext context, Nested * DottedExpressionConstraint returns NestedExpression * DottedExpressionConstraint.DottedExpressionConstraint_1_0 returns NestedExpression * SubExpressionConstraint returns NestedExpression - * FocusConcept returns NestedExpression + * EclFocusConcept returns NestedExpression * NestedExpression returns NestedExpression * * Constraint: @@ -1050,7 +1050,7 @@ protected void sequence_NestedExpression(ISerializationContext context, NestedEx /** * Contexts: - * Refinement returns NestedRefinement + * EclRefinement returns NestedRefinement * OrRefinement returns NestedRefinement * OrRefinement.OrRefinement_1_0_0 returns NestedRefinement * AndRefinement returns NestedRefinement @@ -1059,7 +1059,7 @@ protected void sequence_NestedExpression(ISerializationContext context, NestedEx * NestedRefinement returns NestedRefinement * * Constraint: - * nested=Refinement + * nested=EclRefinement */ protected void sequence_NestedRefinement(ISerializationContext context, NestedRefinement semanticObject) { if (errorAcceptor != null) { @@ -1067,14 +1067,14 @@ protected void sequence_NestedRefinement(ISerializationContext context, NestedRe errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EclPackage.Literals.NESTED_REFINEMENT__NESTED)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); - feeder.accept(grammarAccess.getNestedRefinementAccess().getNestedRefinementParserRuleCall_1_0(), semanticObject.getNested()); + feeder.accept(grammarAccess.getNestedRefinementAccess().getNestedEclRefinementParserRuleCall_1_0(), semanticObject.getNested()); feeder.finish(); } /** * Contexts: - * AttributeSet returns OrRefinement + * EclAttributeSet returns OrRefinement * OrAttributeSet returns OrRefinement * OrAttributeSet.OrRefinement_1_0 returns OrRefinement * @@ -1120,7 +1120,7 @@ protected void sequence_OrExpressionConstraint(ISerializationContext context, Or /** * Contexts: - * Refinement returns OrRefinement + * EclRefinement returns OrRefinement * OrRefinement returns OrRefinement * OrRefinement.OrRefinement_1_0_0 returns OrRefinement * @@ -1158,7 +1158,7 @@ protected void sequence_OrRefinement(ISerializationContext context, OrRefinement * ParentOf returns ParentOf * * Constraint: - * constraint=FocusConcept + * constraint=EclFocusConcept */ protected void sequence_ParentOf(ISerializationContext context, ParentOf semanticObject) { if (errorAcceptor != null) { @@ -1166,7 +1166,7 @@ protected void sequence_ParentOf(ISerializationContext context, ParentOf semanti errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EclPackage.Literals.PARENT_OF__CONSTRAINT)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); - feeder.accept(grammarAccess.getParentOfAccess().getConstraintFocusConceptParserRuleCall_1_0(), semanticObject.getConstraint()); + feeder.accept(grammarAccess.getParentOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0(), semanticObject.getConstraint()); feeder.finish(); } @@ -1183,7 +1183,7 @@ protected void sequence_ParentOf(ISerializationContext context, ParentOf semanti * RefinedExpressionConstraint returns RefinedExpressionConstraint * * Constraint: - * (constraint=RefinedExpressionConstraint_RefinedExpressionConstraint_1_0 refinement=Refinement) + * (constraint=RefinedExpressionConstraint_RefinedExpressionConstraint_1_0 refinement=EclRefinement) */ protected void sequence_RefinedExpressionConstraint(ISerializationContext context, RefinedExpressionConstraint semanticObject) { if (errorAcceptor != null) { @@ -1194,7 +1194,7 @@ protected void sequence_RefinedExpressionConstraint(ISerializationContext contex } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); feeder.accept(grammarAccess.getRefinedExpressionConstraintAccess().getRefinedExpressionConstraintConstraintAction_1_0(), semanticObject.getConstraint()); - feeder.accept(grammarAccess.getRefinedExpressionConstraintAccess().getRefinementRefinementParserRuleCall_1_2_0(), semanticObject.getRefinement()); + feeder.accept(grammarAccess.getRefinedExpressionConstraintAccess().getRefinementEclRefinementParserRuleCall_1_2_0(), semanticObject.getRefinement()); feeder.finish(); } diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/EclSyntacticSequencer.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/AbstractEclSyntacticSequencer.java similarity index 69% rename from snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/EclSyntacticSequencer.java rename to snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/AbstractEclSyntacticSequencer.java index ec2b4076f91..0005805337a 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/EclSyntacticSequencer.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/serializer/AbstractEclSyntacticSequencer.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,19 +30,19 @@ import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; @SuppressWarnings("all") -public class EclSyntacticSequencer extends AbstractSyntacticSequencer { +public abstract class AbstractEclSyntacticSequencer extends AbstractSyntacticSequencer { protected EclGrammarAccess grammarAccess; - protected AbstractElementAlias match_AndAttributeSet_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1; - protected AbstractElementAlias match_AndExpressionConstraint_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1; - protected AbstractElementAlias match_AndRefinement_ANDKeyword_1_0_1_0_or_CommaKeyword_1_0_1_1; + protected AbstractElementAlias match_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0; + protected AbstractElementAlias match_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0; + protected AbstractElementAlias match_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0; @Inject protected void init(IGrammarAccess access) { grammarAccess = (EclGrammarAccess) access; - match_AndAttributeSet_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndAttributeSetAccess().getANDKeyword_1_1_0()), new TokenAlias(false, false, grammarAccess.getAndAttributeSetAccess().getCommaKeyword_1_1_1())); - match_AndExpressionConstraint_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndExpressionConstraintAccess().getANDKeyword_1_1_0()), new TokenAlias(false, false, grammarAccess.getAndExpressionConstraintAccess().getCommaKeyword_1_1_1())); - match_AndRefinement_ANDKeyword_1_0_1_0_or_CommaKeyword_1_0_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndRefinementAccess().getANDKeyword_1_0_1_0()), new TokenAlias(false, false, grammarAccess.getAndRefinementAccess().getCommaKeyword_1_0_1_1())); + match_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndAttributeSetAccess().getCOMMATerminalRuleCall_1_1_1()), new TokenAlias(false, false, grammarAccess.getAndAttributeSetAccess().getCONJUNCTIONTerminalRuleCall_1_1_0())); + match_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndExpressionConstraintAccess().getCOMMATerminalRuleCall_1_1_1()), new TokenAlias(false, false, grammarAccess.getAndExpressionConstraintAccess().getCONJUNCTIONTerminalRuleCall_1_1_0())); + match_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndRefinementAccess().getCOMMATerminalRuleCall_1_0_1_1()), new TokenAlias(false, false, grammarAccess.getAndRefinementAccess().getCONJUNCTIONTerminalRuleCall_1_0_1_0())); } @Override @@ -51,6 +51,10 @@ protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall rul return getCARETToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getCOLONRule()) return getCOLONToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getCOMMARule()) + return getCOMMAToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getCONJUNCTIONRule()) + return getCONJUNCTIONToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getCURLY_CLOSERule()) return getCURLY_CLOSEToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getCURLY_OPENRule()) @@ -59,10 +63,14 @@ else if (ruleCall.getRule() == grammarAccess.getDBL_GTRule()) return getDBL_GTToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getDBL_LTRule()) return getDBL_LTToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getDISJUNCTIONRule()) + return getDISJUNCTIONToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getDOTRule()) return getDOTToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getEQUALRule()) return getEQUALToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getEXCLUSIONRule()) + return getEXCLUSIONToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getGTRule()) return getGTToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getGTERule()) @@ -116,6 +124,26 @@ protected String getCOLONToken(EObject semanticObject, RuleCall ruleCall, INode return ":"; } + /** + * terminal COMMA: + * ','; + */ + protected String getCOMMAToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return ","; + } + + /** + * terminal CONJUNCTION: + * ('a' | 'A') ('n' | 'N') ('d' | 'D'); + */ + protected String getCONJUNCTIONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "and"; + } + /** * terminal CURLY_CLOSE: * '}'; @@ -156,6 +184,16 @@ protected String getDBL_LTToken(EObject semanticObject, RuleCall ruleCall, INode return "<<"; } + /** + * terminal DISJUNCTION: + * ('o' | 'O') ('r' | 'R'); + */ + protected String getDISJUNCTIONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "or"; + } + /** * terminal DOT: * '.'; @@ -176,6 +214,16 @@ protected String getEQUALToken(EObject semanticObject, RuleCall ruleCall, INode return "="; } + /** + * terminal EXCLUSION: + * ('m' | 'M') ('i' | 'I') ('n' | 'N') ('u' | 'U') ('s' | 'S'); + */ + protected String getEXCLUSIONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "minus"; + } + /** * terminal GT: * '>'; @@ -332,46 +380,46 @@ protected void emitUnassignedTokens(EObject semanticObject, ISynTransition trans List transitionNodes = collectNodes(fromNode, toNode); for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { List syntaxNodes = getNodesFor(transitionNodes, syntax); - if (match_AndAttributeSet_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1.equals(syntax)) - emit_AndAttributeSet_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1(semanticObject, getLastNavigableState(), syntaxNodes); - else if (match_AndExpressionConstraint_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1.equals(syntax)) - emit_AndExpressionConstraint_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1(semanticObject, getLastNavigableState(), syntaxNodes); - else if (match_AndRefinement_ANDKeyword_1_0_1_0_or_CommaKeyword_1_0_1_1.equals(syntax)) - emit_AndRefinement_ANDKeyword_1_0_1_0_or_CommaKeyword_1_0_1_1(semanticObject, getLastNavigableState(), syntaxNodes); + if (match_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0.equals(syntax)) + emit_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0.equals(syntax)) + emit_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0.equals(syntax)) + emit_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0(semanticObject, getLastNavigableState(), syntaxNodes); else acceptNodes(getLastNavigableState(), syntaxNodes); } } /** * Ambiguous syntax: - * 'AND' | ',' + * CONJUNCTION | COMMA * * This ambiguous syntax occurs at: * {AndRefinement.left=} (ambiguity) right=SubAttributeSet */ - protected void emit_AndAttributeSet_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1(EObject semanticObject, ISynNavigable transition, List nodes) { + protected void emit_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(EObject semanticObject, ISynNavigable transition, List nodes) { acceptNodes(transition, nodes); } /** * Ambiguous syntax: - * 'AND' | ',' + * CONJUNCTION | COMMA * * This ambiguous syntax occurs at: * {AndExpressionConstraint.left=} (ambiguity) right=ExclusionExpressionConstraint */ - protected void emit_AndExpressionConstraint_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1(EObject semanticObject, ISynNavigable transition, List nodes) { + protected void emit_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(EObject semanticObject, ISynNavigable transition, List nodes) { acceptNodes(transition, nodes); } /** * Ambiguous syntax: - * 'AND' | ',' + * CONJUNCTION | COMMA * * This ambiguous syntax occurs at: * {AndRefinement.left=} (ambiguity) right=SubRefinement */ - protected void emit_AndRefinement_ANDKeyword_1_0_1_0_or_CommaKeyword_1_0_1_1(EObject semanticObject, ISynNavigable transition, List nodes) { + protected void emit_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0(EObject semanticObject, ISynNavigable transition, List nodes) { acceptNodes(transition, nodes); } diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/services/EclGrammarAccess.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/services/EclGrammarAccess.java index f16960c5544..ee7ac7818e6 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/services/EclGrammarAccess.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/services/EclGrammarAccess.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,28 +74,28 @@ public class OrExpressionConstraintElements extends AbstractParserRuleElementFin private final RuleCall cAndExpressionConstraintParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Group cGroup_1 = (Group)cGroup.eContents().get(1); private final Action cOrExpressionConstraintLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); - private final Keyword cORKeyword_1_1 = (Keyword)cGroup_1.eContents().get(1); + private final RuleCall cDISJUNCTIONTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); private final RuleCall cRightAndExpressionConstraintParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); //OrExpressionConstraint ExpressionConstraint: - // AndExpressionConstraint ({OrExpressionConstraint.left=current} 'OR' right=AndExpressionConstraint)*; + // AndExpressionConstraint ({OrExpressionConstraint.left=current} DISJUNCTION right=AndExpressionConstraint)*; @Override public ParserRule getRule() { return rule; } - //AndExpressionConstraint ({OrExpressionConstraint.left=current} 'OR' right=AndExpressionConstraint)* + //AndExpressionConstraint ({OrExpressionConstraint.left=current} DISJUNCTION right=AndExpressionConstraint)* public Group getGroup() { return cGroup; } //AndExpressionConstraint public RuleCall getAndExpressionConstraintParserRuleCall_0() { return cAndExpressionConstraintParserRuleCall_0; } - //({OrExpressionConstraint.left=current} 'OR' right=AndExpressionConstraint)* + //({OrExpressionConstraint.left=current} DISJUNCTION right=AndExpressionConstraint)* public Group getGroup_1() { return cGroup_1; } //{OrExpressionConstraint.left=current} public Action getOrExpressionConstraintLeftAction_1_0() { return cOrExpressionConstraintLeftAction_1_0; } - //'OR' - public Keyword getORKeyword_1_1() { return cORKeyword_1_1; } + //DISJUNCTION + public RuleCall getDISJUNCTIONTerminalRuleCall_1_1() { return cDISJUNCTIONTerminalRuleCall_1_1; } //right=AndExpressionConstraint public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } @@ -110,37 +110,37 @@ public class AndExpressionConstraintElements extends AbstractParserRuleElementFi private final Group cGroup_1 = (Group)cGroup.eContents().get(1); private final Action cAndExpressionConstraintLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); private final Alternatives cAlternatives_1_1 = (Alternatives)cGroup_1.eContents().get(1); - private final Keyword cANDKeyword_1_1_0 = (Keyword)cAlternatives_1_1.eContents().get(0); - private final Keyword cCommaKeyword_1_1_1 = (Keyword)cAlternatives_1_1.eContents().get(1); + private final RuleCall cCONJUNCTIONTerminalRuleCall_1_1_0 = (RuleCall)cAlternatives_1_1.eContents().get(0); + private final RuleCall cCOMMATerminalRuleCall_1_1_1 = (RuleCall)cAlternatives_1_1.eContents().get(1); private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); private final RuleCall cRightExclusionExpressionConstraintParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); //AndExpressionConstraint ExpressionConstraint: - // ExclusionExpressionConstraint ({AndExpressionConstraint.left=current} ('AND' | ',') + // ExclusionExpressionConstraint ({AndExpressionConstraint.left=current} (CONJUNCTION | COMMA) // right=ExclusionExpressionConstraint)*; @Override public ParserRule getRule() { return rule; } - //ExclusionExpressionConstraint ({AndExpressionConstraint.left=current} ('AND' | ',') + //ExclusionExpressionConstraint ({AndExpressionConstraint.left=current} (CONJUNCTION | COMMA) //right=ExclusionExpressionConstraint)* public Group getGroup() { return cGroup; } //ExclusionExpressionConstraint public RuleCall getExclusionExpressionConstraintParserRuleCall_0() { return cExclusionExpressionConstraintParserRuleCall_0; } - //({AndExpressionConstraint.left=current} ('AND' | ',') right=ExclusionExpressionConstraint)* + //({AndExpressionConstraint.left=current} (CONJUNCTION | COMMA) right=ExclusionExpressionConstraint)* public Group getGroup_1() { return cGroup_1; } //{AndExpressionConstraint.left=current} public Action getAndExpressionConstraintLeftAction_1_0() { return cAndExpressionConstraintLeftAction_1_0; } - //'AND' | ',' + //CONJUNCTION | COMMA public Alternatives getAlternatives_1_1() { return cAlternatives_1_1; } - //'AND' - public Keyword getANDKeyword_1_1_0() { return cANDKeyword_1_1_0; } + //CONJUNCTION + public RuleCall getCONJUNCTIONTerminalRuleCall_1_1_0() { return cCONJUNCTIONTerminalRuleCall_1_1_0; } - //',' - public Keyword getCommaKeyword_1_1_1() { return cCommaKeyword_1_1_1; } + //COMMA + public RuleCall getCOMMATerminalRuleCall_1_1_1() { return cCOMMATerminalRuleCall_1_1_1; } //right=ExclusionExpressionConstraint public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } @@ -154,28 +154,29 @@ public class ExclusionExpressionConstraintElements extends AbstractParserRuleEle private final RuleCall cRefinedExpressionConstraintParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Group cGroup_1 = (Group)cGroup.eContents().get(1); private final Action cExclusionExpressionConstraintLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); - private final Keyword cMINUSKeyword_1_1 = (Keyword)cGroup_1.eContents().get(1); + private final RuleCall cEXCLUSIONTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); private final RuleCall cRightRefinedExpressionConstraintParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); //ExclusionExpressionConstraint ExpressionConstraint: - // RefinedExpressionConstraint ({ExclusionExpressionConstraint.left=current} 'MINUS' right=RefinedExpressionConstraint)?; + // RefinedExpressionConstraint ({ExclusionExpressionConstraint.left=current} EXCLUSION + // right=RefinedExpressionConstraint)?; @Override public ParserRule getRule() { return rule; } - //RefinedExpressionConstraint ({ExclusionExpressionConstraint.left=current} 'MINUS' right=RefinedExpressionConstraint)? + //RefinedExpressionConstraint ({ExclusionExpressionConstraint.left=current} EXCLUSION right=RefinedExpressionConstraint)? public Group getGroup() { return cGroup; } //RefinedExpressionConstraint public RuleCall getRefinedExpressionConstraintParserRuleCall_0() { return cRefinedExpressionConstraintParserRuleCall_0; } - //({ExclusionExpressionConstraint.left=current} 'MINUS' right=RefinedExpressionConstraint)? + //({ExclusionExpressionConstraint.left=current} EXCLUSION right=RefinedExpressionConstraint)? public Group getGroup_1() { return cGroup_1; } //{ExclusionExpressionConstraint.left=current} public Action getExclusionExpressionConstraintLeftAction_1_0() { return cExclusionExpressionConstraintLeftAction_1_0; } - //'MINUS' - public Keyword getMINUSKeyword_1_1() { return cMINUSKeyword_1_1; } + //EXCLUSION + public RuleCall getEXCLUSIONTerminalRuleCall_1_1() { return cEXCLUSIONTerminalRuleCall_1_1; } //right=RefinedExpressionConstraint public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } @@ -191,19 +192,19 @@ public class RefinedExpressionConstraintElements extends AbstractParserRuleEleme private final Action cRefinedExpressionConstraintConstraintAction_1_0 = (Action)cGroup_1.eContents().get(0); private final RuleCall cCOLONTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); private final Assignment cRefinementAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); - private final RuleCall cRefinementRefinementParserRuleCall_1_2_0 = (RuleCall)cRefinementAssignment_1_2.eContents().get(0); + private final RuleCall cRefinementEclRefinementParserRuleCall_1_2_0 = (RuleCall)cRefinementAssignment_1_2.eContents().get(0); //RefinedExpressionConstraint ExpressionConstraint: - // DottedExpressionConstraint ({RefinedExpressionConstraint.constraint=current} COLON refinement=Refinement)?; + // DottedExpressionConstraint ({RefinedExpressionConstraint.constraint=current} COLON refinement=EclRefinement)?; @Override public ParserRule getRule() { return rule; } - //DottedExpressionConstraint ({RefinedExpressionConstraint.constraint=current} COLON refinement=Refinement)? + //DottedExpressionConstraint ({RefinedExpressionConstraint.constraint=current} COLON refinement=EclRefinement)? public Group getGroup() { return cGroup; } //DottedExpressionConstraint public RuleCall getDottedExpressionConstraintParserRuleCall_0() { return cDottedExpressionConstraintParserRuleCall_0; } - //({RefinedExpressionConstraint.constraint=current} COLON refinement=Refinement)? + //({RefinedExpressionConstraint.constraint=current} COLON refinement=EclRefinement)? public Group getGroup_1() { return cGroup_1; } //{RefinedExpressionConstraint.constraint=current} @@ -212,11 +213,11 @@ public class RefinedExpressionConstraintElements extends AbstractParserRuleEleme //COLON public RuleCall getCOLONTerminalRuleCall_1_1() { return cCOLONTerminalRuleCall_1_1; } - //refinement=Refinement + //refinement=EclRefinement public Assignment getRefinementAssignment_1_2() { return cRefinementAssignment_1_2; } - //Refinement - public RuleCall getRefinementRefinementParserRuleCall_1_2_0() { return cRefinementRefinementParserRuleCall_1_2_0; } + //EclRefinement + public RuleCall getRefinementEclRefinementParserRuleCall_1_2_0() { return cRefinementEclRefinementParserRuleCall_1_2_0; } } public class DottedExpressionConstraintElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.DottedExpressionConstraint"); @@ -262,13 +263,13 @@ public class SubExpressionConstraintElements extends AbstractParserRuleElementFi private final RuleCall cParentOfParserRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3); private final RuleCall cAncestorOfParserRuleCall_4 = (RuleCall)cAlternatives.eContents().get(4); private final RuleCall cAncestorOrSelfOfParserRuleCall_5 = (RuleCall)cAlternatives.eContents().get(5); - private final RuleCall cFocusConceptParserRuleCall_6 = (RuleCall)cAlternatives.eContents().get(6); + private final RuleCall cEclFocusConceptParserRuleCall_6 = (RuleCall)cAlternatives.eContents().get(6); //SubExpressionConstraint ExpressionConstraint: - // ChildOf | DescendantOf | DescendantOrSelfOf | ParentOf | AncestorOf | AncestorOrSelfOf | FocusConcept; + // ChildOf | DescendantOf | DescendantOrSelfOf | ParentOf | AncestorOf | AncestorOrSelfOf | EclFocusConcept; @Override public ParserRule getRule() { return rule; } - //ChildOf | DescendantOf | DescendantOrSelfOf | ParentOf | AncestorOf | AncestorOrSelfOf | FocusConcept + //ChildOf | DescendantOf | DescendantOrSelfOf | ParentOf | AncestorOf | AncestorOrSelfOf | EclFocusConcept public Alternatives getAlternatives() { return cAlternatives; } //ChildOf @@ -289,29 +290,29 @@ public class SubExpressionConstraintElements extends AbstractParserRuleElementFi //AncestorOrSelfOf public RuleCall getAncestorOrSelfOfParserRuleCall_5() { return cAncestorOrSelfOfParserRuleCall_5; } - //FocusConcept - public RuleCall getFocusConceptParserRuleCall_6() { return cFocusConceptParserRuleCall_6; } + //EclFocusConcept + public RuleCall getEclFocusConceptParserRuleCall_6() { return cEclFocusConceptParserRuleCall_6; } } - public class FocusConceptElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + public class EclFocusConceptElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); private final RuleCall cMemberOfParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); - private final RuleCall cConceptReferenceParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + private final RuleCall cEclConceptReferenceParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); private final RuleCall cAnyParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); private final RuleCall cNestedExpressionParserRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3); - //FocusConcept ExpressionConstraint: - // MemberOf | ConceptReference | Any | NestedExpression; + //EclFocusConcept ExpressionConstraint: + // MemberOf | EclConceptReference | Any | NestedExpression; @Override public ParserRule getRule() { return rule; } - //MemberOf | ConceptReference | Any | NestedExpression + //MemberOf | EclConceptReference | Any | NestedExpression public Alternatives getAlternatives() { return cAlternatives; } //MemberOf public RuleCall getMemberOfParserRuleCall_0() { return cMemberOfParserRuleCall_0; } - //ConceptReference - public RuleCall getConceptReferenceParserRuleCall_1() { return cConceptReferenceParserRuleCall_1; } + //EclConceptReference + public RuleCall getEclConceptReferenceParserRuleCall_1() { return cEclConceptReferenceParserRuleCall_1; } //Any public RuleCall getAnyParserRuleCall_2() { return cAnyParserRuleCall_2; } @@ -324,138 +325,138 @@ public class ChildOfElements extends AbstractParserRuleElementFinder { private final Group cGroup = (Group)rule.eContents().get(1); private final RuleCall cLT_EMTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Assignment cConstraintAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cConstraintFocusConceptParserRuleCall_1_0 = (RuleCall)cConstraintAssignment_1.eContents().get(0); + private final RuleCall cConstraintEclFocusConceptParserRuleCall_1_0 = (RuleCall)cConstraintAssignment_1.eContents().get(0); //ChildOf: - // LT_EM constraint=FocusConcept; + // LT_EM constraint=EclFocusConcept; @Override public ParserRule getRule() { return rule; } - //LT_EM constraint=FocusConcept + //LT_EM constraint=EclFocusConcept public Group getGroup() { return cGroup; } //LT_EM public RuleCall getLT_EMTerminalRuleCall_0() { return cLT_EMTerminalRuleCall_0; } - //constraint=FocusConcept + //constraint=EclFocusConcept public Assignment getConstraintAssignment_1() { return cConstraintAssignment_1; } - //FocusConcept - public RuleCall getConstraintFocusConceptParserRuleCall_1_0() { return cConstraintFocusConceptParserRuleCall_1_0; } + //EclFocusConcept + public RuleCall getConstraintEclFocusConceptParserRuleCall_1_0() { return cConstraintEclFocusConceptParserRuleCall_1_0; } } public class DescendantOfElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.DescendantOf"); private final Group cGroup = (Group)rule.eContents().get(1); private final RuleCall cLTTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Assignment cConstraintAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cConstraintFocusConceptParserRuleCall_1_0 = (RuleCall)cConstraintAssignment_1.eContents().get(0); + private final RuleCall cConstraintEclFocusConceptParserRuleCall_1_0 = (RuleCall)cConstraintAssignment_1.eContents().get(0); //DescendantOf: - // LT constraint=FocusConcept; + // LT constraint=EclFocusConcept; @Override public ParserRule getRule() { return rule; } - //LT constraint=FocusConcept + //LT constraint=EclFocusConcept public Group getGroup() { return cGroup; } //LT public RuleCall getLTTerminalRuleCall_0() { return cLTTerminalRuleCall_0; } - //constraint=FocusConcept + //constraint=EclFocusConcept public Assignment getConstraintAssignment_1() { return cConstraintAssignment_1; } - //FocusConcept - public RuleCall getConstraintFocusConceptParserRuleCall_1_0() { return cConstraintFocusConceptParserRuleCall_1_0; } + //EclFocusConcept + public RuleCall getConstraintEclFocusConceptParserRuleCall_1_0() { return cConstraintEclFocusConceptParserRuleCall_1_0; } } public class DescendantOrSelfOfElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.DescendantOrSelfOf"); private final Group cGroup = (Group)rule.eContents().get(1); private final RuleCall cDBL_LTTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Assignment cConstraintAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cConstraintFocusConceptParserRuleCall_1_0 = (RuleCall)cConstraintAssignment_1.eContents().get(0); + private final RuleCall cConstraintEclFocusConceptParserRuleCall_1_0 = (RuleCall)cConstraintAssignment_1.eContents().get(0); //DescendantOrSelfOf: - // DBL_LT constraint=FocusConcept; + // DBL_LT constraint=EclFocusConcept; @Override public ParserRule getRule() { return rule; } - //DBL_LT constraint=FocusConcept + //DBL_LT constraint=EclFocusConcept public Group getGroup() { return cGroup; } //DBL_LT public RuleCall getDBL_LTTerminalRuleCall_0() { return cDBL_LTTerminalRuleCall_0; } - //constraint=FocusConcept + //constraint=EclFocusConcept public Assignment getConstraintAssignment_1() { return cConstraintAssignment_1; } - //FocusConcept - public RuleCall getConstraintFocusConceptParserRuleCall_1_0() { return cConstraintFocusConceptParserRuleCall_1_0; } + //EclFocusConcept + public RuleCall getConstraintEclFocusConceptParserRuleCall_1_0() { return cConstraintEclFocusConceptParserRuleCall_1_0; } } public class ParentOfElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.ParentOf"); private final Group cGroup = (Group)rule.eContents().get(1); private final RuleCall cGT_EMTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Assignment cConstraintAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cConstraintFocusConceptParserRuleCall_1_0 = (RuleCall)cConstraintAssignment_1.eContents().get(0); + private final RuleCall cConstraintEclFocusConceptParserRuleCall_1_0 = (RuleCall)cConstraintAssignment_1.eContents().get(0); //ParentOf: - // GT_EM constraint=FocusConcept; + // GT_EM constraint=EclFocusConcept; @Override public ParserRule getRule() { return rule; } - //GT_EM constraint=FocusConcept + //GT_EM constraint=EclFocusConcept public Group getGroup() { return cGroup; } //GT_EM public RuleCall getGT_EMTerminalRuleCall_0() { return cGT_EMTerminalRuleCall_0; } - //constraint=FocusConcept + //constraint=EclFocusConcept public Assignment getConstraintAssignment_1() { return cConstraintAssignment_1; } - //FocusConcept - public RuleCall getConstraintFocusConceptParserRuleCall_1_0() { return cConstraintFocusConceptParserRuleCall_1_0; } + //EclFocusConcept + public RuleCall getConstraintEclFocusConceptParserRuleCall_1_0() { return cConstraintEclFocusConceptParserRuleCall_1_0; } } public class AncestorOfElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.AncestorOf"); private final Group cGroup = (Group)rule.eContents().get(1); private final RuleCall cGTTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Assignment cConstraintAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cConstraintFocusConceptParserRuleCall_1_0 = (RuleCall)cConstraintAssignment_1.eContents().get(0); + private final RuleCall cConstraintEclFocusConceptParserRuleCall_1_0 = (RuleCall)cConstraintAssignment_1.eContents().get(0); //AncestorOf: - // GT constraint=FocusConcept; + // GT constraint=EclFocusConcept; @Override public ParserRule getRule() { return rule; } - //GT constraint=FocusConcept + //GT constraint=EclFocusConcept public Group getGroup() { return cGroup; } //GT public RuleCall getGTTerminalRuleCall_0() { return cGTTerminalRuleCall_0; } - //constraint=FocusConcept + //constraint=EclFocusConcept public Assignment getConstraintAssignment_1() { return cConstraintAssignment_1; } - //FocusConcept - public RuleCall getConstraintFocusConceptParserRuleCall_1_0() { return cConstraintFocusConceptParserRuleCall_1_0; } + //EclFocusConcept + public RuleCall getConstraintEclFocusConceptParserRuleCall_1_0() { return cConstraintEclFocusConceptParserRuleCall_1_0; } } public class AncestorOrSelfOfElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.AncestorOrSelfOf"); private final Group cGroup = (Group)rule.eContents().get(1); private final RuleCall cDBL_GTTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Assignment cConstraintAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cConstraintFocusConceptParserRuleCall_1_0 = (RuleCall)cConstraintAssignment_1.eContents().get(0); + private final RuleCall cConstraintEclFocusConceptParserRuleCall_1_0 = (RuleCall)cConstraintAssignment_1.eContents().get(0); //AncestorOrSelfOf: - // DBL_GT constraint=FocusConcept; + // DBL_GT constraint=EclFocusConcept; @Override public ParserRule getRule() { return rule; } - //DBL_GT constraint=FocusConcept + //DBL_GT constraint=EclFocusConcept public Group getGroup() { return cGroup; } //DBL_GT public RuleCall getDBL_GTTerminalRuleCall_0() { return cDBL_GTTerminalRuleCall_0; } - //constraint=FocusConcept + //constraint=EclFocusConcept public Assignment getConstraintAssignment_1() { return cConstraintAssignment_1; } - //FocusConcept - public RuleCall getConstraintFocusConceptParserRuleCall_1_0() { return cConstraintFocusConceptParserRuleCall_1_0; } + //EclFocusConcept + public RuleCall getConstraintEclFocusConceptParserRuleCall_1_0() { return cConstraintEclFocusConceptParserRuleCall_1_0; } } public class MemberOfElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.MemberOf"); @@ -463,28 +464,28 @@ public class MemberOfElements extends AbstractParserRuleElementFinder { private final RuleCall cCARETTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Assignment cConstraintAssignment_1 = (Assignment)cGroup.eContents().get(1); private final Alternatives cConstraintAlternatives_1_0 = (Alternatives)cConstraintAssignment_1.eContents().get(0); - private final RuleCall cConstraintConceptReferenceParserRuleCall_1_0_0 = (RuleCall)cConstraintAlternatives_1_0.eContents().get(0); + private final RuleCall cConstraintEclConceptReferenceParserRuleCall_1_0_0 = (RuleCall)cConstraintAlternatives_1_0.eContents().get(0); private final RuleCall cConstraintAnyParserRuleCall_1_0_1 = (RuleCall)cConstraintAlternatives_1_0.eContents().get(1); private final RuleCall cConstraintNestedExpressionParserRuleCall_1_0_2 = (RuleCall)cConstraintAlternatives_1_0.eContents().get(2); //MemberOf: - // CARET constraint=(ConceptReference | Any | NestedExpression); + // CARET constraint=(EclConceptReference | Any | NestedExpression); @Override public ParserRule getRule() { return rule; } - //CARET constraint=(ConceptReference | Any | NestedExpression) + //CARET constraint=(EclConceptReference | Any | NestedExpression) public Group getGroup() { return cGroup; } //CARET public RuleCall getCARETTerminalRuleCall_0() { return cCARETTerminalRuleCall_0; } - //constraint=(ConceptReference | Any | NestedExpression) + //constraint=(EclConceptReference | Any | NestedExpression) public Assignment getConstraintAssignment_1() { return cConstraintAssignment_1; } - //(ConceptReference | Any | NestedExpression) + //(EclConceptReference | Any | NestedExpression) public Alternatives getConstraintAlternatives_1_0() { return cConstraintAlternatives_1_0; } - //ConceptReference - public RuleCall getConstraintConceptReferenceParserRuleCall_1_0_0() { return cConstraintConceptReferenceParserRuleCall_1_0_0; } + //EclConceptReference + public RuleCall getConstraintEclConceptReferenceParserRuleCall_1_0_0() { return cConstraintEclConceptReferenceParserRuleCall_1_0_0; } //Any public RuleCall getConstraintAnyParserRuleCall_1_0_1() { return cConstraintAnyParserRuleCall_1_0_1; } @@ -492,15 +493,15 @@ public class MemberOfElements extends AbstractParserRuleElementFinder { //NestedExpression public RuleCall getConstraintNestedExpressionParserRuleCall_1_0_2() { return cConstraintNestedExpressionParserRuleCall_1_0_2; } } - public class ConceptReferenceElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.ConceptReference"); + public class EclConceptReferenceElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.EclConceptReference"); private final Group cGroup = (Group)rule.eContents().get(1); private final Assignment cIdAssignment_0 = (Assignment)cGroup.eContents().get(0); private final RuleCall cIdSnomedIdentifierParserRuleCall_0_0 = (RuleCall)cIdAssignment_0.eContents().get(0); private final Assignment cTermAssignment_1 = (Assignment)cGroup.eContents().get(1); private final RuleCall cTermTERM_STRINGTerminalRuleCall_1_0 = (RuleCall)cTermAssignment_1.eContents().get(0); - //ConceptReference: + //EclConceptReference: // id=SnomedIdentifier term=TERM_STRING?; @Override public ParserRule getRule() { return rule; } @@ -538,11 +539,11 @@ public class AnyElements extends AbstractParserRuleElementFinder { //{Any} public Action getAnyAction_1() { return cAnyAction_1; } } - public class RefinementElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.Refinement"); + public class EclRefinementElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.EclRefinement"); private final RuleCall cOrRefinementParserRuleCall = (RuleCall)rule.eContents().get(1); - //Refinement: + //EclRefinement: // OrRefinement; @Override public ParserRule getRule() { return rule; } @@ -556,31 +557,31 @@ public class OrRefinementElements extends AbstractParserRuleElementFinder { private final Group cGroup_1 = (Group)cGroup.eContents().get(1); private final Group cGroup_1_0 = (Group)cGroup_1.eContents().get(0); private final Action cOrRefinementLeftAction_1_0_0 = (Action)cGroup_1_0.eContents().get(0); - private final Keyword cORKeyword_1_0_1 = (Keyword)cGroup_1_0.eContents().get(1); + private final RuleCall cDISJUNCTIONTerminalRuleCall_1_0_1 = (RuleCall)cGroup_1_0.eContents().get(1); private final Assignment cRightAssignment_1_0_2 = (Assignment)cGroup_1_0.eContents().get(2); private final RuleCall cRightAndRefinementParserRuleCall_1_0_2_0 = (RuleCall)cRightAssignment_1_0_2.eContents().get(0); - //OrRefinement Refinement: - // AndRefinement -> ({OrRefinement.left=current} 'OR' right=AndRefinement)*; + //OrRefinement EclRefinement: + // AndRefinement -> ({OrRefinement.left=current} DISJUNCTION right=AndRefinement)*; @Override public ParserRule getRule() { return rule; } - //AndRefinement -> ({OrRefinement.left=current} 'OR' right=AndRefinement)* + //AndRefinement -> ({OrRefinement.left=current} DISJUNCTION right=AndRefinement)* public Group getGroup() { return cGroup; } //AndRefinement public RuleCall getAndRefinementParserRuleCall_0() { return cAndRefinementParserRuleCall_0; } - //-> ({OrRefinement.left=current} 'OR' right=AndRefinement)* + //-> ({OrRefinement.left=current} DISJUNCTION right=AndRefinement)* public Group getGroup_1() { return cGroup_1; } - //{OrRefinement.left=current} 'OR' right=AndRefinement + //{OrRefinement.left=current} DISJUNCTION right=AndRefinement public Group getGroup_1_0() { return cGroup_1_0; } //{OrRefinement.left=current} public Action getOrRefinementLeftAction_1_0_0() { return cOrRefinementLeftAction_1_0_0; } - //'OR' - public Keyword getORKeyword_1_0_1() { return cORKeyword_1_0_1; } + //DISJUNCTION + public RuleCall getDISJUNCTIONTerminalRuleCall_1_0_1() { return cDISJUNCTIONTerminalRuleCall_1_0_1; } //right=AndRefinement public Assignment getRightAssignment_1_0_2() { return cRightAssignment_1_0_2; } @@ -596,38 +597,38 @@ public class AndRefinementElements extends AbstractParserRuleElementFinder { private final Group cGroup_1_0 = (Group)cGroup_1.eContents().get(0); private final Action cAndRefinementLeftAction_1_0_0 = (Action)cGroup_1_0.eContents().get(0); private final Alternatives cAlternatives_1_0_1 = (Alternatives)cGroup_1_0.eContents().get(1); - private final Keyword cANDKeyword_1_0_1_0 = (Keyword)cAlternatives_1_0_1.eContents().get(0); - private final Keyword cCommaKeyword_1_0_1_1 = (Keyword)cAlternatives_1_0_1.eContents().get(1); + private final RuleCall cCONJUNCTIONTerminalRuleCall_1_0_1_0 = (RuleCall)cAlternatives_1_0_1.eContents().get(0); + private final RuleCall cCOMMATerminalRuleCall_1_0_1_1 = (RuleCall)cAlternatives_1_0_1.eContents().get(1); private final Assignment cRightAssignment_1_0_2 = (Assignment)cGroup_1_0.eContents().get(2); private final RuleCall cRightSubRefinementParserRuleCall_1_0_2_0 = (RuleCall)cRightAssignment_1_0_2.eContents().get(0); - //AndRefinement Refinement: - // SubRefinement -> ({AndRefinement.left=current} ('AND' | ',') right=SubRefinement)*; + //AndRefinement EclRefinement: + // SubRefinement -> ({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubRefinement)*; @Override public ParserRule getRule() { return rule; } - //SubRefinement -> ({AndRefinement.left=current} ('AND' | ',') right=SubRefinement)* + //SubRefinement -> ({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubRefinement)* public Group getGroup() { return cGroup; } //SubRefinement public RuleCall getSubRefinementParserRuleCall_0() { return cSubRefinementParserRuleCall_0; } - //-> ({AndRefinement.left=current} ('AND' | ',') right=SubRefinement)* + //-> ({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubRefinement)* public Group getGroup_1() { return cGroup_1; } - //{AndRefinement.left=current} ('AND' | ',') right=SubRefinement + //{AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubRefinement public Group getGroup_1_0() { return cGroup_1_0; } //{AndRefinement.left=current} public Action getAndRefinementLeftAction_1_0_0() { return cAndRefinementLeftAction_1_0_0; } - //'AND' | ',' + //CONJUNCTION | COMMA public Alternatives getAlternatives_1_0_1() { return cAlternatives_1_0_1; } - //'AND' - public Keyword getANDKeyword_1_0_1_0() { return cANDKeyword_1_0_1_0; } + //CONJUNCTION + public RuleCall getCONJUNCTIONTerminalRuleCall_1_0_1_0() { return cCONJUNCTIONTerminalRuleCall_1_0_1_0; } - //',' - public Keyword getCommaKeyword_1_0_1_1() { return cCommaKeyword_1_0_1_1; } + //COMMA + public RuleCall getCOMMATerminalRuleCall_1_0_1_1() { return cCOMMATerminalRuleCall_1_0_1_1; } //right=SubRefinement public Assignment getRightAssignment_1_0_2() { return cRightAssignment_1_0_2; } @@ -639,21 +640,21 @@ public class SubRefinementElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.SubRefinement"); private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); private final RuleCall cAttributeConstraintParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); - private final RuleCall cAttributeGroupParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + private final RuleCall cEclAttributeGroupParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); private final RuleCall cNestedRefinementParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); - //SubRefinement Refinement: - // AttributeConstraint | AttributeGroup | NestedRefinement; + //SubRefinement EclRefinement: + // AttributeConstraint | EclAttributeGroup | NestedRefinement; @Override public ParserRule getRule() { return rule; } - //AttributeConstraint | AttributeGroup | NestedRefinement + //AttributeConstraint | EclAttributeGroup | NestedRefinement public Alternatives getAlternatives() { return cAlternatives; } //AttributeConstraint public RuleCall getAttributeConstraintParserRuleCall_0() { return cAttributeConstraintParserRuleCall_0; } - //AttributeGroup - public RuleCall getAttributeGroupParserRuleCall_1() { return cAttributeGroupParserRuleCall_1; } + //EclAttributeGroup + public RuleCall getEclAttributeGroupParserRuleCall_1() { return cEclAttributeGroupParserRuleCall_1; } //NestedRefinement public RuleCall getNestedRefinementParserRuleCall_2() { return cNestedRefinementParserRuleCall_2; } @@ -663,43 +664,43 @@ public class NestedRefinementElements extends AbstractParserRuleElementFinder { private final Group cGroup = (Group)rule.eContents().get(1); private final RuleCall cROUND_OPENTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Assignment cNestedAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cNestedRefinementParserRuleCall_1_0 = (RuleCall)cNestedAssignment_1.eContents().get(0); + private final RuleCall cNestedEclRefinementParserRuleCall_1_0 = (RuleCall)cNestedAssignment_1.eContents().get(0); private final RuleCall cROUND_CLOSETerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2); //NestedRefinement: - // ROUND_OPEN nested=Refinement ROUND_CLOSE; + // ROUND_OPEN nested=EclRefinement ROUND_CLOSE; @Override public ParserRule getRule() { return rule; } - //ROUND_OPEN nested=Refinement ROUND_CLOSE + //ROUND_OPEN nested=EclRefinement ROUND_CLOSE public Group getGroup() { return cGroup; } //ROUND_OPEN public RuleCall getROUND_OPENTerminalRuleCall_0() { return cROUND_OPENTerminalRuleCall_0; } - //nested=Refinement + //nested=EclRefinement public Assignment getNestedAssignment_1() { return cNestedAssignment_1; } - //Refinement - public RuleCall getNestedRefinementParserRuleCall_1_0() { return cNestedRefinementParserRuleCall_1_0; } + //EclRefinement + public RuleCall getNestedEclRefinementParserRuleCall_1_0() { return cNestedEclRefinementParserRuleCall_1_0; } //ROUND_CLOSE public RuleCall getROUND_CLOSETerminalRuleCall_2() { return cROUND_CLOSETerminalRuleCall_2; } } - public class AttributeGroupElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.AttributeGroup"); + public class EclAttributeGroupElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeGroup"); private final Group cGroup = (Group)rule.eContents().get(1); private final Assignment cCardinalityAssignment_0 = (Assignment)cGroup.eContents().get(0); private final RuleCall cCardinalityCardinalityParserRuleCall_0_0 = (RuleCall)cCardinalityAssignment_0.eContents().get(0); private final RuleCall cCURLY_OPENTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); private final Assignment cRefinementAssignment_2 = (Assignment)cGroup.eContents().get(2); - private final RuleCall cRefinementAttributeSetParserRuleCall_2_0 = (RuleCall)cRefinementAssignment_2.eContents().get(0); + private final RuleCall cRefinementEclAttributeSetParserRuleCall_2_0 = (RuleCall)cRefinementAssignment_2.eContents().get(0); private final RuleCall cCURLY_CLOSETerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3); - //AttributeGroup: - // cardinality=Cardinality? CURLY_OPEN refinement=AttributeSet CURLY_CLOSE; + //EclAttributeGroup: + // cardinality=Cardinality? CURLY_OPEN refinement=EclAttributeSet CURLY_CLOSE; @Override public ParserRule getRule() { return rule; } - //cardinality=Cardinality? CURLY_OPEN refinement=AttributeSet CURLY_CLOSE + //cardinality=Cardinality? CURLY_OPEN refinement=EclAttributeSet CURLY_CLOSE public Group getGroup() { return cGroup; } //cardinality=Cardinality? @@ -711,20 +712,20 @@ public class AttributeGroupElements extends AbstractParserRuleElementFinder { //CURLY_OPEN public RuleCall getCURLY_OPENTerminalRuleCall_1() { return cCURLY_OPENTerminalRuleCall_1; } - //refinement=AttributeSet + //refinement=EclAttributeSet public Assignment getRefinementAssignment_2() { return cRefinementAssignment_2; } - //AttributeSet - public RuleCall getRefinementAttributeSetParserRuleCall_2_0() { return cRefinementAttributeSetParserRuleCall_2_0; } + //EclAttributeSet + public RuleCall getRefinementEclAttributeSetParserRuleCall_2_0() { return cRefinementEclAttributeSetParserRuleCall_2_0; } //CURLY_CLOSE public RuleCall getCURLY_CLOSETerminalRuleCall_3() { return cCURLY_CLOSETerminalRuleCall_3; } } - public class AttributeSetElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.AttributeSet"); + public class EclAttributeSetElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeSet"); private final RuleCall cOrAttributeSetParserRuleCall = (RuleCall)rule.eContents().get(1); - //AttributeSet Refinement: + //EclAttributeSet EclRefinement: // OrAttributeSet; @Override public ParserRule getRule() { return rule; } @@ -737,28 +738,28 @@ public class OrAttributeSetElements extends AbstractParserRuleElementFinder { private final RuleCall cAndAttributeSetParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Group cGroup_1 = (Group)cGroup.eContents().get(1); private final Action cOrRefinementLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); - private final Keyword cORKeyword_1_1 = (Keyword)cGroup_1.eContents().get(1); + private final RuleCall cDISJUNCTIONTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); private final RuleCall cRightAndAttributeSetParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); - //OrAttributeSet Refinement: - // AndAttributeSet ({OrRefinement.left=current} 'OR' right=AndAttributeSet)*; + //OrAttributeSet EclRefinement: + // AndAttributeSet ({OrRefinement.left=current} DISJUNCTION right=AndAttributeSet)*; @Override public ParserRule getRule() { return rule; } - //AndAttributeSet ({OrRefinement.left=current} 'OR' right=AndAttributeSet)* + //AndAttributeSet ({OrRefinement.left=current} DISJUNCTION right=AndAttributeSet)* public Group getGroup() { return cGroup; } //AndAttributeSet public RuleCall getAndAttributeSetParserRuleCall_0() { return cAndAttributeSetParserRuleCall_0; } - //({OrRefinement.left=current} 'OR' right=AndAttributeSet)* + //({OrRefinement.left=current} DISJUNCTION right=AndAttributeSet)* public Group getGroup_1() { return cGroup_1; } //{OrRefinement.left=current} public Action getOrRefinementLeftAction_1_0() { return cOrRefinementLeftAction_1_0; } - //'OR' - public Keyword getORKeyword_1_1() { return cORKeyword_1_1; } + //DISJUNCTION + public RuleCall getDISJUNCTIONTerminalRuleCall_1_1() { return cDISJUNCTIONTerminalRuleCall_1_1; } //right=AndAttributeSet public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } @@ -773,35 +774,35 @@ public class AndAttributeSetElements extends AbstractParserRuleElementFinder { private final Group cGroup_1 = (Group)cGroup.eContents().get(1); private final Action cAndRefinementLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); private final Alternatives cAlternatives_1_1 = (Alternatives)cGroup_1.eContents().get(1); - private final Keyword cANDKeyword_1_1_0 = (Keyword)cAlternatives_1_1.eContents().get(0); - private final Keyword cCommaKeyword_1_1_1 = (Keyword)cAlternatives_1_1.eContents().get(1); + private final RuleCall cCONJUNCTIONTerminalRuleCall_1_1_0 = (RuleCall)cAlternatives_1_1.eContents().get(0); + private final RuleCall cCOMMATerminalRuleCall_1_1_1 = (RuleCall)cAlternatives_1_1.eContents().get(1); private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); private final RuleCall cRightSubAttributeSetParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); - //AndAttributeSet Refinement: - // SubAttributeSet ({AndRefinement.left=current} ('AND' | ',') right=SubAttributeSet)*; + //AndAttributeSet EclRefinement: + // SubAttributeSet ({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubAttributeSet)*; @Override public ParserRule getRule() { return rule; } - //SubAttributeSet ({AndRefinement.left=current} ('AND' | ',') right=SubAttributeSet)* + //SubAttributeSet ({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubAttributeSet)* public Group getGroup() { return cGroup; } //SubAttributeSet public RuleCall getSubAttributeSetParserRuleCall_0() { return cSubAttributeSetParserRuleCall_0; } - //({AndRefinement.left=current} ('AND' | ',') right=SubAttributeSet)* + //({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubAttributeSet)* public Group getGroup_1() { return cGroup_1; } //{AndRefinement.left=current} public Action getAndRefinementLeftAction_1_0() { return cAndRefinementLeftAction_1_0; } - //'AND' | ',' + //CONJUNCTION | COMMA public Alternatives getAlternatives_1_1() { return cAlternatives_1_1; } - //'AND' - public Keyword getANDKeyword_1_1_0() { return cANDKeyword_1_1_0; } + //CONJUNCTION + public RuleCall getCONJUNCTIONTerminalRuleCall_1_1_0() { return cCONJUNCTIONTerminalRuleCall_1_1_0; } - //',' - public Keyword getCommaKeyword_1_1_1() { return cCommaKeyword_1_1_1; } + //COMMA + public RuleCall getCOMMATerminalRuleCall_1_1_1() { return cCOMMATerminalRuleCall_1_1_1; } //right=SubAttributeSet public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } @@ -815,7 +816,7 @@ public class SubAttributeSetElements extends AbstractParserRuleElementFinder { private final RuleCall cAttributeConstraintParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); private final RuleCall cNestedAttributeSetParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); - //SubAttributeSet Refinement: + //SubAttributeSet EclRefinement: // AttributeConstraint | NestedAttributeSet; @Override public ParserRule getRule() { return rule; } @@ -833,24 +834,24 @@ public class NestedAttributeSetElements extends AbstractParserRuleElementFinder private final Group cGroup = (Group)rule.eContents().get(1); private final RuleCall cROUND_OPENTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Assignment cNestedAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cNestedAttributeSetParserRuleCall_1_0 = (RuleCall)cNestedAssignment_1.eContents().get(0); + private final RuleCall cNestedEclAttributeSetParserRuleCall_1_0 = (RuleCall)cNestedAssignment_1.eContents().get(0); private final RuleCall cROUND_CLOSETerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2); //NestedAttributeSet NestedRefinement: - // ROUND_OPEN nested=AttributeSet ROUND_CLOSE; + // ROUND_OPEN nested=EclAttributeSet ROUND_CLOSE; @Override public ParserRule getRule() { return rule; } - //ROUND_OPEN nested=AttributeSet ROUND_CLOSE + //ROUND_OPEN nested=EclAttributeSet ROUND_CLOSE public Group getGroup() { return cGroup; } //ROUND_OPEN public RuleCall getROUND_OPENTerminalRuleCall_0() { return cROUND_OPENTerminalRuleCall_0; } - //nested=AttributeSet + //nested=EclAttributeSet public Assignment getNestedAssignment_1() { return cNestedAssignment_1; } - //AttributeSet - public RuleCall getNestedAttributeSetParserRuleCall_1_0() { return cNestedAttributeSetParserRuleCall_1_0; } + //EclAttributeSet + public RuleCall getNestedEclAttributeSetParserRuleCall_1_0() { return cNestedEclAttributeSetParserRuleCall_1_0; } //ROUND_CLOSE public RuleCall getROUND_CLOSETerminalRuleCall_2() { return cROUND_CLOSETerminalRuleCall_2; } @@ -1803,7 +1804,7 @@ public class BooleanElements extends AbstractParserRuleElementFinder { private final RefinedExpressionConstraintElements pRefinedExpressionConstraint; private final DottedExpressionConstraintElements pDottedExpressionConstraint; private final SubExpressionConstraintElements pSubExpressionConstraint; - private final FocusConceptElements pFocusConcept; + private final EclFocusConceptElements pEclFocusConcept; private final ChildOfElements pChildOf; private final DescendantOfElements pDescendantOf; private final DescendantOrSelfOfElements pDescendantOrSelfOf; @@ -1811,15 +1812,15 @@ public class BooleanElements extends AbstractParserRuleElementFinder { private final AncestorOfElements pAncestorOf; private final AncestorOrSelfOfElements pAncestorOrSelfOf; private final MemberOfElements pMemberOf; - private final ConceptReferenceElements pConceptReference; + private final EclConceptReferenceElements pEclConceptReference; private final AnyElements pAny; - private final RefinementElements pRefinement; + private final EclRefinementElements pEclRefinement; private final OrRefinementElements pOrRefinement; private final AndRefinementElements pAndRefinement; private final SubRefinementElements pSubRefinement; private final NestedRefinementElements pNestedRefinement; - private final AttributeGroupElements pAttributeGroup; - private final AttributeSetElements pAttributeSet; + private final EclAttributeGroupElements pEclAttributeGroup; + private final EclAttributeSetElements pEclAttributeSet; private final OrAttributeSetElements pOrAttributeSet; private final AndAttributeSetElements pAndAttributeSet; private final SubAttributeSetElements pSubAttributeSet; @@ -1858,6 +1859,10 @@ public class BooleanElements extends AbstractParserRuleElementFinder { private final TerminalRule tTERM_STRING; private final TerminalRule tREVERSED; private final TerminalRule tTO; + private final TerminalRule tCOMMA; + private final TerminalRule tCONJUNCTION; + private final TerminalRule tDISJUNCTION; + private final TerminalRule tEXCLUSION; private final TerminalRule tZERO; private final TerminalRule tDIGIT_NONZERO; private final TerminalRule tCOLON; @@ -1870,7 +1875,6 @@ public class BooleanElements extends AbstractParserRuleElementFinder { private final TerminalRule tPLUS; private final TerminalRule tDASH; private final TerminalRule tCARET; - private final TerminalRule tNOT; private final TerminalRule tDOT; private final TerminalRule tWILDCARD; private final TerminalRule tEQUAL; @@ -1902,7 +1906,7 @@ public EclGrammarAccess(GrammarProvider grammarProvider) { this.pRefinedExpressionConstraint = new RefinedExpressionConstraintElements(); this.pDottedExpressionConstraint = new DottedExpressionConstraintElements(); this.pSubExpressionConstraint = new SubExpressionConstraintElements(); - this.pFocusConcept = new FocusConceptElements(); + this.pEclFocusConcept = new EclFocusConceptElements(); this.pChildOf = new ChildOfElements(); this.pDescendantOf = new DescendantOfElements(); this.pDescendantOrSelfOf = new DescendantOrSelfOfElements(); @@ -1910,15 +1914,15 @@ public EclGrammarAccess(GrammarProvider grammarProvider) { this.pAncestorOf = new AncestorOfElements(); this.pAncestorOrSelfOf = new AncestorOrSelfOfElements(); this.pMemberOf = new MemberOfElements(); - this.pConceptReference = new ConceptReferenceElements(); + this.pEclConceptReference = new EclConceptReferenceElements(); this.pAny = new AnyElements(); - this.pRefinement = new RefinementElements(); + this.pEclRefinement = new EclRefinementElements(); this.pOrRefinement = new OrRefinementElements(); this.pAndRefinement = new AndRefinementElements(); this.pSubRefinement = new SubRefinementElements(); this.pNestedRefinement = new NestedRefinementElements(); - this.pAttributeGroup = new AttributeGroupElements(); - this.pAttributeSet = new AttributeSetElements(); + this.pEclAttributeGroup = new EclAttributeGroupElements(); + this.pEclAttributeSet = new EclAttributeSetElements(); this.pOrAttributeSet = new OrAttributeSetElements(); this.pAndAttributeSet = new AndAttributeSetElements(); this.pSubAttributeSet = new SubAttributeSetElements(); @@ -1957,6 +1961,10 @@ public EclGrammarAccess(GrammarProvider grammarProvider) { this.tTERM_STRING = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.TERM_STRING"); this.tREVERSED = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.REVERSED"); this.tTO = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.TO"); + this.tCOMMA = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.COMMA"); + this.tCONJUNCTION = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.CONJUNCTION"); + this.tDISJUNCTION = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.DISJUNCTION"); + this.tEXCLUSION = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.EXCLUSION"); this.tZERO = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.ZERO"); this.tDIGIT_NONZERO = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.DIGIT_NONZERO"); this.tCOLON = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.COLON"); @@ -1969,7 +1977,6 @@ public EclGrammarAccess(GrammarProvider grammarProvider) { this.tPLUS = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.PLUS"); this.tDASH = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.DASH"); this.tCARET = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.CARET"); - this.tNOT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.NOT"); this.tDOT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.DOT"); this.tWILDCARD = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.WILDCARD"); this.tEQUAL = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ecl.Ecl.EQUAL"); @@ -2033,7 +2040,7 @@ public ParserRule getExpressionConstraintRule() { } //OrExpressionConstraint ExpressionConstraint: - // AndExpressionConstraint ({OrExpressionConstraint.left=current} 'OR' right=AndExpressionConstraint)*; + // AndExpressionConstraint ({OrExpressionConstraint.left=current} DISJUNCTION right=AndExpressionConstraint)*; public OrExpressionConstraintElements getOrExpressionConstraintAccess() { return pOrExpressionConstraint; } @@ -2043,7 +2050,7 @@ public ParserRule getOrExpressionConstraintRule() { } //AndExpressionConstraint ExpressionConstraint: - // ExclusionExpressionConstraint ({AndExpressionConstraint.left=current} ('AND' | ',') + // ExclusionExpressionConstraint ({AndExpressionConstraint.left=current} (CONJUNCTION | COMMA) // right=ExclusionExpressionConstraint)*; public AndExpressionConstraintElements getAndExpressionConstraintAccess() { return pAndExpressionConstraint; @@ -2054,7 +2061,8 @@ public ParserRule getAndExpressionConstraintRule() { } //ExclusionExpressionConstraint ExpressionConstraint: - // RefinedExpressionConstraint ({ExclusionExpressionConstraint.left=current} 'MINUS' right=RefinedExpressionConstraint)?; + // RefinedExpressionConstraint ({ExclusionExpressionConstraint.left=current} EXCLUSION + // right=RefinedExpressionConstraint)?; public ExclusionExpressionConstraintElements getExclusionExpressionConstraintAccess() { return pExclusionExpressionConstraint; } @@ -2064,7 +2072,7 @@ public ParserRule getExclusionExpressionConstraintRule() { } //RefinedExpressionConstraint ExpressionConstraint: - // DottedExpressionConstraint ({RefinedExpressionConstraint.constraint=current} COLON refinement=Refinement)?; + // DottedExpressionConstraint ({RefinedExpressionConstraint.constraint=current} COLON refinement=EclRefinement)?; public RefinedExpressionConstraintElements getRefinedExpressionConstraintAccess() { return pRefinedExpressionConstraint; } @@ -2084,7 +2092,7 @@ public ParserRule getDottedExpressionConstraintRule() { } //SubExpressionConstraint ExpressionConstraint: - // ChildOf | DescendantOf | DescendantOrSelfOf | ParentOf | AncestorOf | AncestorOrSelfOf | FocusConcept; + // ChildOf | DescendantOf | DescendantOrSelfOf | ParentOf | AncestorOf | AncestorOrSelfOf | EclFocusConcept; public SubExpressionConstraintElements getSubExpressionConstraintAccess() { return pSubExpressionConstraint; } @@ -2093,18 +2101,18 @@ public ParserRule getSubExpressionConstraintRule() { return getSubExpressionConstraintAccess().getRule(); } - //FocusConcept ExpressionConstraint: - // MemberOf | ConceptReference | Any | NestedExpression; - public FocusConceptElements getFocusConceptAccess() { - return pFocusConcept; + //EclFocusConcept ExpressionConstraint: + // MemberOf | EclConceptReference | Any | NestedExpression; + public EclFocusConceptElements getEclFocusConceptAccess() { + return pEclFocusConcept; } - public ParserRule getFocusConceptRule() { - return getFocusConceptAccess().getRule(); + public ParserRule getEclFocusConceptRule() { + return getEclFocusConceptAccess().getRule(); } //ChildOf: - // LT_EM constraint=FocusConcept; + // LT_EM constraint=EclFocusConcept; public ChildOfElements getChildOfAccess() { return pChildOf; } @@ -2114,7 +2122,7 @@ public ParserRule getChildOfRule() { } //DescendantOf: - // LT constraint=FocusConcept; + // LT constraint=EclFocusConcept; public DescendantOfElements getDescendantOfAccess() { return pDescendantOf; } @@ -2124,7 +2132,7 @@ public ParserRule getDescendantOfRule() { } //DescendantOrSelfOf: - // DBL_LT constraint=FocusConcept; + // DBL_LT constraint=EclFocusConcept; public DescendantOrSelfOfElements getDescendantOrSelfOfAccess() { return pDescendantOrSelfOf; } @@ -2134,7 +2142,7 @@ public ParserRule getDescendantOrSelfOfRule() { } //ParentOf: - // GT_EM constraint=FocusConcept; + // GT_EM constraint=EclFocusConcept; public ParentOfElements getParentOfAccess() { return pParentOf; } @@ -2144,7 +2152,7 @@ public ParserRule getParentOfRule() { } //AncestorOf: - // GT constraint=FocusConcept; + // GT constraint=EclFocusConcept; public AncestorOfElements getAncestorOfAccess() { return pAncestorOf; } @@ -2154,7 +2162,7 @@ public ParserRule getAncestorOfRule() { } //AncestorOrSelfOf: - // DBL_GT constraint=FocusConcept; + // DBL_GT constraint=EclFocusConcept; public AncestorOrSelfOfElements getAncestorOrSelfOfAccess() { return pAncestorOrSelfOf; } @@ -2164,7 +2172,7 @@ public ParserRule getAncestorOrSelfOfRule() { } //MemberOf: - // CARET constraint=(ConceptReference | Any | NestedExpression); + // CARET constraint=(EclConceptReference | Any | NestedExpression); public MemberOfElements getMemberOfAccess() { return pMemberOf; } @@ -2173,14 +2181,14 @@ public ParserRule getMemberOfRule() { return getMemberOfAccess().getRule(); } - //ConceptReference: + //EclConceptReference: // id=SnomedIdentifier term=TERM_STRING?; - public ConceptReferenceElements getConceptReferenceAccess() { - return pConceptReference; + public EclConceptReferenceElements getEclConceptReferenceAccess() { + return pEclConceptReference; } - public ParserRule getConceptReferenceRule() { - return getConceptReferenceAccess().getRule(); + public ParserRule getEclConceptReferenceRule() { + return getEclConceptReferenceAccess().getRule(); } //Any: @@ -2193,18 +2201,18 @@ public ParserRule getAnyRule() { return getAnyAccess().getRule(); } - //Refinement: + //EclRefinement: // OrRefinement; - public RefinementElements getRefinementAccess() { - return pRefinement; + public EclRefinementElements getEclRefinementAccess() { + return pEclRefinement; } - public ParserRule getRefinementRule() { - return getRefinementAccess().getRule(); + public ParserRule getEclRefinementRule() { + return getEclRefinementAccess().getRule(); } - //OrRefinement Refinement: - // AndRefinement -> ({OrRefinement.left=current} 'OR' right=AndRefinement)*; + //OrRefinement EclRefinement: + // AndRefinement -> ({OrRefinement.left=current} DISJUNCTION right=AndRefinement)*; public OrRefinementElements getOrRefinementAccess() { return pOrRefinement; } @@ -2213,8 +2221,8 @@ public ParserRule getOrRefinementRule() { return getOrRefinementAccess().getRule(); } - //AndRefinement Refinement: - // SubRefinement -> ({AndRefinement.left=current} ('AND' | ',') right=SubRefinement)*; + //AndRefinement EclRefinement: + // SubRefinement -> ({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubRefinement)*; public AndRefinementElements getAndRefinementAccess() { return pAndRefinement; } @@ -2223,8 +2231,8 @@ public ParserRule getAndRefinementRule() { return getAndRefinementAccess().getRule(); } - //SubRefinement Refinement: - // AttributeConstraint | AttributeGroup | NestedRefinement; + //SubRefinement EclRefinement: + // AttributeConstraint | EclAttributeGroup | NestedRefinement; public SubRefinementElements getSubRefinementAccess() { return pSubRefinement; } @@ -2234,7 +2242,7 @@ public ParserRule getSubRefinementRule() { } //NestedRefinement: - // ROUND_OPEN nested=Refinement ROUND_CLOSE; + // ROUND_OPEN nested=EclRefinement ROUND_CLOSE; public NestedRefinementElements getNestedRefinementAccess() { return pNestedRefinement; } @@ -2243,28 +2251,28 @@ public ParserRule getNestedRefinementRule() { return getNestedRefinementAccess().getRule(); } - //AttributeGroup: - // cardinality=Cardinality? CURLY_OPEN refinement=AttributeSet CURLY_CLOSE; - public AttributeGroupElements getAttributeGroupAccess() { - return pAttributeGroup; + //EclAttributeGroup: + // cardinality=Cardinality? CURLY_OPEN refinement=EclAttributeSet CURLY_CLOSE; + public EclAttributeGroupElements getEclAttributeGroupAccess() { + return pEclAttributeGroup; } - public ParserRule getAttributeGroupRule() { - return getAttributeGroupAccess().getRule(); + public ParserRule getEclAttributeGroupRule() { + return getEclAttributeGroupAccess().getRule(); } - //AttributeSet Refinement: + //EclAttributeSet EclRefinement: // OrAttributeSet; - public AttributeSetElements getAttributeSetAccess() { - return pAttributeSet; + public EclAttributeSetElements getEclAttributeSetAccess() { + return pEclAttributeSet; } - public ParserRule getAttributeSetRule() { - return getAttributeSetAccess().getRule(); + public ParserRule getEclAttributeSetRule() { + return getEclAttributeSetAccess().getRule(); } - //OrAttributeSet Refinement: - // AndAttributeSet ({OrRefinement.left=current} 'OR' right=AndAttributeSet)*; + //OrAttributeSet EclRefinement: + // AndAttributeSet ({OrRefinement.left=current} DISJUNCTION right=AndAttributeSet)*; public OrAttributeSetElements getOrAttributeSetAccess() { return pOrAttributeSet; } @@ -2273,8 +2281,8 @@ public ParserRule getOrAttributeSetRule() { return getOrAttributeSetAccess().getRule(); } - //AndAttributeSet Refinement: - // SubAttributeSet ({AndRefinement.left=current} ('AND' | ',') right=SubAttributeSet)*; + //AndAttributeSet EclRefinement: + // SubAttributeSet ({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubAttributeSet)*; public AndAttributeSetElements getAndAttributeSetAccess() { return pAndAttributeSet; } @@ -2283,7 +2291,7 @@ public ParserRule getAndAttributeSetRule() { return getAndAttributeSetAccess().getRule(); } - //SubAttributeSet Refinement: + //SubAttributeSet EclRefinement: // AttributeConstraint | NestedAttributeSet; public SubAttributeSetElements getSubAttributeSetAccess() { return pSubAttributeSet; @@ -2294,7 +2302,7 @@ public ParserRule getSubAttributeSetRule() { } //NestedAttributeSet NestedRefinement: - // ROUND_OPEN nested=AttributeSet ROUND_CLOSE; + // ROUND_OPEN nested=EclAttributeSet ROUND_CLOSE; public NestedAttributeSetElements getNestedAttributeSetAccess() { return pNestedAttributeSet; } @@ -2648,6 +2656,30 @@ public TerminalRule getTORule() { return tTO; } + //terminal COMMA: + // ','; + public TerminalRule getCOMMARule() { + return tCOMMA; + } + + //terminal CONJUNCTION: + // ('a' | 'A') ('n' | 'N') ('d' | 'D'); + public TerminalRule getCONJUNCTIONRule() { + return tCONJUNCTION; + } + + //terminal DISJUNCTION: + // ('o' | 'O') ('r' | 'R'); + public TerminalRule getDISJUNCTIONRule() { + return tDISJUNCTION; + } + + //terminal EXCLUSION: + // ('m' | 'M') ('i' | 'I') ('n' | 'N') ('u' | 'U') ('s' | 'S'); + public TerminalRule getEXCLUSIONRule() { + return tEXCLUSION; + } + //terminal ZERO: // '0'; public TerminalRule getZERORule() { @@ -2720,12 +2752,6 @@ public TerminalRule getCARETRule() { return tCARET; } - //terminal NOT: - // '!'; - public TerminalRule getNOTRule() { - return tNOT; - } - //terminal DOT: // '.'; public TerminalRule getDOTRule() { diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/validation/AbstractEclValidator.java b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/validation/AbstractEclValidator.java index 3d30f7400d3..d152bd9ba38 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/validation/AbstractEclValidator.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/validation/AbstractEclValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,5 +28,4 @@ protected List getEPackages() { result.add(com.b2international.snowowl.snomed.ecl.ecl.EclPackage.eINSTANCE); return result; } - } diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/Ecl.xtext b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/Ecl.xtext index eacb7519592..236ab93deb6 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/Ecl.xtext +++ b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/Ecl.xtext @@ -25,86 +25,86 @@ ExpressionConstraint: OrExpressionConstraint; OrExpressionConstraint returns ExpressionConstraint: - AndExpressionConstraint ({OrExpressionConstraint.left=current} 'OR' right=AndExpressionConstraint)*; + AndExpressionConstraint ({OrExpressionConstraint.left=current} DISJUNCTION right=AndExpressionConstraint)*; AndExpressionConstraint returns ExpressionConstraint: - ExclusionExpressionConstraint ({AndExpressionConstraint.left=current} ('AND' | ',') + ExclusionExpressionConstraint ({AndExpressionConstraint.left=current} (CONJUNCTION | COMMA) right=ExclusionExpressionConstraint)*; ExclusionExpressionConstraint returns ExpressionConstraint: - RefinedExpressionConstraint ({ExclusionExpressionConstraint.left=current} 'MINUS' right=RefinedExpressionConstraint)?; + RefinedExpressionConstraint ({ExclusionExpressionConstraint.left=current} EXCLUSION right=RefinedExpressionConstraint)?; RefinedExpressionConstraint returns ExpressionConstraint: - DottedExpressionConstraint ({RefinedExpressionConstraint.constraint=current} COLON refinement=Refinement)?; + DottedExpressionConstraint ({RefinedExpressionConstraint.constraint=current} COLON refinement=EclRefinement)?; DottedExpressionConstraint returns ExpressionConstraint: SubExpressionConstraint ({DottedExpressionConstraint.constraint=current} DOT attribute=SubExpressionConstraint)*; SubExpressionConstraint returns ExpressionConstraint: - ChildOf | DescendantOf | DescendantOrSelfOf | ParentOf | AncestorOf | AncestorOrSelfOf | FocusConcept; + ChildOf | DescendantOf | DescendantOrSelfOf | ParentOf | AncestorOf | AncestorOrSelfOf | EclFocusConcept; -FocusConcept returns ExpressionConstraint: - MemberOf | ConceptReference | Any | NestedExpression; +EclFocusConcept returns ExpressionConstraint: + MemberOf | EclConceptReference | Any | NestedExpression; ChildOf: - LT_EM constraint=FocusConcept; + LT_EM constraint=EclFocusConcept; DescendantOf: - LT constraint=FocusConcept; + LT constraint=EclFocusConcept; DescendantOrSelfOf: - DBL_LT constraint=FocusConcept; + DBL_LT constraint=EclFocusConcept; ParentOf: - GT_EM constraint=FocusConcept; + GT_EM constraint=EclFocusConcept; AncestorOf: - GT constraint=FocusConcept; + GT constraint=EclFocusConcept; AncestorOrSelfOf: - DBL_GT constraint=FocusConcept; + DBL_GT constraint=EclFocusConcept; MemberOf: - CARET constraint=(ConceptReference | Any | NestedExpression); + CARET constraint=(EclConceptReference | Any | NestedExpression); -ConceptReference: +EclConceptReference: id=SnomedIdentifier (term=TERM_STRING)?; Any: WILDCARD {Any}; -Refinement: +EclRefinement: OrRefinement; -OrRefinement returns Refinement: - AndRefinement -> ({OrRefinement.left=current} 'OR' right=AndRefinement)*; +OrRefinement returns EclRefinement: + AndRefinement -> ({OrRefinement.left=current} DISJUNCTION right=AndRefinement)*; -AndRefinement returns Refinement: - SubRefinement -> ({AndRefinement.left=current} ('AND' | ',') right=SubRefinement)*; +AndRefinement returns EclRefinement: + SubRefinement -> ({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubRefinement)*; -SubRefinement returns Refinement: - AttributeConstraint | AttributeGroup | NestedRefinement; +SubRefinement returns EclRefinement: + AttributeConstraint | EclAttributeGroup | NestedRefinement; NestedRefinement: - ROUND_OPEN nested=Refinement ROUND_CLOSE; + ROUND_OPEN nested=EclRefinement ROUND_CLOSE; -AttributeGroup: - (cardinality=Cardinality)? CURLY_OPEN refinement=AttributeSet CURLY_CLOSE; +EclAttributeGroup: + (cardinality=Cardinality)? CURLY_OPEN refinement=EclAttributeSet CURLY_CLOSE; -AttributeSet returns Refinement: +EclAttributeSet returns EclRefinement: OrAttributeSet; -OrAttributeSet returns Refinement: - AndAttributeSet ({OrRefinement.left=current} 'OR' right=AndAttributeSet)*; +OrAttributeSet returns EclRefinement: + AndAttributeSet ({OrRefinement.left=current} DISJUNCTION right=AndAttributeSet)*; -AndAttributeSet returns Refinement: - SubAttributeSet ({AndRefinement.left=current} ('AND' | ',') right=SubAttributeSet)*; +AndAttributeSet returns EclRefinement: + SubAttributeSet ({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubAttributeSet)*; -SubAttributeSet returns Refinement: +SubAttributeSet returns EclRefinement: AttributeConstraint | NestedAttributeSet; NestedAttributeSet returns NestedRefinement: - ROUND_OPEN nested=AttributeSet ROUND_CLOSE; + ROUND_OPEN nested=EclAttributeSet ROUND_CLOSE; AttributeConstraint: (cardinality=Cardinality)? (reversed?=REVERSED)? attribute=SubExpressionConstraint comparison=Comparison; @@ -216,18 +216,27 @@ NonNegativeDecimal returns ecore::EBigDecimal hidden(): Boolean returns ecore::EBoolean hidden(): 'true'|'false'; -// ---TERMINALS--- terminal TERM_STRING: "|" (!("|"))* "|"; terminal REVERSED: 'R'; -// ECL terminals terminal TO: '..'; -// numeric terminals +terminal COMMA: + ','; + +terminal CONJUNCTION: + ('a' | 'A') ('n' | 'N') ('d' | 'D'); + +terminal DISJUNCTION: + ('o' | 'O') ('r' | 'R'); + +terminal EXCLUSION: + ('m' | 'M') ('i' | 'I') ('n' | 'N') ('u' | 'U') ('s' | 'S'); + terminal ZERO: '0'; @@ -264,9 +273,6 @@ terminal DASH: terminal CARET: '^'; -terminal NOT: - '!'; - terminal DOT: '.'; diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/GenerateEcl.mwe2 b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/GenerateEcl.mwe2 index 9c40fc52c89..5d8eecd3bb3 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/GenerateEcl.mwe2 +++ b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/GenerateEcl.mwe2 @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ import org.eclipse.xtext.xtext.generator.model.project.* var rootPath = ".." var header = "/* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the \"License\"); * you may not use this file except in compliance with the License. @@ -70,6 +70,7 @@ Workflow { } } language = StandardLanguage { + name = "com.b2international.snowowl.snomed.ecl.Ecl" fileExtensions = "ecl" // The antlr parser generator fragment. @@ -81,7 +82,7 @@ Workflow { } } serializer = { - generateStub = false + generateStub = true } validator = { // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/converter/EclValueConverterService.java b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/converter/EclValueConverterService.java index 8cdb783c8d8..b1c98581588 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/converter/EclValueConverterService.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/converter/EclValueConverterService.java @@ -24,7 +24,7 @@ /** * @since 5.4 */ -public final class EclValueConverterService extends DefaultTerminalConverters { +public class EclValueConverterService extends DefaultTerminalConverters { @Inject private CardinalityMaxValueConverter maxValueConverter; diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/RValue.java b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/serializer/EclSemanticSequencer.java similarity index 69% rename from snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/RValue.java rename to snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/serializer/EclSemanticSequencer.java index 7b2026beb61..c14ae1602d0 100644 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/RValue.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/serializer/EclSemanticSequencer.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.dsl.query; +package com.b2international.snowowl.snomed.ecl.serializer; -import java.io.Serializable; -public interface RValue extends Serializable { - public StringBuilder toString(StringBuilder buf); -} \ No newline at end of file +public class EclSemanticSequencer extends AbstractEclSemanticSequencer { +} diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/serializer/EclSyntacticSequencer.java b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/serializer/EclSyntacticSequencer.java new file mode 100644 index 00000000000..efe9ddfa054 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/serializer/EclSyntacticSequencer.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.ecl.serializer; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.RuleCall; +import org.eclipse.xtext.nodemodel.INode; + +public class EclSyntacticSequencer extends AbstractEclSyntacticSequencer { + + @Override + protected String getEXCLUSIONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + String result = super.getEXCLUSIONToken(semanticObject, ruleCall, node); + if (result.equals("minus")) { + return "MINUS"; + } + return result; + } + + @Override + protected String getCONJUNCTIONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + String result = super.getCONJUNCTIONToken(semanticObject, ruleCall, node); + if (result.equals("and")) { + return "AND"; + } + return result; + } + + @Override + protected String getDISJUNCTIONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + String result = super.getDISJUNCTIONToken(semanticObject, ruleCall, node); + if (result.equals("or")) { + return "OR"; + } + return result; + } +} diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/validation/EclValidator.java b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/validation/EclValidator.java index a5e16c0bd2c..073474d45ea 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/validation/EclValidator.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/validation/EclValidator.java @@ -22,11 +22,11 @@ import com.b2international.snowowl.snomed.ecl.ecl.AndRefinement; import com.b2international.snowowl.snomed.ecl.ecl.Cardinality; import com.b2international.snowowl.snomed.ecl.ecl.EclPackage; +import com.b2international.snowowl.snomed.ecl.ecl.EclRefinement; import com.b2international.snowowl.snomed.ecl.ecl.ExclusionExpressionConstraint; import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint; import com.b2international.snowowl.snomed.ecl.ecl.OrExpressionConstraint; import com.b2international.snowowl.snomed.ecl.ecl.OrRefinement; -import com.b2international.snowowl.snomed.ecl.ecl.Refinement; /** * This class contains custom validation rules. @@ -102,7 +102,7 @@ private boolean isAmbiguous(ExpressionConstraint parent, ExpressionConstraint ch return parent.getClass() != child.getClass() && (child instanceof AndExpressionConstraint || child instanceof OrExpressionConstraint || child instanceof ExclusionExpressionConstraint); } - private boolean isAmbiguous(Refinement parent, Refinement child) { + private boolean isAmbiguous(EclRefinement parent, EclRefinement child) { return parent.getClass() != child.getClass() && (child instanceof AndRefinement || child instanceof OrRefinement); } diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/.classpath b/snomed/com.b2international.snowowl.snomed.etl.tests/.classpath similarity index 67% rename from snomed/com.b2international.snowowl.snomed.semanticengine.test/.classpath rename to snomed/com.b2international.snowowl.snomed.etl.tests/.classpath index eabeb3aca3d..48522a76f44 100644 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/.classpath +++ b/snomed/com.b2international.snowowl.snomed.etl.tests/.classpath @@ -11,5 +11,15 @@ + + + + + + + + + + diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/.project b/snomed/com.b2international.snowowl.snomed.etl.tests/.project similarity index 76% rename from snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/.project rename to snomed/com.b2international.snowowl.snomed.etl.tests/.project index e4e10020f2c..9adb3d267db 100644 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/.project +++ b/snomed/com.b2international.snowowl.snomed.etl.tests/.project @@ -1,10 +1,15 @@ - com.b2international.snowowl.snomed.semanticengine.simpleast.test + com.b2international.snowowl.snomed.etl.tests + + org.eclipse.xtext.ui.shared.xtextBuilder + + + org.eclipse.jdt.core.javabuilder @@ -28,7 +33,8 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.pde.PluginNature diff --git a/snomed/com.b2international.snowowl.snomed.etl.tests/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.etl.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..2f2b436cb95 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl.tests/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Snow Owl SNOMED CT Expression Template Language Tests +Bundle-SymbolicName: com.b2international.snowowl.snomed.etl.tests +Bundle-Version: 7.4.0.qualifier +Bundle-Vendor: B2i Healthcare +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-11 +Require-Bundle: org.junit;bundle-version="4.12.0", + org.eclipse.xtend.lib;bundle-version="[2.18.0,2.19.0)", + org.eclipse.xtext.testing;bundle-version="[2.18.0,2.19.0)", + com.b2international.snowowl.snomed.etl diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/build.properties b/snomed/com.b2international.snowowl.snomed.etl.tests/build.properties similarity index 53% rename from snomed/com.b2international.snowowl.snomed.semanticengine/build.properties rename to snomed/com.b2international.snowowl.snomed.etl.tests/build.properties index 56d77655550..b6d6b8fb3fe 100644 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/build.properties +++ b/snomed/com.b2international.snowowl.snomed.etl.tests/build.properties @@ -1,4 +1,6 @@ -source.. = src/ +source.. = src/,\ + src-gen/,\ + xtend-gen/ output.. = target/classes/ bin.includes = META-INF/,\ . diff --git a/snomed/com.b2international.snowowl.snomed.etl.tests/pom.xml b/snomed/com.b2international.snowowl.snomed.etl.tests/pom.xml new file mode 100644 index 00000000000..756edcc7d0e --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl.tests/pom.xml @@ -0,0 +1,67 @@ + + 4.0.0 + + com.b2international.snowowl + snomed-parent + 7.4.0-SNAPSHOT + + com.b2international.snowowl.snomed.etl.tests + eclipse-test-plugin + + + + src + + + xtend-gen + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + .gitignore + + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.compiler.version} + + ${basedir}/xtend-gen + + + + + compile + + + + + + org.eclipse.tycho + target-platform-configuration + ${tycho.version} + + + org.eclipse.tycho + tycho-surefire-plugin + ${tycho.version} + + + **/*Test.java + + + + + + \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.etl.tests/src-gen/com/b2international/snowowl/snomed/etl/tests/EtlInjectorProvider.java b/snomed/com.b2international.snowowl.snomed.etl.tests/src-gen/com/b2international/snowowl/snomed/etl/tests/EtlInjectorProvider.java new file mode 100644 index 00000000000..2d1e038fa87 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl.tests/src-gen/com/b2international/snowowl/snomed/etl/tests/EtlInjectorProvider.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.tests; + +import com.b2international.snowowl.snomed.etl.EtlRuntimeModule; +import com.b2international.snowowl.snomed.etl.EtlStandaloneSetup; +import com.google.inject.Guice; +import com.google.inject.Injector; +import org.eclipse.xtext.testing.GlobalRegistries; +import org.eclipse.xtext.testing.GlobalRegistries.GlobalStateMemento; +import org.eclipse.xtext.testing.IInjectorProvider; +import org.eclipse.xtext.testing.IRegistryConfigurator; + +public class EtlInjectorProvider implements IInjectorProvider, IRegistryConfigurator { + + protected GlobalStateMemento stateBeforeInjectorCreation; + protected GlobalStateMemento stateAfterInjectorCreation; + protected Injector injector; + + static { + GlobalRegistries.initializeDefaults(); + } + + @Override + public Injector getInjector() { + if (injector == null) { + this.injector = internalCreateInjector(); + stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + } + return injector; + } + + protected Injector internalCreateInjector() { + return new EtlStandaloneSetup() { + @Override + public Injector createInjector() { + return Guice.createInjector(createRuntimeModule()); + } + }.createInjectorAndDoEMFRegistration(); + } + + protected EtlRuntimeModule createRuntimeModule() { + // make it work also with Maven/Tycho and OSGI + // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=493672 + return new EtlRuntimeModule() { + @Override + public ClassLoader bindClassLoaderToInstance() { + return EtlInjectorProvider.class + .getClassLoader(); + } + }; + } + + @Override + public void restoreRegistry() { + stateBeforeInjectorCreation.restoreGlobalState(); + stateBeforeInjectorCreation = null; + } + + @Override + public void setupRegistry() { + stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + if (injector == null) { + getInjector(); + } + stateAfterInjectorCreation.restoreGlobalState(); + } +} diff --git a/snomed/com.b2international.snowowl.snomed.etl.tests/src/com/b2international/snowowl/snomed/etl/tests/EtlParsingTest.xtend b/snomed/com.b2international.snowowl.snomed.etl.tests/src/com/b2international/snowowl/snomed/etl/tests/EtlParsingTest.xtend new file mode 100644 index 00000000000..ebea32713f5 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl.tests/src/com/b2international/snowowl/snomed/etl/tests/EtlParsingTest.xtend @@ -0,0 +1,1962 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.tests + +import com.b2international.snowowl.snomed.ecl.Ecl +import com.b2international.snowowl.snomed.ecl.ecl.Any +import com.b2international.snowowl.snomed.ecl.ecl.AttributeConstraint +import com.b2international.snowowl.snomed.ecl.ecl.AttributeValueEquals +import com.b2international.snowowl.snomed.ecl.ecl.DescendantOf +import com.b2international.snowowl.snomed.ecl.ecl.DescendantOrSelfOf +import com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference +import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint +import com.b2international.snowowl.snomed.ecl.ecl.RefinedExpressionConstraint +import com.b2international.snowowl.snomed.etl.etl.Attribute +import com.b2international.snowowl.snomed.etl.etl.ConceptIdReplacementSlot +import com.b2international.snowowl.snomed.etl.etl.ConceptReference +import com.b2international.snowowl.snomed.etl.etl.DecimalReplacementSlot +import com.b2international.snowowl.snomed.etl.etl.ExpressionReplacementSlot +import com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate +import com.b2international.snowowl.snomed.etl.etl.IntegerReplacementSlot +import com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange +import com.b2international.snowowl.snomed.etl.etl.SlotIntegerValue +import com.b2international.snowowl.snomed.etl.etl.StringReplacementSlot +import com.b2international.snowowl.snomed.etl.etl.SubExpression +import com.google.inject.Inject +import org.eclipse.xtext.testing.InjectWith +import org.eclipse.xtext.testing.XtextRunner +import org.eclipse.xtext.testing.util.ParseHelper +import org.eclipse.xtext.testing.validation.ValidationTestHelper +import org.junit.FixMethodOrder +import org.junit.Test +import org.junit.runner.RunWith + +import static org.junit.Assert.assertEquals +import static org.junit.Assert.assertFalse +import static org.junit.Assert.assertNotNull +import static org.junit.Assert.assertNull +import static org.junit.Assert.assertTrue + +@RunWith(XtextRunner) +@InjectWith(EtlInjectorProvider) +@FixMethodOrder(NAME_ASCENDING) +class EtlParsingTest { + + @Inject extension ParseHelper + @Inject extension ValidationTestHelper + + @Test + def void test_empty() { + ''.assertNoErrors + } + + @Test + def void test_7_1_1_Simple_AttributeName_1() { + + val expression = ''' + 404684003 |Clinical finding| : [[+]] = 80166006 |Streptococcus pyogenes| + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "404684003", "Clinical finding") + + val refinement = expression.expression.refinement + + assertTrue(refinement.groups.empty) + assertEquals(1, refinement.attributes.size) + + val attribute = refinement.attributes.head + + assertNull(attribute.slot) + + assertNull(attribute.name.id) + assertNull(attribute.name.term) + + assertTrue(attribute.name.slot instanceof ExpressionReplacementSlot) + + val expressionReplacementSlot = attribute.name.slot as ExpressionReplacementSlot + + assertNull(expressionReplacementSlot.name) + assertNull(expressionReplacementSlot.constraint) + + assertTrue(attribute.value instanceof ConceptReference) + assertConceptReference(attribute.value as ConceptReference, "80166006", "Streptococcus pyogenes") + + } + + @Test + def void test_7_1_1_Simple_AttributeValue_1() { + + val expression = ''' + 404684003 |Clinical finding| : 363698007 |Finding site| = [[+]] + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "404684003", "Clinical finding") + + val refinement = expression.expression.refinement + + assertTrue(refinement.groups.empty) + assertEquals(1, refinement.attributes.size) + + val attribute = refinement.attributes.head + + assertNull(attribute.slot) + assertConceptReference(attribute.name, "363698007", "Finding site") + + assertTrue(attribute.value instanceof ConceptReference) + + val value = attribute.value as ConceptReference + + assertNull(value.id) + assertNull(value.term) + + assertTrue(value.slot instanceof ExpressionReplacementSlot) + + val expressionReplacementSlot = value.slot as ExpressionReplacementSlot + + assertNull(expressionReplacementSlot.name) + assertNull(expressionReplacementSlot.constraint) + + } + + @Test + def void test_7_1_1_Simple_FocusConcept_1() { + + val expression = ''' + [[+]]: 272741003 |Laterality| = 24028007 |Right| + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + + assertNull(focusConcept.concept.id) + assertNull(focusConcept.concept.term) + + assertTrue(focusConcept.concept.slot instanceof ExpressionReplacementSlot) + + val expressionReplacementSlot = focusConcept.concept.slot as ExpressionReplacementSlot + assertNull(expressionReplacementSlot.name) + assertNull(expressionReplacementSlot.constraint) + + val refinement = expression.expression.refinement + + assertTrue(refinement.groups.empty) + assertEquals(1, refinement.attributes.size) + + assertSimpleAttribute(refinement.attributes.head, "272741003", "Laterality", "24028007", "Right") + + } + + @Test + def void test_7_1_2_Typed_ConceptReplacement_1() { + + val expression = ''' + 404684003 |Clinical finding| : 255234002 |After| = [[+id]] + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "404684003", "Clinical finding") + + val refinement = expression.expression.refinement + + assertTrue(refinement.groups.empty) + assertEquals(1, refinement.attributes.size) + + val attribute = refinement.attributes.head + + assertNull(attribute.slot) + assertConceptReference(attribute.name, "255234002", "After") + + assertTrue(attribute.value instanceof ConceptReference) + + val value = attribute.value as ConceptReference + + assertNull(value.id) + assertNull(value.term) + + assertTrue(value.slot instanceof ConceptIdReplacementSlot) + + val conceptReplacementSlot = value.slot as ConceptIdReplacementSlot + + assertNull(conceptReplacementSlot.name) + assertNull(conceptReplacementSlot.constraint) + + } + + @Test + def void test_7_1_2_Typed_ConcreteValueReplacement_1() { + + val expression = ''' + 322236009 |Paracetamol 500mg tablet| : 209999999104 |Has trade name| = [[+str]] + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "322236009", "Paracetamol 500mg tablet") + + val refinement = expression.expression.refinement + + assertTrue(refinement.groups.empty) + assertEquals(1, refinement.attributes.size) + + val attribute = refinement.attributes.head + + assertNull(attribute.slot) + assertConceptReference(attribute.name, "209999999104", "Has trade name") + + assertTrue(attribute.value instanceof StringReplacementSlot) + + val stringReplacementSlot = attribute.value as StringReplacementSlot + + assertNull(stringReplacementSlot.name) + assertTrue(stringReplacementSlot.values.empty) + + } + + @Test + def void test_7_1_2_Typed_ConcreteValueReplacement_2() { + + val expression = ''' + 323510009 |Amoxycillin 500mg capsule| : + { 749999999108 |Has pack size magnitude| = [[+int]], + 759999999106 |Has pack size units| = 428641000 |Capsule| } + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "323510009", "Amoxycillin 500mg capsule") + + val refinement = expression.expression.refinement + + assertEquals(1, refinement.groups.size) + assertTrue(refinement.attributes.empty) + + val group = refinement.groups.head + + assertNull(group.slot) + + val attribute1 = group.attributes.head + + assertNull(attribute1.slot) + assertConceptReference(attribute1.name, "749999999108", "Has pack size magnitude") + + assertTrue(attribute1.value instanceof IntegerReplacementSlot) + + val integerReplacementSlot = attribute1.value as IntegerReplacementSlot + + assertNull(integerReplacementSlot.name) + assertTrue(integerReplacementSlot.values.empty) + + val attribute2 = group.attributes.last + assertNull(attribute2.slot) + assertSimpleAttribute(attribute2, "759999999106", "Has pack size units", "428641000", "Capsule") + + } + + @Test + def void test_7_1_2_Typed_ConcreteValueReplacement_3() { + + val expression = ''' + 326645001 |Chlorhexidine gluconate 0.02% irrigation solution| : + { 749999999108 |Has pack size magnitude| = [[+dec]], + 759999999106 |Has pack size units| = 258770004 |Liter| } + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "326645001", "Chlorhexidine gluconate 0.02% irrigation solution") + + val refinement = expression.expression.refinement + + assertEquals(1, refinement.groups.size) + assertTrue(refinement.attributes.empty) + + val group = refinement.groups.head + + assertNull(group.slot) + + val attribute1 = group.attributes.head + + assertNull(attribute1.slot) + assertConceptReference(attribute1.name, "749999999108", "Has pack size magnitude") + + assertTrue(attribute1.value instanceof DecimalReplacementSlot) + + val decimalReplacementSlot = attribute1.value as DecimalReplacementSlot + + assertNull(decimalReplacementSlot.name) + assertTrue(decimalReplacementSlot.values.empty) + + val attribute2 = group.attributes.last + assertNull(attribute2.slot) + assertSimpleAttribute(attribute2, "759999999106", "Has pack size units", "258770004", "Liter") + + } + + @Test + def void test_7_1_2_Typed_ExpressionReplacement_1() { + + val expression = ''' + 404684003 |Clinical finding| : 255234002 |After| = [[+scg]] + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "404684003", "Clinical finding") + + val refinement = expression.expression.refinement + + assertTrue(refinement.groups.empty) + assertEquals(1, refinement.attributes.size) + + val attribute = refinement.attributes.head + + assertNull(attribute.slot) + assertConceptReference(attribute.name, "255234002", "After") + + assertTrue(attribute.value instanceof ConceptReference) + + val value = attribute.value as ConceptReference + + assertNull(value.id) + assertNull(value.term) + + assertTrue(value.slot instanceof ExpressionReplacementSlot) + + val expressionReplacementSlot = value.slot as ExpressionReplacementSlot + + assertNull(expressionReplacementSlot.name) + assertNull(expressionReplacementSlot.constraint) + + } + + @Test + def void test_7_1_2_Typed_TokenReplacement_1() { + + val expression = ''' + [[+tok]] 73211009 |Diabetes mellitus| : 363698007 |Finding site| = 113331007 |Endocrine system| + '''.assertNoErrors + + assertNotNull(expression.slot) + assertNull(expression.slot.name) + assertTrue(expression.slot.tokens.empty) + + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + assertConceptReference(focusConcept.concept, "73211009", "Diabetes mellitus") + + val refinement = expression.expression.refinement + + assertTrue(refinement.groups.empty) + assertEquals(1, refinement.attributes.size) + + val attribute = refinement.attributes.head + + assertNull(attribute.slot) + assertNull(attribute.name.slot) + assertNull((attribute.value as ConceptReference).slot) + + assertSimpleAttribute(refinement.attributes.head, "363698007", "Finding site", "113331007", "Endocrine system") + + } + + @Test + def void test_7_1_3_Constrained_ExpressionConstraints_1() { + + val expression = ''' + 71388002 |Procedure| : + { + 260686004 |Method| = 312251004 |Computed tomography imaging action| , + 405813007 |Procedure site - Direct| = [[+id (<< 442083009 |Anatomical or acquired body structure| )]] + } + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "71388002", "Procedure") + + val refinement = expression.expression.refinement + + assertEquals(1, refinement.groups.size) + assertTrue(refinement.attributes.empty) + + val group = refinement.groups.head + + assertNull(group.slot) + + val attribute1 = group.attributes.head + + assertNull(attribute1.slot) + assertNull(attribute1.name.slot) + assertNull((attribute1.value as ConceptReference).slot) + assertSimpleAttribute(attribute1, "260686004", "Method", "312251004", "Computed tomography imaging action") + + val attribute2 = group.attributes.last + + assertNull(attribute2.slot) + assertNull(attribute2.name.slot) + + assertConceptReference(attribute2.name, "405813007", "Procedure site - Direct") + + assertTrue(attribute2.value instanceof ConceptReference) + + val conceptReference = attribute2.value as ConceptReference + + assertNull(conceptReference.id) + assertNull(conceptReference.term) + + assertTrue(conceptReference.slot instanceof ConceptIdReplacementSlot) + + val slot = conceptReference.slot as ConceptIdReplacementSlot + + assertNull(slot.name) + + assertDescendantOrSelfOfExpression(slot.constraint, "442083009", "Anatomical or acquired body structure") + + } + + @Test + def void test_7_1_3_Constrained_ExpressionConstraints_2() { + + val expression = ''' + 71388002 |Procedure| : + { 260686004 |Method| = 312251004 |Computed tomography imaging action| , + 405813007 |Procedure site - Direct| = + [[+scg (<< 442083009 |Anatomical or acquired body structure| )]]} + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "71388002", "Procedure") + + val refinement = expression.expression.refinement + + assertEquals(1, refinement.groups.size) + assertTrue(refinement.attributes.empty) + + val group = refinement.groups.head + + assertNull(group.slot) + + val attribute1 = group.attributes.head + + assertNull(attribute1.slot) + assertNull(attribute1.name.slot) + assertNull((attribute1.value as ConceptReference).slot) + assertSimpleAttribute(attribute1, "260686004", "Method", "312251004", "Computed tomography imaging action") + + val attribute2 = group.attributes.last + + assertNull(attribute2.slot) + assertNull(attribute2.name.slot) + + assertConceptReference(attribute2.name, "405813007", "Procedure site - Direct") + + assertTrue(attribute2.value instanceof ConceptReference) + + val conceptReference = attribute2.value as ConceptReference + + assertNull(conceptReference.id) + assertNull(conceptReference.term) + + assertTrue(conceptReference.slot instanceof ExpressionReplacementSlot) + + val slot = conceptReference.slot as ExpressionReplacementSlot + + assertNull(slot.name) + + assertDescendantOrSelfOfExpression(slot.constraint, "442083009", "Anatomical or acquired body structure") + + } + + @Test + def void test_7_1_3_Constrained_RangeConstraints_1() { + + val expression = ''' + 323510009 |Amoxycillin 500mg capsule| : + { 749999999108 |Has pack size magnitude| = [[+int (#20..#30)]], + 759999999106 |Has pack size units| = 428641000 |Capsule| } + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "323510009", "Amoxycillin 500mg capsule") + + val refinement = expression.expression.refinement + + assertEquals(1, refinement.groups.size) + assertTrue(refinement.attributes.empty) + + val group = refinement.groups.head + + assertNull(group.slot) + + val attribute1 = group.attributes.head + + assertNull(attribute1.slot) + assertConceptReference(attribute1.name, "749999999108", "Has pack size magnitude") + + assertTrue(attribute1.value instanceof IntegerReplacementSlot) + + val integerReplacementSlot = attribute1.value as IntegerReplacementSlot + + assertNull(integerReplacementSlot.name) + assertEquals(1, integerReplacementSlot.values.size) + + assertTrue(integerReplacementSlot.values.head instanceof SlotIntegerRange) + val range = integerReplacementSlot.values.head as SlotIntegerRange + + assertEquals(20, range.minimum.value) + assertFalse(range.minimum.isExclusive) + assertEquals(30, range.maximum.value) + assertFalse(range.maximum.isExclusive) + + val attribute2 = group.attributes.last + assertNull(attribute2.slot) + assertSimpleAttribute(attribute2, "759999999106", "Has pack size units", "428641000", "Capsule") + + } + + @Test + def void test_7_1_3_Constrained_RangeConstraints_2() { + + val expression = ''' + 323510009 |Amoxycillin 500mg capsule| : + { 749999999108 |Has pack size magnitude| = [[+int (>#20..<#30)]], + 759999999106 |Has pack size units| = 428641000 |Capsule| } + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "323510009", "Amoxycillin 500mg capsule") + + val refinement = expression.expression.refinement + + assertEquals(1, refinement.groups.size) + assertTrue(refinement.attributes.empty) + + val group = refinement.groups.head + + assertNull(group.slot) + + val attribute1 = group.attributes.head + + assertNull(attribute1.slot) + assertConceptReference(attribute1.name, "749999999108", "Has pack size magnitude") + + assertTrue(attribute1.value instanceof IntegerReplacementSlot) + + val integerReplacementSlot = attribute1.value as IntegerReplacementSlot + + assertNull(integerReplacementSlot.name) + assertEquals(1, integerReplacementSlot.values.size) + + assertTrue(integerReplacementSlot.values.head instanceof SlotIntegerRange) + val range = integerReplacementSlot.values.head as SlotIntegerRange + + assertEquals(20, range.minimum.value) + assertTrue(range.minimum.isExclusive) + assertEquals(30, range.maximum.value) + assertTrue(range.maximum.isExclusive) + + val attribute2 = group.attributes.last + assertNull(attribute2.slot) + assertSimpleAttribute(attribute2, "759999999106", "Has pack size units", "428641000", "Capsule") + + } + + @Test + def void test_7_1_3_Constrained_RangeConstraints_3() { + + val expression = ''' + 323510009 |Amoxycillin 500mg capsule| : + { 749999999108 |Has pack size magnitude| = [[+int (#10..#20 #30..#40)]], + 759999999106 |Has pack size units| = 428641000 |Capsule| } + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "323510009", "Amoxycillin 500mg capsule") + + val refinement = expression.expression.refinement + + assertEquals(1, refinement.groups.size) + assertTrue(refinement.attributes.empty) + + val group = refinement.groups.head + + assertNull(group.slot) + + val attribute1 = group.attributes.head + + assertNull(attribute1.slot) + assertConceptReference(attribute1.name, "749999999108", "Has pack size magnitude") + + assertTrue(attribute1.value instanceof IntegerReplacementSlot) + + val integerReplacementSlot = attribute1.value as IntegerReplacementSlot + + assertNull(integerReplacementSlot.name) + assertEquals(2, integerReplacementSlot.values.size) + + assertTrue(integerReplacementSlot.values.head instanceof SlotIntegerRange) + val range = integerReplacementSlot.values.head as SlotIntegerRange + + assertEquals(10, range.minimum.value) + assertFalse(range.minimum.isExclusive) + assertEquals(20, range.maximum.value) + assertFalse(range.maximum.isExclusive) + + assertTrue(integerReplacementSlot.values.last instanceof SlotIntegerRange) + val range2 = integerReplacementSlot.values.last as SlotIntegerRange + + assertEquals(30, range2.minimum.value) + assertFalse(range2.minimum.isExclusive) + assertEquals(40, range2.maximum.value) + assertFalse(range2.maximum.isExclusive) + + val attribute2 = group.attributes.last + assertNull(attribute2.slot) + assertSimpleAttribute(attribute2, "759999999106", "Has pack size units", "428641000", "Capsule") + + } + + @Test + def void test_7_1_3_Constrained_RangeConstraints_4() { + + val expression = ''' + 323510009 |Amoxycillin 500mg capsule| : + { 749999999108 |Has pack size magnitude| = [[+int (#20..)]], + 759999999106 |Has pack size units| = 428641000 |Capsule| } + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "323510009", "Amoxycillin 500mg capsule") + + val refinement = expression.expression.refinement + + assertEquals(1, refinement.groups.size) + assertTrue(refinement.attributes.empty) + + val group = refinement.groups.head + + assertNull(group.slot) + + val attribute1 = group.attributes.head + + assertNull(attribute1.slot) + assertConceptReference(attribute1.name, "749999999108", "Has pack size magnitude") + + assertTrue(attribute1.value instanceof IntegerReplacementSlot) + + val integerReplacementSlot = attribute1.value as IntegerReplacementSlot + + assertNull(integerReplacementSlot.name) + assertEquals(1, integerReplacementSlot.values.size) + + assertTrue(integerReplacementSlot.values.head instanceof SlotIntegerRange) + val range = integerReplacementSlot.values.head as SlotIntegerRange + + assertEquals(20, range.minimum.value) + assertFalse(range.minimum.isExclusive) + + assertNull(range.maximum) + + val attribute2 = group.attributes.last + assertNull(attribute2.slot) + assertSimpleAttribute(attribute2, "759999999106", "Has pack size units", "428641000", "Capsule") + + } + + @Test + def void test_7_1_3_Constrained_RangeConstraints_5() { + + val expression = ''' + 323510009 |Amoxycillin 500mg capsule| : + { 749999999108 |Has pack size magnitude| = [[+int (..#20)]], + 759999999106 |Has pack size units| = 428641000 |Capsule| } + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "323510009", "Amoxycillin 500mg capsule") + + val refinement = expression.expression.refinement + + assertEquals(1, refinement.groups.size) + assertTrue(refinement.attributes.empty) + + val group = refinement.groups.head + + assertNull(group.slot) + + val attribute1 = group.attributes.head + + assertNull(attribute1.slot) + assertConceptReference(attribute1.name, "749999999108", "Has pack size magnitude") + + assertTrue(attribute1.value instanceof IntegerReplacementSlot) + + val integerReplacementSlot = attribute1.value as IntegerReplacementSlot + + assertNull(integerReplacementSlot.name) + assertEquals(1, integerReplacementSlot.values.size) + + assertTrue(integerReplacementSlot.values.head instanceof SlotIntegerRange) + val range = integerReplacementSlot.values.head as SlotIntegerRange + + assertNull(range.minimum) + + assertEquals(20, range.maximum.value) + assertFalse(range.maximum.isExclusive) + + val attribute2 = group.attributes.last + assertNull(attribute2.slot) + assertSimpleAttribute(attribute2, "759999999106", "Has pack size units", "428641000", "Capsule") + + } + + @Test + def void test_7_1_3_Constrained_ValueListConstraints_1() { + + val expression = ''' + [[+tok (<<< ===)]] 281647001 |Adverse reaction (disorder)| : + 246075003 |Causative agent (attribute)| = [[+id]] + '''.assertNoErrors + + assertNotNull(expression.slot) + assertNull(expression.slot.name) + + assertEquals(2, expression.slot.tokens.size) + assertEquals("<<<", expression.slot.tokens.head) + assertEquals("===", expression.slot.tokens.last) + + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + assertConceptReference(focusConcept.concept, "281647001", "Adverse reaction (disorder)") + + val refinement = expression.expression.refinement + + assertTrue(refinement.groups.empty) + assertEquals(1, refinement.attributes.size) + + val attribute = refinement.attributes.head + + assertNull(attribute.slot) + assertNull(attribute.name.slot) + assertConceptReference(attribute.name, "246075003", "Causative agent (attribute)") + + assertTrue(attribute.value instanceof ConceptReference) + val value = attribute.value as ConceptReference + + assertNull(value.id) + assertNull(value.term) + + assertTrue(value.slot instanceof ConceptIdReplacementSlot) + + val conceptReplacementSlot = value.slot as ConceptIdReplacementSlot + + assertNull(conceptReplacementSlot.name) + assertNull(conceptReplacementSlot.constraint) + + } + + @Test + def void test_7_1_3_Constrained_ValueListConstraints_2() { + + val expression = ''' + 322236009 |Paracetamol 500mg tablet| : 209999999104 |Has trade name| = [[+str ("PANADOL" "TYLENOL" "HERRON")]] + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "322236009", "Paracetamol 500mg tablet") + + val refinement = expression.expression.refinement + + assertTrue(refinement.groups.empty) + assertEquals(1, refinement.attributes.size) + + val attribute = refinement.attributes.head + + assertNull(attribute.slot) + assertConceptReference(attribute.name, "209999999104", "Has trade name") + + assertTrue(attribute.value instanceof StringReplacementSlot) + + val stringReplacementSlot = attribute.value as StringReplacementSlot + + assertNull(stringReplacementSlot.name) + assertEquals(3, stringReplacementSlot.values.size) + + assertEquals("PANADOL", stringReplacementSlot.values.get(0)) + assertEquals("TYLENOL", stringReplacementSlot.values.get(1)) + assertEquals("HERRON", stringReplacementSlot.values.get(2)) + + } + + @Test + def void test_7_1_3_Constrained_ValueListConstraints_3() { + + val expression = ''' + 323510009 |Amoxycillin 500mg capsule| : + { 749999999108 |Has pack size magnitude| = [[+int (#10 #20 #30)]], + 759999999106 |Has pack size units| = 428641000 |Capsule| } + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "323510009", "Amoxycillin 500mg capsule") + + val refinement = expression.expression.refinement + + assertEquals(1, refinement.groups.size) + assertTrue(refinement.attributes.empty) + + val group = refinement.groups.head + + assertNull(group.slot) + + val attribute1 = group.attributes.head + + assertNull(attribute1.slot) + assertConceptReference(attribute1.name, "749999999108", "Has pack size magnitude") + + assertTrue(attribute1.value instanceof IntegerReplacementSlot) + + val integerReplacementSlot = attribute1.value as IntegerReplacementSlot + + assertNull(integerReplacementSlot.name) + assertEquals(3, integerReplacementSlot.values.size) + + assertTrue(integerReplacementSlot.values.get(0) instanceof SlotIntegerValue) + val first = integerReplacementSlot.values.get(0) as SlotIntegerValue + assertEquals(10, first.value) + + assertTrue(integerReplacementSlot.values.get(1) instanceof SlotIntegerValue) + val second = integerReplacementSlot.values.get(1) as SlotIntegerValue + assertEquals(20, second.value) + + assertTrue(integerReplacementSlot.values.get(2) instanceof SlotIntegerValue) + val third = integerReplacementSlot.values.get(2) as SlotIntegerValue + assertEquals(30, third.value) + + val attribute2 = group.attributes.last + assertNull(attribute2.slot) + assertSimpleAttribute(attribute2, "759999999106", "Has pack size units", "428641000", "Capsule") + + } + + @Test + def void test_7_1_4_Named_RepeatedSlotNames_1() { + + val expression = ''' + 404684003 |Finding| : { + 363698007 |Finding site| = [[+ @site]], + 363714003 |Interprets| = ( 363787002 |Observable entity| : 704319004 |Inheres in| = [[+ @site]] ) + } + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "404684003", "Finding") + + val refinement = expression.expression.refinement + + assertEquals(1, refinement.groups.size) + assertTrue(refinement.attributes.empty) + + val group = refinement.groups.head + + assertNull(group.slot) + assertEquals(2, group.attributes.size) + + val attribute1 = group.attributes.head + + assertNull(attribute1.slot) + assertConceptReference(attribute1.name, "363698007", "Finding site") + + assertTrue(attribute1.value instanceof ConceptReference) + + val value1 = attribute1.value as ConceptReference + + assertNull(value1.id) + assertNull(value1.term) + + assertTrue(value1.slot instanceof ExpressionReplacementSlot) + + val expressionSlot = value1.slot as ExpressionReplacementSlot + + assertEquals("@site", expressionSlot.name) + assertNull(expressionSlot.constraint) + + + val attribute2 = group.attributes.last + + assertNull(attribute2.slot) + assertConceptReference(attribute2.name, "363714003", "Interprets") + + assertTrue(attribute2.value instanceof SubExpression) + + val subExpression = attribute2.value as SubExpression + + assertEquals(1, subExpression.focusConcepts.size) + + assertNull(subExpression.focusConcepts.head.slot) + assertConceptReference(subExpression.focusConcepts.head.concept, "363787002", "Observable entity") + + assertEquals(1, subExpression.refinement.attributes.size) + + val subAttribute = subExpression.refinement.attributes.head + + assertNull(subAttribute.slot) + assertConceptReference(subAttribute.name, "704319004", "Inheres in") + + assertTrue(subAttribute.value instanceof ConceptReference) + + val value2 = subAttribute.value as ConceptReference + + assertNull(value2.id) + assertNull(value2.term) + + assertTrue(value2.slot instanceof ExpressionReplacementSlot) + + val expressionSlot2 = value2.slot as ExpressionReplacementSlot + + assertEquals("@site", expressionSlot2.name) + assertNull(expressionSlot2.constraint) + + } + + @Test + def void test_7_1_4_Named_SlotNames_1() { + + val expression = ''' + 243796009 |Situation with explicit context| : + { 246090004 |Associated finding| = [[+id (< 404684003 |Clinical finding| ) @finding]], + 40873100 |Temporal context| = 410511007 |Current or past (actual)| , + 408729009 |Finding context| = 410515003 |Known present| , + 408732007 |Subject relationship context| = 444148008 |Person in family of subject| } + '''.assertNoErrors + + assertNull(expression.slot) + assertFalse(expression.primitive) + + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + assertNull(focusConcept.concept.slot) + + assertConceptReference(focusConcept.concept, "243796009", "Situation with explicit context") + + val refinement = expression.expression.refinement + + assertEquals(1, refinement.groups.size) + assertTrue(refinement.attributes.empty) + + val group = refinement.groups.head + + assertNull(group.slot) + assertEquals(4, group.attributes.size) + + val attribute1 = group.attributes.get(0) + + assertNull(attribute1.slot) + assertNull(attribute1.name.slot) + + assertConceptReference(attribute1.name, "246090004", "Associated finding") + + assertTrue(attribute1.value instanceof ConceptReference) + + val conceptReference = attribute1.value as ConceptReference + + assertNull(conceptReference.id) + assertNull(conceptReference.term) + + assertTrue(conceptReference.slot instanceof ConceptIdReplacementSlot) + + val slot = conceptReference.slot as ConceptIdReplacementSlot + + assertEquals("@finding", slot.name) + + assertDescendantOfExpression(slot.constraint, "404684003", "Clinical finding") + + assertSimpleAttribute(group.attributes.get(1), "40873100", "Temporal context", "410511007", "Current or past (actual)") + assertSimpleAttribute(group.attributes.get(2), "408729009", "Finding context", "410515003", "Known present") + assertSimpleAttribute(group.attributes.get(3), "408732007", "Subject relationship context", "444148008", "Person in family of subject") + + } + + @Test + def void test_7_1_5_Information_Cardinality_1() { + + val expression = ''' + [[1..3]] [[+id (< 404684003 |Clinical finding| : [0..0] 363698007 |Finding site| = * ) @finding]]: + [[1..1]] 363698007 |Finding site| = [[+id (<< 442083009 |Anatomical or acquired body structure| ) @site ]] + '''.assertNoErrors + + assertNull(expression.slot) + assertEquals(1, expression.expression.focusConcepts.size) + + val focusConcept = expression.expression.focusConcepts.head + + assertNotNull(focusConcept.slot) + assertNull(focusConcept.slot.name) + assertEquals(1, focusConcept.slot.cardinality.min) + assertEquals(3, focusConcept.slot.cardinality.max) + + assertNull(focusConcept.concept.id) + assertNull(focusConcept.concept.term) + assertTrue(focusConcept.concept.slot instanceof ConceptIdReplacementSlot) + + val idSlot = focusConcept.concept.slot as ConceptIdReplacementSlot + + assertEquals("@finding", idSlot.name) + + assertTrue(idSlot.constraint instanceof RefinedExpressionConstraint) + val refinedConstraint = idSlot.constraint as RefinedExpressionConstraint + + assertDescendantOfExpression(refinedConstraint.constraint, "404684003", "Clinical finding") + + assertTrue(refinedConstraint.refinement instanceof AttributeConstraint) + val attributeConstraint = refinedConstraint.refinement as AttributeConstraint + + assertEquals(0, attributeConstraint.cardinality.min) + assertEquals(0, attributeConstraint.cardinality.max) + + assertTrue(attributeConstraint.attribute instanceof EclConceptReference) + assertEclConceptReference(attributeConstraint.attribute as EclConceptReference, "363698007", "Finding site") + assertTrue(attributeConstraint.comparison instanceof AttributeValueEquals) + assertTrue((attributeConstraint.comparison as AttributeValueEquals).constraint instanceof Any) + + assertEquals(1, expression.expression.refinement.attributes.size) + assertTrue(expression.expression.refinement.groups.empty) + + val attribute = expression.expression.refinement.attributes.head + + assertNotNull(attribute.slot) + assertNull(attribute.slot.name) + assertEquals(1, attribute.slot.cardinality.min) + assertEquals(1, attribute.slot.cardinality.max) + + assertNull(attribute.name.slot) + assertConceptReference(attribute.name, "363698007", "Finding site") + + assertTrue(attribute.value instanceof ConceptReference) + + val conceptReference = attribute.value as ConceptReference + + assertEquals("@site", conceptReference.slot.name) + assertTrue(conceptReference.slot instanceof ConceptIdReplacementSlot) + + assertDescendantOrSelfOfExpression((conceptReference.slot as ConceptIdReplacementSlot).constraint, "442083009", "Anatomical or acquired body structure") + + } + + @Test + def void test_7_1_5_Information_DefaultCardinality_1() { + ''' + [[+id (<< 71388002 |Procedure| )]]: + { 260686004 |Method| = [[+id (<< 129264002 |Action (qualifier value)| )]], + 405813007 |Procedure site - Direct| = [[+id (<< 442083009 |Anatomical or acquired body structure (body structure)| )]] } + '''.assertNoErrors + } + + @Test + def void test_7_1_5_Information_DefaultCardinality_2() { + + val expression = ''' + [[1..*]] [[+id (<< 71388002 |Procedure| )]]: + [[1..*]] { + [[1..*]] 260686004 |Method| = [[+id (<< 129264002 |Action (qualifier value)| )]], + [[1..*]] 405813007 |Procedure site - Direct| = [[+id (<< 442083009 |Anatomical or acquired body structure (body structure)| )]] + } + '''.assertNoErrors + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot.name) + assertEquals(1, focusConcept.slot.cardinality.min) + assertEquals(Ecl.MAX_CARDINALITY, focusConcept.slot.cardinality.max) + + assertTrue(focusConcept.concept.slot instanceof ConceptIdReplacementSlot) + + val idSlot = focusConcept.concept.slot as ConceptIdReplacementSlot + + assertNull(idSlot.name) + assertDescendantOrSelfOfExpression(idSlot.constraint, "71388002", "Procedure") + + assertEquals(1, expression.expression.refinement.groups.size) + + val group = expression.expression.refinement.groups.head + + assertNull(group.slot.name) + assertEquals(1, group.slot.cardinality.min) + assertEquals(Ecl.MAX_CARDINALITY, group.slot.cardinality.max) + + assertEquals(2, group.attributes.size) + + assertNull(group.attributes.head.slot.name) + assertEquals(1, group.attributes.head.slot.cardinality.min) + assertEquals(Ecl.MAX_CARDINALITY, group.attributes.head.slot.cardinality.max) + + assertNull(group.attributes.last.slot.name) + assertEquals(1, group.attributes.last.slot.cardinality.min) + assertEquals(Ecl.MAX_CARDINALITY, group.attributes.last.slot.cardinality.max) + + } + + @Test + def void test_7_1_5_Information_InformationSlotName_1() { + + val expression = ''' + 71388002 |Procedure| : + [[1..1 @mpGroup]] { + 260686004 |Method| = 312251004 |Computed tomography imaging action| , + 405813007 |Procedure site - Direct| = [[+id (<< 442083009 |Anatomical or acquired body structure| ) @site]] + } + '''.assertNoErrors + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot) + + assertConceptReference(focusConcept.concept, "71388002", "Procedure") + + assertEquals(1, expression.expression.refinement.groups.size) + + val group = expression.expression.refinement.groups.head + + assertEquals("@mpGroup", group.slot.name) + assertEquals(1, group.slot.cardinality.min) + assertEquals(1, group.slot.cardinality.max) + + assertEquals(2, group.attributes.size) + + assertNull(group.attributes.head.slot) + + assertSimpleAttribute(group.attributes.head, "260686004", "Method", "312251004", "Computed tomography imaging action") + + assertNull(group.attributes.last.slot) + + assertConceptReference(group.attributes.last.name, "405813007", "Procedure site - Direct") + + assertTrue(group.attributes.last.value instanceof ConceptReference) + + val reference = group.attributes.last.value as ConceptReference + + assertTrue(reference.slot instanceof ConceptIdReplacementSlot) + + val idSlot = reference.slot as ConceptIdReplacementSlot + + assertEquals("@site", idSlot.name) + assertDescendantOrSelfOfExpression(idSlot.constraint, "442083009", "Anatomical or acquired body structure") + + } + + @Test + def void test_7_1_6_Advanced_MultipleCardinalityConstraints_1() { + + val expression = ''' + [[1..1]] [[+ (< 71388002 |Procedure| ) @Procedure]] : + [[ 1..2 @SMgroup]] { + [[1..1]] 405813007 |Procedure site - direct| = [[+ (< 91723000 |Anatomical structure| ) @BodySite]], + [[1..1]] 260686004 |Method| = [[+ (< 129264002 |Action (qualifier value)| ) @Method]] + } + '''.assertNoErrors + + val focusConcept = expression.expression.focusConcepts.head + + assertNull(focusConcept.slot.name) + assertEquals(1, focusConcept.slot.cardinality.min) + assertEquals(1, focusConcept.slot.cardinality.max) + + assertTrue(focusConcept.concept.slot instanceof ExpressionReplacementSlot) + + val idSlot = focusConcept.concept.slot as ExpressionReplacementSlot + + assertEquals("@Procedure", idSlot.name) + assertDescendantOfExpression(idSlot.constraint, "71388002", "Procedure") + + assertEquals(1, expression.expression.refinement.groups.size) + + val group = expression.expression.refinement.groups.head + + assertEquals("@SMgroup", group.slot.name) + assertEquals(1, group.slot.cardinality.min) + assertEquals(2, group.slot.cardinality.max) + + assertEquals(2, group.attributes.size) + + assertNull(group.attributes.head.slot.name) + assertEquals(1, group.attributes.head.slot.cardinality.min) + assertEquals(1, group.attributes.head.slot.cardinality.max) + + assertTrue(group.attributes.head.value instanceof ConceptReference) + val firstReference = group.attributes.head.value as ConceptReference + assertTrue(firstReference.slot instanceof ExpressionReplacementSlot) + val firstExpression = firstReference.slot as ExpressionReplacementSlot + + assertEquals("@BodySite", firstExpression.name) + assertDescendantOfExpression(firstExpression.constraint, "91723000", "Anatomical structure") + + assertNull(group.attributes.last.slot.name) + assertEquals(1, group.attributes.last.slot.cardinality.min) + assertEquals(1, group.attributes.last.slot.cardinality.max) + + assertTrue(group.attributes.last.value instanceof ConceptReference) + val secondReference = group.attributes.last.value as ConceptReference + assertTrue(secondReference.slot instanceof ExpressionReplacementSlot) + val secondExpression = secondReference.slot as ExpressionReplacementSlot + + assertEquals("@Method", secondExpression.name) + assertDescendantOfExpression(secondExpression.constraint, "129264002", "Action (qualifier value)") + + } + + @Test + def void test_7_1_6_Advanced_MultipleCardinalityConstraints_2() { + ''' + [[1..1]] [[+id (<< 413350009 |Finding with explicit context|) @Condition]]: + [[ 1..2 @AFgroup ]] { + [[1..1]] 246090004 |Associated finding| = ( + [[+id (<< 404684003 |Clinical finding|) @Finding]]: + [[0..1 @SSgroup]] { + [[0..1]] 246112005 |Severity| = [[+id (< 272141005 |Severities|) @Severity]], + [[0..1]] 363698007 |Finding site| = [[+id (< 91723000 |Anatomical structure|) @Site]] + } + ), + [[1..1]] 408732007 |Subject relationship context| = [[+id (< 444148008 |Person in family of subject|) @Relationship]], + [[1..1]] 408731000 |Temporal context| = [[+id (< 410510008 |Temporal context value|) @Time]], + [[1..1]] 408729009 |Finding context| = [[+id (< 410514004 |Finding context value|) @Context]] + } + '''.assertNoErrors + } + + @Test + def void test_7_1_6_Advanced_MultipleReplacementSlots_1() { + ''' + [[+ (< 71388002 |Procedure| ) @Procedure]] : + { + 405813007 |Procedure site - direct| = [[+ (< 91723000 |Anatomical structure| ) @BodySite]], + 260686004 |Method| = [[+ (< 129264002 |Action (qualifier value)| ) @Method]] + } + '''.assertNoErrors + } + + @Test + def void test_7_1_6_Advanced_MultipleReplacementSlots_2() { + ''' + 243796009 |Situation with explicit context| : + { 246090004 |Associated finding| = [[+id (< 404684003 |Clinical finding| ) @Finding]], + 408731000 |Temporal context| = 410511007 |Current or past (actual)| , + 408729009 |Finding context| = 410515003 |Known present| , + 408732007 |Subject relationship context| = [[+id (<< 444148008 |Person in family of subject| ) @Relationship]] } + '''.assertNoErrors + } + + // IHTSDO templates + + @Test + def void test_adverse_reaction_caused_by_substance_disorder_v1_outdated() { + ''' + 281647001 |Adverse reaction (disorder)|: + [[~1..1]] { + [[~1..1]] 246075003 |Causative agent (attribute)| = [[+id(<105590001 |Substance (substance)|) @substance]] + } + '''.assertNoErrors + } + + @Test + def void test_allergic_reaction_caused_by_substance_disorder_v1_outdated() { + ''' + 281647001 |Adverse reaction (disorder)|: + [[~1..1]] { + [[~1..1]] 370135005 |Pathological process (attribute)| = 472964009 |Allergic process (qualifier value)| + }, + [[~1..1]] { + [[~1..1]] 246075003 |Causative agent (attribute)| = [[+id(<105590001 |Substance (substance)|) @substance]] + } + '''.assertNoErrors + } + + @Test + def void test_allergic_reaction_caused_by_substance_disorder_v2() { + ''' + 281647001 |Adverse reaction (disorder)|: + [[~1..1]] { + [[~1..1]] 370135005 |Pathological process (attribute)| = 472964009 |Allergic process (qualifier value)|, + [[~1..1]] 246075003 |Causative agent (attribute)| = [[+id(<105590001 |Substance (substance)|) @substance]] + } + '''.assertNoErrors + } + + @Test + def void test_allergic_disease_caused_by_substance_disorder_v1_outdated() { + ''' + 64572001 |Disease (disorder)|: + [[~1..1]] { + [[~1..1]] 370135005 |Pathological process (attribute)| = [[+id(<<472964009 |Allergic process (qualifier value)|) @pathologicalProcess]] + }, + [[~0..1]] { + [[~1..1]] 42752001 |Due to (attribute)| = 419076005 |Allergic reaction (disorder)| + }, + [[~0..1]] { + [[~1..1]] 246075003 |Causative agent (attribute)| = [[+id(<105590001 |Substance (substance)|) @substance]] + }, + [[~1..1]] { + [[~1..1]] 116676008 |Associated morphology (attribute)| = 409774005 |Inflammatory morphology (morphologic abnormality)|, + [[~1..1]] 363698007 |Finding site (attribute)| = [[+id(<<442083009 |Anatomical or acquired body structure (body structure)|) @findingSite]] + } + '''.assertNoErrors + } + + @Test + def void test_allergic_disease_caused_by_substance_disorder_v2() { + ''' + 64572001 |Disease (disorder)|: + [[~1..1]] { + [[~1..1]] 116676008 |Associated morphology (attribute)| = [[+id(<< 49755003 |Morphologically abnormal structure (morphologic abnormality)|) @morphology]], + [[~1..1]] 370135005 |Pathological process (attribute)| = [[+id(<<472964009 |Allergic process (qualifier value)|) @pathologicalProcess]], + [[~1..1]] 363698007 |Finding site (attribute)| = [[+id(<<442083009 |Anatomical or acquired body structure (body structure)|) @bodyStructure]], + [[~0..1]] 246075003 |Causative agent (attribute)| = [[+id(<105590001 |Substance (substance)|) @substance]] + } + '''.assertNoErrors + } + + @Test + def void test_allergy_to_substance_disorder_v1_outdated() { + ''' + 420134006 |Propensity to adverse reactions (disorder)|: + [[~1..1]] { + [[~1..1]] 370135005 |Pathological process (attribute)| = 472964009 |Allergic process (qualifier value)| + }, + [[~1..1]] { + [[~1..1]] 246075003 |Causative agent (attribute)| = [[+id(<105590001 |Substance (substance)|) @substance]], + [[~1..1]] 255234002 |After (attribute)| = 609327009 |Allergic sensitization (disorder)| + } + '''.assertNoErrors + } + + @Test + def void test_allergy_to_substance_finding_v2() { + ''' + 420134006 |Propensity to adverse reactions (finding)|: + [[~1..1]] { + [[~1..1]] 719722006 |Has realization (attribute)| = 472964009 |Allergic process (qualifier value)|, + [[~1..1]] 246075003 |Causative agent (attribute)| = [[+id(<105590001 |Substance (substance)|) @substance]] + } + '''.assertNoErrors + } + + @Test + def void test_cataract_disorder() { + ''' + 64572001 |Disease (disorder)|: + [[~1..2]] { + [[~0..1]] 246454002 |Occurrence (attribute)| = [[ +id ( << 282032007 |Periods of life (qualifier value)|) @occurance]], + [[~1..1]] 363698007 |Finding site (attribute)| = [[ +id( << 78076003 |Structure of lens of eye (body structure)| ) @site]], + [[~1..1]] 116676008 |Associated morphology (attribute)| = 128305008 |Abnormally opaque structure (morphologic abnormality)|, + [[~0..1]] 370135005 |Pathological process (attribute)| = [[ +id ( << 308489006 |Pathological process (qualifier value)|) @proc]], + [[~0..1]] 246075003 |Causative agent (attribute)| = [[ +id ( < 105590001 |Substance (substance)|) @causeAgent]] + }, + { + [[~0..1]] 255234002 |After (attribute)| = [[ +id ( << 404684003 |Clinical finding (finding)| OR << 71388002 |Procedure (procedure)|) @after]] + }, + { + [[~0..1]] 42752001 |Due to (attribute)| = [[ +id (<< 404684003 |Clinical finding (finding)| OR << 272379006 |Event (event)| OR << 71388002 |Procedure (procedure)|) @due]] + } + '''.assertNoErrors + } + + @Test + def void test_congenital_morphology_of_body_structure_disorder() { + ''' + 64572001 |Disease (disorder)|: + { + 246454002 |Occurrence (attribute)| = 255399007 |Congenital (qualifier value)|, + 116676008 |Associated morphology (attribute)| = [[+id(<< 49755003 |Morphologically abnormal structure (morphologic abnormality)|) @morphology]], + 363698007 |Finding site (attribute)| = [[+id(<<442083009 |Anatomical or acquired body structure (body structure)|) @findingSite]] + } + '''.assertNoErrors + } + + @Test + def void test_ct_angiography_of_body_structure_procedure() { + ''' + 71388002 |Procedure (procedure)|: + [[~1..1]] { + 260686004 |Method (attribute)| = 312251004 |Computed tomography imaging - action (qualifier value)|, + 405813007 |Procedure site - Direct (attribute)| = [[+id(<<59820001 |Blood vessel structure (body structure)|) @procSite]] + } + '''.assertNoErrors + } + + @Test + def void test_ct_arteriography_of_body_structure_procedure() { + ''' + 71388002 |Procedure (procedure)|: + [[~1..1]] { + 260686004 |Method (attribute)| = 312251004 |Computed tomography imaging - action (qualifier value)|, + 405813007 |Procedure site - Direct (attribute)| = [[+id(<<11527006 |Arterial system structure (body structure)|) @procSite]] + } + '''.assertNoErrors + } + + @Test + def void test_ct_arthrography_of_body_structure_procedure() { + ''' + 71388002 |Procedure (procedure)|: + [[~1..1]] { + 260686004 |Method (attribute)| = 312251004 |Computed tomography imaging - action (qualifier value)|, + 405813007 |Procedure site - Direct (attribute)| = [[+id(<<39352004 |Joint structure (body structure)|) @procSite]] + } + + '''.assertNoErrors + } + + @Test + def void test_ct_guided_procedure_of_body_structure_procedure() { + ''' + 71388002 |Procedure|: + [[~1..1]] { + 260686004 |Method| = 312251004 |Computed tomography imaging action|, + [[~1..1]] 405813007 |Procedure site - Direct| = [[+id(<< 442083009 |Anatomical or acquired body structure|) @procSite]], + 363703001 |Has intent| = 429892002 |Guidance intent| + }, + { + 260686004 |Method| = [[+id (<< 129264002 |Action|) @action]], + [[~1..1]] 405813007 |Procedure site - Direct| = [[+id @procSite]] + } + '''.assertNoErrors + } + + @Test + def void test_ct_of_body_structure_procedure() { + ''' + 71388002 |Procedure|: + [[~1..1]] { + 260686004 |Method| = 312251004 |Computed tomography imaging action|, + [[~1..1]] 405813007 |Procedure site - Direct| = [[+id(<< 442083009 |Anatomical or acquired body structure|) @procSite]] + } + '''.assertNoErrors + } + + @Test + def void test_ct_of_body_structure_with_contrast_procedure() { + ''' + 71388002 |Procedure (procedure)|: + [[~1..1]] { + 260686004 |Method (attribute)| = 312251004 |Computed tomography imaging - action (qualifier value)|, + 405813007 |Procedure site - Direct (attribute)| = [[+id(<<442083009 |Anatomical or acquired body structure (body structure)|) @procSite]], + 424361007 |Using substance (attribute)| = [[+id(<<385420005 |Contrast media (substance)|) @substance]] + } + '''.assertNoErrors + } + + @Test + def void test_ct_venography_of_body_structure_procedure() { + ''' + 71388002 |Procedure (procedure)|: + [[~1..1]] { + 260686004 |Method (attribute)| = 312251004 |Computed tomography imaging - action (qualifier value)|, + 405813007 |Procedure site - Direct (attribute)| = [[+id( <<119553000 |Venous system structure (body structure)|) @procSite]] + } + '''.assertNoErrors + } + + @Test + def void test_family_history_of_findingdisorder_situation() { + ''' + 243796009 |Situation with explicit context (situation)|: + { + 246090004 |Associated finding (attribute)| = [[+id(<404684003 |Clinical finding (finding)|) @finding]], + 408731000 |Temporal context (attribute)| = 410511007 |Current or past (actual) (qualifier value)|, + 408729009 |Finding context (attribute)| = 410515003 |Known present (qualifier value)|, + 408732007 |Subject relationship context (attribute)| = 444148008 |Person in family of subject (person)| + } + '''.assertNoErrors + } + + @Test + def void test_family_history_of_procedure_situation() { + ''' + 243796009 |Situation with explicit context (situation)|: + { + 363589002 |Associated procedure (attribute)| = [[+id(<71388002 |Procedure (procedure)|) @procedure]], + 408731000 |Temporal context (attribute)| = 410511007 |Current or past (actual) (qualifier value)|, + 408730004 |Procedure context (attribute)| = 385658003 |Done (qualifier value)|, + 408732007 |Subject relationship context (attribute)| = 444148008 |Person in family of subject (person)| + } + '''.assertNoErrors + } + + @Test + def void test_foreign_body_of_body_structure_disorder() { + ''' + 64572001 |Disease (disorder)|: + [[~1..1]] { + [[~0..1]] 363698007 |Finding site (attribute)| = [[ +id( < 123037004 |Body structure (body structure)| ) @site]], + [[~1..1]] 116676008 |Associated morphology (attribute)| = [[ +id( << 19227008 |Foreign body (morphologic abnormality)|) @morph]] + } + '''.assertNoErrors + } + + @Test + def void test_history_of_findingdisorder_situation() { + ''' + 243796009 |Situation with explicit context (situation)|: + { + 246090004 |Associated finding (attribute)| = [[+id(<404684003 |Clinical finding (finding)|) @finding]], + 408731000 |Temporal context (attribute)| = 410513005 |In the past (qualifier value)|, + 408729009 |Finding context (attribute)| = 410515003 |Known present (qualifier value)|, + 408732007 |Subject relationship context (attribute)| = 410604004 |Subject of record (person)| + } + '''.assertNoErrors + } + + @Test + def void test_history_of_procedure_situation() { + ''' + 243796009 |Situation with explicit context (situation)|: + { + 363589002 |Associated procedure (attribute)| = [[+id(<71388002 |Procedure (procedure)|) @procedure]], + 408731000 |Temporal context (attribute)| = [[+id(<<410513005 |In the past (qualifier value)|) @past]], + 408730004 |Procedure context (attribute)| = 385658003 |Done (qualifier value)|, + 408732007 |Subject relationship context (attribute)| = 410604004 |Subject of record (person)| + } + '''.assertNoErrors + } + + @Test + def void test_infection_caused_by_bacteria_disorder_v2() { + ''' + 64572001 |Disease (disorder)|: + [[~0..1]] { + [[~1..1]] 263502005 |Clinical course (attribute)| = [[+id(<288524001 |Courses (qualifier value)|) @course]] + }, + [[~1..1]] { + [[~1..1]] 370135005 |Pathological process (attribute)| = 441862004 |Infectious process (qualifier value)|, + [[~0..1]] 363698007 |Finding site (attribute)| = [[+id(<<442083009 |Anatomical or acquired body structure (body structure)|) @bodyStructure]], + [[~0..1]] 116676008 |Associated morphology (attribute)| = [[+id(<<49755003 |Morphologically abnormal structure (morphologic abnormality)|) @morphology]], + [[~1..1]] 246075003 |Causative agent (attribute)| = [[+id(<<409822003 |Superkingdom Bacteria (organism)|) @bacteria]], + [[~0..1]] 246454002 |Occurrence (attribute)| = [[+id(<282032007 |Periods of life (qualifier value)|) @periodsOfLife]] + } + '''.assertNoErrors + } + + @Test + def void test_infection_caused_by_fungus_disorder() { + ''' + 64572001 |Disease (disorder)|: + [[~1..1]] { + [[~0..1]] 246454002 |Occurrence (attribute)| = [[+id(<282032007 |Periods of life (qualifier value)|) @periodsOfLife]], + [[~0..1]] 363698007 |Finding site (attribute)| = [[+id(<<442083009 |Anatomical or acquired body structure (body structure)|) @bodyStructure]], + [[~0..1]] 116676008 |Associated morphology (attribute)| = [[+id(<<49755003 |Morphologically abnormal structure (morphologic abnormality)|) @morphology]], + [[~1..1]] 370135005 |Pathological process (attribute)| = 441862004 |Infectious process (qualifier value)|, + [[~1..1]] 246075003 |Causative agent (attribute)| = [[+id(<<414561005 |Kingdom Fungi (organism)|) @fungus]] + }, + [[~0..1]] { + [[~1..1]] 263502005 |Clinical course (attribute)| = [[+id(<288524001 |Courses (qualifier value)|) @course]] + } + '''.assertNoErrors + } + + @Test + def void test_infection_caused_by_virus() { + ''' + 64572001 |Disease (disorder)|: + [[~0..1]] { + [[~1..1]] 263502005 |Clinical course (attribute)| = [[+id(<288524001 |Courses (qualifier value)|) @course]] + }, + [[~1..1]] { + [[~0..1]] 246454002 |Occurrence (attribute)| = [[+id(<282032007 |Periods of life (qualifier value)|) @periodsOfLife]], + [[~1..1]] 370135005 |Pathological process (attribute)| = 441862004 |Infectious process (qualifier value)|, + [[~0..1]] 363698007 |Finding site (attribute)| = [[+id(<442083009 |Anatomical or acquired body structure (body structure)|) @bodyStructure]], + [[~1..1]] 246075003 |Causative agent (attribute)| = [[+id(<<49872002 |Virus (organism)|) @virus]], + [[~0..1]] 116676008 |Associated morphology (attribute)| = [[+id(<<49755003 |Morphologically abnormal structure (morphologic abnormality)|) @morphology]] + } + '''.assertNoErrors + } + + @Test + def void test_infection_of_body_structure_caused_by_bacteria_disorder_v1_outdated() { + ''' + 64572001 |Disease (disorder)|: + { + 370135005 |Pathological process (attribute)| = 441862004 |Infectious process (qualifier value)|, + 363698007 |Finding site (attribute)| = [[+id(<<442083009 |Anatomical or acquired body structure (body structure)|) @findingSite]], + 246075003 |Causative agent (attribute)| = [[+id(<<409822003 |Superkingdom Bacteria (organism)|) @bacteria]] + } + '''.assertNoErrors + } + + @Test + def void test_mri_of_body_structure_procedure() { + ''' + 71388002 |Procedure (procedure)|: + [[~1..1]] { + 260686004 |Method (attribute)| = 312250003 |Magnetic resonance imaging - action (qualifier value)|, + 405813007 |Procedure site - Direct (attribute)| = [[+id( <<442083009 |Anatomical or acquired body structure (body structure)|) @procSite]] + } + '''.assertNoErrors + } + + @Test + def void test_nonallergic_hypersensitivity_to_substance_disorder_v2() { + ''' + 420134006 |Propensity to adverse reactions (finding)|: + [[~1..1]] { + [[~1..1]] 719722006 |Has realization (attribute)| = 609404002 |Non-allergic hypersensitivity process (qualifier value)|, + [[~1..1]] 246075003 |Causative agent (attribute)| = [[+id(<105590001 |Substance (substance)|) @substance]] + } + '''.assertNoErrors + } + + @Test + def void test_parasitic_disease_disorder() { + ''' + 64572001 |Disease (disorder)|: + [[~1..1]] { + [[~1..1]] 370135005 |Pathological process (attribute)| = 442614005 |Parasitic process (qualifier value)|, + [[~0..1]] 246075003 |Causative agent (attribute)| = [[+id(<410607006 |Organism (organism)|) @organism]], + [[~0..1]] 116676008 |Associated morphology (attribute)| = [[+id(<49755003 |Morphologically abnormal structure (morphologic abnormality)|) @associatedMorphology]], + [[~0..1]] 363698007 |Finding site (attribute)| = [[+id(<442083009 |Anatomical or acquired body structure (body structure)|) @bodyStructure]], + [[~0..1]] 246454002 |Occurrence (attribute)| = [[+id(<282032007 |Periods of life (qualifier value)|) @occurrence]] + }, + { + [[~0..1]] 263502005 |Clinical course (attribute)| = [[+id(<288524001 |Courses (qualifier value)|) @clinicalCourse]] + } + '''.assertNoErrors + } + + @Test + def void test_superficial_bite_wound_of_site_without_infection_disorder() { + ''' + 25358000 |Superficial injury without infection (disorder)|: + [[~1..1]] { + [[~1..1]] 116676008 |Associated morphology (attribute)| = [[+id(<<37205004 |Superficial wound (morphologic abnormality)|) @associatedMorphology]], + [[~0..1]] 363698007 |Finding site (attribute)| = [[+id(<91723000 |Anatomical structure (body structure)|) @site]] + }, + { + [[~1..1]] 42752001 |Due to (attribute)| = [[+id(<<782161000 |Bite (event)|) @biteEvent]] + } + '''.assertNoErrors + } + + @Test + def void test_ultrasonography_of_body_structure_procedure() { + ''' + 71388002 |Procedure (procedure)|: + [[~1..1]] { + 260686004 |Method (attribute)| = 278292003 |Ultrasound imaging - action (qualifier value)|, + 405813007 |Procedure site - Direct (attribute)| = [[+id(<<442083009 |Anatomical or acquired body structure (body structure)|) @procSite]] + } + '''.assertNoErrors + } + + @Test + def void test_clinical_course_contact_dermatitis_of_body_structure_caused_by_substance_disorder_v2() { + ''' + 64572001 |Disease (disorder)|: + [[~0..1]] { + [[~1..1]] 263502005 |Clinical course (attribute)| = [[+id(<288524001 |Courses (qualifier value)|) @clinicalCourse]] + }, + [[~1..*]] { + [[~0..1]] 246075003 |Causative agent (attribute)| = [[+id(<105590001 |Substance (substance)|) @substance]], + [[~1..1]] 116676008 |Associated morphology (attribute)| = 409774005 |Inflammatory morphology (morphologic abnormality)|, + [[~1..1]] 370135005 |Pathological process (attribute)| = 769258001 |Contact hypersensitivity process (qualifier value)|, + [[~0..1]] 363698007 |Finding site (attribute)| = [[+id(<<442083009 |Anatomical or acquired body structure (body structure)|) @bodyStructure]] + } + '''.assertNoErrors + } + + @Test + def void test_clinical_course_contact_dermatitis_of_body_structure_caused_by_substance_v1__outdated() { + ''' + 40275004 |Contact dermatitis (disorder)|: + [[~0..1]] { + [[~1..1]] 263502005 |Clinical course (attribute)| = [[+id(<288524001 |Courses (qualifier value)|) @clinicalCourse]] + }, + [[~0..1]] { + [[~1..1]] 246075003 |Causative agent (attribute)| = [[+id(<105590001 |Substance (substance)|) @substance]] + }, + [[~1..*]] { + [[~1..1]] 116676008 |Associated morphology (attribute)| = 23583003 |Inflammation (morphologic abnormality)|, + [[~1..1]] 370135005 |Pathological process (attribute)| = [[+id(<<472963003 |Hypersensitivity process (qualifier value)|) @pathologicalProcess]], + [[~1..1]] 363698007 |Finding site (attribute)| = [[+id(<<442083009 |Anatomical or acquired body structure (body structure)|) @bodyStructure]] + } + '''.assertNoErrors + } + + @Test + def void test_course_periods_of_life_morphology_of_body_structure_disorder() { + ''' + 64572001 |Disease (disorder)|: + [[~0..1]] 263502005 |Clinical course (attribute)| = [[+id(< 288524001 |Courses (qualifier value)|) @course]], + { + [[~0..1]] 246454002 |Occurrence (attribute)| = [[+id(< 282032007 |Periods of life (qualifier value)|) @periodsOfLife]], + 370135005 |Pathological process (attribute)| = [[+id(<< 441862004 |Infectious process (qualifier value)|) @infectiousProcess]], + [[~0..1]] 363698007 |Finding site (attribute)| = [[+id(<< 442083009 |Anatomical or acquired body structure (body structure)|) @bodyStructure]], + [[~0..1]] 246075003 |Causative agent (attribute)| = [[+id(<< 410607006 |Organism (organism)|) @organism]], + [[~0..1]] 116676008 |Associated morphology (attribute)| = [[+id(<< 49755003 |Morphologically abnormal structure (morphologic abnormality)|) @morphology]] + } + '''.assertNoErrors + } + + @Test + def void test_fracture_morphology_of_bone_structure_disorder() { + ''' + 64572001 |Disease (disorder)|: + [[~1..*]] { + [[~1..1]] 116676008 |Associated morphology (attribute)| = [[+id(<<72704001 |Fracture (morphologic abnormality)|) @fractureMorphology]], + [[~1..1]] 363698007 |Finding site (attribute)| = [[+id(<<272673000 |Bone structure (body structure)|) @boneStructure]], + [[~0..1]] 246454002 |Occurrence (attribute)| = [[+id(<<282032007 |Periods of life (qualifier value)|) @periodsOfLife]] + } + '''.assertNoErrors + } + + @Test + def void test_substance_pseudoallergy_disorder_v1__outdated() { + ''' + 420134006 |Propensity to adverse reactions (disorder)|: + [[~1..1]] { + [[~1..1]] 370135005 |Pathological process (attribute)| = 609404002 |Non-allergic hypersensitivity process (qualifier value)| + }, + [[~1..1]] { + [[~1..1]] 246075003 |Causative agent (attribute)| = [[+id(<105590001 |Substance (substance)|) @substance]], + [[~1..1]] 255234002 |After (attribute)| = 609406000 |Pseudoallergic reaction (disorder)| + } + '''.assertNoErrors + } + + @Test + def void test_wound_morphology_of_body_structure_due_to_event_disorder() { + ''' + 64572001 |Disease (disorder)|: + [[~0..1]] 42752001 |Due to (attribute)| = [[+id(<< 272379006 |Event (event)|) @event]], + { + 116676008 |Associated morphology (attribute)| = [[+id(<< 13924000 |Wound (morphologic abnormality)|) @woundMorphology]], + [[~0..1]] 363698007 |Finding site (attribute)| = [[+id(<< 123037004 |Body structure (body structure)|) @bodyStructure]], + [[~0..1]] 246075003 |Causative agent (attribute)| = [[+id(<< 260787004 |Physical object (physical object)| OR << 78621006 |Physical force (physical force)| OR << 105590001 |Substance (substance)|) @physicalObject]], + [[~0..1]] 370135005 |Pathological process (attribute)| = [[+id(<< 441862004 |Infectious process (qualifier value)|)@infectiousProcess]] + } + '''.assertNoErrors + } + + def private void assertConceptReference(ConceptReference reference, String id, String term) { + assertEquals(id, reference.id) + assertEquals('|' + term + '|', reference.term) + } + + def private void assertEclConceptReference(EclConceptReference reference, String id, String term) { + assertEquals(id, reference.id) + assertEquals('|' + term + '|', reference.term) + } + + def private void assertSimpleAttribute(Attribute attribute, String nameId, String nameTerm, String valueId, String valueTerm) { + assertConceptReference(attribute.name, nameId, nameTerm) + assertTrue(attribute.value instanceof ConceptReference) + assertConceptReference((attribute.value as ConceptReference), valueId, valueTerm) + } + + def private void assertDescendantOfExpression(ExpressionConstraint constraint, String id, String term) { + assertTrue(constraint instanceof DescendantOf) + val descendantOf = constraint as DescendantOf + assertTrue(descendantOf.constraint instanceof EclConceptReference) + val reference = descendantOf.constraint as EclConceptReference + assertEquals(id, reference.id) + assertEquals('|' + term + '|', reference.term) + } + + def private void assertDescendantOrSelfOfExpression(ExpressionConstraint constraint, String id, String term) { + assertTrue(constraint instanceof DescendantOrSelfOf) + val descendantOrSelfOf = constraint as DescendantOrSelfOf + assertTrue(descendantOrSelfOf.constraint instanceof EclConceptReference) + val reference = descendantOrSelfOf.constraint as EclConceptReference + assertEquals(id, reference.id) + assertEquals('|' + term + '|', reference.term) + } + + private def ExpressionTemplate assertNoErrors(CharSequence it) throws Exception { + val template = parse; + assertNotNull('''Cannot parse expression: «it».''', template); + template.assertNoErrors; + return template + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.etl.tests/xtend-gen/.gitignore b/snomed/com.b2international.snowowl.snomed.etl.tests/xtend-gen/.gitignore new file mode 100644 index 00000000000..02b6653cb30 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl.tests/xtend-gen/.gitignore @@ -0,0 +1,5 @@ +#This file is needed to prevent git from omitting this folder that would cause build issues/compile errors. +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/snomed/com.b2international.snowowl.snomed.dsl/.classpath b/snomed/com.b2international.snowowl.snomed.etl/.classpath similarity index 91% rename from snomed/com.b2international.snowowl.snomed.dsl/.classpath rename to snomed/com.b2international.snowowl.snomed.etl/.classpath index 8f1dba04e60..dd9974e1e33 100644 --- a/snomed/com.b2international.snowowl.snomed.dsl/.classpath +++ b/snomed/com.b2international.snowowl.snomed.etl/.classpath @@ -7,5 +7,6 @@ + diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/.project b/snomed/com.b2international.snowowl.snomed.etl/.project similarity index 77% rename from snomed/com.b2international.snowowl.snomed.semanticengine/.project rename to snomed/com.b2international.snowowl.snomed.etl/.project index 1cd099e9511..a0fbfa0a466 100644 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/.project +++ b/snomed/com.b2international.snowowl.snomed.etl/.project @@ -1,10 +1,15 @@ - com.b2international.snowowl.snomed.semanticengine + com.b2international.snowowl.snomed.etl + + org.eclipse.xtext.ui.shared.xtextBuilder + + + org.eclipse.jdt.core.javabuilder @@ -28,7 +33,8 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature diff --git a/snomed/com.b2international.snowowl.snomed.etl/ETL_v1.0_ABNF_syntax_20170721.txt b/snomed/com.b2international.snowowl.snomed.etl/ETL_v1.0_ABNF_syntax_20170721.txt new file mode 100644 index 00000000000..bc0ae3075aa --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/ETL_v1.0_ABNF_syntax_20170721.txt @@ -0,0 +1,142 @@ +; Compositional Grammar v2.3.1 with slot references (in blue) +expressionTemplate = ws [ (definitionStatus / tokenReplacementSlot) ws] subExpression ws +subExpression = focusConcept [ws ":" ws refinement] +definitionStatus = equivalentTo / subtypeOf +equivalentTo = "===" +subtypeOf = "<<<" +focusConcept = [templateInformationSlot ws] conceptReference *(ws "+" ws [templateInformationSlot ws] conceptReference) +conceptReference = conceptReplacementSlot / expressionReplacementSlot / ( conceptId [ws "|" ws term ws "|"] ) +conceptId = sctId +term = nonwsNonPipe *( *SP nonwsNonPipe ) +refinement = (attributeSet / attributeGroup) *( ws ["," ws] attributeGroup ) +attributeGroup = [ templateInformationSlot ws ] "{" ws attributeSet ws "}" +attributeSet = attribute *(ws "," ws attribute) +attribute = [ templateInformationSlot ws ] attributeName ws "=" ws attributeValue +attributeName = conceptReference +attributeValue = expressionValue / QM stringValue QM / "#" numericValue / concreteValueReplacementSlot +expressionValue = conceptReference / "(" ws subExpression ws ")" +stringValue = 1*(anyNonEscapedChar / escapedChar) +numericValue = ["-"/"+"] (decimalValue / integerValue) +integerValue = digitNonZero *digit / zero +decimalValue = integerValue "." 1*digit +sctId = digitNonZero 5*17( digit ) +ws = *( SP / HTAB / CR / LF ) ; optional white space +SP = %x20 ; space +HTAB = %x09 ; tab +CR = %x0D ; carriage return +LF = %x0A ; line feed +QM = %x22 ; quotation mark +BS = %x5C ; back slash +digit = %x30-39 +zero = %x30 +digitNonZero = %x31-39 +nonwsNonPipe = %x21-7B / %x7D-7E / UTF8-2 / UTF8-3 / UTF8-4 +anyNonEscapedChar = HTAB / CR / LF / %x20-21 / %x23-5B / %x5D-7E / UTF8-2 / UTF8-3 / UTF8-4 +escapedChar = BS QM / BS BS +UTF8-2 = %xC2-DF UTF8-tail +UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail ) +UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / %xF4 %x80-8F 2( UTF8-tail ) +UTF8-tail = %x80-BF +; Template Syntax v1 +templateSlot = templateReplacementSlot / templateInformationSlot +templateReplacementSlot = conceptReplacementSlot / expressionReplacementSlot / tokenReplacementSlot / concreteValueReplacementSlot +conceptReplacementSlot = "[[" ws "+" ws "id" ws [ "(" ws expressionConstraint ws ")" ws] [slotName ws] "]]" +expressionReplacementSlot = "[[" ws "+" ws ["scg" ws] [ "(" ws expressionConstraint ws ")" ws] [slotName ws] "]]" +tokenReplacementSlot = "[[" ws "+" ws "tok" ws [ "(" ws slotTokenSet ws ")" ws] [slotName ws] "]]" +concreteValueReplacementSlot = stringReplacementSlot / integerReplacementSlot / decimalReplacementSlot +stringReplacementSlot = "[[" ws "+" ws "str" ws [ "(" ws slotStringSet ws ")" ws] [slotName ws] "]]" +integerReplacementSlot = "[[" ws "+" ws "int" ws [ "(" ws slotIntegerSet ws ")" ws] [slotName ws] "]]" +decimalReplacementSlot = "[[" ws "+" ws "dec" ws [ "(" ws slotDecimalSet ws ")" ws] [slotName ws] "]]" +slotTokenSet = slotToken *(mws slotToken) +slotStringSet = slotString *(mws slotString) +slotIntegerSet = ( "#" integerValue / slotIntegerRange) *(mws ("#" integerValue / slotIntegerRange)) +slotDecimalSet = ( "#" decimalValue / slotDecimalRange) *(mws ("#" decimalValue / slotDecimalRange)) +slotIntegerRange = ( slotIntegerMinimum to [ slotIntegerMaximum ] ) / ( to slotIntegerMaximum ) +slotIntegerMinimum = [ exclusiveMinimum ] "#" integerValue +slotIntegerMaximum = [ exclusiveMaximum ] "#" integerValue +slotDecimalRange = ( slotDecimalMinimum to [ slotDecimalMaximum ] ) / ( to slotDecimalMaximum ) +slotDecimalMinimum = [ exclusiveMinimum ] "#" DecimalValue +slotDecimalMaximum = [ exclusiveMaximum ] "#" DecimalValue +exclusiveMinimum = ">" +exclusiveMaximum = "<" +slotName = "@" (nonQuoteStringValue / slotString) +slotToken = definitionStatus / memberOf / constraintOperator / conjunction / disjunction / exclusion / reverseFlag / expressionComparisonOperator / numericComparisonOperator / stringComparisonOperator +slotString = QM stringValue QM +nonQuoteStringValue = *(%x21 / %x23-26 / %x28-3F / %x41-5A / %x5C / %x5E-7E) ; string with no ws, quotes, at or square brackets +templateInformationSlot = "[[" ws slotInformation ws "]]" +slotInformation = [cardinality ws] [slotName ws] +; Expression Constraint Language v1.3 - Note that some rules are commented out because they are repeated in the Compositional Grammar rules above. +expressionConstraint = ws ( refinedExpressionConstraint / compoundExpressionConstraint / dottedExpressionConstraint / subExpressionConstraint ) ws +refinedExpressionConstraint = subExpressionConstraint ws ":" ws eclRefinement +compoundExpressionConstraint = conjunctionExpressionConstraint / disjunctionExpressionConstraint / exclusionExpressionConstraint +conjunctionExpressionConstraint = subExpressionConstraint 1*(ws conjunction ws subExpressionConstraint) +disjunctionExpressionConstraint = subExpressionConstraint 1*(ws disjunction ws subExpressionConstraint) +exclusionExpressionConstraint = subExpressionConstraint ws exclusion ws subExpressionConstraint +dottedExpressionConstraint = subExpressionConstraint 1*(ws dottedExpressionAttribute) +dottedExpressionAttribute = dot ws eclAttributeName +subExpressionConstraint = [constraintOperator ws] [memberOf ws] (eclFocusConcept / "(" ws expressionConstraint ws ")") +eclFocusConcept = eclConceptReference / wildCard +dot = "." +memberOf = "^" +eclConceptReference = conceptId [ws "|" ws term ws "|"] +; conceptId = sctId +; term = 1*nonwsNonPipe *( 1*SP 1*nonwsNonPipe ) +wildCard = "*" +constraintOperator = childOf / descendantOrSelfOf / descendantOf / parentOf / ancestorOrSelfOf / ancestorOf +descendantOf = "<" +descendantOrSelfOf = "<<" +childOf = "" +ancestorOrSelfOf = ">>" +parentOf = ">!" +conjunction = (("a"/"A") ("n"/"N") ("d"/"D") mws) / "," +disjunction = ("o"/"O") ("r"/"R") mws +exclusion = ("m"/"M") ("i"/"I") ("n"/"N") ("u"/"U") ("s"/"S") mws +eclRefinement = subRefinement ws [conjunctionRefinementSet / disjunctionRefinementSet] +conjunctionRefinementSet = 1*(ws conjunction ws subRefinement) +disjunctionRefinementSet = 1*(ws disjunction ws subRefinement) +subRefinement = eclAttributeSet / eclAttributeGroup / "(" ws eclRefinement ws ")" +eclAttributeSet = subAttributeSet ws [conjunctionAttributeSet / disjunctionAttributeSet] +conjunctionAttributeSet = 1*(ws conjunction ws subAttributeSet) +disjunctionAttributeSet = 1*(ws disjunction ws subAttributeSet) +subAttributeSet = eclAttribute / "(" ws eclAttributeSet ws ")" +eclAttributeGroup = ["[" cardinality "]" ws] "{" ws eclAttributeSet ws "}" +eclAttribute = ["[" cardinality "]" ws] [reverseFlag ws] eclAttributeName ws (expressionComparisonOperator ws subExpressionConstraint / numericComparisonOperator ws "#" numericValue / stringComparisonOperator ws QM stringValue QM) +cardinality = minValue to maxValue +minValue = nonNegativeIntegerValue +to = ".." +maxValue = nonNegativeIntegerValue / many +many = "*" +reverseFlag = "R" +eclAttributeName = subExpressionConstraint +expressionComparisonOperator = "=" / "!=" +numericComparisonOperator = "=" / "!=" / "<=" / "<" / ">=" / ">" +stringComparisonOperator = "=" / "!=" +; numericValue = ["-"/"+"] (decimalValue / integerValue) +; stringValue = 1*(anyNonEscapedChar / escapedChar) +; integerValue = digitNonZero *digit / zero +; decimalValue = integerValue "." 1*digit +nonNegativeIntegerValue = (digitNonZero *digit ) / zero +; sctId = digitNonZero 5*17( digit ) +; ws = *( SP / HTAB / CR / LF / comment ) ; optional white space +mws = 1*( SP / HTAB / CR / LF / comment ) ; mandatory white space +comment = "/*" *(nonStarChar / starWithNonFSlash) "*/" +nonStarChar = SP / HTAB / CR / LF / %x21-29 / %x2B-7E /UTF8-2 / UTF8-3 / UTF8-4 +starWithNonFSlash = %x2A nonFSlash +nonFSlash = SP / HTAB / CR / LF / %x21-2E / %x30-7E /UTF8-2 / UTF8-3 / UTF8-4 +; SP = %x20 ; space +; HTAB = %x09 ; tab +; CR = %x0D ; carriage return +; LF = %x0A ; line feed +; QM = %x22 ; quotation mark +; BS = %x5C ; back slash +; digit = %x30-39 +; zero = %x30 +; digitNonZero = %x31-39 +; nonwsNonPipe = %x21-7B / %x7D-7E / UTF8-2 / UTF8-3 / UTF8-4 +; anyNonEscapedChar = SP / HTAB / CR / LF / %x20-21 / %x23-5B / %x5D-7E / UTF8-2 / UTF8-3 / UTF8-4 +; escapedChar = BS QM / BS BS +; UTF8-2 = %xC2-DF UTF8-tail +; UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail ) +; UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / %xF4 %x80-8F 2( UTF8-tail ) +; UTF8-tail = %x80-BF diff --git a/snomed/com.b2international.snowowl.snomed.etl/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.etl/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..0b5cdf8c5be --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/META-INF/MANIFEST.MF @@ -0,0 +1,30 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: SNOMED CT Expression Template Language +Bundle-Vendor: B2i Healthcare +Bundle-Version: 7.4.0.qualifier +Bundle-SymbolicName: com.b2international.snowowl.snomed.etl;singleton:=true +Bundle-ActivationPolicy: lazy +Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0", + org.eclipse.emf.ecore, + org.antlr.runtime, + org.eclipse.emf.common, + com.b2international.snowowl.snomed.ecl;visibility:=reexport +Bundle-RequiredExecutionEnvironment: JavaSE-11 +Import-Package: org.apache.log4j, + org.slf4j;version="1.7.25" +Export-Package: com.b2international.snowowl.snomed.etl, + com.b2international.snowowl.snomed.etl, + com.b2international.snowowl.snomed.etl.etl, + com.b2international.snowowl.snomed.etl.etl.impl, + com.b2international.snowowl.snomed.etl.etl.util, + com.b2international.snowowl.snomed.etl.generator, + com.b2international.snowowl.snomed.etl.parser.antlr, + com.b2international.snowowl.snomed.etl.parser.antlr.internal, + com.b2international.snowowl.snomed.etl.parser.antlr.lexer, + com.b2international.snowowl.snomed.etl.scoping, + com.b2international.snowowl.snomed.etl.scoping, + com.b2international.snowowl.snomed.etl.serializer, + com.b2international.snowowl.snomed.etl.services, + com.b2international.snowowl.snomed.etl.validation, + com.b2international.snowowl.snomed.etl.validation diff --git a/snomed/com.b2international.snowowl.snomed.etl/build.properties b/snomed/com.b2international.snowowl.snomed.etl/build.properties new file mode 100644 index 00000000000..ff867272fca --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/build.properties @@ -0,0 +1,18 @@ +source.. = src/,\ + src-gen/ +output.. = target/classes/ +bin.includes = .,\ + META-INF/,\ + plugin.xml +bin.excludes = **/*.mwe2 +additional.bundles = org.eclipse.xtext.xbase,\ + org.eclipse.xtext.common.types,\ + org.eclipse.xtext.xtext.generator,\ + org.eclipse.emf.codegen.ecore,\ + org.eclipse.emf.mwe.utils,\ + org.eclipse.emf.mwe2.launch,\ + org.eclipse.emf.mwe2.lib,\ + org.objectweb.asm,\ + org.apache.commons.logging,\ + org.apache.log4j,\ + com.ibm.icu diff --git a/snomed/com.b2international.snowowl.snomed.etl/model/generated/Etl.ecore b/snomed/com.b2international.snowowl.snomed.etl/model/generated/Etl.ecore new file mode 100644 index 00000000000..acab6b51770 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/model/generated/Etl.ecore @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/snomed/com.b2international.snowowl.snomed.etl/model/generated/Etl.genmodel b/snomed/com.b2international.snowowl.snomed.etl/model/generated/Etl.genmodel new file mode 100644 index 00000000000..298f0f9ac58 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/model/generated/Etl.genmodel @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/snomed/com.b2international.snowowl.snomed.etl/plugin.xml b/snomed/com.b2international.snowowl.snomed.etl/plugin.xml new file mode 100644 index 00000000000..2edb2befa21 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/plugin.xml @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/snomed/com.b2international.snowowl.snomed.etl/pom.xml b/snomed/com.b2international.snowowl.snomed.etl/pom.xml new file mode 100644 index 00000000000..27f07d39a0c --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/pom.xml @@ -0,0 +1,17 @@ + + + 4.0.0 + + com.b2international.snowowl.snomed.etl + eclipse-plugin + + + com.b2international.snowowl + snomed-parent + 7.4.0-SNAPSHOT + + + diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/AbstractEtlRuntimeModule.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/AbstractEtlRuntimeModule.java new file mode 100644 index 00000000000..0c47dfac4d0 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/AbstractEtlRuntimeModule.java @@ -0,0 +1,226 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl; + +import com.b2international.snowowl.snomed.etl.generator.EtlGenerator; +import com.b2international.snowowl.snomed.etl.parser.antlr.EtlAntlrTokenFileProvider; +import com.b2international.snowowl.snomed.etl.parser.antlr.EtlParser; +import com.b2international.snowowl.snomed.etl.parser.antlr.lexer.InternalEtlLexer; +import com.b2international.snowowl.snomed.etl.scoping.EtlScopeProvider; +import com.b2international.snowowl.snomed.etl.serializer.EtlSemanticSequencer; +import com.b2international.snowowl.snomed.etl.serializer.EtlSyntacticSequencer; +import com.b2international.snowowl.snomed.etl.services.EtlGrammarAccess; +import com.b2international.snowowl.snomed.etl.validation.EtlValidator; +import com.google.inject.Binder; +import com.google.inject.Provider; +import com.google.inject.name.Names; +import java.util.Properties; +import org.eclipse.xtext.Constants; +import org.eclipse.xtext.IGrammarAccess; +import org.eclipse.xtext.conversion.impl.AbstractIDValueConverter; +import org.eclipse.xtext.conversion.impl.IgnoreCaseIDValueConverter; +import org.eclipse.xtext.generator.IGenerator2; +import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; +import org.eclipse.xtext.naming.IQualifiedNameProvider; +import org.eclipse.xtext.parser.IParser; +import org.eclipse.xtext.parser.ITokenToStringConverter; +import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider; +import org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter; +import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; +import org.eclipse.xtext.parser.antlr.ITokenDefProvider; +import org.eclipse.xtext.parser.antlr.Lexer; +import org.eclipse.xtext.parser.antlr.LexerBindings; +import org.eclipse.xtext.parser.antlr.LexerProvider; +import org.eclipse.xtext.parsetree.reconstr.ITokenSerializer; +import org.eclipse.xtext.parsetree.reconstr.impl.IgnoreCaseKeywordSerializer; +import org.eclipse.xtext.resource.IContainer; +import org.eclipse.xtext.resource.IResourceDescriptions; +import org.eclipse.xtext.resource.containers.IAllContainersState; +import org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider; +import org.eclipse.xtext.resource.containers.StateBasedContainerManager; +import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider; +import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions; +import org.eclipse.xtext.scoping.IGlobalScopeProvider; +import org.eclipse.xtext.scoping.IScopeProvider; +import org.eclipse.xtext.scoping.IgnoreCaseLinking; +import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; +import org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider; +import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider; +import org.eclipse.xtext.serializer.ISerializer; +import org.eclipse.xtext.serializer.impl.Serializer; +import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer; +import org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer; +import org.eclipse.xtext.serializer.tokens.IKeywordSerializer; +import org.eclipse.xtext.service.DefaultRuntimeModule; +import org.eclipse.xtext.service.SingletonBinding; + +/** + * Manual modifications go to {@link EtlRuntimeModule}. + */ +@SuppressWarnings("all") +public abstract class AbstractEtlRuntimeModule extends DefaultRuntimeModule { + + protected Properties properties = null; + + @Override + public void configure(Binder binder) { + properties = tryBindProperties(binder, "com/b2international/snowowl/snomed/etl/Etl.properties"); + super.configure(binder); + } + + public void configureLanguageName(Binder binder) { + binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("com.b2international.snowowl.snomed.etl.Etl"); + } + + public void configureFileExtensions(Binder binder) { + if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null) + binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("etl"); + } + + // contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2 + public ClassLoader bindClassLoaderToInstance() { + return getClass().getClassLoader(); + } + + // contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2 + public Class bindIGrammarAccess() { + return EtlGrammarAccess.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISemanticSequencer() { + return EtlSemanticSequencer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISyntacticSequencer() { + return EtlSyntacticSequencer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISerializer() { + return Serializer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIParser() { + return EtlParser.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindITokenToStringConverter() { + return AntlrTokenToStringConverter.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIAntlrTokenFileProvider() { + return EtlAntlrTokenFileProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindLexer() { + return InternalEtlLexer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindITokenDefProvider() { + return AntlrTokenDefProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Provider provideInternalEtlLexer() { + return LexerProvider.create(InternalEtlLexer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public void configureRuntimeLexer(Binder binder) { + binder.bind(Lexer.class) + .annotatedWith(Names.named(LexerBindings.RUNTIME)) + .to(InternalEtlLexer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindITokenSerializer$IKeywordSerializer() { + return IgnoreCaseKeywordSerializer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIKeywordSerializer() { + return org.eclipse.xtext.serializer.tokens.IgnoreCaseKeywordSerializer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindAbstractIDValueConverter() { + return IgnoreCaseIDValueConverter.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2 + @SingletonBinding(eager=true) + public Class bindEtlValidator() { + return EtlValidator.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public Class bindIScopeProvider() { + return EtlScopeProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public void configureIScopeProviderDelegate(Binder binder) { + binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(ImportedNamespaceAwareLocalScopeProvider.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public Class bindIGlobalScopeProvider() { + return DefaultGlobalScopeProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public void configureIgnoreCaseLinking(Binder binder) { + binder.bindConstant().annotatedWith(IgnoreCaseLinking.class).to(false); + } + + // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 + public Class bindIQualifiedNameProvider() { + return DefaultDeclarativeQualifiedNameProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public Class bindIContainer$Manager() { + return StateBasedContainerManager.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public Class bindIAllContainersState$Provider() { + return ResourceSetBasedAllContainersStateProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public void configureIResourceDescriptions(Binder binder) { + binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public void configureIResourceDescriptionsPersisted(Binder binder) { + binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 + public Class bindIGenerator2() { + return EtlGenerator.class; + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/Etl.xtextbin b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/Etl.xtextbin new file mode 100644 index 0000000000000000000000000000000000000000..ef978880d6c07fc8964124a45cdded86ac3e5e89 GIT binary patch literal 14786 zcmb7L2Y4LC+4kJrotou>Trn6-#|9sm4mRGI*|QL+7)izy8*!Fa@`0o?r;`hWmW0q- z=)EMAkOG7dT0(#jO6Z{n0zV}Q0YVZ&67mDd|Gu+(dwZvIp8R?q*u9|^ zX4YqTL;dxQo7Rt$LTt6VP*}5XDz$Fiy7^x3V0O)jH$RsjNG;f9m%USm7QFR^|3V~| z61C0w%+OFKA4?2phP-*bxuN;17G#GDUVb=J$mWJKgY!p*bL(>J>~+ZNo9`6{=cfyU zvT=08>kG6;Vlg3N|CM$xw0j5RQ~JFA?65a-K(?>X8}7~>;|-69MC0nn&$tw^#%?b^ zlm&~<(LvAWD3^E1L}9}kFD_(lH?Eytf2@AUD`bXpecoU~#HZkim-mKyy}q{M<5-=y zG}C)bX246vw%bVT5MIV_K`Pyw%X|N=SW48T1L$$FSV|@{gW1eT(j$hD4ZVYzk&$eF z*2~w#V)bb^Q^=6?xLAEEmF_C!v%>=--k2E-BEHresYM)A};lfCwP9$p& z@;0o?<@*xJwVAMfu~dY+*xeZV7pYNF?M;lCBq<@~9_7;uphnYyadJUqNK}r0< z7$AeORNSUa9JWNFCYi?o9dR;SiiU=znf!>CFOArmuHJlhO~D_va}ciCa;uoENgEE0 zak4Iz@&zi!!PbbU+(wMAQN7H>gdOzT`szY#CmI_RM%KVEhel;&YWuxRVKnbG^yY>~ z3i%8&I$4)n!yx4Hu|+ju$8Iks)RC#l3=Sp|bYch55SyA_zb5YiJvVGZ0J)>JJvS!D z$>|upRYXL5o|ur>2?*0W^3??7&OU~S&!=}ONbdsa8EUw%s`#!&@dXs$4dS~)e0F+$ z@8BreRaM%fsI(`Q_JY#hP}&T$0%n}*cJ?W%>`RsXpt2Auv)o((gQlvHMMaJMsj(Ou zjzdqnMpsppcT`cq(HQczj-iSRm0GhpJJ{FJFP*d%ah5Q`m>z=XBJMQPhI0TlT9AIp z*6yBkn{*C@yiIB6Ag0~IIY%285z<-; zS_$W1igrS@uFV@-<>kq%%jeZiUJa>Ku>r)ESz?D!XE})()tT;=&Y>Z(!M`ZSEYu`(cXlqHgZ4Vmpr(&tq~?FH)OE}OJ1 zc+V8&=8mFJK18`u1+tS?9-P7LDet5dGLprNN!K|1#(X7U-(u+Bh5f5Zi-tbH-a0w z2>jCscRG3|u7)>A=M2Eimd=^%-()Iqg-bk-E+?N?HFh_6leY%-GO-!Ytjqv9d8_w@g z_g1ixtw_@Eh9tg65)0|a_p2o752)2{2{^a${&rYziWtaud4v7raEH&~hvYD|j6)y- zCU;sUKO)XuU{d4i)*iC?ameOwu#pQboqMX#xi>=RKHlFCI(2yGBE3oCCq9Xvk_0BJ zVgpP+U`_vwIuF8hve}AO-}HIBMIM`D zAZ+wCiuLT+l}b%yr6QdFp^>-2HSTtR=sO|NcNwzz4B30&S)VCjF}-TEfCWBg|KC!} zK_lCLM{HNiK^9k8ZvTwIiEBfoN)cX{AjUD+?gLM8D zs6piKwoCs(!Ov&_YpJN@KTDGTYb8IYTt!C2m4wZNiuHwhM-+H=FULdmZ6T2Sx~ zczLNNTXnTbEH*AygWf;`EH?2ytENB`FL1>=N2+Q3H6YYrJ4~unCXkba1#Fs zwJCn9Ss*IAJEYnyH3l*9UpH#|(C7{f%1ZLWpW4yymAbsQ)yVpWan^tlP(ka)VxGxGd_d7BB)1 zqlds5D*~Lut#d~ZM+vn8)cySrn=&i;_(;Il2D(!9SdZ0FOk}JA(m?}|GIk`aLL3r> z{HP~XFK(0l=zlNBBYNIPNDq+HqIAM=OV#g_9w6x%<)lL?SX*s*XNlG-)Y0XO2F0k815eXPtV+|ck6a*+=ZioeiDqv951Z#ISYU6|5 zAhp)UV;$7vYCQ+;RzhtkPHM+l)Z_Vhg-~A+lj@eER^?U>VswJ2OQ;jA`bmMr$vyxh zcuH`qY;mA$aj?BmUoS$RYN2gu0O-@iBKnT( z7{p^mVCr%kGXDK}oER>7tSAp3V%FVtQG0TENy$rLn zsv#Bw!y*F{{i`&NvS8z)pzxZdz-mLi&Zx99DsO~Q`3^jJ3(yY6k? zzXN(GTYIxZnZdHueb=Y;9%H=mGpWUU%P|22RH(5IH&-zbhn z;oosZ#iagGoN7Pgg8`xb$!iXYWHUKT=l`YN=P)xZ8l6Zwf8ht{O9lwk)jT+vE%iiFKsx_NX%LxYiA<)YM}^)bAktJ$gtbI5 z3R6jB8i-7dLWe1;uHMVgR zvExBWF97R`8eZ>4ZJs}H7d<4|3V z1IA9Ue_k3GQXdBu%!o@cM2@!|VhV`FQHvMR z;>GBe`t+d&3w1l+Rzk_;^(4Z}GYek5Monpf~d8h|o9j+GRb|HpN-jN4~|o zXmKV}t=ge$)F8_UcI@5d7Vg1gd-Ud85j*U(%kFzGbR4JMah)5T+nxKJN1f-LPG_Za zy7On}Q|B}13%x<_pm*1M>HYL#?W%DqsTQccRHs^~n$>dUsUdZ)xuI`CZ{b|%^r}f}OLe{aKz*W)bWT?D)GXbjJ9SoH?BtvQ=R=*+qt0c{HL5{v zr*2ZWI?J86opY2@tQr|1;WBNXP%Mjo5|Mx8e zzUN8ddmenx5XY_1_ltNeDTD7@KMxka`Vl)Ieu3VpUz5)cWeeDrwfm9!QTE(pNRWoE zWxD&YrP%6SBK6}$yI*1lLqCCjjxV$)MneCR(mY_9fW5DlLsToied)o@tA47a@H7<` zEn@W`^fNG-7#YmjeR};Y)t`gQQ|)IfogSR+wO`+KK}723i2|p8MW?YEt0o0XFTm|u z{UY6dsi*;4FBAP0kZW=~mg&}XPjv5Eze-8prPshv9>LvfZA+k=gnpg6Z$LNR-EolA zzbOg7Np}jlV<`QWAJ~Lu`Gd1d{WjdIK_kAeO3Hb7f4xJTci~|@J+l0zey@b~TXaN| zW~GBLYF0W3zJ8zA9-&#{Fk?U973uULuNMpb5w6%Y)_=qmp91KQdBsB1)-+fRvZld- zpJqveZy59^yaNBPxN@ERDSy8#G;0`~&S};#sI)YXHLy9rKm8e(cXP|VVMzmTgk}-L zH;n$=Uj*8ZbLozrbT5D=4wL%ztr^S6VV?WK>UKrLLQW%yTKsSw4ZV+Yy zuiIJYh&++alVE&G`RMRp)P`ph{_rsNbF7ssLrqo}4PN*`4&62^G0ar-Gmm*nxhc&w z;@m6EbPi#x$;z5V+{{2E;$|iwC-g@?74e6UVTEC40k*O1I}*c#4We#NR4jg?tpJ^E z!@EV$H^p=_TM}&!&}J0pm6qZDTz<%YyJa)ZY!v`+O<=rSHX;Zc+rUQBY>T8b+ZB}% zR$E)VBFqles{^wmIm`uziI@f>M@`bq3s82V>B*Sk%GzOZXIM-aR2AjlTP#i(78%KI ze6*03hV@0zakjuXk)6!~qj)G~SXpp~&Fs#bS;FjLTm2Iu!-@hYLiW$>RWZEH-e|?} z7G@vZVEFLQ> zK^zXPMJQtbRvoIF%iSr<<|0C)3X3f228%Xdeo5JpIX+9oHKcH0A{KN<*aX zF((G`Jc-?av&vE%;*O#QJWjDAnMWSde2u`F;>me1e}0|FrvkY?tj4AJMgV*ofyYM< z`G9*muoC8sAQs`wc_wk@z@M{VC4AYLv-ud`&KMRlN(o~NnYBDdwuAIMwx1946GQWM zFI1Wf0uJ9K2TXS5?I3a?T&pn``3B6zpcOZl;1|clrF=S7n9KN^{eL+hTmd`dBgZb% zTp1X-ibk*>8fk=utKmxNSkGJo47_96Y1b0&I>0qXH;tvaKES(yczEkXTLEZKM9jB| zbCobRmc!q~$JY~Hn45`z3-O~nT+)0ez`r%XkG2B;ySAUd7vS^bsR;ca@Ug$sX>KF_ z?ZDrhQ(N9EcsA-4*(=Q*fjxdg72m?2-Zmx;`*)&C;^s#LzYE~g{BVvz<+oLwH18%V zHgKzo0q!2SQ)}+!)Nx-?1;M!=_?$X;R>B*hL$;>bH%LQJq8T@yaRX3AETLg=_v`I(?G2 zPazi5gP|}c7*7YDJ;Pw&rBq!G(RkKI<2gp-`JxVJ@HB+ccmY>N<3(D0iP31mSN7)R zQZ!y+G_v@D1X`~aqwyNV8I508MuY2n^9GoY=ej3gC5>I@qwn4%U1m(F5ggyL(+$`9 z=544>j9cZc%2>IzQC32@bz{@dt%nRoqi|WeF#X)|73t@)iedV>6DVuFbSL80<=0iy zgPF22{oKg``AtY3=~rD2E;PY~T6YT4&z)M-fw5_{`igL;!{#a7cr9t{N2jmYJ+oi?yYq6#d3|Jjh&Z;%a3gp}99JV#q za*^i08r^o~>SGN4U0RsaTD= ztXZ%c#h<$zENce%@4^BOhoa3r3^6Dz75xJ__wXPBM=%1>rJ`*|udRUpNq1#Hc?7R4 zEAT{^^j9axJSWe + * A representation of the model object 'Attribute'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.Attribute#getSlot Slot}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.Attribute#getName Name}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.Attribute#getValue Value}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getAttribute() + * @model + * @generated + */ +public interface Attribute extends EObject +{ + /** + * Returns the value of the 'Slot' containment reference. + * + * + * @return the value of the 'Slot' containment reference. + * @see #setSlot(TemplateInformationSlot) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getAttribute_Slot() + * @model containment="true" + * @generated + */ + TemplateInformationSlot getSlot(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.Attribute#getSlot Slot}' containment reference. + * + * + * @param value the new value of the 'Slot' containment reference. + * @see #getSlot() + * @generated + */ + void setSlot(TemplateInformationSlot value); + + /** + * Returns the value of the 'Name' containment reference. + * + * + * @return the value of the 'Name' containment reference. + * @see #setName(ConceptReference) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getAttribute_Name() + * @model containment="true" + * @generated + */ + ConceptReference getName(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.Attribute#getName Name}' containment reference. + * + * + * @param value the new value of the 'Name' containment reference. + * @see #getName() + * @generated + */ + void setName(ConceptReference value); + + /** + * Returns the value of the 'Value' containment reference. + * + * + * @return the value of the 'Value' containment reference. + * @see #setValue(AttributeValue) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getAttribute_Value() + * @model containment="true" + * @generated + */ + AttributeValue getValue(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.Attribute#getValue Value}' containment reference. + * + * + * @param value the new value of the 'Value' containment reference. + * @see #getValue() + * @generated + */ + void setValue(AttributeValue value); + +} // Attribute diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/AttributeGroup.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/AttributeGroup.java new file mode 100644 index 00000000000..1d9f2b8ece7 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/AttributeGroup.java @@ -0,0 +1,75 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Attribute Group'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.AttributeGroup#getSlot Slot}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.AttributeGroup#getAttributes Attributes}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getAttributeGroup() + * @model + * @generated + */ +public interface AttributeGroup extends EObject +{ + /** + * Returns the value of the 'Slot' containment reference. + * + * + * @return the value of the 'Slot' containment reference. + * @see #setSlot(TemplateInformationSlot) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getAttributeGroup_Slot() + * @model containment="true" + * @generated + */ + TemplateInformationSlot getSlot(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.AttributeGroup#getSlot Slot}' containment reference. + * + * + * @param value the new value of the 'Slot' containment reference. + * @see #getSlot() + * @generated + */ + void setSlot(TemplateInformationSlot value); + + /** + * Returns the value of the 'Attributes' containment reference list. + * The list contents are of type {@link com.b2international.snowowl.snomed.etl.etl.Attribute}. + * + * + * @return the value of the 'Attributes' containment reference list. + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getAttributeGroup_Attributes() + * @model containment="true" + * @generated + */ + EList getAttributes(); + +} // AttributeGroup diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/AttributeValue.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/AttributeValue.java similarity index 78% rename from snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/AttributeValue.java rename to snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/AttributeValue.java index 02d44965d1e..010d79f6ac7 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/AttributeValue.java +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/AttributeValue.java @@ -1,19 +1,19 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl.scg; +package com.b2international.snowowl.snomed.etl.etl; import org.eclipse.emf.ecore.EObject; @@ -23,10 +23,10 @@ * * * - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getAttributeValue() + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getAttributeValue() * @model * @generated */ public interface AttributeValue extends EObject { -} // AttributeValue \ No newline at end of file +} // AttributeValue diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/AndClause.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConceptIdReplacementSlot.java similarity index 61% rename from snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/AndClause.java rename to snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConceptIdReplacementSlot.java index 7f692d1cc3a..27d10e5295f 100644 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/AndClause.java +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConceptIdReplacementSlot.java @@ -1,30 +1,31 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.dsl.query.queryast; +package com.b2international.snowowl.snomed.etl.etl; /** * - * A representation of the model object 'And Clause'. + * A representation of the model object 'Concept Id Replacement Slot'. * * * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getAndClause() + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getConceptIdReplacementSlot() * @model * @generated */ -public interface AndClause extends BinaryRValue { -} // AndClause \ No newline at end of file +public interface ConceptIdReplacementSlot extends ConceptReplacementSlot +{ +} // ConceptIdReplacementSlot diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConceptReference.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConceptReference.java new file mode 100644 index 00000000000..175089143a1 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConceptReference.java @@ -0,0 +1,105 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + + +/** + * + * A representation of the model object 'Concept Reference'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.ConceptReference#getSlot Slot}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.ConceptReference#getId Id}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.ConceptReference#getTerm Term}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getConceptReference() + * @model + * @generated + */ +public interface ConceptReference extends AttributeValue +{ + /** + * Returns the value of the 'Slot' containment reference. + * + * + * @return the value of the 'Slot' containment reference. + * @see #setSlot(ConceptReplacementSlot) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getConceptReference_Slot() + * @model containment="true" + * @generated + */ + ConceptReplacementSlot getSlot(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReference#getSlot Slot}' containment reference. + * + * + * @param value the new value of the 'Slot' containment reference. + * @see #getSlot() + * @generated + */ + void setSlot(ConceptReplacementSlot value); + + /** + * Returns the value of the 'Id' attribute. + * + * + * @return the value of the 'Id' attribute. + * @see #setId(String) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getConceptReference_Id() + * @model + * @generated + */ + String getId(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReference#getId Id}' attribute. + * + * + * @param value the new value of the 'Id' attribute. + * @see #getId() + * @generated + */ + void setId(String value); + + /** + * Returns the value of the 'Term' attribute. + * + * + * @return the value of the 'Term' attribute. + * @see #setTerm(String) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getConceptReference_Term() + * @model + * @generated + */ + String getTerm(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReference#getTerm Term}' attribute. + * + * + * @param value the new value of the 'Term' attribute. + * @see #getTerm() + * @generated + */ + void setTerm(String value); + +} // ConceptReference diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConceptReplacementSlot.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConceptReplacementSlot.java new file mode 100644 index 00000000000..c05a807525c --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConceptReplacementSlot.java @@ -0,0 +1,85 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Concept Replacement Slot'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot#getConstraint Constraint}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot#getName Name}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getConceptReplacementSlot() + * @model + * @generated + */ +public interface ConceptReplacementSlot extends EObject +{ + /** + * Returns the value of the 'Constraint' containment reference. + * + * + * @return the value of the 'Constraint' containment reference. + * @see #setConstraint(ExpressionConstraint) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getConceptReplacementSlot_Constraint() + * @model containment="true" + * @generated + */ + ExpressionConstraint getConstraint(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot#getConstraint Constraint}' containment reference. + * + * + * @param value the new value of the 'Constraint' containment reference. + * @see #getConstraint() + * @generated + */ + void setConstraint(ExpressionConstraint value); + + /** + * Returns the value of the 'Name' attribute. + * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getConceptReplacementSlot_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // ConceptReplacementSlot diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConcreteValueReplacementSlot.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConcreteValueReplacementSlot.java new file mode 100644 index 00000000000..63ae852b0c7 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ConcreteValueReplacementSlot.java @@ -0,0 +1,59 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + + +/** + * + * A representation of the model object 'Concrete Value Replacement Slot'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.ConcreteValueReplacementSlot#getName Name}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getConcreteValueReplacementSlot() + * @model + * @generated + */ +public interface ConcreteValueReplacementSlot extends AttributeValue +{ + /** + * Returns the value of the 'Name' attribute. + * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getConcreteValueReplacementSlot_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.ConcreteValueReplacementSlot#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // ConcreteValueReplacementSlot diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/DecimalReplacementSlot.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/DecimalReplacementSlot.java new file mode 100644 index 00000000000..7b953d3eb45 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/DecimalReplacementSlot.java @@ -0,0 +1,50 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Decimal Replacement Slot'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.DecimalReplacementSlot#getValues Values}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getDecimalReplacementSlot() + * @model + * @generated + */ +public interface DecimalReplacementSlot extends ConcreteValueReplacementSlot +{ + /** + * Returns the value of the 'Values' containment reference list. + * The list contents are of type {@link com.b2international.snowowl.snomed.etl.etl.SlotDecimal}. + * + * + * @return the value of the 'Values' containment reference list. + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getDecimalReplacementSlot_Values() + * @model containment="true" + * @generated + */ + EList getValues(); + +} // DecimalReplacementSlot diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/DecimalValue.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/DecimalValue.java new file mode 100644 index 00000000000..5e1891a6d0e --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/DecimalValue.java @@ -0,0 +1,60 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import java.math.BigDecimal; + +/** + * + * A representation of the model object 'Decimal Value'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.DecimalValue#getValue Value}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getDecimalValue() + * @model + * @generated + */ +public interface DecimalValue extends AttributeValue +{ + /** + * Returns the value of the 'Value' attribute. + * + * + * @return the value of the 'Value' attribute. + * @see #setValue(BigDecimal) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getDecimalValue_Value() + * @model + * @generated + */ + BigDecimal getValue(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.DecimalValue#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(BigDecimal value); + +} // DecimalValue diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/EtlCardinality.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/EtlCardinality.java new file mode 100644 index 00000000000..75896f81a32 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/EtlCardinality.java @@ -0,0 +1,83 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Cardinality'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.EtlCardinality#getMin Min}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.EtlCardinality#getMax Max}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getEtlCardinality() + * @model + * @generated + */ +public interface EtlCardinality extends EObject +{ + /** + * Returns the value of the 'Min' attribute. + * + * + * @return the value of the 'Min' attribute. + * @see #setMin(int) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getEtlCardinality_Min() + * @model + * @generated + */ + int getMin(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.EtlCardinality#getMin Min}' attribute. + * + * + * @param value the new value of the 'Min' attribute. + * @see #getMin() + * @generated + */ + void setMin(int value); + + /** + * Returns the value of the 'Max' attribute. + * + * + * @return the value of the 'Max' attribute. + * @see #setMax(int) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getEtlCardinality_Max() + * @model + * @generated + */ + int getMax(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.EtlCardinality#getMax Max}' attribute. + * + * + * @param value the new value of the 'Max' attribute. + * @see #getMax() + * @generated + */ + void setMax(int value); + +} // EtlCardinality diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/EtlFactory.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/EtlFactory.java new file mode 100644 index 00000000000..c4ec1986e1f --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/EtlFactory.java @@ -0,0 +1,326 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage + * @generated + */ +public interface EtlFactory extends EFactory +{ + /** + * The singleton instance of the factory. + * + * + * @generated + */ + EtlFactory eINSTANCE = com.b2international.snowowl.snomed.etl.etl.impl.EtlFactoryImpl.init(); + + /** + * Returns a new object of class 'Expression Template'. + * + * + * @return a new object of class 'Expression Template'. + * @generated + */ + ExpressionTemplate createExpressionTemplate(); + + /** + * Returns a new object of class 'Sub Expression'. + * + * + * @return a new object of class 'Sub Expression'. + * @generated + */ + SubExpression createSubExpression(); + + /** + * Returns a new object of class 'Focus Concept'. + * + * + * @return a new object of class 'Focus Concept'. + * @generated + */ + FocusConcept createFocusConcept(); + + /** + * Returns a new object of class 'Refinement'. + * + * + * @return a new object of class 'Refinement'. + * @generated + */ + Refinement createRefinement(); + + /** + * Returns a new object of class 'Attribute Group'. + * + * + * @return a new object of class 'Attribute Group'. + * @generated + */ + AttributeGroup createAttributeGroup(); + + /** + * Returns a new object of class 'Attribute'. + * + * + * @return a new object of class 'Attribute'. + * @generated + */ + Attribute createAttribute(); + + /** + * Returns a new object of class 'Attribute Value'. + * + * + * @return a new object of class 'Attribute Value'. + * @generated + */ + AttributeValue createAttributeValue(); + + /** + * Returns a new object of class 'Concept Id Replacement Slot'. + * + * + * @return a new object of class 'Concept Id Replacement Slot'. + * @generated + */ + ConceptIdReplacementSlot createConceptIdReplacementSlot(); + + /** + * Returns a new object of class 'Expression Replacement Slot'. + * + * + * @return a new object of class 'Expression Replacement Slot'. + * @generated + */ + ExpressionReplacementSlot createExpressionReplacementSlot(); + + /** + * Returns a new object of class 'Token Replacement Slot'. + * + * + * @return a new object of class 'Token Replacement Slot'. + * @generated + */ + TokenReplacementSlot createTokenReplacementSlot(); + + /** + * Returns a new object of class 'Template Information Slot'. + * + * + * @return a new object of class 'Template Information Slot'. + * @generated + */ + TemplateInformationSlot createTemplateInformationSlot(); + + /** + * Returns a new object of class 'Concrete Value Replacement Slot'. + * + * + * @return a new object of class 'Concrete Value Replacement Slot'. + * @generated + */ + ConcreteValueReplacementSlot createConcreteValueReplacementSlot(); + + /** + * Returns a new object of class 'String Replacement Slot'. + * + * + * @return a new object of class 'String Replacement Slot'. + * @generated + */ + StringReplacementSlot createStringReplacementSlot(); + + /** + * Returns a new object of class 'Integer Replacement Slot'. + * + * + * @return a new object of class 'Integer Replacement Slot'. + * @generated + */ + IntegerReplacementSlot createIntegerReplacementSlot(); + + /** + * Returns a new object of class 'Decimal Replacement Slot'. + * + * + * @return a new object of class 'Decimal Replacement Slot'. + * @generated + */ + DecimalReplacementSlot createDecimalReplacementSlot(); + + /** + * Returns a new object of class 'Cardinality'. + * + * + * @return a new object of class 'Cardinality'. + * @generated + */ + EtlCardinality createEtlCardinality(); + + /** + * Returns a new object of class 'Concept Replacement Slot'. + * + * + * @return a new object of class 'Concept Replacement Slot'. + * @generated + */ + ConceptReplacementSlot createConceptReplacementSlot(); + + /** + * Returns a new object of class 'Concept Reference'. + * + * + * @return a new object of class 'Concept Reference'. + * @generated + */ + ConceptReference createConceptReference(); + + /** + * Returns a new object of class 'String Value'. + * + * + * @return a new object of class 'String Value'. + * @generated + */ + StringValue createStringValue(); + + /** + * Returns a new object of class 'Integer Value'. + * + * + * @return a new object of class 'Integer Value'. + * @generated + */ + IntegerValue createIntegerValue(); + + /** + * Returns a new object of class 'Decimal Value'. + * + * + * @return a new object of class 'Decimal Value'. + * @generated + */ + DecimalValue createDecimalValue(); + + /** + * Returns a new object of class 'Slot Integer'. + * + * + * @return a new object of class 'Slot Integer'. + * @generated + */ + SlotInteger createSlotInteger(); + + /** + * Returns a new object of class 'Slot Integer Value'. + * + * + * @return a new object of class 'Slot Integer Value'. + * @generated + */ + SlotIntegerValue createSlotIntegerValue(); + + /** + * Returns a new object of class 'Slot Integer Range'. + * + * + * @return a new object of class 'Slot Integer Range'. + * @generated + */ + SlotIntegerRange createSlotIntegerRange(); + + /** + * Returns a new object of class 'Slot Integer Minimum Value'. + * + * + * @return a new object of class 'Slot Integer Minimum Value'. + * @generated + */ + SlotIntegerMinimumValue createSlotIntegerMinimumValue(); + + /** + * Returns a new object of class 'Slot Integer Maximum Value'. + * + * + * @return a new object of class 'Slot Integer Maximum Value'. + * @generated + */ + SlotIntegerMaximumValue createSlotIntegerMaximumValue(); + + /** + * Returns a new object of class 'Slot Decimal'. + * + * + * @return a new object of class 'Slot Decimal'. + * @generated + */ + SlotDecimal createSlotDecimal(); + + /** + * Returns a new object of class 'Slot Decimal Value'. + * + * + * @return a new object of class 'Slot Decimal Value'. + * @generated + */ + SlotDecimalValue createSlotDecimalValue(); + + /** + * Returns a new object of class 'Slot Decimal Range'. + * + * + * @return a new object of class 'Slot Decimal Range'. + * @generated + */ + SlotDecimalRange createSlotDecimalRange(); + + /** + * Returns a new object of class 'Slot Decimal Minimum Value'. + * + * + * @return a new object of class 'Slot Decimal Minimum Value'. + * @generated + */ + SlotDecimalMinimumValue createSlotDecimalMinimumValue(); + + /** + * Returns a new object of class 'Slot Decimal Maximum Value'. + * + * + * @return a new object of class 'Slot Decimal Maximum Value'. + * @generated + */ + SlotDecimalMaximumValue createSlotDecimalMaximumValue(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + EtlPackage getEtlPackage(); + +} //EtlFactory diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/EtlPackage.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/EtlPackage.java new file mode 100644 index 00000000000..9e4784924c4 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/EtlPackage.java @@ -0,0 +1,2658 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
        + *
      • each class,
      • + *
      • each feature of each class,
      • + *
      • each enum,
      • + *
      • and each data type
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlFactory + * @model kind="package" + * @generated + */ +public interface EtlPackage extends EPackage +{ + /** + * The package name. + * + * + * @generated + */ + String eNAME = "etl"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.b2international.com/snowowl/snomed/etl/Etl"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "etl"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + EtlPackage eINSTANCE = com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl.init(); + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.ExpressionTemplateImpl Expression Template}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.ExpressionTemplateImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getExpressionTemplate() + * @generated + */ + int EXPRESSION_TEMPLATE = 0; + + /** + * The feature id for the 'Primitive' attribute. + * + * + * @generated + * @ordered + */ + int EXPRESSION_TEMPLATE__PRIMITIVE = 0; + + /** + * The feature id for the 'Slot' containment reference. + * + * + * @generated + * @ordered + */ + int EXPRESSION_TEMPLATE__SLOT = 1; + + /** + * The feature id for the 'Expression' containment reference. + * + * + * @generated + * @ordered + */ + int EXPRESSION_TEMPLATE__EXPRESSION = 2; + + /** + * The number of structural features of the 'Expression Template' class. + * + * + * @generated + * @ordered + */ + int EXPRESSION_TEMPLATE_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.AttributeValueImpl Attribute Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.AttributeValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getAttributeValue() + * @generated + */ + int ATTRIBUTE_VALUE = 6; + + /** + * The number of structural features of the 'Attribute Value' class. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE_VALUE_FEATURE_COUNT = 0; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SubExpressionImpl Sub Expression}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SubExpressionImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSubExpression() + * @generated + */ + int SUB_EXPRESSION = 1; + + /** + * The feature id for the 'Focus Concepts' containment reference list. + * + * + * @generated + * @ordered + */ + int SUB_EXPRESSION__FOCUS_CONCEPTS = ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Refinement' containment reference. + * + * + * @generated + * @ordered + */ + int SUB_EXPRESSION__REFINEMENT = ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Sub Expression' class. + * + * + * @generated + * @ordered + */ + int SUB_EXPRESSION_FEATURE_COUNT = ATTRIBUTE_VALUE_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.FocusConceptImpl Focus Concept}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.FocusConceptImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getFocusConcept() + * @generated + */ + int FOCUS_CONCEPT = 2; + + /** + * The feature id for the 'Slot' containment reference. + * + * + * @generated + * @ordered + */ + int FOCUS_CONCEPT__SLOT = 0; + + /** + * The feature id for the 'Concept' containment reference. + * + * + * @generated + * @ordered + */ + int FOCUS_CONCEPT__CONCEPT = 1; + + /** + * The number of structural features of the 'Focus Concept' class. + * + * + * @generated + * @ordered + */ + int FOCUS_CONCEPT_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.RefinementImpl Refinement}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.RefinementImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getRefinement() + * @generated + */ + int REFINEMENT = 3; + + /** + * The feature id for the 'Attributes' containment reference list. + * + * + * @generated + * @ordered + */ + int REFINEMENT__ATTRIBUTES = 0; + + /** + * The feature id for the 'Groups' containment reference list. + * + * + * @generated + * @ordered + */ + int REFINEMENT__GROUPS = 1; + + /** + * The number of structural features of the 'Refinement' class. + * + * + * @generated + * @ordered + */ + int REFINEMENT_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.AttributeGroupImpl Attribute Group}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.AttributeGroupImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getAttributeGroup() + * @generated + */ + int ATTRIBUTE_GROUP = 4; + + /** + * The feature id for the 'Slot' containment reference. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE_GROUP__SLOT = 0; + + /** + * The feature id for the 'Attributes' containment reference list. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE_GROUP__ATTRIBUTES = 1; + + /** + * The number of structural features of the 'Attribute Group' class. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE_GROUP_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.AttributeImpl Attribute}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.AttributeImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getAttribute() + * @generated + */ + int ATTRIBUTE = 5; + + /** + * The feature id for the 'Slot' containment reference. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE__SLOT = 0; + + /** + * The feature id for the 'Name' containment reference. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE__NAME = 1; + + /** + * The feature id for the 'Value' containment reference. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE__VALUE = 2; + + /** + * The number of structural features of the 'Attribute' class. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.ConceptReplacementSlotImpl Concept Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.ConceptReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getConceptReplacementSlot() + * @generated + */ + int CONCEPT_REPLACEMENT_SLOT = 16; + + /** + * The feature id for the 'Constraint' containment reference. + * + * + * @generated + * @ordered + */ + int CONCEPT_REPLACEMENT_SLOT__CONSTRAINT = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONCEPT_REPLACEMENT_SLOT__NAME = 1; + + /** + * The number of structural features of the 'Concept Replacement Slot' class. + * + * + * @generated + * @ordered + */ + int CONCEPT_REPLACEMENT_SLOT_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.ConceptIdReplacementSlotImpl Concept Id Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.ConceptIdReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getConceptIdReplacementSlot() + * @generated + */ + int CONCEPT_ID_REPLACEMENT_SLOT = 7; + + /** + * The feature id for the 'Constraint' containment reference. + * + * + * @generated + * @ordered + */ + int CONCEPT_ID_REPLACEMENT_SLOT__CONSTRAINT = CONCEPT_REPLACEMENT_SLOT__CONSTRAINT; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONCEPT_ID_REPLACEMENT_SLOT__NAME = CONCEPT_REPLACEMENT_SLOT__NAME; + + /** + * The number of structural features of the 'Concept Id Replacement Slot' class. + * + * + * @generated + * @ordered + */ + int CONCEPT_ID_REPLACEMENT_SLOT_FEATURE_COUNT = CONCEPT_REPLACEMENT_SLOT_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.ExpressionReplacementSlotImpl Expression Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.ExpressionReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getExpressionReplacementSlot() + * @generated + */ + int EXPRESSION_REPLACEMENT_SLOT = 8; + + /** + * The feature id for the 'Constraint' containment reference. + * + * + * @generated + * @ordered + */ + int EXPRESSION_REPLACEMENT_SLOT__CONSTRAINT = CONCEPT_REPLACEMENT_SLOT__CONSTRAINT; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int EXPRESSION_REPLACEMENT_SLOT__NAME = CONCEPT_REPLACEMENT_SLOT__NAME; + + /** + * The number of structural features of the 'Expression Replacement Slot' class. + * + * + * @generated + * @ordered + */ + int EXPRESSION_REPLACEMENT_SLOT_FEATURE_COUNT = CONCEPT_REPLACEMENT_SLOT_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.TokenReplacementSlotImpl Token Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.TokenReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getTokenReplacementSlot() + * @generated + */ + int TOKEN_REPLACEMENT_SLOT = 9; + + /** + * The feature id for the 'Tokens' attribute list. + * + * + * @generated + * @ordered + */ + int TOKEN_REPLACEMENT_SLOT__TOKENS = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int TOKEN_REPLACEMENT_SLOT__NAME = 1; + + /** + * The number of structural features of the 'Token Replacement Slot' class. + * + * + * @generated + * @ordered + */ + int TOKEN_REPLACEMENT_SLOT_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.TemplateInformationSlotImpl Template Information Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.TemplateInformationSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getTemplateInformationSlot() + * @generated + */ + int TEMPLATE_INFORMATION_SLOT = 10; + + /** + * The feature id for the 'Cardinality' containment reference. + * + * + * @generated + * @ordered + */ + int TEMPLATE_INFORMATION_SLOT__CARDINALITY = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int TEMPLATE_INFORMATION_SLOT__NAME = 1; + + /** + * The number of structural features of the 'Template Information Slot' class. + * + * + * @generated + * @ordered + */ + int TEMPLATE_INFORMATION_SLOT_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.ConcreteValueReplacementSlotImpl Concrete Value Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.ConcreteValueReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getConcreteValueReplacementSlot() + * @generated + */ + int CONCRETE_VALUE_REPLACEMENT_SLOT = 11; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONCRETE_VALUE_REPLACEMENT_SLOT__NAME = ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Concrete Value Replacement Slot' class. + * + * + * @generated + * @ordered + */ + int CONCRETE_VALUE_REPLACEMENT_SLOT_FEATURE_COUNT = ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.StringReplacementSlotImpl String Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.StringReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getStringReplacementSlot() + * @generated + */ + int STRING_REPLACEMENT_SLOT = 12; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int STRING_REPLACEMENT_SLOT__NAME = CONCRETE_VALUE_REPLACEMENT_SLOT__NAME; + + /** + * The feature id for the 'Values' attribute list. + * + * + * @generated + * @ordered + */ + int STRING_REPLACEMENT_SLOT__VALUES = CONCRETE_VALUE_REPLACEMENT_SLOT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'String Replacement Slot' class. + * + * + * @generated + * @ordered + */ + int STRING_REPLACEMENT_SLOT_FEATURE_COUNT = CONCRETE_VALUE_REPLACEMENT_SLOT_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.IntegerReplacementSlotImpl Integer Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.IntegerReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getIntegerReplacementSlot() + * @generated + */ + int INTEGER_REPLACEMENT_SLOT = 13; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int INTEGER_REPLACEMENT_SLOT__NAME = CONCRETE_VALUE_REPLACEMENT_SLOT__NAME; + + /** + * The feature id for the 'Values' containment reference list. + * + * + * @generated + * @ordered + */ + int INTEGER_REPLACEMENT_SLOT__VALUES = CONCRETE_VALUE_REPLACEMENT_SLOT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Integer Replacement Slot' class. + * + * + * @generated + * @ordered + */ + int INTEGER_REPLACEMENT_SLOT_FEATURE_COUNT = CONCRETE_VALUE_REPLACEMENT_SLOT_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.DecimalReplacementSlotImpl Decimal Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.DecimalReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getDecimalReplacementSlot() + * @generated + */ + int DECIMAL_REPLACEMENT_SLOT = 14; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DECIMAL_REPLACEMENT_SLOT__NAME = CONCRETE_VALUE_REPLACEMENT_SLOT__NAME; + + /** + * The feature id for the 'Values' containment reference list. + * + * + * @generated + * @ordered + */ + int DECIMAL_REPLACEMENT_SLOT__VALUES = CONCRETE_VALUE_REPLACEMENT_SLOT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Decimal Replacement Slot' class. + * + * + * @generated + * @ordered + */ + int DECIMAL_REPLACEMENT_SLOT_FEATURE_COUNT = CONCRETE_VALUE_REPLACEMENT_SLOT_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.EtlCardinalityImpl Cardinality}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlCardinalityImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getEtlCardinality() + * @generated + */ + int ETL_CARDINALITY = 15; + + /** + * The feature id for the 'Min' attribute. + * + * + * @generated + * @ordered + */ + int ETL_CARDINALITY__MIN = 0; + + /** + * The feature id for the 'Max' attribute. + * + * + * @generated + * @ordered + */ + int ETL_CARDINALITY__MAX = 1; + + /** + * The number of structural features of the 'Cardinality' class. + * + * + * @generated + * @ordered + */ + int ETL_CARDINALITY_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.ConceptReferenceImpl Concept Reference}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.ConceptReferenceImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getConceptReference() + * @generated + */ + int CONCEPT_REFERENCE = 17; + + /** + * The feature id for the 'Slot' containment reference. + * + * + * @generated + * @ordered + */ + int CONCEPT_REFERENCE__SLOT = ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Id' attribute. + * + * + * @generated + * @ordered + */ + int CONCEPT_REFERENCE__ID = ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Term' attribute. + * + * + * @generated + * @ordered + */ + int CONCEPT_REFERENCE__TERM = ATTRIBUTE_VALUE_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Concept Reference' class. + * + * + * @generated + * @ordered + */ + int CONCEPT_REFERENCE_FEATURE_COUNT = ATTRIBUTE_VALUE_FEATURE_COUNT + 3; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.StringValueImpl String Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.StringValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getStringValue() + * @generated + */ + int STRING_VALUE = 18; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int STRING_VALUE__VALUE = ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'String Value' class. + * + * + * @generated + * @ordered + */ + int STRING_VALUE_FEATURE_COUNT = ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.IntegerValueImpl Integer Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.IntegerValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getIntegerValue() + * @generated + */ + int INTEGER_VALUE = 19; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int INTEGER_VALUE__VALUE = ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Integer Value' class. + * + * + * @generated + * @ordered + */ + int INTEGER_VALUE_FEATURE_COUNT = ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.DecimalValueImpl Decimal Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.DecimalValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getDecimalValue() + * @generated + */ + int DECIMAL_VALUE = 20; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int DECIMAL_VALUE__VALUE = ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Decimal Value' class. + * + * + * @generated + * @ordered + */ + int DECIMAL_VALUE_FEATURE_COUNT = ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerImpl Slot Integer}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotInteger() + * @generated + */ + int SLOT_INTEGER = 21; + + /** + * The number of structural features of the 'Slot Integer' class. + * + * + * @generated + * @ordered + */ + int SLOT_INTEGER_FEATURE_COUNT = 0; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerValueImpl Slot Integer Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotIntegerValue() + * @generated + */ + int SLOT_INTEGER_VALUE = 22; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int SLOT_INTEGER_VALUE__VALUE = SLOT_INTEGER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Slot Integer Value' class. + * + * + * @generated + * @ordered + */ + int SLOT_INTEGER_VALUE_FEATURE_COUNT = SLOT_INTEGER_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerRangeImpl Slot Integer Range}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerRangeImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotIntegerRange() + * @generated + */ + int SLOT_INTEGER_RANGE = 23; + + /** + * The feature id for the 'Minimum' containment reference. + * + * + * @generated + * @ordered + */ + int SLOT_INTEGER_RANGE__MINIMUM = SLOT_INTEGER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Maximum' containment reference. + * + * + * @generated + * @ordered + */ + int SLOT_INTEGER_RANGE__MAXIMUM = SLOT_INTEGER_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Slot Integer Range' class. + * + * + * @generated + * @ordered + */ + int SLOT_INTEGER_RANGE_FEATURE_COUNT = SLOT_INTEGER_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerMinimumValueImpl Slot Integer Minimum Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerMinimumValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotIntegerMinimumValue() + * @generated + */ + int SLOT_INTEGER_MINIMUM_VALUE = 24; + + /** + * The feature id for the 'Exclusive' attribute. + * + * + * @generated + * @ordered + */ + int SLOT_INTEGER_MINIMUM_VALUE__EXCLUSIVE = 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int SLOT_INTEGER_MINIMUM_VALUE__VALUE = 1; + + /** + * The number of structural features of the 'Slot Integer Minimum Value' class. + * + * + * @generated + * @ordered + */ + int SLOT_INTEGER_MINIMUM_VALUE_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerMaximumValueImpl Slot Integer Maximum Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerMaximumValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotIntegerMaximumValue() + * @generated + */ + int SLOT_INTEGER_MAXIMUM_VALUE = 25; + + /** + * The feature id for the 'Exclusive' attribute. + * + * + * @generated + * @ordered + */ + int SLOT_INTEGER_MAXIMUM_VALUE__EXCLUSIVE = 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int SLOT_INTEGER_MAXIMUM_VALUE__VALUE = 1; + + /** + * The number of structural features of the 'Slot Integer Maximum Value' class. + * + * + * @generated + * @ordered + */ + int SLOT_INTEGER_MAXIMUM_VALUE_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalImpl Slot Decimal}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotDecimal() + * @generated + */ + int SLOT_DECIMAL = 26; + + /** + * The number of structural features of the 'Slot Decimal' class. + * + * + * @generated + * @ordered + */ + int SLOT_DECIMAL_FEATURE_COUNT = 0; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalValueImpl Slot Decimal Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotDecimalValue() + * @generated + */ + int SLOT_DECIMAL_VALUE = 27; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int SLOT_DECIMAL_VALUE__VALUE = SLOT_DECIMAL_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Slot Decimal Value' class. + * + * + * @generated + * @ordered + */ + int SLOT_DECIMAL_VALUE_FEATURE_COUNT = SLOT_DECIMAL_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalRangeImpl Slot Decimal Range}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalRangeImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotDecimalRange() + * @generated + */ + int SLOT_DECIMAL_RANGE = 28; + + /** + * The feature id for the 'Minimum' containment reference. + * + * + * @generated + * @ordered + */ + int SLOT_DECIMAL_RANGE__MINIMUM = SLOT_DECIMAL_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Maximum' containment reference. + * + * + * @generated + * @ordered + */ + int SLOT_DECIMAL_RANGE__MAXIMUM = SLOT_DECIMAL_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Slot Decimal Range' class. + * + * + * @generated + * @ordered + */ + int SLOT_DECIMAL_RANGE_FEATURE_COUNT = SLOT_DECIMAL_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalMinimumValueImpl Slot Decimal Minimum Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalMinimumValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotDecimalMinimumValue() + * @generated + */ + int SLOT_DECIMAL_MINIMUM_VALUE = 29; + + /** + * The feature id for the 'Exclusive' attribute. + * + * + * @generated + * @ordered + */ + int SLOT_DECIMAL_MINIMUM_VALUE__EXCLUSIVE = 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int SLOT_DECIMAL_MINIMUM_VALUE__VALUE = 1; + + /** + * The number of structural features of the 'Slot Decimal Minimum Value' class. + * + * + * @generated + * @ordered + */ + int SLOT_DECIMAL_MINIMUM_VALUE_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalMaximumValueImpl Slot Decimal Maximum Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalMaximumValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotDecimalMaximumValue() + * @generated + */ + int SLOT_DECIMAL_MAXIMUM_VALUE = 30; + + /** + * The feature id for the 'Exclusive' attribute. + * + * + * @generated + * @ordered + */ + int SLOT_DECIMAL_MAXIMUM_VALUE__EXCLUSIVE = 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int SLOT_DECIMAL_MAXIMUM_VALUE__VALUE = 1; + + /** + * The number of structural features of the 'Slot Decimal Maximum Value' class. + * + * + * @generated + * @ordered + */ + int SLOT_DECIMAL_MAXIMUM_VALUE_FEATURE_COUNT = 2; + + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate Expression Template}'. + * + * + * @return the meta object for class 'Expression Template'. + * @see com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate + * @generated + */ + EClass getExpressionTemplate(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate#isPrimitive Primitive}'. + * + * + * @return the meta object for the attribute 'Primitive'. + * @see com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate#isPrimitive() + * @see #getExpressionTemplate() + * @generated + */ + EAttribute getExpressionTemplate_Primitive(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate#getSlot Slot}'. + * + * + * @return the meta object for the containment reference 'Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate#getSlot() + * @see #getExpressionTemplate() + * @generated + */ + EReference getExpressionTemplate_Slot(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate#getExpression Expression}'. + * + * + * @return the meta object for the containment reference 'Expression'. + * @see com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate#getExpression() + * @see #getExpressionTemplate() + * @generated + */ + EReference getExpressionTemplate_Expression(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.SubExpression Sub Expression}'. + * + * + * @return the meta object for class 'Sub Expression'. + * @see com.b2international.snowowl.snomed.etl.etl.SubExpression + * @generated + */ + EClass getSubExpression(); + + /** + * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.snomed.etl.etl.SubExpression#getFocusConcepts Focus Concepts}'. + * + * + * @return the meta object for the containment reference list 'Focus Concepts'. + * @see com.b2international.snowowl.snomed.etl.etl.SubExpression#getFocusConcepts() + * @see #getSubExpression() + * @generated + */ + EReference getSubExpression_FocusConcepts(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.SubExpression#getRefinement Refinement}'. + * + * + * @return the meta object for the containment reference 'Refinement'. + * @see com.b2international.snowowl.snomed.etl.etl.SubExpression#getRefinement() + * @see #getSubExpression() + * @generated + */ + EReference getSubExpression_Refinement(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.FocusConcept Focus Concept}'. + * + * + * @return the meta object for class 'Focus Concept'. + * @see com.b2international.snowowl.snomed.etl.etl.FocusConcept + * @generated + */ + EClass getFocusConcept(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.FocusConcept#getSlot Slot}'. + * + * + * @return the meta object for the containment reference 'Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.FocusConcept#getSlot() + * @see #getFocusConcept() + * @generated + */ + EReference getFocusConcept_Slot(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.FocusConcept#getConcept Concept}'. + * + * + * @return the meta object for the containment reference 'Concept'. + * @see com.b2international.snowowl.snomed.etl.etl.FocusConcept#getConcept() + * @see #getFocusConcept() + * @generated + */ + EReference getFocusConcept_Concept(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.Refinement Refinement}'. + * + * + * @return the meta object for class 'Refinement'. + * @see com.b2international.snowowl.snomed.etl.etl.Refinement + * @generated + */ + EClass getRefinement(); + + /** + * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.snomed.etl.etl.Refinement#getAttributes Attributes}'. + * + * + * @return the meta object for the containment reference list 'Attributes'. + * @see com.b2international.snowowl.snomed.etl.etl.Refinement#getAttributes() + * @see #getRefinement() + * @generated + */ + EReference getRefinement_Attributes(); + + /** + * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.snomed.etl.etl.Refinement#getGroups Groups}'. + * + * + * @return the meta object for the containment reference list 'Groups'. + * @see com.b2international.snowowl.snomed.etl.etl.Refinement#getGroups() + * @see #getRefinement() + * @generated + */ + EReference getRefinement_Groups(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.AttributeGroup Attribute Group}'. + * + * + * @return the meta object for class 'Attribute Group'. + * @see com.b2international.snowowl.snomed.etl.etl.AttributeGroup + * @generated + */ + EClass getAttributeGroup(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.AttributeGroup#getSlot Slot}'. + * + * + * @return the meta object for the containment reference 'Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.AttributeGroup#getSlot() + * @see #getAttributeGroup() + * @generated + */ + EReference getAttributeGroup_Slot(); + + /** + * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.snomed.etl.etl.AttributeGroup#getAttributes Attributes}'. + * + * + * @return the meta object for the containment reference list 'Attributes'. + * @see com.b2international.snowowl.snomed.etl.etl.AttributeGroup#getAttributes() + * @see #getAttributeGroup() + * @generated + */ + EReference getAttributeGroup_Attributes(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.Attribute Attribute}'. + * + * + * @return the meta object for class 'Attribute'. + * @see com.b2international.snowowl.snomed.etl.etl.Attribute + * @generated + */ + EClass getAttribute(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.Attribute#getSlot Slot}'. + * + * + * @return the meta object for the containment reference 'Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.Attribute#getSlot() + * @see #getAttribute() + * @generated + */ + EReference getAttribute_Slot(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.Attribute#getName Name}'. + * + * + * @return the meta object for the containment reference 'Name'. + * @see com.b2international.snowowl.snomed.etl.etl.Attribute#getName() + * @see #getAttribute() + * @generated + */ + EReference getAttribute_Name(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.Attribute#getValue Value}'. + * + * + * @return the meta object for the containment reference 'Value'. + * @see com.b2international.snowowl.snomed.etl.etl.Attribute#getValue() + * @see #getAttribute() + * @generated + */ + EReference getAttribute_Value(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.AttributeValue Attribute Value}'. + * + * + * @return the meta object for class 'Attribute Value'. + * @see com.b2international.snowowl.snomed.etl.etl.AttributeValue + * @generated + */ + EClass getAttributeValue(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.ConceptIdReplacementSlot Concept Id Replacement Slot}'. + * + * + * @return the meta object for class 'Concept Id Replacement Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.ConceptIdReplacementSlot + * @generated + */ + EClass getConceptIdReplacementSlot(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.ExpressionReplacementSlot Expression Replacement Slot}'. + * + * + * @return the meta object for class 'Expression Replacement Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.ExpressionReplacementSlot + * @generated + */ + EClass getExpressionReplacementSlot(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot Token Replacement Slot}'. + * + * + * @return the meta object for class 'Token Replacement Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot + * @generated + */ + EClass getTokenReplacementSlot(); + + /** + * Returns the meta object for the attribute list '{@link com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot#getTokens Tokens}'. + * + * + * @return the meta object for the attribute list 'Tokens'. + * @see com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot#getTokens() + * @see #getTokenReplacementSlot() + * @generated + */ + EAttribute getTokenReplacementSlot_Tokens(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot#getName() + * @see #getTokenReplacementSlot() + * @generated + */ + EAttribute getTokenReplacementSlot_Name(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot Template Information Slot}'. + * + * + * @return the meta object for class 'Template Information Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot + * @generated + */ + EClass getTemplateInformationSlot(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot#getCardinality Cardinality}'. + * + * + * @return the meta object for the containment reference 'Cardinality'. + * @see com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot#getCardinality() + * @see #getTemplateInformationSlot() + * @generated + */ + EReference getTemplateInformationSlot_Cardinality(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot#getName() + * @see #getTemplateInformationSlot() + * @generated + */ + EAttribute getTemplateInformationSlot_Name(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.ConcreteValueReplacementSlot Concrete Value Replacement Slot}'. + * + * + * @return the meta object for class 'Concrete Value Replacement Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.ConcreteValueReplacementSlot + * @generated + */ + EClass getConcreteValueReplacementSlot(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.ConcreteValueReplacementSlot#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see com.b2international.snowowl.snomed.etl.etl.ConcreteValueReplacementSlot#getName() + * @see #getConcreteValueReplacementSlot() + * @generated + */ + EAttribute getConcreteValueReplacementSlot_Name(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.StringReplacementSlot String Replacement Slot}'. + * + * + * @return the meta object for class 'String Replacement Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.StringReplacementSlot + * @generated + */ + EClass getStringReplacementSlot(); + + /** + * Returns the meta object for the attribute list '{@link com.b2international.snowowl.snomed.etl.etl.StringReplacementSlot#getValues Values}'. + * + * + * @return the meta object for the attribute list 'Values'. + * @see com.b2international.snowowl.snomed.etl.etl.StringReplacementSlot#getValues() + * @see #getStringReplacementSlot() + * @generated + */ + EAttribute getStringReplacementSlot_Values(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.IntegerReplacementSlot Integer Replacement Slot}'. + * + * + * @return the meta object for class 'Integer Replacement Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.IntegerReplacementSlot + * @generated + */ + EClass getIntegerReplacementSlot(); + + /** + * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.snomed.etl.etl.IntegerReplacementSlot#getValues Values}'. + * + * + * @return the meta object for the containment reference list 'Values'. + * @see com.b2international.snowowl.snomed.etl.etl.IntegerReplacementSlot#getValues() + * @see #getIntegerReplacementSlot() + * @generated + */ + EReference getIntegerReplacementSlot_Values(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.DecimalReplacementSlot Decimal Replacement Slot}'. + * + * + * @return the meta object for class 'Decimal Replacement Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.DecimalReplacementSlot + * @generated + */ + EClass getDecimalReplacementSlot(); + + /** + * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.snomed.etl.etl.DecimalReplacementSlot#getValues Values}'. + * + * + * @return the meta object for the containment reference list 'Values'. + * @see com.b2international.snowowl.snomed.etl.etl.DecimalReplacementSlot#getValues() + * @see #getDecimalReplacementSlot() + * @generated + */ + EReference getDecimalReplacementSlot_Values(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.EtlCardinality Cardinality}'. + * + * + * @return the meta object for class 'Cardinality'. + * @see com.b2international.snowowl.snomed.etl.etl.EtlCardinality + * @generated + */ + EClass getEtlCardinality(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.EtlCardinality#getMin Min}'. + * + * + * @return the meta object for the attribute 'Min'. + * @see com.b2international.snowowl.snomed.etl.etl.EtlCardinality#getMin() + * @see #getEtlCardinality() + * @generated + */ + EAttribute getEtlCardinality_Min(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.EtlCardinality#getMax Max}'. + * + * + * @return the meta object for the attribute 'Max'. + * @see com.b2international.snowowl.snomed.etl.etl.EtlCardinality#getMax() + * @see #getEtlCardinality() + * @generated + */ + EAttribute getEtlCardinality_Max(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot Concept Replacement Slot}'. + * + * + * @return the meta object for class 'Concept Replacement Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot + * @generated + */ + EClass getConceptReplacementSlot(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot#getConstraint Constraint}'. + * + * + * @return the meta object for the containment reference 'Constraint'. + * @see com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot#getConstraint() + * @see #getConceptReplacementSlot() + * @generated + */ + EReference getConceptReplacementSlot_Constraint(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot#getName() + * @see #getConceptReplacementSlot() + * @generated + */ + EAttribute getConceptReplacementSlot_Name(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReference Concept Reference}'. + * + * + * @return the meta object for class 'Concept Reference'. + * @see com.b2international.snowowl.snomed.etl.etl.ConceptReference + * @generated + */ + EClass getConceptReference(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReference#getSlot Slot}'. + * + * + * @return the meta object for the containment reference 'Slot'. + * @see com.b2international.snowowl.snomed.etl.etl.ConceptReference#getSlot() + * @see #getConceptReference() + * @generated + */ + EReference getConceptReference_Slot(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReference#getId Id}'. + * + * + * @return the meta object for the attribute 'Id'. + * @see com.b2international.snowowl.snomed.etl.etl.ConceptReference#getId() + * @see #getConceptReference() + * @generated + */ + EAttribute getConceptReference_Id(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReference#getTerm Term}'. + * + * + * @return the meta object for the attribute 'Term'. + * @see com.b2international.snowowl.snomed.etl.etl.ConceptReference#getTerm() + * @see #getConceptReference() + * @generated + */ + EAttribute getConceptReference_Term(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.StringValue String Value}'. + * + * + * @return the meta object for class 'String Value'. + * @see com.b2international.snowowl.snomed.etl.etl.StringValue + * @generated + */ + EClass getStringValue(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.StringValue#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see com.b2international.snowowl.snomed.etl.etl.StringValue#getValue() + * @see #getStringValue() + * @generated + */ + EAttribute getStringValue_Value(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.IntegerValue Integer Value}'. + * + * + * @return the meta object for class 'Integer Value'. + * @see com.b2international.snowowl.snomed.etl.etl.IntegerValue + * @generated + */ + EClass getIntegerValue(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.IntegerValue#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see com.b2international.snowowl.snomed.etl.etl.IntegerValue#getValue() + * @see #getIntegerValue() + * @generated + */ + EAttribute getIntegerValue_Value(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.DecimalValue Decimal Value}'. + * + * + * @return the meta object for class 'Decimal Value'. + * @see com.b2international.snowowl.snomed.etl.etl.DecimalValue + * @generated + */ + EClass getDecimalValue(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.DecimalValue#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see com.b2international.snowowl.snomed.etl.etl.DecimalValue#getValue() + * @see #getDecimalValue() + * @generated + */ + EAttribute getDecimalValue_Value(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.SlotInteger Slot Integer}'. + * + * + * @return the meta object for class 'Slot Integer'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotInteger + * @generated + */ + EClass getSlotInteger(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerValue Slot Integer Value}'. + * + * + * @return the meta object for class 'Slot Integer Value'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerValue + * @generated + */ + EClass getSlotIntegerValue(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerValue#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerValue#getValue() + * @see #getSlotIntegerValue() + * @generated + */ + EAttribute getSlotIntegerValue_Value(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange Slot Integer Range}'. + * + * + * @return the meta object for class 'Slot Integer Range'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange + * @generated + */ + EClass getSlotIntegerRange(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange#getMinimum Minimum}'. + * + * + * @return the meta object for the containment reference 'Minimum'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange#getMinimum() + * @see #getSlotIntegerRange() + * @generated + */ + EReference getSlotIntegerRange_Minimum(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange#getMaximum Maximum}'. + * + * + * @return the meta object for the containment reference 'Maximum'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange#getMaximum() + * @see #getSlotIntegerRange() + * @generated + */ + EReference getSlotIntegerRange_Maximum(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue Slot Integer Minimum Value}'. + * + * + * @return the meta object for class 'Slot Integer Minimum Value'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue + * @generated + */ + EClass getSlotIntegerMinimumValue(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue#isExclusive Exclusive}'. + * + * + * @return the meta object for the attribute 'Exclusive'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue#isExclusive() + * @see #getSlotIntegerMinimumValue() + * @generated + */ + EAttribute getSlotIntegerMinimumValue_Exclusive(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue#getValue() + * @see #getSlotIntegerMinimumValue() + * @generated + */ + EAttribute getSlotIntegerMinimumValue_Value(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue Slot Integer Maximum Value}'. + * + * + * @return the meta object for class 'Slot Integer Maximum Value'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue + * @generated + */ + EClass getSlotIntegerMaximumValue(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue#isExclusive Exclusive}'. + * + * + * @return the meta object for the attribute 'Exclusive'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue#isExclusive() + * @see #getSlotIntegerMaximumValue() + * @generated + */ + EAttribute getSlotIntegerMaximumValue_Exclusive(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue#getValue() + * @see #getSlotIntegerMaximumValue() + * @generated + */ + EAttribute getSlotIntegerMaximumValue_Value(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimal Slot Decimal}'. + * + * + * @return the meta object for class 'Slot Decimal'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimal + * @generated + */ + EClass getSlotDecimal(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalValue Slot Decimal Value}'. + * + * + * @return the meta object for class 'Slot Decimal Value'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalValue + * @generated + */ + EClass getSlotDecimalValue(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalValue#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalValue#getValue() + * @see #getSlotDecimalValue() + * @generated + */ + EAttribute getSlotDecimalValue_Value(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange Slot Decimal Range}'. + * + * + * @return the meta object for class 'Slot Decimal Range'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange + * @generated + */ + EClass getSlotDecimalRange(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange#getMinimum Minimum}'. + * + * + * @return the meta object for the containment reference 'Minimum'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange#getMinimum() + * @see #getSlotDecimalRange() + * @generated + */ + EReference getSlotDecimalRange_Minimum(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange#getMaximum Maximum}'. + * + * + * @return the meta object for the containment reference 'Maximum'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange#getMaximum() + * @see #getSlotDecimalRange() + * @generated + */ + EReference getSlotDecimalRange_Maximum(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue Slot Decimal Minimum Value}'. + * + * + * @return the meta object for class 'Slot Decimal Minimum Value'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue + * @generated + */ + EClass getSlotDecimalMinimumValue(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue#isExclusive Exclusive}'. + * + * + * @return the meta object for the attribute 'Exclusive'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue#isExclusive() + * @see #getSlotDecimalMinimumValue() + * @generated + */ + EAttribute getSlotDecimalMinimumValue_Exclusive(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue#getValue() + * @see #getSlotDecimalMinimumValue() + * @generated + */ + EAttribute getSlotDecimalMinimumValue_Value(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue Slot Decimal Maximum Value}'. + * + * + * @return the meta object for class 'Slot Decimal Maximum Value'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue + * @generated + */ + EClass getSlotDecimalMaximumValue(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue#isExclusive Exclusive}'. + * + * + * @return the meta object for the attribute 'Exclusive'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue#isExclusive() + * @see #getSlotDecimalMaximumValue() + * @generated + */ + EAttribute getSlotDecimalMaximumValue_Exclusive(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue#getValue() + * @see #getSlotDecimalMaximumValue() + * @generated + */ + EAttribute getSlotDecimalMaximumValue_Value(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + EtlFactory getEtlFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
        + *
      • each class,
      • + *
      • each feature of each class,
      • + *
      • each enum,
      • + *
      • and each data type
      • + *
      + * + * @generated + */ + interface Literals + { + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.ExpressionTemplateImpl Expression Template}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.ExpressionTemplateImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getExpressionTemplate() + * @generated + */ + EClass EXPRESSION_TEMPLATE = eINSTANCE.getExpressionTemplate(); + + /** + * The meta object literal for the 'Primitive' attribute feature. + * + * + * @generated + */ + EAttribute EXPRESSION_TEMPLATE__PRIMITIVE = eINSTANCE.getExpressionTemplate_Primitive(); + + /** + * The meta object literal for the 'Slot' containment reference feature. + * + * + * @generated + */ + EReference EXPRESSION_TEMPLATE__SLOT = eINSTANCE.getExpressionTemplate_Slot(); + + /** + * The meta object literal for the 'Expression' containment reference feature. + * + * + * @generated + */ + EReference EXPRESSION_TEMPLATE__EXPRESSION = eINSTANCE.getExpressionTemplate_Expression(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SubExpressionImpl Sub Expression}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SubExpressionImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSubExpression() + * @generated + */ + EClass SUB_EXPRESSION = eINSTANCE.getSubExpression(); + + /** + * The meta object literal for the 'Focus Concepts' containment reference list feature. + * + * + * @generated + */ + EReference SUB_EXPRESSION__FOCUS_CONCEPTS = eINSTANCE.getSubExpression_FocusConcepts(); + + /** + * The meta object literal for the 'Refinement' containment reference feature. + * + * + * @generated + */ + EReference SUB_EXPRESSION__REFINEMENT = eINSTANCE.getSubExpression_Refinement(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.FocusConceptImpl Focus Concept}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.FocusConceptImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getFocusConcept() + * @generated + */ + EClass FOCUS_CONCEPT = eINSTANCE.getFocusConcept(); + + /** + * The meta object literal for the 'Slot' containment reference feature. + * + * + * @generated + */ + EReference FOCUS_CONCEPT__SLOT = eINSTANCE.getFocusConcept_Slot(); + + /** + * The meta object literal for the 'Concept' containment reference feature. + * + * + * @generated + */ + EReference FOCUS_CONCEPT__CONCEPT = eINSTANCE.getFocusConcept_Concept(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.RefinementImpl Refinement}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.RefinementImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getRefinement() + * @generated + */ + EClass REFINEMENT = eINSTANCE.getRefinement(); + + /** + * The meta object literal for the 'Attributes' containment reference list feature. + * + * + * @generated + */ + EReference REFINEMENT__ATTRIBUTES = eINSTANCE.getRefinement_Attributes(); + + /** + * The meta object literal for the 'Groups' containment reference list feature. + * + * + * @generated + */ + EReference REFINEMENT__GROUPS = eINSTANCE.getRefinement_Groups(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.AttributeGroupImpl Attribute Group}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.AttributeGroupImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getAttributeGroup() + * @generated + */ + EClass ATTRIBUTE_GROUP = eINSTANCE.getAttributeGroup(); + + /** + * The meta object literal for the 'Slot' containment reference feature. + * + * + * @generated + */ + EReference ATTRIBUTE_GROUP__SLOT = eINSTANCE.getAttributeGroup_Slot(); + + /** + * The meta object literal for the 'Attributes' containment reference list feature. + * + * + * @generated + */ + EReference ATTRIBUTE_GROUP__ATTRIBUTES = eINSTANCE.getAttributeGroup_Attributes(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.AttributeImpl Attribute}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.AttributeImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getAttribute() + * @generated + */ + EClass ATTRIBUTE = eINSTANCE.getAttribute(); + + /** + * The meta object literal for the 'Slot' containment reference feature. + * + * + * @generated + */ + EReference ATTRIBUTE__SLOT = eINSTANCE.getAttribute_Slot(); + + /** + * The meta object literal for the 'Name' containment reference feature. + * + * + * @generated + */ + EReference ATTRIBUTE__NAME = eINSTANCE.getAttribute_Name(); + + /** + * The meta object literal for the 'Value' containment reference feature. + * + * + * @generated + */ + EReference ATTRIBUTE__VALUE = eINSTANCE.getAttribute_Value(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.AttributeValueImpl Attribute Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.AttributeValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getAttributeValue() + * @generated + */ + EClass ATTRIBUTE_VALUE = eINSTANCE.getAttributeValue(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.ConceptIdReplacementSlotImpl Concept Id Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.ConceptIdReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getConceptIdReplacementSlot() + * @generated + */ + EClass CONCEPT_ID_REPLACEMENT_SLOT = eINSTANCE.getConceptIdReplacementSlot(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.ExpressionReplacementSlotImpl Expression Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.ExpressionReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getExpressionReplacementSlot() + * @generated + */ + EClass EXPRESSION_REPLACEMENT_SLOT = eINSTANCE.getExpressionReplacementSlot(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.TokenReplacementSlotImpl Token Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.TokenReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getTokenReplacementSlot() + * @generated + */ + EClass TOKEN_REPLACEMENT_SLOT = eINSTANCE.getTokenReplacementSlot(); + + /** + * The meta object literal for the 'Tokens' attribute list feature. + * + * + * @generated + */ + EAttribute TOKEN_REPLACEMENT_SLOT__TOKENS = eINSTANCE.getTokenReplacementSlot_Tokens(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute TOKEN_REPLACEMENT_SLOT__NAME = eINSTANCE.getTokenReplacementSlot_Name(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.TemplateInformationSlotImpl Template Information Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.TemplateInformationSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getTemplateInformationSlot() + * @generated + */ + EClass TEMPLATE_INFORMATION_SLOT = eINSTANCE.getTemplateInformationSlot(); + + /** + * The meta object literal for the 'Cardinality' containment reference feature. + * + * + * @generated + */ + EReference TEMPLATE_INFORMATION_SLOT__CARDINALITY = eINSTANCE.getTemplateInformationSlot_Cardinality(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute TEMPLATE_INFORMATION_SLOT__NAME = eINSTANCE.getTemplateInformationSlot_Name(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.ConcreteValueReplacementSlotImpl Concrete Value Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.ConcreteValueReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getConcreteValueReplacementSlot() + * @generated + */ + EClass CONCRETE_VALUE_REPLACEMENT_SLOT = eINSTANCE.getConcreteValueReplacementSlot(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute CONCRETE_VALUE_REPLACEMENT_SLOT__NAME = eINSTANCE.getConcreteValueReplacementSlot_Name(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.StringReplacementSlotImpl String Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.StringReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getStringReplacementSlot() + * @generated + */ + EClass STRING_REPLACEMENT_SLOT = eINSTANCE.getStringReplacementSlot(); + + /** + * The meta object literal for the 'Values' attribute list feature. + * + * + * @generated + */ + EAttribute STRING_REPLACEMENT_SLOT__VALUES = eINSTANCE.getStringReplacementSlot_Values(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.IntegerReplacementSlotImpl Integer Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.IntegerReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getIntegerReplacementSlot() + * @generated + */ + EClass INTEGER_REPLACEMENT_SLOT = eINSTANCE.getIntegerReplacementSlot(); + + /** + * The meta object literal for the 'Values' containment reference list feature. + * + * + * @generated + */ + EReference INTEGER_REPLACEMENT_SLOT__VALUES = eINSTANCE.getIntegerReplacementSlot_Values(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.DecimalReplacementSlotImpl Decimal Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.DecimalReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getDecimalReplacementSlot() + * @generated + */ + EClass DECIMAL_REPLACEMENT_SLOT = eINSTANCE.getDecimalReplacementSlot(); + + /** + * The meta object literal for the 'Values' containment reference list feature. + * + * + * @generated + */ + EReference DECIMAL_REPLACEMENT_SLOT__VALUES = eINSTANCE.getDecimalReplacementSlot_Values(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.EtlCardinalityImpl Cardinality}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlCardinalityImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getEtlCardinality() + * @generated + */ + EClass ETL_CARDINALITY = eINSTANCE.getEtlCardinality(); + + /** + * The meta object literal for the 'Min' attribute feature. + * + * + * @generated + */ + EAttribute ETL_CARDINALITY__MIN = eINSTANCE.getEtlCardinality_Min(); + + /** + * The meta object literal for the 'Max' attribute feature. + * + * + * @generated + */ + EAttribute ETL_CARDINALITY__MAX = eINSTANCE.getEtlCardinality_Max(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.ConceptReplacementSlotImpl Concept Replacement Slot}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.ConceptReplacementSlotImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getConceptReplacementSlot() + * @generated + */ + EClass CONCEPT_REPLACEMENT_SLOT = eINSTANCE.getConceptReplacementSlot(); + + /** + * The meta object literal for the 'Constraint' containment reference feature. + * + * + * @generated + */ + EReference CONCEPT_REPLACEMENT_SLOT__CONSTRAINT = eINSTANCE.getConceptReplacementSlot_Constraint(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute CONCEPT_REPLACEMENT_SLOT__NAME = eINSTANCE.getConceptReplacementSlot_Name(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.ConceptReferenceImpl Concept Reference}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.ConceptReferenceImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getConceptReference() + * @generated + */ + EClass CONCEPT_REFERENCE = eINSTANCE.getConceptReference(); + + /** + * The meta object literal for the 'Slot' containment reference feature. + * + * + * @generated + */ + EReference CONCEPT_REFERENCE__SLOT = eINSTANCE.getConceptReference_Slot(); + + /** + * The meta object literal for the 'Id' attribute feature. + * + * + * @generated + */ + EAttribute CONCEPT_REFERENCE__ID = eINSTANCE.getConceptReference_Id(); + + /** + * The meta object literal for the 'Term' attribute feature. + * + * + * @generated + */ + EAttribute CONCEPT_REFERENCE__TERM = eINSTANCE.getConceptReference_Term(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.StringValueImpl String Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.StringValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getStringValue() + * @generated + */ + EClass STRING_VALUE = eINSTANCE.getStringValue(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute STRING_VALUE__VALUE = eINSTANCE.getStringValue_Value(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.IntegerValueImpl Integer Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.IntegerValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getIntegerValue() + * @generated + */ + EClass INTEGER_VALUE = eINSTANCE.getIntegerValue(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute INTEGER_VALUE__VALUE = eINSTANCE.getIntegerValue_Value(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.DecimalValueImpl Decimal Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.DecimalValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getDecimalValue() + * @generated + */ + EClass DECIMAL_VALUE = eINSTANCE.getDecimalValue(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute DECIMAL_VALUE__VALUE = eINSTANCE.getDecimalValue_Value(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerImpl Slot Integer}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotInteger() + * @generated + */ + EClass SLOT_INTEGER = eINSTANCE.getSlotInteger(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerValueImpl Slot Integer Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotIntegerValue() + * @generated + */ + EClass SLOT_INTEGER_VALUE = eINSTANCE.getSlotIntegerValue(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute SLOT_INTEGER_VALUE__VALUE = eINSTANCE.getSlotIntegerValue_Value(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerRangeImpl Slot Integer Range}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerRangeImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotIntegerRange() + * @generated + */ + EClass SLOT_INTEGER_RANGE = eINSTANCE.getSlotIntegerRange(); + + /** + * The meta object literal for the 'Minimum' containment reference feature. + * + * + * @generated + */ + EReference SLOT_INTEGER_RANGE__MINIMUM = eINSTANCE.getSlotIntegerRange_Minimum(); + + /** + * The meta object literal for the 'Maximum' containment reference feature. + * + * + * @generated + */ + EReference SLOT_INTEGER_RANGE__MAXIMUM = eINSTANCE.getSlotIntegerRange_Maximum(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerMinimumValueImpl Slot Integer Minimum Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerMinimumValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotIntegerMinimumValue() + * @generated + */ + EClass SLOT_INTEGER_MINIMUM_VALUE = eINSTANCE.getSlotIntegerMinimumValue(); + + /** + * The meta object literal for the 'Exclusive' attribute feature. + * + * + * @generated + */ + EAttribute SLOT_INTEGER_MINIMUM_VALUE__EXCLUSIVE = eINSTANCE.getSlotIntegerMinimumValue_Exclusive(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute SLOT_INTEGER_MINIMUM_VALUE__VALUE = eINSTANCE.getSlotIntegerMinimumValue_Value(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerMaximumValueImpl Slot Integer Maximum Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerMaximumValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotIntegerMaximumValue() + * @generated + */ + EClass SLOT_INTEGER_MAXIMUM_VALUE = eINSTANCE.getSlotIntegerMaximumValue(); + + /** + * The meta object literal for the 'Exclusive' attribute feature. + * + * + * @generated + */ + EAttribute SLOT_INTEGER_MAXIMUM_VALUE__EXCLUSIVE = eINSTANCE.getSlotIntegerMaximumValue_Exclusive(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute SLOT_INTEGER_MAXIMUM_VALUE__VALUE = eINSTANCE.getSlotIntegerMaximumValue_Value(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalImpl Slot Decimal}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotDecimal() + * @generated + */ + EClass SLOT_DECIMAL = eINSTANCE.getSlotDecimal(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalValueImpl Slot Decimal Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotDecimalValue() + * @generated + */ + EClass SLOT_DECIMAL_VALUE = eINSTANCE.getSlotDecimalValue(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute SLOT_DECIMAL_VALUE__VALUE = eINSTANCE.getSlotDecimalValue_Value(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalRangeImpl Slot Decimal Range}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalRangeImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotDecimalRange() + * @generated + */ + EClass SLOT_DECIMAL_RANGE = eINSTANCE.getSlotDecimalRange(); + + /** + * The meta object literal for the 'Minimum' containment reference feature. + * + * + * @generated + */ + EReference SLOT_DECIMAL_RANGE__MINIMUM = eINSTANCE.getSlotDecimalRange_Minimum(); + + /** + * The meta object literal for the 'Maximum' containment reference feature. + * + * + * @generated + */ + EReference SLOT_DECIMAL_RANGE__MAXIMUM = eINSTANCE.getSlotDecimalRange_Maximum(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalMinimumValueImpl Slot Decimal Minimum Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalMinimumValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotDecimalMinimumValue() + * @generated + */ + EClass SLOT_DECIMAL_MINIMUM_VALUE = eINSTANCE.getSlotDecimalMinimumValue(); + + /** + * The meta object literal for the 'Exclusive' attribute feature. + * + * + * @generated + */ + EAttribute SLOT_DECIMAL_MINIMUM_VALUE__EXCLUSIVE = eINSTANCE.getSlotDecimalMinimumValue_Exclusive(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute SLOT_DECIMAL_MINIMUM_VALUE__VALUE = eINSTANCE.getSlotDecimalMinimumValue_Value(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalMaximumValueImpl Slot Decimal Maximum Value}' class. + * + * + * @see com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalMaximumValueImpl + * @see com.b2international.snowowl.snomed.etl.etl.impl.EtlPackageImpl#getSlotDecimalMaximumValue() + * @generated + */ + EClass SLOT_DECIMAL_MAXIMUM_VALUE = eINSTANCE.getSlotDecimalMaximumValue(); + + /** + * The meta object literal for the 'Exclusive' attribute feature. + * + * + * @generated + */ + EAttribute SLOT_DECIMAL_MAXIMUM_VALUE__EXCLUSIVE = eINSTANCE.getSlotDecimalMaximumValue_Exclusive(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute SLOT_DECIMAL_MAXIMUM_VALUE__VALUE = eINSTANCE.getSlotDecimalMaximumValue_Value(); + + } + +} //EtlPackage diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ExpressionReplacementSlot.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ExpressionReplacementSlot.java new file mode 100644 index 00000000000..8c2c7e4744a --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ExpressionReplacementSlot.java @@ -0,0 +1,31 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + + +/** + * + * A representation of the model object 'Expression Replacement Slot'. + * + * + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getExpressionReplacementSlot() + * @model + * @generated + */ +public interface ExpressionReplacementSlot extends ConceptReplacementSlot +{ +} // ExpressionReplacementSlot diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ExpressionTemplate.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ExpressionTemplate.java new file mode 100644 index 00000000000..192162fc1cd --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/ExpressionTemplate.java @@ -0,0 +1,106 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Expression Template'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate#isPrimitive Primitive}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate#getSlot Slot}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate#getExpression Expression}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getExpressionTemplate() + * @model + * @generated + */ +public interface ExpressionTemplate extends EObject +{ + /** + * Returns the value of the 'Primitive' attribute. + * + * + * @return the value of the 'Primitive' attribute. + * @see #setPrimitive(boolean) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getExpressionTemplate_Primitive() + * @model + * @generated + */ + boolean isPrimitive(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate#isPrimitive Primitive}' attribute. + * + * + * @param value the new value of the 'Primitive' attribute. + * @see #isPrimitive() + * @generated + */ + void setPrimitive(boolean value); + + /** + * Returns the value of the 'Slot' containment reference. + * + * + * @return the value of the 'Slot' containment reference. + * @see #setSlot(TokenReplacementSlot) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getExpressionTemplate_Slot() + * @model containment="true" + * @generated + */ + TokenReplacementSlot getSlot(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate#getSlot Slot}' containment reference. + * + * + * @param value the new value of the 'Slot' containment reference. + * @see #getSlot() + * @generated + */ + void setSlot(TokenReplacementSlot value); + + /** + * Returns the value of the 'Expression' containment reference. + * + * + * @return the value of the 'Expression' containment reference. + * @see #setExpression(SubExpression) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getExpressionTemplate_Expression() + * @model containment="true" + * @generated + */ + SubExpression getExpression(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate#getExpression Expression}' containment reference. + * + * + * @param value the new value of the 'Expression' containment reference. + * @see #getExpression() + * @generated + */ + void setExpression(SubExpression value); + +} // ExpressionTemplate diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/FocusConcept.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/FocusConcept.java new file mode 100644 index 00000000000..d8d95517741 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/FocusConcept.java @@ -0,0 +1,83 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Focus Concept'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.FocusConcept#getSlot Slot}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.FocusConcept#getConcept Concept}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getFocusConcept() + * @model + * @generated + */ +public interface FocusConcept extends EObject +{ + /** + * Returns the value of the 'Slot' containment reference. + * + * + * @return the value of the 'Slot' containment reference. + * @see #setSlot(TemplateInformationSlot) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getFocusConcept_Slot() + * @model containment="true" + * @generated + */ + TemplateInformationSlot getSlot(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.FocusConcept#getSlot Slot}' containment reference. + * + * + * @param value the new value of the 'Slot' containment reference. + * @see #getSlot() + * @generated + */ + void setSlot(TemplateInformationSlot value); + + /** + * Returns the value of the 'Concept' containment reference. + * + * + * @return the value of the 'Concept' containment reference. + * @see #setConcept(ConceptReference) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getFocusConcept_Concept() + * @model containment="true" + * @generated + */ + ConceptReference getConcept(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.FocusConcept#getConcept Concept}' containment reference. + * + * + * @param value the new value of the 'Concept' containment reference. + * @see #getConcept() + * @generated + */ + void setConcept(ConceptReference value); + +} // FocusConcept diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/IntegerReplacementSlot.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/IntegerReplacementSlot.java new file mode 100644 index 00000000000..85b97bd3bad --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/IntegerReplacementSlot.java @@ -0,0 +1,50 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Integer Replacement Slot'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.IntegerReplacementSlot#getValues Values}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getIntegerReplacementSlot() + * @model + * @generated + */ +public interface IntegerReplacementSlot extends ConcreteValueReplacementSlot +{ + /** + * Returns the value of the 'Values' containment reference list. + * The list contents are of type {@link com.b2international.snowowl.snomed.etl.etl.SlotInteger}. + * + * + * @return the value of the 'Values' containment reference list. + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getIntegerReplacementSlot_Values() + * @model containment="true" + * @generated + */ + EList getValues(); + +} // IntegerReplacementSlot diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/IntegerValue.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/IntegerValue.java new file mode 100644 index 00000000000..965941ccf34 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/IntegerValue.java @@ -0,0 +1,59 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + + +/** + * + * A representation of the model object 'Integer Value'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.IntegerValue#getValue Value}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getIntegerValue() + * @model + * @generated + */ +public interface IntegerValue extends AttributeValue +{ + /** + * Returns the value of the 'Value' attribute. + * + * + * @return the value of the 'Value' attribute. + * @see #setValue(int) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getIntegerValue_Value() + * @model + * @generated + */ + int getValue(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.IntegerValue#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(int value); + +} // IntegerValue diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/Refinement.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/Refinement.java new file mode 100644 index 00000000000..8ac011e532b --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/Refinement.java @@ -0,0 +1,65 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Refinement'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.Refinement#getAttributes Attributes}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.Refinement#getGroups Groups}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getRefinement() + * @model + * @generated + */ +public interface Refinement extends EObject +{ + /** + * Returns the value of the 'Attributes' containment reference list. + * The list contents are of type {@link com.b2international.snowowl.snomed.etl.etl.Attribute}. + * + * + * @return the value of the 'Attributes' containment reference list. + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getRefinement_Attributes() + * @model containment="true" + * @generated + */ + EList getAttributes(); + + /** + * Returns the value of the 'Groups' containment reference list. + * The list contents are of type {@link com.b2international.snowowl.snomed.etl.etl.AttributeGroup}. + * + * + * @return the value of the 'Groups' containment reference list. + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getRefinement_Groups() + * @model containment="true" + * @generated + */ + EList getGroups(); + +} // Refinement diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/OrClause.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimal.java similarity index 63% rename from snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/OrClause.java rename to snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimal.java index d166ef818f9..0271b84daaf 100644 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/OrClause.java +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimal.java @@ -1,30 +1,32 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.dsl.query.queryast; +package com.b2international.snowowl.snomed.etl.etl; +import org.eclipse.emf.ecore.EObject; /** * - * A representation of the model object 'Or Clause'. + * A representation of the model object 'Slot Decimal'. * * * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getOrClause() + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotDecimal() * @model * @generated */ -public interface OrClause extends BinaryRValue { -} // OrClause \ No newline at end of file +public interface SlotDecimal extends EObject +{ +} // SlotDecimal diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalMaximumValue.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalMaximumValue.java new file mode 100644 index 00000000000..c266253de12 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalMaximumValue.java @@ -0,0 +1,85 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import java.math.BigDecimal; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Slot Decimal Maximum Value'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue#isExclusive Exclusive}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue#getValue Value}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotDecimalMaximumValue() + * @model + * @generated + */ +public interface SlotDecimalMaximumValue extends EObject +{ + /** + * Returns the value of the 'Exclusive' attribute. + * + * + * @return the value of the 'Exclusive' attribute. + * @see #setExclusive(boolean) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotDecimalMaximumValue_Exclusive() + * @model + * @generated + */ + boolean isExclusive(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue#isExclusive Exclusive}' attribute. + * + * + * @param value the new value of the 'Exclusive' attribute. + * @see #isExclusive() + * @generated + */ + void setExclusive(boolean value); + + /** + * Returns the value of the 'Value' attribute. + * + * + * @return the value of the 'Value' attribute. + * @see #setValue(BigDecimal) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotDecimalMaximumValue_Value() + * @model + * @generated + */ + BigDecimal getValue(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(BigDecimal value); + +} // SlotDecimalMaximumValue diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalMinimumValue.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalMinimumValue.java new file mode 100644 index 00000000000..33bfecced70 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalMinimumValue.java @@ -0,0 +1,85 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import java.math.BigDecimal; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Slot Decimal Minimum Value'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue#isExclusive Exclusive}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue#getValue Value}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotDecimalMinimumValue() + * @model + * @generated + */ +public interface SlotDecimalMinimumValue extends EObject +{ + /** + * Returns the value of the 'Exclusive' attribute. + * + * + * @return the value of the 'Exclusive' attribute. + * @see #setExclusive(boolean) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotDecimalMinimumValue_Exclusive() + * @model + * @generated + */ + boolean isExclusive(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue#isExclusive Exclusive}' attribute. + * + * + * @param value the new value of the 'Exclusive' attribute. + * @see #isExclusive() + * @generated + */ + void setExclusive(boolean value); + + /** + * Returns the value of the 'Value' attribute. + * + * + * @return the value of the 'Value' attribute. + * @see #setValue(BigDecimal) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotDecimalMinimumValue_Value() + * @model + * @generated + */ + BigDecimal getValue(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(BigDecimal value); + +} // SlotDecimalMinimumValue diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalRange.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalRange.java new file mode 100644 index 00000000000..c1bbf504170 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalRange.java @@ -0,0 +1,82 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + + +/** + * + * A representation of the model object 'Slot Decimal Range'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange#getMinimum Minimum}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange#getMaximum Maximum}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotDecimalRange() + * @model + * @generated + */ +public interface SlotDecimalRange extends SlotDecimal +{ + /** + * Returns the value of the 'Minimum' containment reference. + * + * + * @return the value of the 'Minimum' containment reference. + * @see #setMinimum(SlotDecimalMinimumValue) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotDecimalRange_Minimum() + * @model containment="true" + * @generated + */ + SlotDecimalMinimumValue getMinimum(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange#getMinimum Minimum}' containment reference. + * + * + * @param value the new value of the 'Minimum' containment reference. + * @see #getMinimum() + * @generated + */ + void setMinimum(SlotDecimalMinimumValue value); + + /** + * Returns the value of the 'Maximum' containment reference. + * + * + * @return the value of the 'Maximum' containment reference. + * @see #setMaximum(SlotDecimalMaximumValue) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotDecimalRange_Maximum() + * @model containment="true" + * @generated + */ + SlotDecimalMaximumValue getMaximum(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange#getMaximum Maximum}' containment reference. + * + * + * @param value the new value of the 'Maximum' containment reference. + * @see #getMaximum() + * @generated + */ + void setMaximum(SlotDecimalMaximumValue value); + +} // SlotDecimalRange diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalValue.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalValue.java new file mode 100644 index 00000000000..1357fd873b9 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotDecimalValue.java @@ -0,0 +1,60 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import java.math.BigDecimal; + +/** + * + * A representation of the model object 'Slot Decimal Value'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalValue#getValue Value}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotDecimalValue() + * @model + * @generated + */ +public interface SlotDecimalValue extends SlotDecimal +{ + /** + * Returns the value of the 'Value' attribute. + * + * + * @return the value of the 'Value' attribute. + * @see #setValue(BigDecimal) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotDecimalValue_Value() + * @model + * @generated + */ + BigDecimal getValue(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalValue#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(BigDecimal value); + +} // SlotDecimalValue diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/NotClause.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotInteger.java similarity index 63% rename from snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/NotClause.java rename to snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotInteger.java index ce56574df39..fd69092eb36 100644 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/queryast/NotClause.java +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotInteger.java @@ -1,30 +1,32 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.dsl.query.queryast; +package com.b2international.snowowl.snomed.etl.etl; +import org.eclipse.emf.ecore.EObject; /** * - * A representation of the model object 'Not Clause'. + * A representation of the model object 'Slot Integer'. * * * - * @see com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastPackage#getNotClause() + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotInteger() * @model * @generated */ -public interface NotClause extends UnaryRValue { -} // NotClause \ No newline at end of file +public interface SlotInteger extends EObject +{ +} // SlotInteger diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerMaximumValue.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerMaximumValue.java new file mode 100644 index 00000000000..fbb9f3dc774 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerMaximumValue.java @@ -0,0 +1,83 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Slot Integer Maximum Value'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue#isExclusive Exclusive}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue#getValue Value}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotIntegerMaximumValue() + * @model + * @generated + */ +public interface SlotIntegerMaximumValue extends EObject +{ + /** + * Returns the value of the 'Exclusive' attribute. + * + * + * @return the value of the 'Exclusive' attribute. + * @see #setExclusive(boolean) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotIntegerMaximumValue_Exclusive() + * @model + * @generated + */ + boolean isExclusive(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue#isExclusive Exclusive}' attribute. + * + * + * @param value the new value of the 'Exclusive' attribute. + * @see #isExclusive() + * @generated + */ + void setExclusive(boolean value); + + /** + * Returns the value of the 'Value' attribute. + * + * + * @return the value of the 'Value' attribute. + * @see #setValue(int) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotIntegerMaximumValue_Value() + * @model + * @generated + */ + int getValue(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(int value); + +} // SlotIntegerMaximumValue diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerMinimumValue.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerMinimumValue.java new file mode 100644 index 00000000000..bea29e3e35d --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerMinimumValue.java @@ -0,0 +1,83 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Slot Integer Minimum Value'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue#isExclusive Exclusive}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue#getValue Value}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotIntegerMinimumValue() + * @model + * @generated + */ +public interface SlotIntegerMinimumValue extends EObject +{ + /** + * Returns the value of the 'Exclusive' attribute. + * + * + * @return the value of the 'Exclusive' attribute. + * @see #setExclusive(boolean) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotIntegerMinimumValue_Exclusive() + * @model + * @generated + */ + boolean isExclusive(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue#isExclusive Exclusive}' attribute. + * + * + * @param value the new value of the 'Exclusive' attribute. + * @see #isExclusive() + * @generated + */ + void setExclusive(boolean value); + + /** + * Returns the value of the 'Value' attribute. + * + * + * @return the value of the 'Value' attribute. + * @see #setValue(int) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotIntegerMinimumValue_Value() + * @model + * @generated + */ + int getValue(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(int value); + +} // SlotIntegerMinimumValue diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerRange.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerRange.java new file mode 100644 index 00000000000..b82b2a33336 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerRange.java @@ -0,0 +1,82 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + + +/** + * + * A representation of the model object 'Slot Integer Range'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange#getMinimum Minimum}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange#getMaximum Maximum}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotIntegerRange() + * @model + * @generated + */ +public interface SlotIntegerRange extends SlotInteger +{ + /** + * Returns the value of the 'Minimum' containment reference. + * + * + * @return the value of the 'Minimum' containment reference. + * @see #setMinimum(SlotIntegerMinimumValue) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotIntegerRange_Minimum() + * @model containment="true" + * @generated + */ + SlotIntegerMinimumValue getMinimum(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange#getMinimum Minimum}' containment reference. + * + * + * @param value the new value of the 'Minimum' containment reference. + * @see #getMinimum() + * @generated + */ + void setMinimum(SlotIntegerMinimumValue value); + + /** + * Returns the value of the 'Maximum' containment reference. + * + * + * @return the value of the 'Maximum' containment reference. + * @see #setMaximum(SlotIntegerMaximumValue) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotIntegerRange_Maximum() + * @model containment="true" + * @generated + */ + SlotIntegerMaximumValue getMaximum(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange#getMaximum Maximum}' containment reference. + * + * + * @param value the new value of the 'Maximum' containment reference. + * @see #getMaximum() + * @generated + */ + void setMaximum(SlotIntegerMaximumValue value); + +} // SlotIntegerRange diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerValue.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerValue.java new file mode 100644 index 00000000000..2e9faa3582f --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SlotIntegerValue.java @@ -0,0 +1,59 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + + +/** + * + * A representation of the model object 'Slot Integer Value'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerValue#getValue Value}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotIntegerValue() + * @model + * @generated + */ +public interface SlotIntegerValue extends SlotInteger +{ + /** + * Returns the value of the 'Value' attribute. + * + * + * @return the value of the 'Value' attribute. + * @see #setValue(int) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSlotIntegerValue_Value() + * @model + * @generated + */ + int getValue(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerValue#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(int value); + +} // SlotIntegerValue diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/StringReplacementSlot.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/StringReplacementSlot.java new file mode 100644 index 00000000000..560cb61630e --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/StringReplacementSlot.java @@ -0,0 +1,50 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'String Replacement Slot'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.StringReplacementSlot#getValues Values}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getStringReplacementSlot() + * @model + * @generated + */ +public interface StringReplacementSlot extends ConcreteValueReplacementSlot +{ + /** + * Returns the value of the 'Values' attribute list. + * The list contents are of type {@link java.lang.String}. + * + * + * @return the value of the 'Values' attribute list. + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getStringReplacementSlot_Values() + * @model unique="false" + * @generated + */ + EList getValues(); + +} // StringReplacementSlot diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/StringValue.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/StringValue.java new file mode 100644 index 00000000000..367166e8377 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/StringValue.java @@ -0,0 +1,59 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + + +/** + * + * A representation of the model object 'String Value'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.StringValue#getValue Value}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getStringValue() + * @model + * @generated + */ +public interface StringValue extends AttributeValue +{ + /** + * Returns the value of the 'Value' attribute. + * + * + * @return the value of the 'Value' attribute. + * @see #setValue(String) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getStringValue_Value() + * @model + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.StringValue#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // StringValue diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SubExpression.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SubExpression.java new file mode 100644 index 00000000000..2682f15ca2f --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/SubExpression.java @@ -0,0 +1,73 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Sub Expression'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SubExpression#getFocusConcepts Focus Concepts}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.SubExpression#getRefinement Refinement}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSubExpression() + * @model + * @generated + */ +public interface SubExpression extends AttributeValue +{ + /** + * Returns the value of the 'Focus Concepts' containment reference list. + * The list contents are of type {@link com.b2international.snowowl.snomed.etl.etl.FocusConcept}. + * + * + * @return the value of the 'Focus Concepts' containment reference list. + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSubExpression_FocusConcepts() + * @model containment="true" + * @generated + */ + EList getFocusConcepts(); + + /** + * Returns the value of the 'Refinement' containment reference. + * + * + * @return the value of the 'Refinement' containment reference. + * @see #setRefinement(Refinement) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getSubExpression_Refinement() + * @model containment="true" + * @generated + */ + Refinement getRefinement(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.SubExpression#getRefinement Refinement}' containment reference. + * + * + * @param value the new value of the 'Refinement' containment reference. + * @see #getRefinement() + * @generated + */ + void setRefinement(Refinement value); + +} // SubExpression diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/TemplateInformationSlot.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/TemplateInformationSlot.java new file mode 100644 index 00000000000..9c6c248dd23 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/TemplateInformationSlot.java @@ -0,0 +1,83 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Template Information Slot'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot#getCardinality Cardinality}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot#getName Name}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getTemplateInformationSlot() + * @model + * @generated + */ +public interface TemplateInformationSlot extends EObject +{ + /** + * Returns the value of the 'Cardinality' containment reference. + * + * + * @return the value of the 'Cardinality' containment reference. + * @see #setCardinality(EtlCardinality) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getTemplateInformationSlot_Cardinality() + * @model containment="true" + * @generated + */ + EtlCardinality getCardinality(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot#getCardinality Cardinality}' containment reference. + * + * + * @param value the new value of the 'Cardinality' containment reference. + * @see #getCardinality() + * @generated + */ + void setCardinality(EtlCardinality value); + + /** + * Returns the value of the 'Name' attribute. + * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getTemplateInformationSlot_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // TemplateInformationSlot diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/TokenReplacementSlot.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/TokenReplacementSlot.java new file mode 100644 index 00000000000..fb8141d69cc --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/TokenReplacementSlot.java @@ -0,0 +1,75 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Token Replacement Slot'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot#getTokens Tokens}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot#getName Name}
      • + *
      + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getTokenReplacementSlot() + * @model + * @generated + */ +public interface TokenReplacementSlot extends EObject +{ + /** + * Returns the value of the 'Tokens' attribute list. + * The list contents are of type {@link java.lang.String}. + * + * + * @return the value of the 'Tokens' attribute list. + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getTokenReplacementSlot_Tokens() + * @model unique="false" + * @generated + */ + EList getTokens(); + + /** + * Returns the value of the 'Name' attribute. + * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#getTokenReplacementSlot_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // TokenReplacementSlot diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/AttributeGroupImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/AttributeGroupImpl.java new file mode 100644 index 00000000000..a33c7b68fa0 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/AttributeGroupImpl.java @@ -0,0 +1,257 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.Attribute; +import com.b2international.snowowl.snomed.etl.etl.AttributeGroup; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot; + +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.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Attribute Group'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.AttributeGroupImpl#getSlot Slot}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.AttributeGroupImpl#getAttributes Attributes}
      • + *
      + * + * @generated + */ +public class AttributeGroupImpl extends MinimalEObjectImpl.Container implements AttributeGroup +{ + /** + * The cached value of the '{@link #getSlot() Slot}' containment reference. + * + * + * @see #getSlot() + * @generated + * @ordered + */ + protected TemplateInformationSlot slot; + + /** + * The cached value of the '{@link #getAttributes() Attributes}' containment reference list. + * + * + * @see #getAttributes() + * @generated + * @ordered + */ + protected EList attributes; + + /** + * + * + * @generated + */ + protected AttributeGroupImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.ATTRIBUTE_GROUP; + } + + /** + * + * + * @generated + */ + @Override + public TemplateInformationSlot getSlot() + { + return slot; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSlot(TemplateInformationSlot newSlot, NotificationChain msgs) + { + TemplateInformationSlot oldSlot = slot; + slot = newSlot; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.ATTRIBUTE_GROUP__SLOT, oldSlot, newSlot); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setSlot(TemplateInformationSlot newSlot) + { + if (newSlot != slot) + { + NotificationChain msgs = null; + if (slot != null) + msgs = ((InternalEObject)slot).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.ATTRIBUTE_GROUP__SLOT, null, msgs); + if (newSlot != null) + msgs = ((InternalEObject)newSlot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.ATTRIBUTE_GROUP__SLOT, null, msgs); + msgs = basicSetSlot(newSlot, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.ATTRIBUTE_GROUP__SLOT, newSlot, newSlot)); + } + + /** + * + * + * @generated + */ + @Override + public EList getAttributes() + { + if (attributes == null) + { + attributes = new EObjectContainmentEList(Attribute.class, this, EtlPackage.ATTRIBUTE_GROUP__ATTRIBUTES); + } + return attributes; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case EtlPackage.ATTRIBUTE_GROUP__SLOT: + return basicSetSlot(null, msgs); + case EtlPackage.ATTRIBUTE_GROUP__ATTRIBUTES: + return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.ATTRIBUTE_GROUP__SLOT: + return getSlot(); + case EtlPackage.ATTRIBUTE_GROUP__ATTRIBUTES: + return getAttributes(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.ATTRIBUTE_GROUP__SLOT: + setSlot((TemplateInformationSlot)newValue); + return; + case EtlPackage.ATTRIBUTE_GROUP__ATTRIBUTES: + getAttributes().clear(); + getAttributes().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.ATTRIBUTE_GROUP__SLOT: + setSlot((TemplateInformationSlot)null); + return; + case EtlPackage.ATTRIBUTE_GROUP__ATTRIBUTES: + getAttributes().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.ATTRIBUTE_GROUP__SLOT: + return slot != null; + case EtlPackage.ATTRIBUTE_GROUP__ATTRIBUTES: + return attributes != null && !attributes.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //AttributeGroupImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/AttributeImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/AttributeImpl.java new file mode 100644 index 00000000000..6c82e733888 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/AttributeImpl.java @@ -0,0 +1,357 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.Attribute; +import com.b2international.snowowl.snomed.etl.etl.AttributeValue; +import com.b2international.snowowl.snomed.etl.etl.ConceptReference; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot; + +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.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Attribute'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.AttributeImpl#getSlot Slot}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.AttributeImpl#getName Name}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.AttributeImpl#getValue Value}
      • + *
      + * + * @generated + */ +public class AttributeImpl extends MinimalEObjectImpl.Container implements Attribute +{ + /** + * The cached value of the '{@link #getSlot() Slot}' containment reference. + * + * + * @see #getSlot() + * @generated + * @ordered + */ + protected TemplateInformationSlot slot; + + /** + * The cached value of the '{@link #getName() Name}' containment reference. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected ConceptReference name; + + /** + * The cached value of the '{@link #getValue() Value}' containment reference. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected AttributeValue value; + + /** + * + * + * @generated + */ + protected AttributeImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.ATTRIBUTE; + } + + /** + * + * + * @generated + */ + @Override + public TemplateInformationSlot getSlot() + { + return slot; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSlot(TemplateInformationSlot newSlot, NotificationChain msgs) + { + TemplateInformationSlot oldSlot = slot; + slot = newSlot; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.ATTRIBUTE__SLOT, oldSlot, newSlot); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setSlot(TemplateInformationSlot newSlot) + { + if (newSlot != slot) + { + NotificationChain msgs = null; + if (slot != null) + msgs = ((InternalEObject)slot).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.ATTRIBUTE__SLOT, null, msgs); + if (newSlot != null) + msgs = ((InternalEObject)newSlot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.ATTRIBUTE__SLOT, null, msgs); + msgs = basicSetSlot(newSlot, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.ATTRIBUTE__SLOT, newSlot, newSlot)); + } + + /** + * + * + * @generated + */ + @Override + public ConceptReference getName() + { + return name; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetName(ConceptReference newName, NotificationChain msgs) + { + ConceptReference oldName = name; + name = newName; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.ATTRIBUTE__NAME, oldName, newName); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setName(ConceptReference newName) + { + if (newName != name) + { + NotificationChain msgs = null; + if (name != null) + msgs = ((InternalEObject)name).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.ATTRIBUTE__NAME, null, msgs); + if (newName != null) + msgs = ((InternalEObject)newName).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.ATTRIBUTE__NAME, null, msgs); + msgs = basicSetName(newName, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.ATTRIBUTE__NAME, newName, newName)); + } + + /** + * + * + * @generated + */ + @Override + public AttributeValue getValue() + { + return value; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetValue(AttributeValue newValue, NotificationChain msgs) + { + AttributeValue oldValue = value; + value = newValue; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.ATTRIBUTE__VALUE, oldValue, newValue); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setValue(AttributeValue newValue) + { + if (newValue != value) + { + NotificationChain msgs = null; + if (value != null) + msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.ATTRIBUTE__VALUE, null, msgs); + if (newValue != null) + msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.ATTRIBUTE__VALUE, null, msgs); + msgs = basicSetValue(newValue, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.ATTRIBUTE__VALUE, newValue, newValue)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case EtlPackage.ATTRIBUTE__SLOT: + return basicSetSlot(null, msgs); + case EtlPackage.ATTRIBUTE__NAME: + return basicSetName(null, msgs); + case EtlPackage.ATTRIBUTE__VALUE: + return basicSetValue(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.ATTRIBUTE__SLOT: + return getSlot(); + case EtlPackage.ATTRIBUTE__NAME: + return getName(); + case EtlPackage.ATTRIBUTE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.ATTRIBUTE__SLOT: + setSlot((TemplateInformationSlot)newValue); + return; + case EtlPackage.ATTRIBUTE__NAME: + setName((ConceptReference)newValue); + return; + case EtlPackage.ATTRIBUTE__VALUE: + setValue((AttributeValue)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.ATTRIBUTE__SLOT: + setSlot((TemplateInformationSlot)null); + return; + case EtlPackage.ATTRIBUTE__NAME: + setName((ConceptReference)null); + return; + case EtlPackage.ATTRIBUTE__VALUE: + setValue((AttributeValue)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.ATTRIBUTE__SLOT: + return slot != null; + case EtlPackage.ATTRIBUTE__NAME: + return name != null; + case EtlPackage.ATTRIBUTE__VALUE: + return value != null; + } + return super.eIsSet(featureID); + } + +} //AttributeImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/AttributeValueImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/AttributeValueImpl.java new file mode 100644 index 00000000000..bda27fe6dea --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/AttributeValueImpl.java @@ -0,0 +1,55 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.AttributeValue; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Attribute Value'. + * + * + * @generated + */ +public class AttributeValueImpl extends MinimalEObjectImpl.Container implements AttributeValue +{ + /** + * + * + * @generated + */ + protected AttributeValueImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.ATTRIBUTE_VALUE; + } + +} //AttributeValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConceptIdReplacementSlotImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConceptIdReplacementSlotImpl.java new file mode 100644 index 00000000000..d5c84eed645 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConceptIdReplacementSlotImpl.java @@ -0,0 +1,53 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.ConceptIdReplacementSlot; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Concept Id Replacement Slot'. + * + * + * @generated + */ +public class ConceptIdReplacementSlotImpl extends ConceptReplacementSlotImpl implements ConceptIdReplacementSlot +{ + /** + * + * + * @generated + */ + protected ConceptIdReplacementSlotImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.CONCEPT_ID_REPLACEMENT_SLOT; + } + +} //ConceptIdReplacementSlotImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConceptReferenceImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConceptReferenceImpl.java new file mode 100644 index 00000000000..8d3f049853b --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConceptReferenceImpl.java @@ -0,0 +1,339 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.ConceptReference; +import com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; + +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.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Concept Reference'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.ConceptReferenceImpl#getSlot Slot}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.ConceptReferenceImpl#getId Id}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.ConceptReferenceImpl#getTerm Term}
      • + *
      + * + * @generated + */ +public class ConceptReferenceImpl extends AttributeValueImpl implements ConceptReference +{ + /** + * The cached value of the '{@link #getSlot() Slot}' containment reference. + * + * + * @see #getSlot() + * @generated + * @ordered + */ + protected ConceptReplacementSlot slot; + + /** + * The default value of the '{@link #getId() Id}' attribute. + * + * + * @see #getId() + * @generated + * @ordered + */ + protected static final String ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getId() Id}' attribute. + * + * + * @see #getId() + * @generated + * @ordered + */ + protected String id = ID_EDEFAULT; + + /** + * The default value of the '{@link #getTerm() Term}' attribute. + * + * + * @see #getTerm() + * @generated + * @ordered + */ + protected static final String TERM_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTerm() Term}' attribute. + * + * + * @see #getTerm() + * @generated + * @ordered + */ + protected String term = TERM_EDEFAULT; + + /** + * + * + * @generated + */ + protected ConceptReferenceImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.CONCEPT_REFERENCE; + } + + /** + * + * + * @generated + */ + @Override + public ConceptReplacementSlot getSlot() + { + return slot; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSlot(ConceptReplacementSlot newSlot, NotificationChain msgs) + { + ConceptReplacementSlot oldSlot = slot; + slot = newSlot; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.CONCEPT_REFERENCE__SLOT, oldSlot, newSlot); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setSlot(ConceptReplacementSlot newSlot) + { + if (newSlot != slot) + { + NotificationChain msgs = null; + if (slot != null) + msgs = ((InternalEObject)slot).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.CONCEPT_REFERENCE__SLOT, null, msgs); + if (newSlot != null) + msgs = ((InternalEObject)newSlot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.CONCEPT_REFERENCE__SLOT, null, msgs); + msgs = basicSetSlot(newSlot, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.CONCEPT_REFERENCE__SLOT, newSlot, newSlot)); + } + + /** + * + * + * @generated + */ + @Override + public String getId() + { + return id; + } + + /** + * + * + * @generated + */ + @Override + public void setId(String newId) + { + String oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.CONCEPT_REFERENCE__ID, oldId, id)); + } + + /** + * + * + * @generated + */ + @Override + public String getTerm() + { + return term; + } + + /** + * + * + * @generated + */ + @Override + public void setTerm(String newTerm) + { + String oldTerm = term; + term = newTerm; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.CONCEPT_REFERENCE__TERM, oldTerm, term)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case EtlPackage.CONCEPT_REFERENCE__SLOT: + return basicSetSlot(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.CONCEPT_REFERENCE__SLOT: + return getSlot(); + case EtlPackage.CONCEPT_REFERENCE__ID: + return getId(); + case EtlPackage.CONCEPT_REFERENCE__TERM: + return getTerm(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.CONCEPT_REFERENCE__SLOT: + setSlot((ConceptReplacementSlot)newValue); + return; + case EtlPackage.CONCEPT_REFERENCE__ID: + setId((String)newValue); + return; + case EtlPackage.CONCEPT_REFERENCE__TERM: + setTerm((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.CONCEPT_REFERENCE__SLOT: + setSlot((ConceptReplacementSlot)null); + return; + case EtlPackage.CONCEPT_REFERENCE__ID: + setId(ID_EDEFAULT); + return; + case EtlPackage.CONCEPT_REFERENCE__TERM: + setTerm(TERM_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.CONCEPT_REFERENCE__SLOT: + return slot != null; + case EtlPackage.CONCEPT_REFERENCE__ID: + return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); + case EtlPackage.CONCEPT_REFERENCE__TERM: + return TERM_EDEFAULT == null ? term != null : !TERM_EDEFAULT.equals(term); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (id: "); + result.append(id); + result.append(", term: "); + result.append(term); + result.append(')'); + return result.toString(); + } + +} //ConceptReferenceImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConceptReplacementSlotImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConceptReplacementSlotImpl.java new file mode 100644 index 00000000000..42a7718f492 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConceptReplacementSlotImpl.java @@ -0,0 +1,283 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint; + +import com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; + +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.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Concept Replacement Slot'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.ConceptReplacementSlotImpl#getConstraint Constraint}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.ConceptReplacementSlotImpl#getName Name}
      • + *
      + * + * @generated + */ +public class ConceptReplacementSlotImpl extends MinimalEObjectImpl.Container implements ConceptReplacementSlot +{ + /** + * The cached value of the '{@link #getConstraint() Constraint}' containment reference. + * + * + * @see #getConstraint() + * @generated + * @ordered + */ + protected ExpressionConstraint constraint; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected ConceptReplacementSlotImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.CONCEPT_REPLACEMENT_SLOT; + } + + /** + * + * + * @generated + */ + @Override + public ExpressionConstraint getConstraint() + { + return constraint; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetConstraint(ExpressionConstraint newConstraint, NotificationChain msgs) + { + ExpressionConstraint oldConstraint = constraint; + constraint = newConstraint; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.CONCEPT_REPLACEMENT_SLOT__CONSTRAINT, oldConstraint, newConstraint); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setConstraint(ExpressionConstraint newConstraint) + { + if (newConstraint != constraint) + { + NotificationChain msgs = null; + if (constraint != null) + msgs = ((InternalEObject)constraint).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.CONCEPT_REPLACEMENT_SLOT__CONSTRAINT, null, msgs); + if (newConstraint != null) + msgs = ((InternalEObject)newConstraint).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.CONCEPT_REPLACEMENT_SLOT__CONSTRAINT, null, msgs); + msgs = basicSetConstraint(newConstraint, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.CONCEPT_REPLACEMENT_SLOT__CONSTRAINT, newConstraint, newConstraint)); + } + + /** + * + * + * @generated + */ + @Override + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + @Override + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.CONCEPT_REPLACEMENT_SLOT__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case EtlPackage.CONCEPT_REPLACEMENT_SLOT__CONSTRAINT: + return basicSetConstraint(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.CONCEPT_REPLACEMENT_SLOT__CONSTRAINT: + return getConstraint(); + case EtlPackage.CONCEPT_REPLACEMENT_SLOT__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.CONCEPT_REPLACEMENT_SLOT__CONSTRAINT: + setConstraint((ExpressionConstraint)newValue); + return; + case EtlPackage.CONCEPT_REPLACEMENT_SLOT__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.CONCEPT_REPLACEMENT_SLOT__CONSTRAINT: + setConstraint((ExpressionConstraint)null); + return; + case EtlPackage.CONCEPT_REPLACEMENT_SLOT__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.CONCEPT_REPLACEMENT_SLOT__CONSTRAINT: + return constraint != null; + case EtlPackage.CONCEPT_REPLACEMENT_SLOT__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //ConceptReplacementSlotImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConcreteValueReplacementSlotImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConcreteValueReplacementSlotImpl.java new file mode 100644 index 00000000000..9e8de0836e5 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ConcreteValueReplacementSlotImpl.java @@ -0,0 +1,191 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.ConcreteValueReplacementSlot; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Concrete Value Replacement Slot'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.ConcreteValueReplacementSlotImpl#getName Name}
      • + *
      + * + * @generated + */ +public class ConcreteValueReplacementSlotImpl extends AttributeValueImpl implements ConcreteValueReplacementSlot +{ + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected ConcreteValueReplacementSlotImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.CONCRETE_VALUE_REPLACEMENT_SLOT; + } + + /** + * + * + * @generated + */ + @Override + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + @Override + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.CONCRETE_VALUE_REPLACEMENT_SLOT__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.CONCRETE_VALUE_REPLACEMENT_SLOT__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.CONCRETE_VALUE_REPLACEMENT_SLOT__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.CONCRETE_VALUE_REPLACEMENT_SLOT__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.CONCRETE_VALUE_REPLACEMENT_SLOT__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //ConcreteValueReplacementSlotImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/DecimalReplacementSlotImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/DecimalReplacementSlotImpl.java new file mode 100644 index 00000000000..bedffa00c83 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/DecimalReplacementSlotImpl.java @@ -0,0 +1,179 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.DecimalReplacementSlot; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.SlotDecimal; + +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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Decimal Replacement Slot'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.DecimalReplacementSlotImpl#getValues Values}
      • + *
      + * + * @generated + */ +public class DecimalReplacementSlotImpl extends ConcreteValueReplacementSlotImpl implements DecimalReplacementSlot +{ + /** + * The cached value of the '{@link #getValues() Values}' containment reference list. + * + * + * @see #getValues() + * @generated + * @ordered + */ + protected EList values; + + /** + * + * + * @generated + */ + protected DecimalReplacementSlotImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.DECIMAL_REPLACEMENT_SLOT; + } + + /** + * + * + * @generated + */ + @Override + public EList getValues() + { + if (values == null) + { + values = new EObjectContainmentEList(SlotDecimal.class, this, EtlPackage.DECIMAL_REPLACEMENT_SLOT__VALUES); + } + return values; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case EtlPackage.DECIMAL_REPLACEMENT_SLOT__VALUES: + return ((InternalEList)getValues()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.DECIMAL_REPLACEMENT_SLOT__VALUES: + return getValues(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.DECIMAL_REPLACEMENT_SLOT__VALUES: + getValues().clear(); + getValues().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.DECIMAL_REPLACEMENT_SLOT__VALUES: + getValues().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.DECIMAL_REPLACEMENT_SLOT__VALUES: + return values != null && !values.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //DecimalReplacementSlotImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/DecimalValueImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/DecimalValueImpl.java new file mode 100644 index 00000000000..e505909d398 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/DecimalValueImpl.java @@ -0,0 +1,193 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.DecimalValue; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; + +import java.math.BigDecimal; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Decimal Value'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.DecimalValueImpl#getValue Value}
      • + *
      + * + * @generated + */ +public class DecimalValueImpl extends AttributeValueImpl implements DecimalValue +{ + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final BigDecimal VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected BigDecimal value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected DecimalValueImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.DECIMAL_VALUE; + } + + /** + * + * + * @generated + */ + @Override + public BigDecimal getValue() + { + return value; + } + + /** + * + * + * @generated + */ + @Override + public void setValue(BigDecimal newValue) + { + BigDecimal oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.DECIMAL_VALUE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.DECIMAL_VALUE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.DECIMAL_VALUE__VALUE: + setValue((BigDecimal)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.DECIMAL_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.DECIMAL_VALUE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //DecimalValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/EtlCardinalityImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/EtlCardinalityImpl.java new file mode 100644 index 00000000000..ec9713a63df --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/EtlCardinalityImpl.java @@ -0,0 +1,250 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlCardinality; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; + +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; + +/** + * + * An implementation of the model object 'Cardinality'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.EtlCardinalityImpl#getMin Min}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.EtlCardinalityImpl#getMax Max}
      • + *
      + * + * @generated + */ +public class EtlCardinalityImpl extends MinimalEObjectImpl.Container implements EtlCardinality +{ + /** + * The default value of the '{@link #getMin() Min}' attribute. + * + * + * @see #getMin() + * @generated + * @ordered + */ + protected static final int MIN_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getMin() Min}' attribute. + * + * + * @see #getMin() + * @generated + * @ordered + */ + protected int min = MIN_EDEFAULT; + + /** + * The default value of the '{@link #getMax() Max}' attribute. + * + * + * @see #getMax() + * @generated + * @ordered + */ + protected static final int MAX_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getMax() Max}' attribute. + * + * + * @see #getMax() + * @generated + * @ordered + */ + protected int max = MAX_EDEFAULT; + + /** + * + * + * @generated + */ + protected EtlCardinalityImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.ETL_CARDINALITY; + } + + /** + * + * + * @generated + */ + @Override + public int getMin() + { + return min; + } + + /** + * + * + * @generated + */ + @Override + public void setMin(int newMin) + { + int oldMin = min; + min = newMin; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.ETL_CARDINALITY__MIN, oldMin, min)); + } + + /** + * + * + * @generated + */ + @Override + public int getMax() + { + return max; + } + + /** + * + * + * @generated + */ + @Override + public void setMax(int newMax) + { + int oldMax = max; + max = newMax; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.ETL_CARDINALITY__MAX, oldMax, max)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.ETL_CARDINALITY__MIN: + return getMin(); + case EtlPackage.ETL_CARDINALITY__MAX: + return getMax(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.ETL_CARDINALITY__MIN: + setMin((Integer)newValue); + return; + case EtlPackage.ETL_CARDINALITY__MAX: + setMax((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.ETL_CARDINALITY__MIN: + setMin(MIN_EDEFAULT); + return; + case EtlPackage.ETL_CARDINALITY__MAX: + setMax(MAX_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.ETL_CARDINALITY__MIN: + return min != MIN_EDEFAULT; + case EtlPackage.ETL_CARDINALITY__MAX: + return max != MAX_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (min: "); + result.append(min); + result.append(", max: "); + result.append(max); + result.append(')'); + return result.toString(); + } + +} //EtlCardinalityImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/EtlFactoryImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/EtlFactoryImpl.java new file mode 100644 index 00000000000..b2050a425a5 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/EtlFactoryImpl.java @@ -0,0 +1,511 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.*; + +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; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class EtlFactoryImpl extends EFactoryImpl implements EtlFactory +{ + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static EtlFactory init() + { + try + { + EtlFactory theEtlFactory = (EtlFactory)EPackage.Registry.INSTANCE.getEFactory(EtlPackage.eNS_URI); + if (theEtlFactory != null) + { + return theEtlFactory; + } + } + catch (Exception exception) + { + EcorePlugin.INSTANCE.log(exception); + } + return new EtlFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public EtlFactoryImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) + { + switch (eClass.getClassifierID()) + { + case EtlPackage.EXPRESSION_TEMPLATE: return createExpressionTemplate(); + case EtlPackage.SUB_EXPRESSION: return createSubExpression(); + case EtlPackage.FOCUS_CONCEPT: return createFocusConcept(); + case EtlPackage.REFINEMENT: return createRefinement(); + case EtlPackage.ATTRIBUTE_GROUP: return createAttributeGroup(); + case EtlPackage.ATTRIBUTE: return createAttribute(); + case EtlPackage.ATTRIBUTE_VALUE: return createAttributeValue(); + case EtlPackage.CONCEPT_ID_REPLACEMENT_SLOT: return createConceptIdReplacementSlot(); + case EtlPackage.EXPRESSION_REPLACEMENT_SLOT: return createExpressionReplacementSlot(); + case EtlPackage.TOKEN_REPLACEMENT_SLOT: return createTokenReplacementSlot(); + case EtlPackage.TEMPLATE_INFORMATION_SLOT: return createTemplateInformationSlot(); + case EtlPackage.CONCRETE_VALUE_REPLACEMENT_SLOT: return createConcreteValueReplacementSlot(); + case EtlPackage.STRING_REPLACEMENT_SLOT: return createStringReplacementSlot(); + case EtlPackage.INTEGER_REPLACEMENT_SLOT: return createIntegerReplacementSlot(); + case EtlPackage.DECIMAL_REPLACEMENT_SLOT: return createDecimalReplacementSlot(); + case EtlPackage.ETL_CARDINALITY: return createEtlCardinality(); + case EtlPackage.CONCEPT_REPLACEMENT_SLOT: return createConceptReplacementSlot(); + case EtlPackage.CONCEPT_REFERENCE: return createConceptReference(); + case EtlPackage.STRING_VALUE: return createStringValue(); + case EtlPackage.INTEGER_VALUE: return createIntegerValue(); + case EtlPackage.DECIMAL_VALUE: return createDecimalValue(); + case EtlPackage.SLOT_INTEGER: return createSlotInteger(); + case EtlPackage.SLOT_INTEGER_VALUE: return createSlotIntegerValue(); + case EtlPackage.SLOT_INTEGER_RANGE: return createSlotIntegerRange(); + case EtlPackage.SLOT_INTEGER_MINIMUM_VALUE: return createSlotIntegerMinimumValue(); + case EtlPackage.SLOT_INTEGER_MAXIMUM_VALUE: return createSlotIntegerMaximumValue(); + case EtlPackage.SLOT_DECIMAL: return createSlotDecimal(); + case EtlPackage.SLOT_DECIMAL_VALUE: return createSlotDecimalValue(); + case EtlPackage.SLOT_DECIMAL_RANGE: return createSlotDecimalRange(); + case EtlPackage.SLOT_DECIMAL_MINIMUM_VALUE: return createSlotDecimalMinimumValue(); + case EtlPackage.SLOT_DECIMAL_MAXIMUM_VALUE: return createSlotDecimalMaximumValue(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public ExpressionTemplate createExpressionTemplate() + { + ExpressionTemplateImpl expressionTemplate = new ExpressionTemplateImpl(); + return expressionTemplate; + } + + /** + * + * + * @generated + */ + @Override + public SubExpression createSubExpression() + { + SubExpressionImpl subExpression = new SubExpressionImpl(); + return subExpression; + } + + /** + * + * + * @generated + */ + @Override + public FocusConcept createFocusConcept() + { + FocusConceptImpl focusConcept = new FocusConceptImpl(); + return focusConcept; + } + + /** + * + * + * @generated + */ + @Override + public Refinement createRefinement() + { + RefinementImpl refinement = new RefinementImpl(); + return refinement; + } + + /** + * + * + * @generated + */ + @Override + public AttributeGroup createAttributeGroup() + { + AttributeGroupImpl attributeGroup = new AttributeGroupImpl(); + return attributeGroup; + } + + /** + * + * + * @generated + */ + @Override + public Attribute createAttribute() + { + AttributeImpl attribute = new AttributeImpl(); + return attribute; + } + + /** + * + * + * @generated + */ + @Override + public AttributeValue createAttributeValue() + { + AttributeValueImpl attributeValue = new AttributeValueImpl(); + return attributeValue; + } + + /** + * + * + * @generated + */ + @Override + public ConceptIdReplacementSlot createConceptIdReplacementSlot() + { + ConceptIdReplacementSlotImpl conceptIdReplacementSlot = new ConceptIdReplacementSlotImpl(); + return conceptIdReplacementSlot; + } + + /** + * + * + * @generated + */ + @Override + public ExpressionReplacementSlot createExpressionReplacementSlot() + { + ExpressionReplacementSlotImpl expressionReplacementSlot = new ExpressionReplacementSlotImpl(); + return expressionReplacementSlot; + } + + /** + * + * + * @generated + */ + @Override + public TokenReplacementSlot createTokenReplacementSlot() + { + TokenReplacementSlotImpl tokenReplacementSlot = new TokenReplacementSlotImpl(); + return tokenReplacementSlot; + } + + /** + * + * + * @generated + */ + @Override + public TemplateInformationSlot createTemplateInformationSlot() + { + TemplateInformationSlotImpl templateInformationSlot = new TemplateInformationSlotImpl(); + return templateInformationSlot; + } + + /** + * + * + * @generated + */ + @Override + public ConcreteValueReplacementSlot createConcreteValueReplacementSlot() + { + ConcreteValueReplacementSlotImpl concreteValueReplacementSlot = new ConcreteValueReplacementSlotImpl(); + return concreteValueReplacementSlot; + } + + /** + * + * + * @generated + */ + @Override + public StringReplacementSlot createStringReplacementSlot() + { + StringReplacementSlotImpl stringReplacementSlot = new StringReplacementSlotImpl(); + return stringReplacementSlot; + } + + /** + * + * + * @generated + */ + @Override + public IntegerReplacementSlot createIntegerReplacementSlot() + { + IntegerReplacementSlotImpl integerReplacementSlot = new IntegerReplacementSlotImpl(); + return integerReplacementSlot; + } + + /** + * + * + * @generated + */ + @Override + public DecimalReplacementSlot createDecimalReplacementSlot() + { + DecimalReplacementSlotImpl decimalReplacementSlot = new DecimalReplacementSlotImpl(); + return decimalReplacementSlot; + } + + /** + * + * + * @generated + */ + @Override + public EtlCardinality createEtlCardinality() + { + EtlCardinalityImpl etlCardinality = new EtlCardinalityImpl(); + return etlCardinality; + } + + /** + * + * + * @generated + */ + @Override + public ConceptReplacementSlot createConceptReplacementSlot() + { + ConceptReplacementSlotImpl conceptReplacementSlot = new ConceptReplacementSlotImpl(); + return conceptReplacementSlot; + } + + /** + * + * + * @generated + */ + @Override + public ConceptReference createConceptReference() + { + ConceptReferenceImpl conceptReference = new ConceptReferenceImpl(); + return conceptReference; + } + + /** + * + * + * @generated + */ + @Override + public StringValue createStringValue() + { + StringValueImpl stringValue = new StringValueImpl(); + return stringValue; + } + + /** + * + * + * @generated + */ + @Override + public IntegerValue createIntegerValue() + { + IntegerValueImpl integerValue = new IntegerValueImpl(); + return integerValue; + } + + /** + * + * + * @generated + */ + @Override + public DecimalValue createDecimalValue() + { + DecimalValueImpl decimalValue = new DecimalValueImpl(); + return decimalValue; + } + + /** + * + * + * @generated + */ + @Override + public SlotInteger createSlotInteger() + { + SlotIntegerImpl slotInteger = new SlotIntegerImpl(); + return slotInteger; + } + + /** + * + * + * @generated + */ + @Override + public SlotIntegerValue createSlotIntegerValue() + { + SlotIntegerValueImpl slotIntegerValue = new SlotIntegerValueImpl(); + return slotIntegerValue; + } + + /** + * + * + * @generated + */ + @Override + public SlotIntegerRange createSlotIntegerRange() + { + SlotIntegerRangeImpl slotIntegerRange = new SlotIntegerRangeImpl(); + return slotIntegerRange; + } + + /** + * + * + * @generated + */ + @Override + public SlotIntegerMinimumValue createSlotIntegerMinimumValue() + { + SlotIntegerMinimumValueImpl slotIntegerMinimumValue = new SlotIntegerMinimumValueImpl(); + return slotIntegerMinimumValue; + } + + /** + * + * + * @generated + */ + @Override + public SlotIntegerMaximumValue createSlotIntegerMaximumValue() + { + SlotIntegerMaximumValueImpl slotIntegerMaximumValue = new SlotIntegerMaximumValueImpl(); + return slotIntegerMaximumValue; + } + + /** + * + * + * @generated + */ + @Override + public SlotDecimal createSlotDecimal() + { + SlotDecimalImpl slotDecimal = new SlotDecimalImpl(); + return slotDecimal; + } + + /** + * + * + * @generated + */ + @Override + public SlotDecimalValue createSlotDecimalValue() + { + SlotDecimalValueImpl slotDecimalValue = new SlotDecimalValueImpl(); + return slotDecimalValue; + } + + /** + * + * + * @generated + */ + @Override + public SlotDecimalRange createSlotDecimalRange() + { + SlotDecimalRangeImpl slotDecimalRange = new SlotDecimalRangeImpl(); + return slotDecimalRange; + } + + /** + * + * + * @generated + */ + @Override + public SlotDecimalMinimumValue createSlotDecimalMinimumValue() + { + SlotDecimalMinimumValueImpl slotDecimalMinimumValue = new SlotDecimalMinimumValueImpl(); + return slotDecimalMinimumValue; + } + + /** + * + * + * @generated + */ + @Override + public SlotDecimalMaximumValue createSlotDecimalMaximumValue() + { + SlotDecimalMaximumValueImpl slotDecimalMaximumValue = new SlotDecimalMaximumValueImpl(); + return slotDecimalMaximumValue; + } + + /** + * + * + * @generated + */ + @Override + public EtlPackage getEtlPackage() + { + return (EtlPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static EtlPackage getPackage() + { + return EtlPackage.eINSTANCE; + } + +} //EtlFactoryImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/EtlPackageImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/EtlPackageImpl.java new file mode 100644 index 00000000000..a5800fc723e --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/EtlPackageImpl.java @@ -0,0 +1,1500 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.ecl.ecl.EclPackage; + +import com.b2international.snowowl.snomed.etl.etl.Attribute; +import com.b2international.snowowl.snomed.etl.etl.AttributeGroup; +import com.b2international.snowowl.snomed.etl.etl.AttributeValue; +import com.b2international.snowowl.snomed.etl.etl.ConceptIdReplacementSlot; +import com.b2international.snowowl.snomed.etl.etl.ConceptReference; +import com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot; +import com.b2international.snowowl.snomed.etl.etl.ConcreteValueReplacementSlot; +import com.b2international.snowowl.snomed.etl.etl.DecimalReplacementSlot; +import com.b2international.snowowl.snomed.etl.etl.DecimalValue; +import com.b2international.snowowl.snomed.etl.etl.EtlCardinality; +import com.b2international.snowowl.snomed.etl.etl.EtlFactory; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.ExpressionReplacementSlot; +import com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate; +import com.b2international.snowowl.snomed.etl.etl.FocusConcept; +import com.b2international.snowowl.snomed.etl.etl.IntegerReplacementSlot; +import com.b2international.snowowl.snomed.etl.etl.IntegerValue; +import com.b2international.snowowl.snomed.etl.etl.Refinement; +import com.b2international.snowowl.snomed.etl.etl.SlotDecimal; +import com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue; +import com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue; +import com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange; +import com.b2international.snowowl.snomed.etl.etl.SlotDecimalValue; +import com.b2international.snowowl.snomed.etl.etl.SlotInteger; +import com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue; +import com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue; +import com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange; +import com.b2international.snowowl.snomed.etl.etl.SlotIntegerValue; +import com.b2international.snowowl.snomed.etl.etl.StringReplacementSlot; +import com.b2international.snowowl.snomed.etl.etl.StringValue; +import com.b2international.snowowl.snomed.etl.etl.SubExpression; +import com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot; +import com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot; + +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; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class EtlPackageImpl extends EPackageImpl implements EtlPackage +{ + /** + * + * + * @generated + */ + private EClass expressionTemplateEClass = null; + + /** + * + * + * @generated + */ + private EClass subExpressionEClass = null; + + /** + * + * + * @generated + */ + private EClass focusConceptEClass = null; + + /** + * + * + * @generated + */ + private EClass refinementEClass = null; + + /** + * + * + * @generated + */ + private EClass attributeGroupEClass = null; + + /** + * + * + * @generated + */ + private EClass attributeEClass = null; + + /** + * + * + * @generated + */ + private EClass attributeValueEClass = null; + + /** + * + * + * @generated + */ + private EClass conceptIdReplacementSlotEClass = null; + + /** + * + * + * @generated + */ + private EClass expressionReplacementSlotEClass = null; + + /** + * + * + * @generated + */ + private EClass tokenReplacementSlotEClass = null; + + /** + * + * + * @generated + */ + private EClass templateInformationSlotEClass = null; + + /** + * + * + * @generated + */ + private EClass concreteValueReplacementSlotEClass = null; + + /** + * + * + * @generated + */ + private EClass stringReplacementSlotEClass = null; + + /** + * + * + * @generated + */ + private EClass integerReplacementSlotEClass = null; + + /** + * + * + * @generated + */ + private EClass decimalReplacementSlotEClass = null; + + /** + * + * + * @generated + */ + private EClass etlCardinalityEClass = null; + + /** + * + * + * @generated + */ + private EClass conceptReplacementSlotEClass = null; + + /** + * + * + * @generated + */ + private EClass conceptReferenceEClass = null; + + /** + * + * + * @generated + */ + private EClass stringValueEClass = null; + + /** + * + * + * @generated + */ + private EClass integerValueEClass = null; + + /** + * + * + * @generated + */ + private EClass decimalValueEClass = null; + + /** + * + * + * @generated + */ + private EClass slotIntegerEClass = null; + + /** + * + * + * @generated + */ + private EClass slotIntegerValueEClass = null; + + /** + * + * + * @generated + */ + private EClass slotIntegerRangeEClass = null; + + /** + * + * + * @generated + */ + private EClass slotIntegerMinimumValueEClass = null; + + /** + * + * + * @generated + */ + private EClass slotIntegerMaximumValueEClass = null; + + /** + * + * + * @generated + */ + private EClass slotDecimalEClass = null; + + /** + * + * + * @generated + */ + private EClass slotDecimalValueEClass = null; + + /** + * + * + * @generated + */ + private EClass slotDecimalRangeEClass = null; + + /** + * + * + * @generated + */ + private EClass slotDecimalMinimumValueEClass = null; + + /** + * + * + * @generated + */ + private EClass slotDecimalMaximumValueEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

      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. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage#eNS_URI + * @see #init() + * @generated + */ + private EtlPackageImpl() + { + super(eNS_URI, EtlFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

      This method is used to initialize {@link EtlPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static EtlPackage init() + { + if (isInited) return (EtlPackage)EPackage.Registry.INSTANCE.getEPackage(EtlPackage.eNS_URI); + + // Obtain or create and register package + Object registeredEtlPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + EtlPackageImpl theEtlPackage = registeredEtlPackage instanceof EtlPackageImpl ? (EtlPackageImpl)registeredEtlPackage : new EtlPackageImpl(); + + isInited = true; + + // Initialize simple dependencies + EclPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theEtlPackage.createPackageContents(); + + // Initialize created meta-data + theEtlPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theEtlPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(EtlPackage.eNS_URI, theEtlPackage); + return theEtlPackage; + } + + /** + * + * + * @generated + */ + @Override + public EClass getExpressionTemplate() + { + return expressionTemplateEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getExpressionTemplate_Primitive() + { + return (EAttribute)expressionTemplateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getExpressionTemplate_Slot() + { + return (EReference)expressionTemplateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getExpressionTemplate_Expression() + { + return (EReference)expressionTemplateEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EClass getSubExpression() + { + return subExpressionEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getSubExpression_FocusConcepts() + { + return (EReference)subExpressionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getSubExpression_Refinement() + { + return (EReference)subExpressionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getFocusConcept() + { + return focusConceptEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getFocusConcept_Slot() + { + return (EReference)focusConceptEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getFocusConcept_Concept() + { + return (EReference)focusConceptEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getRefinement() + { + return refinementEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getRefinement_Attributes() + { + return (EReference)refinementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getRefinement_Groups() + { + return (EReference)refinementEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getAttributeGroup() + { + return attributeGroupEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getAttributeGroup_Slot() + { + return (EReference)attributeGroupEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getAttributeGroup_Attributes() + { + return (EReference)attributeGroupEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getAttribute() + { + return attributeEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getAttribute_Slot() + { + return (EReference)attributeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getAttribute_Name() + { + return (EReference)attributeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getAttribute_Value() + { + return (EReference)attributeEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EClass getAttributeValue() + { + return attributeValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getConceptIdReplacementSlot() + { + return conceptIdReplacementSlotEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getExpressionReplacementSlot() + { + return expressionReplacementSlotEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getTokenReplacementSlot() + { + return tokenReplacementSlotEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getTokenReplacementSlot_Tokens() + { + return (EAttribute)tokenReplacementSlotEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getTokenReplacementSlot_Name() + { + return (EAttribute)tokenReplacementSlotEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getTemplateInformationSlot() + { + return templateInformationSlotEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getTemplateInformationSlot_Cardinality() + { + return (EReference)templateInformationSlotEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getTemplateInformationSlot_Name() + { + return (EAttribute)templateInformationSlotEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getConcreteValueReplacementSlot() + { + return concreteValueReplacementSlotEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getConcreteValueReplacementSlot_Name() + { + return (EAttribute)concreteValueReplacementSlotEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getStringReplacementSlot() + { + return stringReplacementSlotEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getStringReplacementSlot_Values() + { + return (EAttribute)stringReplacementSlotEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getIntegerReplacementSlot() + { + return integerReplacementSlotEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getIntegerReplacementSlot_Values() + { + return (EReference)integerReplacementSlotEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getDecimalReplacementSlot() + { + return decimalReplacementSlotEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getDecimalReplacementSlot_Values() + { + return (EReference)decimalReplacementSlotEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getEtlCardinality() + { + return etlCardinalityEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getEtlCardinality_Min() + { + return (EAttribute)etlCardinalityEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getEtlCardinality_Max() + { + return (EAttribute)etlCardinalityEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getConceptReplacementSlot() + { + return conceptReplacementSlotEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getConceptReplacementSlot_Constraint() + { + return (EReference)conceptReplacementSlotEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getConceptReplacementSlot_Name() + { + return (EAttribute)conceptReplacementSlotEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getConceptReference() + { + return conceptReferenceEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getConceptReference_Slot() + { + return (EReference)conceptReferenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getConceptReference_Id() + { + return (EAttribute)conceptReferenceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getConceptReference_Term() + { + return (EAttribute)conceptReferenceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EClass getStringValue() + { + return stringValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getStringValue_Value() + { + return (EAttribute)stringValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getIntegerValue() + { + return integerValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getIntegerValue_Value() + { + return (EAttribute)integerValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getDecimalValue() + { + return decimalValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getDecimalValue_Value() + { + return (EAttribute)decimalValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getSlotInteger() + { + return slotIntegerEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getSlotIntegerValue() + { + return slotIntegerValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getSlotIntegerValue_Value() + { + return (EAttribute)slotIntegerValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getSlotIntegerRange() + { + return slotIntegerRangeEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getSlotIntegerRange_Minimum() + { + return (EReference)slotIntegerRangeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getSlotIntegerRange_Maximum() + { + return (EReference)slotIntegerRangeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getSlotIntegerMinimumValue() + { + return slotIntegerMinimumValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getSlotIntegerMinimumValue_Exclusive() + { + return (EAttribute)slotIntegerMinimumValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getSlotIntegerMinimumValue_Value() + { + return (EAttribute)slotIntegerMinimumValueEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getSlotIntegerMaximumValue() + { + return slotIntegerMaximumValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getSlotIntegerMaximumValue_Exclusive() + { + return (EAttribute)slotIntegerMaximumValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getSlotIntegerMaximumValue_Value() + { + return (EAttribute)slotIntegerMaximumValueEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getSlotDecimal() + { + return slotDecimalEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getSlotDecimalValue() + { + return slotDecimalValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getSlotDecimalValue_Value() + { + return (EAttribute)slotDecimalValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getSlotDecimalRange() + { + return slotDecimalRangeEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getSlotDecimalRange_Minimum() + { + return (EReference)slotDecimalRangeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getSlotDecimalRange_Maximum() + { + return (EReference)slotDecimalRangeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getSlotDecimalMinimumValue() + { + return slotDecimalMinimumValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getSlotDecimalMinimumValue_Exclusive() + { + return (EAttribute)slotDecimalMinimumValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getSlotDecimalMinimumValue_Value() + { + return (EAttribute)slotDecimalMinimumValueEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getSlotDecimalMaximumValue() + { + return slotDecimalMaximumValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getSlotDecimalMaximumValue_Exclusive() + { + return (EAttribute)slotDecimalMaximumValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getSlotDecimalMaximumValue_Value() + { + return (EAttribute)slotDecimalMaximumValueEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EtlFactory getEtlFactory() + { + return (EtlFactory)getEFactoryInstance(); + } + + /** + * + * + * @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. + * + * + * @generated + */ + public void createPackageContents() + { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + expressionTemplateEClass = createEClass(EXPRESSION_TEMPLATE); + createEAttribute(expressionTemplateEClass, EXPRESSION_TEMPLATE__PRIMITIVE); + createEReference(expressionTemplateEClass, EXPRESSION_TEMPLATE__SLOT); + createEReference(expressionTemplateEClass, EXPRESSION_TEMPLATE__EXPRESSION); + + subExpressionEClass = createEClass(SUB_EXPRESSION); + createEReference(subExpressionEClass, SUB_EXPRESSION__FOCUS_CONCEPTS); + createEReference(subExpressionEClass, SUB_EXPRESSION__REFINEMENT); + + focusConceptEClass = createEClass(FOCUS_CONCEPT); + createEReference(focusConceptEClass, FOCUS_CONCEPT__SLOT); + createEReference(focusConceptEClass, FOCUS_CONCEPT__CONCEPT); + + refinementEClass = createEClass(REFINEMENT); + createEReference(refinementEClass, REFINEMENT__ATTRIBUTES); + createEReference(refinementEClass, REFINEMENT__GROUPS); + + attributeGroupEClass = createEClass(ATTRIBUTE_GROUP); + createEReference(attributeGroupEClass, ATTRIBUTE_GROUP__SLOT); + createEReference(attributeGroupEClass, ATTRIBUTE_GROUP__ATTRIBUTES); + + attributeEClass = createEClass(ATTRIBUTE); + createEReference(attributeEClass, ATTRIBUTE__SLOT); + createEReference(attributeEClass, ATTRIBUTE__NAME); + createEReference(attributeEClass, ATTRIBUTE__VALUE); + + attributeValueEClass = createEClass(ATTRIBUTE_VALUE); + + conceptIdReplacementSlotEClass = createEClass(CONCEPT_ID_REPLACEMENT_SLOT); + + expressionReplacementSlotEClass = createEClass(EXPRESSION_REPLACEMENT_SLOT); + + tokenReplacementSlotEClass = createEClass(TOKEN_REPLACEMENT_SLOT); + createEAttribute(tokenReplacementSlotEClass, TOKEN_REPLACEMENT_SLOT__TOKENS); + createEAttribute(tokenReplacementSlotEClass, TOKEN_REPLACEMENT_SLOT__NAME); + + templateInformationSlotEClass = createEClass(TEMPLATE_INFORMATION_SLOT); + createEReference(templateInformationSlotEClass, TEMPLATE_INFORMATION_SLOT__CARDINALITY); + createEAttribute(templateInformationSlotEClass, TEMPLATE_INFORMATION_SLOT__NAME); + + concreteValueReplacementSlotEClass = createEClass(CONCRETE_VALUE_REPLACEMENT_SLOT); + createEAttribute(concreteValueReplacementSlotEClass, CONCRETE_VALUE_REPLACEMENT_SLOT__NAME); + + stringReplacementSlotEClass = createEClass(STRING_REPLACEMENT_SLOT); + createEAttribute(stringReplacementSlotEClass, STRING_REPLACEMENT_SLOT__VALUES); + + integerReplacementSlotEClass = createEClass(INTEGER_REPLACEMENT_SLOT); + createEReference(integerReplacementSlotEClass, INTEGER_REPLACEMENT_SLOT__VALUES); + + decimalReplacementSlotEClass = createEClass(DECIMAL_REPLACEMENT_SLOT); + createEReference(decimalReplacementSlotEClass, DECIMAL_REPLACEMENT_SLOT__VALUES); + + etlCardinalityEClass = createEClass(ETL_CARDINALITY); + createEAttribute(etlCardinalityEClass, ETL_CARDINALITY__MIN); + createEAttribute(etlCardinalityEClass, ETL_CARDINALITY__MAX); + + conceptReplacementSlotEClass = createEClass(CONCEPT_REPLACEMENT_SLOT); + createEReference(conceptReplacementSlotEClass, CONCEPT_REPLACEMENT_SLOT__CONSTRAINT); + createEAttribute(conceptReplacementSlotEClass, CONCEPT_REPLACEMENT_SLOT__NAME); + + conceptReferenceEClass = createEClass(CONCEPT_REFERENCE); + createEReference(conceptReferenceEClass, CONCEPT_REFERENCE__SLOT); + createEAttribute(conceptReferenceEClass, CONCEPT_REFERENCE__ID); + createEAttribute(conceptReferenceEClass, CONCEPT_REFERENCE__TERM); + + stringValueEClass = createEClass(STRING_VALUE); + createEAttribute(stringValueEClass, STRING_VALUE__VALUE); + + integerValueEClass = createEClass(INTEGER_VALUE); + createEAttribute(integerValueEClass, INTEGER_VALUE__VALUE); + + decimalValueEClass = createEClass(DECIMAL_VALUE); + createEAttribute(decimalValueEClass, DECIMAL_VALUE__VALUE); + + slotIntegerEClass = createEClass(SLOT_INTEGER); + + slotIntegerValueEClass = createEClass(SLOT_INTEGER_VALUE); + createEAttribute(slotIntegerValueEClass, SLOT_INTEGER_VALUE__VALUE); + + slotIntegerRangeEClass = createEClass(SLOT_INTEGER_RANGE); + createEReference(slotIntegerRangeEClass, SLOT_INTEGER_RANGE__MINIMUM); + createEReference(slotIntegerRangeEClass, SLOT_INTEGER_RANGE__MAXIMUM); + + slotIntegerMinimumValueEClass = createEClass(SLOT_INTEGER_MINIMUM_VALUE); + createEAttribute(slotIntegerMinimumValueEClass, SLOT_INTEGER_MINIMUM_VALUE__EXCLUSIVE); + createEAttribute(slotIntegerMinimumValueEClass, SLOT_INTEGER_MINIMUM_VALUE__VALUE); + + slotIntegerMaximumValueEClass = createEClass(SLOT_INTEGER_MAXIMUM_VALUE); + createEAttribute(slotIntegerMaximumValueEClass, SLOT_INTEGER_MAXIMUM_VALUE__EXCLUSIVE); + createEAttribute(slotIntegerMaximumValueEClass, SLOT_INTEGER_MAXIMUM_VALUE__VALUE); + + slotDecimalEClass = createEClass(SLOT_DECIMAL); + + slotDecimalValueEClass = createEClass(SLOT_DECIMAL_VALUE); + createEAttribute(slotDecimalValueEClass, SLOT_DECIMAL_VALUE__VALUE); + + slotDecimalRangeEClass = createEClass(SLOT_DECIMAL_RANGE); + createEReference(slotDecimalRangeEClass, SLOT_DECIMAL_RANGE__MINIMUM); + createEReference(slotDecimalRangeEClass, SLOT_DECIMAL_RANGE__MAXIMUM); + + slotDecimalMinimumValueEClass = createEClass(SLOT_DECIMAL_MINIMUM_VALUE); + createEAttribute(slotDecimalMinimumValueEClass, SLOT_DECIMAL_MINIMUM_VALUE__EXCLUSIVE); + createEAttribute(slotDecimalMinimumValueEClass, SLOT_DECIMAL_MINIMUM_VALUE__VALUE); + + slotDecimalMaximumValueEClass = createEClass(SLOT_DECIMAL_MAXIMUM_VALUE); + createEAttribute(slotDecimalMaximumValueEClass, SLOT_DECIMAL_MAXIMUM_VALUE__EXCLUSIVE); + createEAttribute(slotDecimalMaximumValueEClass, SLOT_DECIMAL_MAXIMUM_VALUE__VALUE); + } + + /** + * + * + * @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. + * + * + * @generated + */ + public void initializePackageContents() + { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EclPackage theEclPackage = (EclPackage)EPackage.Registry.INSTANCE.getEPackage(EclPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + subExpressionEClass.getESuperTypes().add(this.getAttributeValue()); + conceptIdReplacementSlotEClass.getESuperTypes().add(this.getConceptReplacementSlot()); + expressionReplacementSlotEClass.getESuperTypes().add(this.getConceptReplacementSlot()); + concreteValueReplacementSlotEClass.getESuperTypes().add(this.getAttributeValue()); + stringReplacementSlotEClass.getESuperTypes().add(this.getConcreteValueReplacementSlot()); + integerReplacementSlotEClass.getESuperTypes().add(this.getConcreteValueReplacementSlot()); + decimalReplacementSlotEClass.getESuperTypes().add(this.getConcreteValueReplacementSlot()); + conceptReferenceEClass.getESuperTypes().add(this.getAttributeValue()); + stringValueEClass.getESuperTypes().add(this.getAttributeValue()); + integerValueEClass.getESuperTypes().add(this.getAttributeValue()); + decimalValueEClass.getESuperTypes().add(this.getAttributeValue()); + slotIntegerValueEClass.getESuperTypes().add(this.getSlotInteger()); + slotIntegerRangeEClass.getESuperTypes().add(this.getSlotInteger()); + slotDecimalValueEClass.getESuperTypes().add(this.getSlotDecimal()); + slotDecimalRangeEClass.getESuperTypes().add(this.getSlotDecimal()); + + // Initialize classes and features; add operations and parameters + initEClass(expressionTemplateEClass, ExpressionTemplate.class, "ExpressionTemplate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getExpressionTemplate_Primitive(), ecorePackage.getEBoolean(), "primitive", null, 0, 1, ExpressionTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getExpressionTemplate_Slot(), this.getTokenReplacementSlot(), null, "slot", null, 0, 1, ExpressionTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getExpressionTemplate_Expression(), this.getSubExpression(), null, "expression", null, 0, 1, ExpressionTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(subExpressionEClass, SubExpression.class, "SubExpression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSubExpression_FocusConcepts(), this.getFocusConcept(), null, "focusConcepts", null, 0, -1, SubExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSubExpression_Refinement(), this.getRefinement(), null, "refinement", null, 0, 1, SubExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(focusConceptEClass, FocusConcept.class, "FocusConcept", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFocusConcept_Slot(), this.getTemplateInformationSlot(), null, "slot", null, 0, 1, FocusConcept.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFocusConcept_Concept(), this.getConceptReference(), null, "concept", null, 0, 1, FocusConcept.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(refinementEClass, Refinement.class, "Refinement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getRefinement_Attributes(), this.getAttribute(), null, "attributes", null, 0, -1, Refinement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getRefinement_Groups(), this.getAttributeGroup(), null, "groups", null, 0, -1, Refinement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(attributeGroupEClass, AttributeGroup.class, "AttributeGroup", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAttributeGroup_Slot(), this.getTemplateInformationSlot(), null, "slot", null, 0, 1, AttributeGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAttributeGroup_Attributes(), this.getAttribute(), null, "attributes", null, 0, -1, AttributeGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(attributeEClass, Attribute.class, "Attribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAttribute_Slot(), this.getTemplateInformationSlot(), null, "slot", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAttribute_Name(), this.getConceptReference(), null, "name", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAttribute_Value(), this.getAttributeValue(), null, "value", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(attributeValueEClass, AttributeValue.class, "AttributeValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(conceptIdReplacementSlotEClass, ConceptIdReplacementSlot.class, "ConceptIdReplacementSlot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(expressionReplacementSlotEClass, ExpressionReplacementSlot.class, "ExpressionReplacementSlot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(tokenReplacementSlotEClass, TokenReplacementSlot.class, "TokenReplacementSlot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getTokenReplacementSlot_Tokens(), ecorePackage.getEString(), "tokens", null, 0, -1, TokenReplacementSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTokenReplacementSlot_Name(), ecorePackage.getEString(), "name", null, 0, 1, TokenReplacementSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(templateInformationSlotEClass, TemplateInformationSlot.class, "TemplateInformationSlot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getTemplateInformationSlot_Cardinality(), this.getEtlCardinality(), null, "cardinality", null, 0, 1, TemplateInformationSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTemplateInformationSlot_Name(), ecorePackage.getEString(), "name", null, 0, 1, TemplateInformationSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(concreteValueReplacementSlotEClass, ConcreteValueReplacementSlot.class, "ConcreteValueReplacementSlot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getConcreteValueReplacementSlot_Name(), ecorePackage.getEString(), "name", null, 0, 1, ConcreteValueReplacementSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(stringReplacementSlotEClass, StringReplacementSlot.class, "StringReplacementSlot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getStringReplacementSlot_Values(), ecorePackage.getEString(), "values", null, 0, -1, StringReplacementSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(integerReplacementSlotEClass, IntegerReplacementSlot.class, "IntegerReplacementSlot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getIntegerReplacementSlot_Values(), this.getSlotInteger(), null, "values", null, 0, -1, IntegerReplacementSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(decimalReplacementSlotEClass, DecimalReplacementSlot.class, "DecimalReplacementSlot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDecimalReplacementSlot_Values(), this.getSlotDecimal(), null, "values", null, 0, -1, DecimalReplacementSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(etlCardinalityEClass, EtlCardinality.class, "EtlCardinality", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getEtlCardinality_Min(), ecorePackage.getEInt(), "min", null, 0, 1, EtlCardinality.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getEtlCardinality_Max(), ecorePackage.getEInt(), "max", null, 0, 1, EtlCardinality.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(conceptReplacementSlotEClass, ConceptReplacementSlot.class, "ConceptReplacementSlot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getConceptReplacementSlot_Constraint(), theEclPackage.getExpressionConstraint(), null, "constraint", null, 0, 1, ConceptReplacementSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getConceptReplacementSlot_Name(), ecorePackage.getEString(), "name", null, 0, 1, ConceptReplacementSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(conceptReferenceEClass, ConceptReference.class, "ConceptReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getConceptReference_Slot(), this.getConceptReplacementSlot(), null, "slot", null, 0, 1, ConceptReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getConceptReference_Id(), ecorePackage.getEString(), "id", null, 0, 1, ConceptReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getConceptReference_Term(), ecorePackage.getEString(), "term", null, 0, 1, ConceptReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(stringValueEClass, StringValue.class, "StringValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getStringValue_Value(), ecorePackage.getEString(), "value", null, 0, 1, StringValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(integerValueEClass, IntegerValue.class, "IntegerValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getIntegerValue_Value(), ecorePackage.getEInt(), "value", null, 0, 1, IntegerValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(decimalValueEClass, DecimalValue.class, "DecimalValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDecimalValue_Value(), ecorePackage.getEBigDecimal(), "value", null, 0, 1, DecimalValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(slotIntegerEClass, SlotInteger.class, "SlotInteger", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(slotIntegerValueEClass, SlotIntegerValue.class, "SlotIntegerValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSlotIntegerValue_Value(), ecorePackage.getEInt(), "value", null, 0, 1, SlotIntegerValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(slotIntegerRangeEClass, SlotIntegerRange.class, "SlotIntegerRange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSlotIntegerRange_Minimum(), this.getSlotIntegerMinimumValue(), null, "minimum", null, 0, 1, SlotIntegerRange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSlotIntegerRange_Maximum(), this.getSlotIntegerMaximumValue(), null, "maximum", null, 0, 1, SlotIntegerRange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(slotIntegerMinimumValueEClass, SlotIntegerMinimumValue.class, "SlotIntegerMinimumValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSlotIntegerMinimumValue_Exclusive(), ecorePackage.getEBoolean(), "exclusive", null, 0, 1, SlotIntegerMinimumValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSlotIntegerMinimumValue_Value(), ecorePackage.getEInt(), "value", null, 0, 1, SlotIntegerMinimumValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(slotIntegerMaximumValueEClass, SlotIntegerMaximumValue.class, "SlotIntegerMaximumValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSlotIntegerMaximumValue_Exclusive(), ecorePackage.getEBoolean(), "exclusive", null, 0, 1, SlotIntegerMaximumValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSlotIntegerMaximumValue_Value(), ecorePackage.getEInt(), "value", null, 0, 1, SlotIntegerMaximumValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(slotDecimalEClass, SlotDecimal.class, "SlotDecimal", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(slotDecimalValueEClass, SlotDecimalValue.class, "SlotDecimalValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSlotDecimalValue_Value(), ecorePackage.getEBigDecimal(), "value", null, 0, 1, SlotDecimalValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(slotDecimalRangeEClass, SlotDecimalRange.class, "SlotDecimalRange", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSlotDecimalRange_Minimum(), this.getSlotDecimalMinimumValue(), null, "minimum", null, 0, 1, SlotDecimalRange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSlotDecimalRange_Maximum(), this.getSlotDecimalMaximumValue(), null, "maximum", null, 0, 1, SlotDecimalRange.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(slotDecimalMinimumValueEClass, SlotDecimalMinimumValue.class, "SlotDecimalMinimumValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSlotDecimalMinimumValue_Exclusive(), ecorePackage.getEBoolean(), "exclusive", null, 0, 1, SlotDecimalMinimumValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSlotDecimalMinimumValue_Value(), ecorePackage.getEBigDecimal(), "value", null, 0, 1, SlotDecimalMinimumValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(slotDecimalMaximumValueEClass, SlotDecimalMaximumValue.class, "SlotDecimalMaximumValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSlotDecimalMaximumValue_Exclusive(), ecorePackage.getEBoolean(), "exclusive", null, 0, 1, SlotDecimalMaximumValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSlotDecimalMaximumValue_Value(), ecorePackage.getEBigDecimal(), "value", null, 0, 1, SlotDecimalMaximumValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //EtlPackageImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ExpressionReplacementSlotImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ExpressionReplacementSlotImpl.java new file mode 100644 index 00000000000..913b5feb3a2 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ExpressionReplacementSlotImpl.java @@ -0,0 +1,53 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.ExpressionReplacementSlot; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Expression Replacement Slot'. + * + * + * @generated + */ +public class ExpressionReplacementSlotImpl extends ConceptReplacementSlotImpl implements ExpressionReplacementSlot +{ + /** + * + * + * @generated + */ + protected ExpressionReplacementSlotImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.EXPRESSION_REPLACEMENT_SLOT; + } + +} //ExpressionReplacementSlotImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ExpressionTemplateImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ExpressionTemplateImpl.java new file mode 100644 index 00000000000..e70903fba6f --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/ExpressionTemplateImpl.java @@ -0,0 +1,356 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate; +import com.b2international.snowowl.snomed.etl.etl.SubExpression; +import com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot; + +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.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Expression Template'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.ExpressionTemplateImpl#isPrimitive Primitive}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.ExpressionTemplateImpl#getSlot Slot}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.ExpressionTemplateImpl#getExpression Expression}
      • + *
      + * + * @generated + */ +public class ExpressionTemplateImpl extends MinimalEObjectImpl.Container implements ExpressionTemplate +{ + /** + * The default value of the '{@link #isPrimitive() Primitive}' attribute. + * + * + * @see #isPrimitive() + * @generated + * @ordered + */ + protected static final boolean PRIMITIVE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isPrimitive() Primitive}' attribute. + * + * + * @see #isPrimitive() + * @generated + * @ordered + */ + protected boolean primitive = PRIMITIVE_EDEFAULT; + + /** + * The cached value of the '{@link #getSlot() Slot}' containment reference. + * + * + * @see #getSlot() + * @generated + * @ordered + */ + protected TokenReplacementSlot slot; + + /** + * The cached value of the '{@link #getExpression() Expression}' containment reference. + * + * + * @see #getExpression() + * @generated + * @ordered + */ + protected SubExpression expression; + + /** + * + * + * @generated + */ + protected ExpressionTemplateImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.EXPRESSION_TEMPLATE; + } + + /** + * + * + * @generated + */ + @Override + public boolean isPrimitive() + { + return primitive; + } + + /** + * + * + * @generated + */ + @Override + public void setPrimitive(boolean newPrimitive) + { + boolean oldPrimitive = primitive; + primitive = newPrimitive; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.EXPRESSION_TEMPLATE__PRIMITIVE, oldPrimitive, primitive)); + } + + /** + * + * + * @generated + */ + @Override + public TokenReplacementSlot getSlot() + { + return slot; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSlot(TokenReplacementSlot newSlot, NotificationChain msgs) + { + TokenReplacementSlot oldSlot = slot; + slot = newSlot; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.EXPRESSION_TEMPLATE__SLOT, oldSlot, newSlot); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setSlot(TokenReplacementSlot newSlot) + { + if (newSlot != slot) + { + NotificationChain msgs = null; + if (slot != null) + msgs = ((InternalEObject)slot).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.EXPRESSION_TEMPLATE__SLOT, null, msgs); + if (newSlot != null) + msgs = ((InternalEObject)newSlot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.EXPRESSION_TEMPLATE__SLOT, null, msgs); + msgs = basicSetSlot(newSlot, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.EXPRESSION_TEMPLATE__SLOT, newSlot, newSlot)); + } + + /** + * + * + * @generated + */ + @Override + public SubExpression getExpression() + { + return expression; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetExpression(SubExpression newExpression, NotificationChain msgs) + { + SubExpression oldExpression = expression; + expression = newExpression; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.EXPRESSION_TEMPLATE__EXPRESSION, oldExpression, newExpression); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setExpression(SubExpression newExpression) + { + if (newExpression != expression) + { + NotificationChain msgs = null; + if (expression != null) + msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.EXPRESSION_TEMPLATE__EXPRESSION, null, msgs); + if (newExpression != null) + msgs = ((InternalEObject)newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.EXPRESSION_TEMPLATE__EXPRESSION, null, msgs); + msgs = basicSetExpression(newExpression, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.EXPRESSION_TEMPLATE__EXPRESSION, newExpression, newExpression)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case EtlPackage.EXPRESSION_TEMPLATE__SLOT: + return basicSetSlot(null, msgs); + case EtlPackage.EXPRESSION_TEMPLATE__EXPRESSION: + return basicSetExpression(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.EXPRESSION_TEMPLATE__PRIMITIVE: + return isPrimitive(); + case EtlPackage.EXPRESSION_TEMPLATE__SLOT: + return getSlot(); + case EtlPackage.EXPRESSION_TEMPLATE__EXPRESSION: + return getExpression(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.EXPRESSION_TEMPLATE__PRIMITIVE: + setPrimitive((Boolean)newValue); + return; + case EtlPackage.EXPRESSION_TEMPLATE__SLOT: + setSlot((TokenReplacementSlot)newValue); + return; + case EtlPackage.EXPRESSION_TEMPLATE__EXPRESSION: + setExpression((SubExpression)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.EXPRESSION_TEMPLATE__PRIMITIVE: + setPrimitive(PRIMITIVE_EDEFAULT); + return; + case EtlPackage.EXPRESSION_TEMPLATE__SLOT: + setSlot((TokenReplacementSlot)null); + return; + case EtlPackage.EXPRESSION_TEMPLATE__EXPRESSION: + setExpression((SubExpression)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.EXPRESSION_TEMPLATE__PRIMITIVE: + return primitive != PRIMITIVE_EDEFAULT; + case EtlPackage.EXPRESSION_TEMPLATE__SLOT: + return slot != null; + case EtlPackage.EXPRESSION_TEMPLATE__EXPRESSION: + return expression != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (primitive: "); + result.append(primitive); + result.append(')'); + return result.toString(); + } + +} //ExpressionTemplateImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/FocusConceptImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/FocusConceptImpl.java new file mode 100644 index 00000000000..5e27900a871 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/FocusConceptImpl.java @@ -0,0 +1,283 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.ConceptReference; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.FocusConcept; +import com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot; + +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.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Focus Concept'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.FocusConceptImpl#getSlot Slot}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.FocusConceptImpl#getConcept Concept}
      • + *
      + * + * @generated + */ +public class FocusConceptImpl extends MinimalEObjectImpl.Container implements FocusConcept +{ + /** + * The cached value of the '{@link #getSlot() Slot}' containment reference. + * + * + * @see #getSlot() + * @generated + * @ordered + */ + protected TemplateInformationSlot slot; + + /** + * The cached value of the '{@link #getConcept() Concept}' containment reference. + * + * + * @see #getConcept() + * @generated + * @ordered + */ + protected ConceptReference concept; + + /** + * + * + * @generated + */ + protected FocusConceptImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.FOCUS_CONCEPT; + } + + /** + * + * + * @generated + */ + @Override + public TemplateInformationSlot getSlot() + { + return slot; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSlot(TemplateInformationSlot newSlot, NotificationChain msgs) + { + TemplateInformationSlot oldSlot = slot; + slot = newSlot; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.FOCUS_CONCEPT__SLOT, oldSlot, newSlot); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setSlot(TemplateInformationSlot newSlot) + { + if (newSlot != slot) + { + NotificationChain msgs = null; + if (slot != null) + msgs = ((InternalEObject)slot).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.FOCUS_CONCEPT__SLOT, null, msgs); + if (newSlot != null) + msgs = ((InternalEObject)newSlot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.FOCUS_CONCEPT__SLOT, null, msgs); + msgs = basicSetSlot(newSlot, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.FOCUS_CONCEPT__SLOT, newSlot, newSlot)); + } + + /** + * + * + * @generated + */ + @Override + public ConceptReference getConcept() + { + return concept; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetConcept(ConceptReference newConcept, NotificationChain msgs) + { + ConceptReference oldConcept = concept; + concept = newConcept; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.FOCUS_CONCEPT__CONCEPT, oldConcept, newConcept); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setConcept(ConceptReference newConcept) + { + if (newConcept != concept) + { + NotificationChain msgs = null; + if (concept != null) + msgs = ((InternalEObject)concept).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.FOCUS_CONCEPT__CONCEPT, null, msgs); + if (newConcept != null) + msgs = ((InternalEObject)newConcept).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.FOCUS_CONCEPT__CONCEPT, null, msgs); + msgs = basicSetConcept(newConcept, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.FOCUS_CONCEPT__CONCEPT, newConcept, newConcept)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case EtlPackage.FOCUS_CONCEPT__SLOT: + return basicSetSlot(null, msgs); + case EtlPackage.FOCUS_CONCEPT__CONCEPT: + return basicSetConcept(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.FOCUS_CONCEPT__SLOT: + return getSlot(); + case EtlPackage.FOCUS_CONCEPT__CONCEPT: + return getConcept(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.FOCUS_CONCEPT__SLOT: + setSlot((TemplateInformationSlot)newValue); + return; + case EtlPackage.FOCUS_CONCEPT__CONCEPT: + setConcept((ConceptReference)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.FOCUS_CONCEPT__SLOT: + setSlot((TemplateInformationSlot)null); + return; + case EtlPackage.FOCUS_CONCEPT__CONCEPT: + setConcept((ConceptReference)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.FOCUS_CONCEPT__SLOT: + return slot != null; + case EtlPackage.FOCUS_CONCEPT__CONCEPT: + return concept != null; + } + return super.eIsSet(featureID); + } + +} //FocusConceptImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/IntegerReplacementSlotImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/IntegerReplacementSlotImpl.java new file mode 100644 index 00000000000..234fd2a1a91 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/IntegerReplacementSlotImpl.java @@ -0,0 +1,179 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.IntegerReplacementSlot; +import com.b2international.snowowl.snomed.etl.etl.SlotInteger; + +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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Integer Replacement Slot'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.IntegerReplacementSlotImpl#getValues Values}
      • + *
      + * + * @generated + */ +public class IntegerReplacementSlotImpl extends ConcreteValueReplacementSlotImpl implements IntegerReplacementSlot +{ + /** + * The cached value of the '{@link #getValues() Values}' containment reference list. + * + * + * @see #getValues() + * @generated + * @ordered + */ + protected EList values; + + /** + * + * + * @generated + */ + protected IntegerReplacementSlotImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.INTEGER_REPLACEMENT_SLOT; + } + + /** + * + * + * @generated + */ + @Override + public EList getValues() + { + if (values == null) + { + values = new EObjectContainmentEList(SlotInteger.class, this, EtlPackage.INTEGER_REPLACEMENT_SLOT__VALUES); + } + return values; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case EtlPackage.INTEGER_REPLACEMENT_SLOT__VALUES: + return ((InternalEList)getValues()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.INTEGER_REPLACEMENT_SLOT__VALUES: + return getValues(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.INTEGER_REPLACEMENT_SLOT__VALUES: + getValues().clear(); + getValues().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.INTEGER_REPLACEMENT_SLOT__VALUES: + getValues().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.INTEGER_REPLACEMENT_SLOT__VALUES: + return values != null && !values.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //IntegerReplacementSlotImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/IntegerValueImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/IntegerValueImpl.java new file mode 100644 index 00000000000..45291ecd0f8 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/IntegerValueImpl.java @@ -0,0 +1,191 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.IntegerValue; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Integer Value'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.IntegerValueImpl#getValue Value}
      • + *
      + * + * @generated + */ +public class IntegerValueImpl extends AttributeValueImpl implements IntegerValue +{ + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final int VALUE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected int value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected IntegerValueImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.INTEGER_VALUE; + } + + /** + * + * + * @generated + */ + @Override + public int getValue() + { + return value; + } + + /** + * + * + * @generated + */ + @Override + public void setValue(int newValue) + { + int oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.INTEGER_VALUE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.INTEGER_VALUE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.INTEGER_VALUE__VALUE: + setValue((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.INTEGER_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.INTEGER_VALUE__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //IntegerValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/RefinementImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/RefinementImpl.java new file mode 100644 index 00000000000..b36cd567023 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/RefinementImpl.java @@ -0,0 +1,221 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.Attribute; +import com.b2international.snowowl.snomed.etl.etl.AttributeGroup; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.Refinement; + +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; + +/** + * + * An implementation of the model object 'Refinement'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.RefinementImpl#getAttributes Attributes}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.RefinementImpl#getGroups Groups}
      • + *
      + * + * @generated + */ +public class RefinementImpl extends MinimalEObjectImpl.Container implements Refinement +{ + /** + * The cached value of the '{@link #getAttributes() Attributes}' containment reference list. + * + * + * @see #getAttributes() + * @generated + * @ordered + */ + protected EList attributes; + + /** + * The cached value of the '{@link #getGroups() Groups}' containment reference list. + * + * + * @see #getGroups() + * @generated + * @ordered + */ + protected EList groups; + + /** + * + * + * @generated + */ + protected RefinementImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.REFINEMENT; + } + + /** + * + * + * @generated + */ + @Override + public EList getAttributes() + { + if (attributes == null) + { + attributes = new EObjectContainmentEList(Attribute.class, this, EtlPackage.REFINEMENT__ATTRIBUTES); + } + return attributes; + } + + /** + * + * + * @generated + */ + @Override + public EList getGroups() + { + if (groups == null) + { + groups = new EObjectContainmentEList(AttributeGroup.class, this, EtlPackage.REFINEMENT__GROUPS); + } + return groups; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case EtlPackage.REFINEMENT__ATTRIBUTES: + return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); + case EtlPackage.REFINEMENT__GROUPS: + return ((InternalEList)getGroups()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.REFINEMENT__ATTRIBUTES: + return getAttributes(); + case EtlPackage.REFINEMENT__GROUPS: + return getGroups(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.REFINEMENT__ATTRIBUTES: + getAttributes().clear(); + getAttributes().addAll((Collection)newValue); + return; + case EtlPackage.REFINEMENT__GROUPS: + getGroups().clear(); + getGroups().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.REFINEMENT__ATTRIBUTES: + getAttributes().clear(); + return; + case EtlPackage.REFINEMENT__GROUPS: + getGroups().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.REFINEMENT__ATTRIBUTES: + return attributes != null && !attributes.isEmpty(); + case EtlPackage.REFINEMENT__GROUPS: + return groups != null && !groups.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //RefinementImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalImpl.java new file mode 100644 index 00000000000..a3c3ed5add9 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalImpl.java @@ -0,0 +1,55 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.SlotDecimal; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Slot Decimal'. + * + * + * @generated + */ +public class SlotDecimalImpl extends MinimalEObjectImpl.Container implements SlotDecimal +{ + /** + * + * + * @generated + */ + protected SlotDecimalImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.SLOT_DECIMAL; + } + +} //SlotDecimalImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalMaximumValueImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalMaximumValueImpl.java new file mode 100644 index 00000000000..afe760ee43f --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalMaximumValueImpl.java @@ -0,0 +1,252 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue; + +import java.math.BigDecimal; + +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; + +/** + * + * An implementation of the model object 'Slot Decimal Maximum Value'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalMaximumValueImpl#isExclusive Exclusive}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalMaximumValueImpl#getValue Value}
      • + *
      + * + * @generated + */ +public class SlotDecimalMaximumValueImpl extends MinimalEObjectImpl.Container implements SlotDecimalMaximumValue +{ + /** + * The default value of the '{@link #isExclusive() Exclusive}' attribute. + * + * + * @see #isExclusive() + * @generated + * @ordered + */ + protected static final boolean EXCLUSIVE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isExclusive() Exclusive}' attribute. + * + * + * @see #isExclusive() + * @generated + * @ordered + */ + protected boolean exclusive = EXCLUSIVE_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final BigDecimal VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected BigDecimal value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected SlotDecimalMaximumValueImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.SLOT_DECIMAL_MAXIMUM_VALUE; + } + + /** + * + * + * @generated + */ + @Override + public boolean isExclusive() + { + return exclusive; + } + + /** + * + * + * @generated + */ + @Override + public void setExclusive(boolean newExclusive) + { + boolean oldExclusive = exclusive; + exclusive = newExclusive; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_DECIMAL_MAXIMUM_VALUE__EXCLUSIVE, oldExclusive, exclusive)); + } + + /** + * + * + * @generated + */ + @Override + public BigDecimal getValue() + { + return value; + } + + /** + * + * + * @generated + */ + @Override + public void setValue(BigDecimal newValue) + { + BigDecimal oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_DECIMAL_MAXIMUM_VALUE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_MAXIMUM_VALUE__EXCLUSIVE: + return isExclusive(); + case EtlPackage.SLOT_DECIMAL_MAXIMUM_VALUE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_MAXIMUM_VALUE__EXCLUSIVE: + setExclusive((Boolean)newValue); + return; + case EtlPackage.SLOT_DECIMAL_MAXIMUM_VALUE__VALUE: + setValue((BigDecimal)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_MAXIMUM_VALUE__EXCLUSIVE: + setExclusive(EXCLUSIVE_EDEFAULT); + return; + case EtlPackage.SLOT_DECIMAL_MAXIMUM_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_MAXIMUM_VALUE__EXCLUSIVE: + return exclusive != EXCLUSIVE_EDEFAULT; + case EtlPackage.SLOT_DECIMAL_MAXIMUM_VALUE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (exclusive: "); + result.append(exclusive); + result.append(", value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //SlotDecimalMaximumValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalMinimumValueImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalMinimumValueImpl.java new file mode 100644 index 00000000000..df84a9bc971 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalMinimumValueImpl.java @@ -0,0 +1,252 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue; + +import java.math.BigDecimal; + +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; + +/** + * + * An implementation of the model object 'Slot Decimal Minimum Value'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalMinimumValueImpl#isExclusive Exclusive}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalMinimumValueImpl#getValue Value}
      • + *
      + * + * @generated + */ +public class SlotDecimalMinimumValueImpl extends MinimalEObjectImpl.Container implements SlotDecimalMinimumValue +{ + /** + * The default value of the '{@link #isExclusive() Exclusive}' attribute. + * + * + * @see #isExclusive() + * @generated + * @ordered + */ + protected static final boolean EXCLUSIVE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isExclusive() Exclusive}' attribute. + * + * + * @see #isExclusive() + * @generated + * @ordered + */ + protected boolean exclusive = EXCLUSIVE_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final BigDecimal VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected BigDecimal value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected SlotDecimalMinimumValueImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.SLOT_DECIMAL_MINIMUM_VALUE; + } + + /** + * + * + * @generated + */ + @Override + public boolean isExclusive() + { + return exclusive; + } + + /** + * + * + * @generated + */ + @Override + public void setExclusive(boolean newExclusive) + { + boolean oldExclusive = exclusive; + exclusive = newExclusive; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_DECIMAL_MINIMUM_VALUE__EXCLUSIVE, oldExclusive, exclusive)); + } + + /** + * + * + * @generated + */ + @Override + public BigDecimal getValue() + { + return value; + } + + /** + * + * + * @generated + */ + @Override + public void setValue(BigDecimal newValue) + { + BigDecimal oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_DECIMAL_MINIMUM_VALUE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_MINIMUM_VALUE__EXCLUSIVE: + return isExclusive(); + case EtlPackage.SLOT_DECIMAL_MINIMUM_VALUE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_MINIMUM_VALUE__EXCLUSIVE: + setExclusive((Boolean)newValue); + return; + case EtlPackage.SLOT_DECIMAL_MINIMUM_VALUE__VALUE: + setValue((BigDecimal)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_MINIMUM_VALUE__EXCLUSIVE: + setExclusive(EXCLUSIVE_EDEFAULT); + return; + case EtlPackage.SLOT_DECIMAL_MINIMUM_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_MINIMUM_VALUE__EXCLUSIVE: + return exclusive != EXCLUSIVE_EDEFAULT; + case EtlPackage.SLOT_DECIMAL_MINIMUM_VALUE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (exclusive: "); + result.append(exclusive); + result.append(", value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //SlotDecimalMinimumValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalRangeImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalRangeImpl.java new file mode 100644 index 00000000000..e93f18677f6 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalRangeImpl.java @@ -0,0 +1,282 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue; +import com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue; +import com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange; + +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.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Slot Decimal Range'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalRangeImpl#getMinimum Minimum}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalRangeImpl#getMaximum Maximum}
      • + *
      + * + * @generated + */ +public class SlotDecimalRangeImpl extends SlotDecimalImpl implements SlotDecimalRange +{ + /** + * The cached value of the '{@link #getMinimum() Minimum}' containment reference. + * + * + * @see #getMinimum() + * @generated + * @ordered + */ + protected SlotDecimalMinimumValue minimum; + + /** + * The cached value of the '{@link #getMaximum() Maximum}' containment reference. + * + * + * @see #getMaximum() + * @generated + * @ordered + */ + protected SlotDecimalMaximumValue maximum; + + /** + * + * + * @generated + */ + protected SlotDecimalRangeImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.SLOT_DECIMAL_RANGE; + } + + /** + * + * + * @generated + */ + @Override + public SlotDecimalMinimumValue getMinimum() + { + return minimum; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetMinimum(SlotDecimalMinimumValue newMinimum, NotificationChain msgs) + { + SlotDecimalMinimumValue oldMinimum = minimum; + minimum = newMinimum; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_DECIMAL_RANGE__MINIMUM, oldMinimum, newMinimum); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setMinimum(SlotDecimalMinimumValue newMinimum) + { + if (newMinimum != minimum) + { + NotificationChain msgs = null; + if (minimum != null) + msgs = ((InternalEObject)minimum).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.SLOT_DECIMAL_RANGE__MINIMUM, null, msgs); + if (newMinimum != null) + msgs = ((InternalEObject)newMinimum).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.SLOT_DECIMAL_RANGE__MINIMUM, null, msgs); + msgs = basicSetMinimum(newMinimum, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_DECIMAL_RANGE__MINIMUM, newMinimum, newMinimum)); + } + + /** + * + * + * @generated + */ + @Override + public SlotDecimalMaximumValue getMaximum() + { + return maximum; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetMaximum(SlotDecimalMaximumValue newMaximum, NotificationChain msgs) + { + SlotDecimalMaximumValue oldMaximum = maximum; + maximum = newMaximum; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_DECIMAL_RANGE__MAXIMUM, oldMaximum, newMaximum); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setMaximum(SlotDecimalMaximumValue newMaximum) + { + if (newMaximum != maximum) + { + NotificationChain msgs = null; + if (maximum != null) + msgs = ((InternalEObject)maximum).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.SLOT_DECIMAL_RANGE__MAXIMUM, null, msgs); + if (newMaximum != null) + msgs = ((InternalEObject)newMaximum).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.SLOT_DECIMAL_RANGE__MAXIMUM, null, msgs); + msgs = basicSetMaximum(newMaximum, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_DECIMAL_RANGE__MAXIMUM, newMaximum, newMaximum)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_RANGE__MINIMUM: + return basicSetMinimum(null, msgs); + case EtlPackage.SLOT_DECIMAL_RANGE__MAXIMUM: + return basicSetMaximum(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_RANGE__MINIMUM: + return getMinimum(); + case EtlPackage.SLOT_DECIMAL_RANGE__MAXIMUM: + return getMaximum(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_RANGE__MINIMUM: + setMinimum((SlotDecimalMinimumValue)newValue); + return; + case EtlPackage.SLOT_DECIMAL_RANGE__MAXIMUM: + setMaximum((SlotDecimalMaximumValue)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_RANGE__MINIMUM: + setMinimum((SlotDecimalMinimumValue)null); + return; + case EtlPackage.SLOT_DECIMAL_RANGE__MAXIMUM: + setMaximum((SlotDecimalMaximumValue)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_RANGE__MINIMUM: + return minimum != null; + case EtlPackage.SLOT_DECIMAL_RANGE__MAXIMUM: + return maximum != null; + } + return super.eIsSet(featureID); + } + +} //SlotDecimalRangeImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalValueImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalValueImpl.java new file mode 100644 index 00000000000..5c84638ce5a --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotDecimalValueImpl.java @@ -0,0 +1,193 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.SlotDecimalValue; + +import java.math.BigDecimal; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Slot Decimal Value'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotDecimalValueImpl#getValue Value}
      • + *
      + * + * @generated + */ +public class SlotDecimalValueImpl extends SlotDecimalImpl implements SlotDecimalValue +{ + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final BigDecimal VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected BigDecimal value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected SlotDecimalValueImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.SLOT_DECIMAL_VALUE; + } + + /** + * + * + * @generated + */ + @Override + public BigDecimal getValue() + { + return value; + } + + /** + * + * + * @generated + */ + @Override + public void setValue(BigDecimal newValue) + { + BigDecimal oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_DECIMAL_VALUE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_VALUE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_VALUE__VALUE: + setValue((BigDecimal)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_DECIMAL_VALUE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //SlotDecimalValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerImpl.java new file mode 100644 index 00000000000..f6c9c93b93b --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerImpl.java @@ -0,0 +1,55 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.SlotInteger; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Slot Integer'. + * + * + * @generated + */ +public class SlotIntegerImpl extends MinimalEObjectImpl.Container implements SlotInteger +{ + /** + * + * + * @generated + */ + protected SlotIntegerImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.SLOT_INTEGER; + } + +} //SlotIntegerImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerMaximumValueImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerMaximumValueImpl.java new file mode 100644 index 00000000000..3ab2ade5b68 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerMaximumValueImpl.java @@ -0,0 +1,250 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue; + +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; + +/** + * + * An implementation of the model object 'Slot Integer Maximum Value'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerMaximumValueImpl#isExclusive Exclusive}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerMaximumValueImpl#getValue Value}
      • + *
      + * + * @generated + */ +public class SlotIntegerMaximumValueImpl extends MinimalEObjectImpl.Container implements SlotIntegerMaximumValue +{ + /** + * The default value of the '{@link #isExclusive() Exclusive}' attribute. + * + * + * @see #isExclusive() + * @generated + * @ordered + */ + protected static final boolean EXCLUSIVE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isExclusive() Exclusive}' attribute. + * + * + * @see #isExclusive() + * @generated + * @ordered + */ + protected boolean exclusive = EXCLUSIVE_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final int VALUE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected int value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected SlotIntegerMaximumValueImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.SLOT_INTEGER_MAXIMUM_VALUE; + } + + /** + * + * + * @generated + */ + @Override + public boolean isExclusive() + { + return exclusive; + } + + /** + * + * + * @generated + */ + @Override + public void setExclusive(boolean newExclusive) + { + boolean oldExclusive = exclusive; + exclusive = newExclusive; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_INTEGER_MAXIMUM_VALUE__EXCLUSIVE, oldExclusive, exclusive)); + } + + /** + * + * + * @generated + */ + @Override + public int getValue() + { + return value; + } + + /** + * + * + * @generated + */ + @Override + public void setValue(int newValue) + { + int oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_INTEGER_MAXIMUM_VALUE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_MAXIMUM_VALUE__EXCLUSIVE: + return isExclusive(); + case EtlPackage.SLOT_INTEGER_MAXIMUM_VALUE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_MAXIMUM_VALUE__EXCLUSIVE: + setExclusive((Boolean)newValue); + return; + case EtlPackage.SLOT_INTEGER_MAXIMUM_VALUE__VALUE: + setValue((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_MAXIMUM_VALUE__EXCLUSIVE: + setExclusive(EXCLUSIVE_EDEFAULT); + return; + case EtlPackage.SLOT_INTEGER_MAXIMUM_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_MAXIMUM_VALUE__EXCLUSIVE: + return exclusive != EXCLUSIVE_EDEFAULT; + case EtlPackage.SLOT_INTEGER_MAXIMUM_VALUE__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (exclusive: "); + result.append(exclusive); + result.append(", value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //SlotIntegerMaximumValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerMinimumValueImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerMinimumValueImpl.java new file mode 100644 index 00000000000..98344fbabc5 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerMinimumValueImpl.java @@ -0,0 +1,250 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue; + +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; + +/** + * + * An implementation of the model object 'Slot Integer Minimum Value'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerMinimumValueImpl#isExclusive Exclusive}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerMinimumValueImpl#getValue Value}
      • + *
      + * + * @generated + */ +public class SlotIntegerMinimumValueImpl extends MinimalEObjectImpl.Container implements SlotIntegerMinimumValue +{ + /** + * The default value of the '{@link #isExclusive() Exclusive}' attribute. + * + * + * @see #isExclusive() + * @generated + * @ordered + */ + protected static final boolean EXCLUSIVE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isExclusive() Exclusive}' attribute. + * + * + * @see #isExclusive() + * @generated + * @ordered + */ + protected boolean exclusive = EXCLUSIVE_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final int VALUE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected int value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected SlotIntegerMinimumValueImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.SLOT_INTEGER_MINIMUM_VALUE; + } + + /** + * + * + * @generated + */ + @Override + public boolean isExclusive() + { + return exclusive; + } + + /** + * + * + * @generated + */ + @Override + public void setExclusive(boolean newExclusive) + { + boolean oldExclusive = exclusive; + exclusive = newExclusive; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_INTEGER_MINIMUM_VALUE__EXCLUSIVE, oldExclusive, exclusive)); + } + + /** + * + * + * @generated + */ + @Override + public int getValue() + { + return value; + } + + /** + * + * + * @generated + */ + @Override + public void setValue(int newValue) + { + int oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_INTEGER_MINIMUM_VALUE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_MINIMUM_VALUE__EXCLUSIVE: + return isExclusive(); + case EtlPackage.SLOT_INTEGER_MINIMUM_VALUE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_MINIMUM_VALUE__EXCLUSIVE: + setExclusive((Boolean)newValue); + return; + case EtlPackage.SLOT_INTEGER_MINIMUM_VALUE__VALUE: + setValue((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_MINIMUM_VALUE__EXCLUSIVE: + setExclusive(EXCLUSIVE_EDEFAULT); + return; + case EtlPackage.SLOT_INTEGER_MINIMUM_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_MINIMUM_VALUE__EXCLUSIVE: + return exclusive != EXCLUSIVE_EDEFAULT; + case EtlPackage.SLOT_INTEGER_MINIMUM_VALUE__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (exclusive: "); + result.append(exclusive); + result.append(", value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //SlotIntegerMinimumValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerRangeImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerRangeImpl.java new file mode 100644 index 00000000000..6729a004ca3 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerRangeImpl.java @@ -0,0 +1,282 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue; +import com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue; +import com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange; + +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.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Slot Integer Range'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerRangeImpl#getMinimum Minimum}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerRangeImpl#getMaximum Maximum}
      • + *
      + * + * @generated + */ +public class SlotIntegerRangeImpl extends SlotIntegerImpl implements SlotIntegerRange +{ + /** + * The cached value of the '{@link #getMinimum() Minimum}' containment reference. + * + * + * @see #getMinimum() + * @generated + * @ordered + */ + protected SlotIntegerMinimumValue minimum; + + /** + * The cached value of the '{@link #getMaximum() Maximum}' containment reference. + * + * + * @see #getMaximum() + * @generated + * @ordered + */ + protected SlotIntegerMaximumValue maximum; + + /** + * + * + * @generated + */ + protected SlotIntegerRangeImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.SLOT_INTEGER_RANGE; + } + + /** + * + * + * @generated + */ + @Override + public SlotIntegerMinimumValue getMinimum() + { + return minimum; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetMinimum(SlotIntegerMinimumValue newMinimum, NotificationChain msgs) + { + SlotIntegerMinimumValue oldMinimum = minimum; + minimum = newMinimum; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_INTEGER_RANGE__MINIMUM, oldMinimum, newMinimum); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setMinimum(SlotIntegerMinimumValue newMinimum) + { + if (newMinimum != minimum) + { + NotificationChain msgs = null; + if (minimum != null) + msgs = ((InternalEObject)minimum).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.SLOT_INTEGER_RANGE__MINIMUM, null, msgs); + if (newMinimum != null) + msgs = ((InternalEObject)newMinimum).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.SLOT_INTEGER_RANGE__MINIMUM, null, msgs); + msgs = basicSetMinimum(newMinimum, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_INTEGER_RANGE__MINIMUM, newMinimum, newMinimum)); + } + + /** + * + * + * @generated + */ + @Override + public SlotIntegerMaximumValue getMaximum() + { + return maximum; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetMaximum(SlotIntegerMaximumValue newMaximum, NotificationChain msgs) + { + SlotIntegerMaximumValue oldMaximum = maximum; + maximum = newMaximum; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_INTEGER_RANGE__MAXIMUM, oldMaximum, newMaximum); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setMaximum(SlotIntegerMaximumValue newMaximum) + { + if (newMaximum != maximum) + { + NotificationChain msgs = null; + if (maximum != null) + msgs = ((InternalEObject)maximum).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.SLOT_INTEGER_RANGE__MAXIMUM, null, msgs); + if (newMaximum != null) + msgs = ((InternalEObject)newMaximum).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.SLOT_INTEGER_RANGE__MAXIMUM, null, msgs); + msgs = basicSetMaximum(newMaximum, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_INTEGER_RANGE__MAXIMUM, newMaximum, newMaximum)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_RANGE__MINIMUM: + return basicSetMinimum(null, msgs); + case EtlPackage.SLOT_INTEGER_RANGE__MAXIMUM: + return basicSetMaximum(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_RANGE__MINIMUM: + return getMinimum(); + case EtlPackage.SLOT_INTEGER_RANGE__MAXIMUM: + return getMaximum(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_RANGE__MINIMUM: + setMinimum((SlotIntegerMinimumValue)newValue); + return; + case EtlPackage.SLOT_INTEGER_RANGE__MAXIMUM: + setMaximum((SlotIntegerMaximumValue)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_RANGE__MINIMUM: + setMinimum((SlotIntegerMinimumValue)null); + return; + case EtlPackage.SLOT_INTEGER_RANGE__MAXIMUM: + setMaximum((SlotIntegerMaximumValue)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_RANGE__MINIMUM: + return minimum != null; + case EtlPackage.SLOT_INTEGER_RANGE__MAXIMUM: + return maximum != null; + } + return super.eIsSet(featureID); + } + +} //SlotIntegerRangeImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerValueImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerValueImpl.java new file mode 100644 index 00000000000..6bfe5216815 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SlotIntegerValueImpl.java @@ -0,0 +1,191 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.SlotIntegerValue; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Slot Integer Value'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SlotIntegerValueImpl#getValue Value}
      • + *
      + * + * @generated + */ +public class SlotIntegerValueImpl extends SlotIntegerImpl implements SlotIntegerValue +{ + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final int VALUE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected int value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected SlotIntegerValueImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.SLOT_INTEGER_VALUE; + } + + /** + * + * + * @generated + */ + @Override + public int getValue() + { + return value; + } + + /** + * + * + * @generated + */ + @Override + public void setValue(int newValue) + { + int oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SLOT_INTEGER_VALUE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_VALUE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_VALUE__VALUE: + setValue((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.SLOT_INTEGER_VALUE__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //SlotIntegerValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/StringReplacementSlotImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/StringReplacementSlotImpl.java new file mode 100644 index 00000000000..f2a8b3cac5d --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/StringReplacementSlotImpl.java @@ -0,0 +1,175 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.StringReplacementSlot; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EDataTypeEList; + +/** + * + * An implementation of the model object 'String Replacement Slot'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.StringReplacementSlotImpl#getValues Values}
      • + *
      + * + * @generated + */ +public class StringReplacementSlotImpl extends ConcreteValueReplacementSlotImpl implements StringReplacementSlot +{ + /** + * The cached value of the '{@link #getValues() Values}' attribute list. + * + * + * @see #getValues() + * @generated + * @ordered + */ + protected EList values; + + /** + * + * + * @generated + */ + protected StringReplacementSlotImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.STRING_REPLACEMENT_SLOT; + } + + /** + * + * + * @generated + */ + @Override + public EList getValues() + { + if (values == null) + { + values = new EDataTypeEList(String.class, this, EtlPackage.STRING_REPLACEMENT_SLOT__VALUES); + } + return values; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.STRING_REPLACEMENT_SLOT__VALUES: + return getValues(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.STRING_REPLACEMENT_SLOT__VALUES: + getValues().clear(); + getValues().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.STRING_REPLACEMENT_SLOT__VALUES: + getValues().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.STRING_REPLACEMENT_SLOT__VALUES: + return values != null && !values.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (values: "); + result.append(values); + result.append(')'); + return result.toString(); + } + +} //StringReplacementSlotImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/StringValueImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/StringValueImpl.java new file mode 100644 index 00000000000..ad621cdbc88 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/StringValueImpl.java @@ -0,0 +1,191 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.StringValue; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'String Value'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.StringValueImpl#getValue Value}
      • + *
      + * + * @generated + */ +public class StringValueImpl extends AttributeValueImpl implements StringValue +{ + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected StringValueImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.STRING_VALUE; + } + + /** + * + * + * @generated + */ + @Override + public String getValue() + { + return value; + } + + /** + * + * + * @generated + */ + @Override + public void setValue(String newValue) + { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.STRING_VALUE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.STRING_VALUE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.STRING_VALUE__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.STRING_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.STRING_VALUE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //StringValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SubExpressionImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SubExpressionImpl.java new file mode 100644 index 00000000000..7f50f1b3a2e --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/SubExpressionImpl.java @@ -0,0 +1,256 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.FocusConcept; +import com.b2international.snowowl.snomed.etl.etl.Refinement; +import com.b2international.snowowl.snomed.etl.etl.SubExpression; + +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; + +/** + * + * An implementation of the model object 'Sub Expression'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SubExpressionImpl#getFocusConcepts Focus Concepts}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.SubExpressionImpl#getRefinement Refinement}
      • + *
      + * + * @generated + */ +public class SubExpressionImpl extends AttributeValueImpl implements SubExpression +{ + /** + * The cached value of the '{@link #getFocusConcepts() Focus Concepts}' containment reference list. + * + * + * @see #getFocusConcepts() + * @generated + * @ordered + */ + protected EList focusConcepts; + + /** + * The cached value of the '{@link #getRefinement() Refinement}' containment reference. + * + * + * @see #getRefinement() + * @generated + * @ordered + */ + protected Refinement refinement; + + /** + * + * + * @generated + */ + protected SubExpressionImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.SUB_EXPRESSION; + } + + /** + * + * + * @generated + */ + @Override + public EList getFocusConcepts() + { + if (focusConcepts == null) + { + focusConcepts = new EObjectContainmentEList(FocusConcept.class, this, EtlPackage.SUB_EXPRESSION__FOCUS_CONCEPTS); + } + return focusConcepts; + } + + /** + * + * + * @generated + */ + @Override + public Refinement getRefinement() + { + return refinement; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetRefinement(Refinement newRefinement, NotificationChain msgs) + { + Refinement oldRefinement = refinement; + refinement = newRefinement; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.SUB_EXPRESSION__REFINEMENT, oldRefinement, newRefinement); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setRefinement(Refinement newRefinement) + { + if (newRefinement != refinement) + { + NotificationChain msgs = null; + if (refinement != null) + msgs = ((InternalEObject)refinement).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.SUB_EXPRESSION__REFINEMENT, null, msgs); + if (newRefinement != null) + msgs = ((InternalEObject)newRefinement).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.SUB_EXPRESSION__REFINEMENT, null, msgs); + msgs = basicSetRefinement(newRefinement, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.SUB_EXPRESSION__REFINEMENT, newRefinement, newRefinement)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case EtlPackage.SUB_EXPRESSION__FOCUS_CONCEPTS: + return ((InternalEList)getFocusConcepts()).basicRemove(otherEnd, msgs); + case EtlPackage.SUB_EXPRESSION__REFINEMENT: + return basicSetRefinement(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.SUB_EXPRESSION__FOCUS_CONCEPTS: + return getFocusConcepts(); + case EtlPackage.SUB_EXPRESSION__REFINEMENT: + return getRefinement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.SUB_EXPRESSION__FOCUS_CONCEPTS: + getFocusConcepts().clear(); + getFocusConcepts().addAll((Collection)newValue); + return; + case EtlPackage.SUB_EXPRESSION__REFINEMENT: + setRefinement((Refinement)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.SUB_EXPRESSION__FOCUS_CONCEPTS: + getFocusConcepts().clear(); + return; + case EtlPackage.SUB_EXPRESSION__REFINEMENT: + setRefinement((Refinement)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.SUB_EXPRESSION__FOCUS_CONCEPTS: + return focusConcepts != null && !focusConcepts.isEmpty(); + case EtlPackage.SUB_EXPRESSION__REFINEMENT: + return refinement != null; + } + return super.eIsSet(featureID); + } + +} //SubExpressionImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/TemplateInformationSlotImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/TemplateInformationSlotImpl.java new file mode 100644 index 00000000000..8610acdd138 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/TemplateInformationSlotImpl.java @@ -0,0 +1,282 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlCardinality; +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot; + +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.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Template Information Slot'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.TemplateInformationSlotImpl#getCardinality Cardinality}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.TemplateInformationSlotImpl#getName Name}
      • + *
      + * + * @generated + */ +public class TemplateInformationSlotImpl extends MinimalEObjectImpl.Container implements TemplateInformationSlot +{ + /** + * The cached value of the '{@link #getCardinality() Cardinality}' containment reference. + * + * + * @see #getCardinality() + * @generated + * @ordered + */ + protected EtlCardinality cardinality; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected TemplateInformationSlotImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.TEMPLATE_INFORMATION_SLOT; + } + + /** + * + * + * @generated + */ + @Override + public EtlCardinality getCardinality() + { + return cardinality; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetCardinality(EtlCardinality newCardinality, NotificationChain msgs) + { + EtlCardinality oldCardinality = cardinality; + cardinality = newCardinality; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EtlPackage.TEMPLATE_INFORMATION_SLOT__CARDINALITY, oldCardinality, newCardinality); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setCardinality(EtlCardinality newCardinality) + { + if (newCardinality != cardinality) + { + NotificationChain msgs = null; + if (cardinality != null) + msgs = ((InternalEObject)cardinality).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EtlPackage.TEMPLATE_INFORMATION_SLOT__CARDINALITY, null, msgs); + if (newCardinality != null) + msgs = ((InternalEObject)newCardinality).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EtlPackage.TEMPLATE_INFORMATION_SLOT__CARDINALITY, null, msgs); + msgs = basicSetCardinality(newCardinality, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.TEMPLATE_INFORMATION_SLOT__CARDINALITY, newCardinality, newCardinality)); + } + + /** + * + * + * @generated + */ + @Override + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + @Override + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.TEMPLATE_INFORMATION_SLOT__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case EtlPackage.TEMPLATE_INFORMATION_SLOT__CARDINALITY: + return basicSetCardinality(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.TEMPLATE_INFORMATION_SLOT__CARDINALITY: + return getCardinality(); + case EtlPackage.TEMPLATE_INFORMATION_SLOT__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.TEMPLATE_INFORMATION_SLOT__CARDINALITY: + setCardinality((EtlCardinality)newValue); + return; + case EtlPackage.TEMPLATE_INFORMATION_SLOT__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.TEMPLATE_INFORMATION_SLOT__CARDINALITY: + setCardinality((EtlCardinality)null); + return; + case EtlPackage.TEMPLATE_INFORMATION_SLOT__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.TEMPLATE_INFORMATION_SLOT__CARDINALITY: + return cardinality != null; + case EtlPackage.TEMPLATE_INFORMATION_SLOT__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //TemplateInformationSlotImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/TokenReplacementSlotImpl.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/TokenReplacementSlotImpl.java new file mode 100644 index 00000000000..61d3457bc49 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/impl/TokenReplacementSlotImpl.java @@ -0,0 +1,238 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.impl; + +import com.b2international.snowowl.snomed.etl.etl.EtlPackage; +import com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot; + +import java.util.Collection; + +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; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EDataTypeEList; + +/** + * + * An implementation of the model object 'Token Replacement Slot'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.TokenReplacementSlotImpl#getTokens Tokens}
      • + *
      • {@link com.b2international.snowowl.snomed.etl.etl.impl.TokenReplacementSlotImpl#getName Name}
      • + *
      + * + * @generated + */ +public class TokenReplacementSlotImpl extends MinimalEObjectImpl.Container implements TokenReplacementSlot +{ + /** + * The cached value of the '{@link #getTokens() Tokens}' attribute list. + * + * + * @see #getTokens() + * @generated + * @ordered + */ + protected EList tokens; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected TokenReplacementSlotImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EtlPackage.Literals.TOKEN_REPLACEMENT_SLOT; + } + + /** + * + * + * @generated + */ + @Override + public EList getTokens() + { + if (tokens == null) + { + tokens = new EDataTypeEList(String.class, this, EtlPackage.TOKEN_REPLACEMENT_SLOT__TOKENS); + } + return tokens; + } + + /** + * + * + * @generated + */ + @Override + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + @Override + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, EtlPackage.TOKEN_REPLACEMENT_SLOT__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case EtlPackage.TOKEN_REPLACEMENT_SLOT__TOKENS: + return getTokens(); + case EtlPackage.TOKEN_REPLACEMENT_SLOT__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case EtlPackage.TOKEN_REPLACEMENT_SLOT__TOKENS: + getTokens().clear(); + getTokens().addAll((Collection)newValue); + return; + case EtlPackage.TOKEN_REPLACEMENT_SLOT__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case EtlPackage.TOKEN_REPLACEMENT_SLOT__TOKENS: + getTokens().clear(); + return; + case EtlPackage.TOKEN_REPLACEMENT_SLOT__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case EtlPackage.TOKEN_REPLACEMENT_SLOT__TOKENS: + return tokens != null && !tokens.isEmpty(); + case EtlPackage.TOKEN_REPLACEMENT_SLOT__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (tokens: "); + result.append(tokens); + result.append(", name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //TokenReplacementSlotImpl diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/util/EtlAdapterFactory.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/util/EtlAdapterFactory.java new file mode 100644 index 00000000000..ec064f04149 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/util/EtlAdapterFactory.java @@ -0,0 +1,745 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.util; + +import com.b2international.snowowl.snomed.etl.etl.*; + +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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage + * @generated + */ +public class EtlAdapterFactory extends AdapterFactoryImpl +{ + /** + * The cached model package. + * + * + * @generated + */ + protected static EtlPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public EtlAdapterFactory() + { + if (modelPackage == null) + { + modelPackage = EtlPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @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 createXXX methods. + * + * + * @generated + */ + protected EtlSwitch modelSwitch = + new EtlSwitch() + { + @Override + public Adapter caseExpressionTemplate(ExpressionTemplate object) + { + return createExpressionTemplateAdapter(); + } + @Override + public Adapter caseSubExpression(SubExpression object) + { + return createSubExpressionAdapter(); + } + @Override + public Adapter caseFocusConcept(FocusConcept object) + { + return createFocusConceptAdapter(); + } + @Override + public Adapter caseRefinement(Refinement object) + { + return createRefinementAdapter(); + } + @Override + public Adapter caseAttributeGroup(AttributeGroup object) + { + return createAttributeGroupAdapter(); + } + @Override + public Adapter caseAttribute(Attribute object) + { + return createAttributeAdapter(); + } + @Override + public Adapter caseAttributeValue(AttributeValue object) + { + return createAttributeValueAdapter(); + } + @Override + public Adapter caseConceptIdReplacementSlot(ConceptIdReplacementSlot object) + { + return createConceptIdReplacementSlotAdapter(); + } + @Override + public Adapter caseExpressionReplacementSlot(ExpressionReplacementSlot object) + { + return createExpressionReplacementSlotAdapter(); + } + @Override + public Adapter caseTokenReplacementSlot(TokenReplacementSlot object) + { + return createTokenReplacementSlotAdapter(); + } + @Override + public Adapter caseTemplateInformationSlot(TemplateInformationSlot object) + { + return createTemplateInformationSlotAdapter(); + } + @Override + public Adapter caseConcreteValueReplacementSlot(ConcreteValueReplacementSlot object) + { + return createConcreteValueReplacementSlotAdapter(); + } + @Override + public Adapter caseStringReplacementSlot(StringReplacementSlot object) + { + return createStringReplacementSlotAdapter(); + } + @Override + public Adapter caseIntegerReplacementSlot(IntegerReplacementSlot object) + { + return createIntegerReplacementSlotAdapter(); + } + @Override + public Adapter caseDecimalReplacementSlot(DecimalReplacementSlot object) + { + return createDecimalReplacementSlotAdapter(); + } + @Override + public Adapter caseEtlCardinality(EtlCardinality object) + { + return createEtlCardinalityAdapter(); + } + @Override + public Adapter caseConceptReplacementSlot(ConceptReplacementSlot object) + { + return createConceptReplacementSlotAdapter(); + } + @Override + public Adapter caseConceptReference(ConceptReference object) + { + return createConceptReferenceAdapter(); + } + @Override + public Adapter caseStringValue(StringValue object) + { + return createStringValueAdapter(); + } + @Override + public Adapter caseIntegerValue(IntegerValue object) + { + return createIntegerValueAdapter(); + } + @Override + public Adapter caseDecimalValue(DecimalValue object) + { + return createDecimalValueAdapter(); + } + @Override + public Adapter caseSlotInteger(SlotInteger object) + { + return createSlotIntegerAdapter(); + } + @Override + public Adapter caseSlotIntegerValue(SlotIntegerValue object) + { + return createSlotIntegerValueAdapter(); + } + @Override + public Adapter caseSlotIntegerRange(SlotIntegerRange object) + { + return createSlotIntegerRangeAdapter(); + } + @Override + public Adapter caseSlotIntegerMinimumValue(SlotIntegerMinimumValue object) + { + return createSlotIntegerMinimumValueAdapter(); + } + @Override + public Adapter caseSlotIntegerMaximumValue(SlotIntegerMaximumValue object) + { + return createSlotIntegerMaximumValueAdapter(); + } + @Override + public Adapter caseSlotDecimal(SlotDecimal object) + { + return createSlotDecimalAdapter(); + } + @Override + public Adapter caseSlotDecimalValue(SlotDecimalValue object) + { + return createSlotDecimalValueAdapter(); + } + @Override + public Adapter caseSlotDecimalRange(SlotDecimalRange object) + { + return createSlotDecimalRangeAdapter(); + } + @Override + public Adapter caseSlotDecimalMinimumValue(SlotDecimalMinimumValue object) + { + return createSlotDecimalMinimumValueAdapter(); + } + @Override + public Adapter caseSlotDecimalMaximumValue(SlotDecimalMaximumValue object) + { + return createSlotDecimalMaximumValueAdapter(); + } + @Override + public Adapter defaultCase(EObject object) + { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) + { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate Expression Template}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.ExpressionTemplate + * @generated + */ + public Adapter createExpressionTemplateAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.SubExpression Sub Expression}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.SubExpression + * @generated + */ + public Adapter createSubExpressionAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.FocusConcept Focus Concept}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.FocusConcept + * @generated + */ + public Adapter createFocusConceptAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.Refinement Refinement}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.Refinement + * @generated + */ + public Adapter createRefinementAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.AttributeGroup Attribute Group}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.AttributeGroup + * @generated + */ + public Adapter createAttributeGroupAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.Attribute Attribute}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.Attribute + * @generated + */ + public Adapter createAttributeAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.AttributeValue Attribute Value}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.AttributeValue + * @generated + */ + public Adapter createAttributeValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.ConceptIdReplacementSlot Concept Id Replacement Slot}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.ConceptIdReplacementSlot + * @generated + */ + public Adapter createConceptIdReplacementSlotAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.ExpressionReplacementSlot Expression Replacement Slot}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.ExpressionReplacementSlot + * @generated + */ + public Adapter createExpressionReplacementSlotAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot Token Replacement Slot}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.TokenReplacementSlot + * @generated + */ + public Adapter createTokenReplacementSlotAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot Template Information Slot}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.TemplateInformationSlot + * @generated + */ + public Adapter createTemplateInformationSlotAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.ConcreteValueReplacementSlot Concrete Value Replacement Slot}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.ConcreteValueReplacementSlot + * @generated + */ + public Adapter createConcreteValueReplacementSlotAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.StringReplacementSlot String Replacement Slot}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.StringReplacementSlot + * @generated + */ + public Adapter createStringReplacementSlotAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.IntegerReplacementSlot Integer Replacement Slot}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.IntegerReplacementSlot + * @generated + */ + public Adapter createIntegerReplacementSlotAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.DecimalReplacementSlot Decimal Replacement Slot}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.DecimalReplacementSlot + * @generated + */ + public Adapter createDecimalReplacementSlotAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.EtlCardinality Cardinality}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.EtlCardinality + * @generated + */ + public Adapter createEtlCardinalityAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot Concept Replacement Slot}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.ConceptReplacementSlot + * @generated + */ + public Adapter createConceptReplacementSlotAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.ConceptReference Concept Reference}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.ConceptReference + * @generated + */ + public Adapter createConceptReferenceAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.StringValue String Value}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.StringValue + * @generated + */ + public Adapter createStringValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.IntegerValue Integer Value}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.IntegerValue + * @generated + */ + public Adapter createIntegerValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.DecimalValue Decimal Value}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.DecimalValue + * @generated + */ + public Adapter createDecimalValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.SlotInteger Slot Integer}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.SlotInteger + * @generated + */ + public Adapter createSlotIntegerAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerValue Slot Integer Value}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerValue + * @generated + */ + public Adapter createSlotIntegerValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange Slot Integer Range}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerRange + * @generated + */ + public Adapter createSlotIntegerRangeAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue Slot Integer Minimum Value}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerMinimumValue + * @generated + */ + public Adapter createSlotIntegerMinimumValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue Slot Integer Maximum Value}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.SlotIntegerMaximumValue + * @generated + */ + public Adapter createSlotIntegerMaximumValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimal Slot Decimal}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimal + * @generated + */ + public Adapter createSlotDecimalAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalValue Slot Decimal Value}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalValue + * @generated + */ + public Adapter createSlotDecimalValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange Slot Decimal Range}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalRange + * @generated + */ + public Adapter createSlotDecimalRangeAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue Slot Decimal Minimum Value}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalMinimumValue + * @generated + */ + public Adapter createSlotDecimalMinimumValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue Slot Decimal Maximum Value}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.etl.etl.SlotDecimalMaximumValue + * @generated + */ + public Adapter createSlotDecimalMaximumValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() + { + return null; + } + +} //EtlAdapterFactory diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/util/EtlSwitch.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/util/EtlSwitch.java new file mode 100644 index 00000000000..d52fa8b1cdd --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/etl/util/EtlSwitch.java @@ -0,0 +1,840 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.etl.util; + +import com.b2international.snowowl.snomed.etl.etl.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX 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. + * + * @see com.b2international.snowowl.snomed.etl.etl.EtlPackage + * @generated + */ +public class EtlSwitch extends Switch +{ + /** + * The cached model package + * + * + * @generated + */ + protected static EtlPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public EtlSwitch() + { + if (modelPackage == null) + { + modelPackage = EtlPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @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 caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) + { + switch (classifierID) + { + case EtlPackage.EXPRESSION_TEMPLATE: + { + ExpressionTemplate expressionTemplate = (ExpressionTemplate)theEObject; + T result = caseExpressionTemplate(expressionTemplate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.SUB_EXPRESSION: + { + SubExpression subExpression = (SubExpression)theEObject; + T result = caseSubExpression(subExpression); + if (result == null) result = caseAttributeValue(subExpression); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.FOCUS_CONCEPT: + { + FocusConcept focusConcept = (FocusConcept)theEObject; + T result = caseFocusConcept(focusConcept); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.REFINEMENT: + { + Refinement refinement = (Refinement)theEObject; + T result = caseRefinement(refinement); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.ATTRIBUTE_GROUP: + { + AttributeGroup attributeGroup = (AttributeGroup)theEObject; + T result = caseAttributeGroup(attributeGroup); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.ATTRIBUTE: + { + Attribute attribute = (Attribute)theEObject; + T result = caseAttribute(attribute); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.ATTRIBUTE_VALUE: + { + AttributeValue attributeValue = (AttributeValue)theEObject; + T result = caseAttributeValue(attributeValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.CONCEPT_ID_REPLACEMENT_SLOT: + { + ConceptIdReplacementSlot conceptIdReplacementSlot = (ConceptIdReplacementSlot)theEObject; + T result = caseConceptIdReplacementSlot(conceptIdReplacementSlot); + if (result == null) result = caseConceptReplacementSlot(conceptIdReplacementSlot); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.EXPRESSION_REPLACEMENT_SLOT: + { + ExpressionReplacementSlot expressionReplacementSlot = (ExpressionReplacementSlot)theEObject; + T result = caseExpressionReplacementSlot(expressionReplacementSlot); + if (result == null) result = caseConceptReplacementSlot(expressionReplacementSlot); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.TOKEN_REPLACEMENT_SLOT: + { + TokenReplacementSlot tokenReplacementSlot = (TokenReplacementSlot)theEObject; + T result = caseTokenReplacementSlot(tokenReplacementSlot); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.TEMPLATE_INFORMATION_SLOT: + { + TemplateInformationSlot templateInformationSlot = (TemplateInformationSlot)theEObject; + T result = caseTemplateInformationSlot(templateInformationSlot); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.CONCRETE_VALUE_REPLACEMENT_SLOT: + { + ConcreteValueReplacementSlot concreteValueReplacementSlot = (ConcreteValueReplacementSlot)theEObject; + T result = caseConcreteValueReplacementSlot(concreteValueReplacementSlot); + if (result == null) result = caseAttributeValue(concreteValueReplacementSlot); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.STRING_REPLACEMENT_SLOT: + { + StringReplacementSlot stringReplacementSlot = (StringReplacementSlot)theEObject; + T result = caseStringReplacementSlot(stringReplacementSlot); + if (result == null) result = caseConcreteValueReplacementSlot(stringReplacementSlot); + if (result == null) result = caseAttributeValue(stringReplacementSlot); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.INTEGER_REPLACEMENT_SLOT: + { + IntegerReplacementSlot integerReplacementSlot = (IntegerReplacementSlot)theEObject; + T result = caseIntegerReplacementSlot(integerReplacementSlot); + if (result == null) result = caseConcreteValueReplacementSlot(integerReplacementSlot); + if (result == null) result = caseAttributeValue(integerReplacementSlot); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.DECIMAL_REPLACEMENT_SLOT: + { + DecimalReplacementSlot decimalReplacementSlot = (DecimalReplacementSlot)theEObject; + T result = caseDecimalReplacementSlot(decimalReplacementSlot); + if (result == null) result = caseConcreteValueReplacementSlot(decimalReplacementSlot); + if (result == null) result = caseAttributeValue(decimalReplacementSlot); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.ETL_CARDINALITY: + { + EtlCardinality etlCardinality = (EtlCardinality)theEObject; + T result = caseEtlCardinality(etlCardinality); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.CONCEPT_REPLACEMENT_SLOT: + { + ConceptReplacementSlot conceptReplacementSlot = (ConceptReplacementSlot)theEObject; + T result = caseConceptReplacementSlot(conceptReplacementSlot); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.CONCEPT_REFERENCE: + { + ConceptReference conceptReference = (ConceptReference)theEObject; + T result = caseConceptReference(conceptReference); + if (result == null) result = caseAttributeValue(conceptReference); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.STRING_VALUE: + { + StringValue stringValue = (StringValue)theEObject; + T result = caseStringValue(stringValue); + if (result == null) result = caseAttributeValue(stringValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.INTEGER_VALUE: + { + IntegerValue integerValue = (IntegerValue)theEObject; + T result = caseIntegerValue(integerValue); + if (result == null) result = caseAttributeValue(integerValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.DECIMAL_VALUE: + { + DecimalValue decimalValue = (DecimalValue)theEObject; + T result = caseDecimalValue(decimalValue); + if (result == null) result = caseAttributeValue(decimalValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.SLOT_INTEGER: + { + SlotInteger slotInteger = (SlotInteger)theEObject; + T result = caseSlotInteger(slotInteger); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.SLOT_INTEGER_VALUE: + { + SlotIntegerValue slotIntegerValue = (SlotIntegerValue)theEObject; + T result = caseSlotIntegerValue(slotIntegerValue); + if (result == null) result = caseSlotInteger(slotIntegerValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.SLOT_INTEGER_RANGE: + { + SlotIntegerRange slotIntegerRange = (SlotIntegerRange)theEObject; + T result = caseSlotIntegerRange(slotIntegerRange); + if (result == null) result = caseSlotInteger(slotIntegerRange); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.SLOT_INTEGER_MINIMUM_VALUE: + { + SlotIntegerMinimumValue slotIntegerMinimumValue = (SlotIntegerMinimumValue)theEObject; + T result = caseSlotIntegerMinimumValue(slotIntegerMinimumValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.SLOT_INTEGER_MAXIMUM_VALUE: + { + SlotIntegerMaximumValue slotIntegerMaximumValue = (SlotIntegerMaximumValue)theEObject; + T result = caseSlotIntegerMaximumValue(slotIntegerMaximumValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.SLOT_DECIMAL: + { + SlotDecimal slotDecimal = (SlotDecimal)theEObject; + T result = caseSlotDecimal(slotDecimal); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.SLOT_DECIMAL_VALUE: + { + SlotDecimalValue slotDecimalValue = (SlotDecimalValue)theEObject; + T result = caseSlotDecimalValue(slotDecimalValue); + if (result == null) result = caseSlotDecimal(slotDecimalValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.SLOT_DECIMAL_RANGE: + { + SlotDecimalRange slotDecimalRange = (SlotDecimalRange)theEObject; + T result = caseSlotDecimalRange(slotDecimalRange); + if (result == null) result = caseSlotDecimal(slotDecimalRange); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.SLOT_DECIMAL_MINIMUM_VALUE: + { + SlotDecimalMinimumValue slotDecimalMinimumValue = (SlotDecimalMinimumValue)theEObject; + T result = caseSlotDecimalMinimumValue(slotDecimalMinimumValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case EtlPackage.SLOT_DECIMAL_MAXIMUM_VALUE: + { + SlotDecimalMaximumValue slotDecimalMaximumValue = (SlotDecimalMaximumValue)theEObject; + T result = caseSlotDecimalMaximumValue(slotDecimalMaximumValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Expression Template'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Expression Template'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseExpressionTemplate(ExpressionTemplate object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Sub Expression'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Sub Expression'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSubExpression(SubExpression object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Focus Concept'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Focus Concept'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFocusConcept(FocusConcept object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Refinement'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Refinement'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRefinement(Refinement object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Attribute Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Attribute Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAttributeGroup(AttributeGroup object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Attribute'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Attribute'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAttribute(Attribute object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Attribute Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Attribute Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAttributeValue(AttributeValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Concept Id Replacement Slot'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Concept Id Replacement Slot'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConceptIdReplacementSlot(ConceptIdReplacementSlot object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Expression Replacement Slot'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Expression Replacement Slot'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseExpressionReplacementSlot(ExpressionReplacementSlot object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Token Replacement Slot'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Token Replacement Slot'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTokenReplacementSlot(TokenReplacementSlot object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Template Information Slot'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Template Information Slot'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTemplateInformationSlot(TemplateInformationSlot object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Concrete Value Replacement Slot'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Concrete Value Replacement Slot'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConcreteValueReplacementSlot(ConcreteValueReplacementSlot object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'String Replacement Slot'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'String Replacement Slot'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseStringReplacementSlot(StringReplacementSlot object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Integer Replacement Slot'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Integer Replacement Slot'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseIntegerReplacementSlot(IntegerReplacementSlot object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Decimal Replacement Slot'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Decimal Replacement Slot'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDecimalReplacementSlot(DecimalReplacementSlot object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Cardinality'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cardinality'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEtlCardinality(EtlCardinality object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Concept Replacement Slot'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Concept Replacement Slot'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConceptReplacementSlot(ConceptReplacementSlot object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Concept Reference'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Concept Reference'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConceptReference(ConceptReference object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'String Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'String Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseStringValue(StringValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Integer Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Integer Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseIntegerValue(IntegerValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Decimal Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Decimal Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDecimalValue(DecimalValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Slot Integer'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Slot Integer'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSlotInteger(SlotInteger object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Slot Integer Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Slot Integer Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSlotIntegerValue(SlotIntegerValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Slot Integer Range'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Slot Integer Range'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSlotIntegerRange(SlotIntegerRange object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Slot Integer Minimum Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Slot Integer Minimum Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSlotIntegerMinimumValue(SlotIntegerMinimumValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Slot Integer Maximum Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Slot Integer Maximum Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSlotIntegerMaximumValue(SlotIntegerMaximumValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Slot Decimal'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Slot Decimal'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSlotDecimal(SlotDecimal object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Slot Decimal Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Slot Decimal Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSlotDecimalValue(SlotDecimalValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Slot Decimal Range'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Slot Decimal Range'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSlotDecimalRange(SlotDecimalRange object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Slot Decimal Minimum Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Slot Decimal Minimum Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSlotDecimalMinimumValue(SlotDecimalMinimumValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Slot Decimal Maximum Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Slot Decimal Maximum Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSlotDecimalMaximumValue(SlotDecimalMaximumValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) + { + return null; + } + +} //EtlSwitch diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/SCGAntlrTokenFileProvider.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/EtlAntlrTokenFileProvider.java similarity index 70% rename from snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/SCGAntlrTokenFileProvider.java rename to snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/EtlAntlrTokenFileProvider.java index 205f466f780..fa45091e75c 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/SCGAntlrTokenFileProvider.java +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/EtlAntlrTokenFileProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,15 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl.parser.antlr; +package com.b2international.snowowl.snomed.etl.parser.antlr; import java.io.InputStream; import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; -public class SCGAntlrTokenFileProvider implements IAntlrTokenFileProvider { - +public class EtlAntlrTokenFileProvider implements IAntlrTokenFileProvider { + + @Override public InputStream getAntlrTokenFile() { ClassLoader classLoader = getClass().getClassLoader(); - return classLoader.getResourceAsStream("com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.tokens"); + return classLoader.getResourceAsStream("com/b2international/snowowl/snomed/etl/parser/antlr/internal/InternalEtlParser.tokens"); } -} \ No newline at end of file +} diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/EtlParser.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/EtlParser.java new file mode 100644 index 00000000000..56f1fdc8386 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/EtlParser.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.parser.antlr; + +import com.b2international.snowowl.snomed.etl.parser.antlr.internal.InternalEtlParser; +import com.b2international.snowowl.snomed.etl.services.EtlGrammarAccess; +import com.google.inject.Inject; +import org.eclipse.xtext.parser.antlr.AbstractAntlrParser; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; + +public class EtlParser extends AbstractAntlrParser { + + @Inject + private EtlGrammarAccess grammarAccess; + + @Override + protected void setInitialHiddenTokens(XtextTokenStream tokenStream) { + tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT"); + } + + + @Override + protected InternalEtlParser createParser(XtextTokenStream stream) { + return new InternalEtlParser(stream, getGrammarAccess()); + } + + @Override + protected String getDefaultRuleName() { + return "ExpressionTemplate"; + } + + public EtlGrammarAccess getGrammarAccess() { + return this.grammarAccess; + } + + public void setGrammarAccess(EtlGrammarAccess grammarAccess) { + this.grammarAccess = grammarAccess; + } +} diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/internal/InternalEtlParser.g b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/internal/InternalEtlParser.g new file mode 100644 index 00000000000..dd597d375ac --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/internal/InternalEtlParser.g @@ -0,0 +1,5786 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +parser grammar InternalEtlParser; + +options { + tokenVocab=InternalEtlLexer; + superClass=AbstractInternalAntlrParser; + backtrack=true; +} + +@header { +package com.b2international.snowowl.snomed.etl.parser.antlr.internal; + +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; +import com.b2international.snowowl.snomed.etl.services.EtlGrammarAccess; + +} + +@members { + +/* + This grammar contains a lot of empty actions to work around a bug in ANTLR. + Otherwise the ANTLR tool will create synpreds that cannot be compiled in some rare cases. +*/ + + private EtlGrammarAccess grammarAccess; + + public InternalEtlParser(TokenStream input, EtlGrammarAccess grammarAccess) { + this(input); + this.grammarAccess = grammarAccess; + registerRules(grammarAccess.getGrammar()); + } + + @Override + protected String getFirstRuleName() { + return "ExpressionTemplate"; + } + + @Override + protected EtlGrammarAccess getGrammarAccess() { + return grammarAccess; + } + +} + +@rulecatch { + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } +} + +// Entry rule entryRuleExpressionTemplate +entryRuleExpressionTemplate returns [EObject current=null]: + { newCompositeNode(grammarAccess.getExpressionTemplateRule()); } + iv_ruleExpressionTemplate=ruleExpressionTemplate + { $current=$iv_ruleExpressionTemplate.current; } + EOF; + +// Rule ExpressionTemplate +ruleExpressionTemplate returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + { + /* */ + } + { + $current = forceCreateModelElement( + grammarAccess.getExpressionTemplateAccess().getExpressionTemplateAction_0(), + $current); + } + ) + ( + ( + ( + ( + ( + lv_primitive_1_0=RULE_SUBTYPE_OF + { + newLeafNode(lv_primitive_1_0, grammarAccess.getExpressionTemplateAccess().getPrimitiveSUBTYPE_OFTerminalRuleCall_1_0_0_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getExpressionTemplateRule()); + } + setWithLastConsumed( + $current, + "primitive", + true, + "com.b2international.snowowl.snomed.etl.Etl.SUBTYPE_OF"); + } + ) + ) + | + this_EQUIVALENT_TO_2=RULE_EQUIVALENT_TO + { + newLeafNode(this_EQUIVALENT_TO_2, grammarAccess.getExpressionTemplateAccess().getEQUIVALENT_TOTerminalRuleCall_1_0_0_1()); + } + ) + | + ( + ( + { + newCompositeNode(grammarAccess.getExpressionTemplateAccess().getSlotTokenReplacementSlotParserRuleCall_1_0_1_0()); + } + lv_slot_3_0=ruleTokenReplacementSlot + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getExpressionTemplateRule()); + } + set( + $current, + "slot", + lv_slot_3_0, + "com.b2international.snowowl.snomed.etl.Etl.TokenReplacementSlot"); + afterParserOrEnumRuleCall(); + } + ) + ) + )? + ( + ( + { + newCompositeNode(grammarAccess.getExpressionTemplateAccess().getExpressionSubExpressionParserRuleCall_1_1_0()); + } + lv_expression_4_0=ruleSubExpression + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getExpressionTemplateRule()); + } + set( + $current, + "expression", + lv_expression_4_0, + "com.b2international.snowowl.snomed.etl.Etl.SubExpression"); + afterParserOrEnumRuleCall(); + } + ) + ) + )? + ) +; + +// Entry rule entryRuleSubExpression +entryRuleSubExpression returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSubExpressionRule()); } + iv_ruleSubExpression=ruleSubExpression + { $current=$iv_ruleSubExpression.current; } + EOF; + +// Rule SubExpression +ruleSubExpression returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + newCompositeNode(grammarAccess.getSubExpressionAccess().getFocusConceptsFocusConceptParserRuleCall_0_0()); + } + lv_focusConcepts_0_0=ruleFocusConcept + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSubExpressionRule()); + } + add( + $current, + "focusConcepts", + lv_focusConcepts_0_0, + "com.b2international.snowowl.snomed.etl.Etl.FocusConcept"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + this_PLUS_1=RULE_PLUS + { + newLeafNode(this_PLUS_1, grammarAccess.getSubExpressionAccess().getPLUSTerminalRuleCall_1_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getSubExpressionAccess().getFocusConceptsFocusConceptParserRuleCall_1_1_0()); + } + lv_focusConcepts_2_0=ruleFocusConcept + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSubExpressionRule()); + } + add( + $current, + "focusConcepts", + lv_focusConcepts_2_0, + "com.b2international.snowowl.snomed.etl.Etl.FocusConcept"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + ( + this_COLON_3=RULE_COLON + { + newLeafNode(this_COLON_3, grammarAccess.getSubExpressionAccess().getCOLONTerminalRuleCall_2_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getSubExpressionAccess().getRefinementRefinementParserRuleCall_2_1_0()); + } + lv_refinement_4_0=ruleRefinement + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSubExpressionRule()); + } + set( + $current, + "refinement", + lv_refinement_4_0, + "com.b2international.snowowl.snomed.etl.Etl.Refinement"); + afterParserOrEnumRuleCall(); + } + ) + ) + )? + ) +; + +// Entry rule entryRuleFocusConcept +entryRuleFocusConcept returns [EObject current=null]: + { newCompositeNode(grammarAccess.getFocusConceptRule()); } + iv_ruleFocusConcept=ruleFocusConcept + { $current=$iv_ruleFocusConcept.current; } + EOF; + +// Rule FocusConcept +ruleFocusConcept returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + newCompositeNode(grammarAccess.getFocusConceptAccess().getSlotTemplateInformationSlotParserRuleCall_0_0()); + } + lv_slot_0_0=ruleTemplateInformationSlot + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getFocusConceptRule()); + } + set( + $current, + "slot", + lv_slot_0_0, + "com.b2international.snowowl.snomed.etl.Etl.TemplateInformationSlot"); + afterParserOrEnumRuleCall(); + } + ) + )? + ( + ( + { + newCompositeNode(grammarAccess.getFocusConceptAccess().getConceptConceptReferenceParserRuleCall_1_0()); + } + lv_concept_1_0=ruleConceptReference + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getFocusConceptRule()); + } + set( + $current, + "concept", + lv_concept_1_0, + "com.b2international.snowowl.snomed.etl.Etl.ConceptReference"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleRefinement +entryRuleRefinement returns [EObject current=null]: + { newCompositeNode(grammarAccess.getRefinementRule()); } + iv_ruleRefinement=ruleRefinement + { $current=$iv_ruleRefinement.current; } + EOF; + +// Rule Refinement +ruleRefinement returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + ( + ( + { + newCompositeNode(grammarAccess.getRefinementAccess().getAttributesAttributeParserRuleCall_0_0_0_0()); + } + lv_attributes_0_0=ruleAttribute + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getRefinementRule()); + } + add( + $current, + "attributes", + lv_attributes_0_0, + "com.b2international.snowowl.snomed.etl.Etl.Attribute"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + this_COMMA_1=RULE_COMMA + { + newLeafNode(this_COMMA_1, grammarAccess.getRefinementAccess().getCOMMATerminalRuleCall_0_0_1_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getRefinementAccess().getAttributesAttributeParserRuleCall_0_0_1_1_0()); + } + lv_attributes_2_0=ruleAttribute + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getRefinementRule()); + } + add( + $current, + "attributes", + lv_attributes_2_0, + "com.b2international.snowowl.snomed.etl.Etl.Attribute"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + ) + | + ( + ( + { + newCompositeNode(grammarAccess.getRefinementAccess().getGroupsAttributeGroupParserRuleCall_0_1_0()); + } + lv_groups_3_0=ruleAttributeGroup + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getRefinementRule()); + } + add( + $current, + "groups", + lv_groups_3_0, + "com.b2international.snowowl.snomed.etl.Etl.AttributeGroup"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) + ( + ( + this_COMMA_4=RULE_COMMA + { + newLeafNode(this_COMMA_4, grammarAccess.getRefinementAccess().getCOMMATerminalRuleCall_1_0()); + } + )? + ( + ( + { + newCompositeNode(grammarAccess.getRefinementAccess().getGroupsAttributeGroupParserRuleCall_1_1_0()); + } + lv_groups_5_0=ruleAttributeGroup + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getRefinementRule()); + } + add( + $current, + "groups", + lv_groups_5_0, + "com.b2international.snowowl.snomed.etl.Etl.AttributeGroup"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + ) +; + +// Entry rule entryRuleAttributeGroup +entryRuleAttributeGroup returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAttributeGroupRule()); } + iv_ruleAttributeGroup=ruleAttributeGroup + { $current=$iv_ruleAttributeGroup.current; } + EOF; + +// Rule AttributeGroup +ruleAttributeGroup returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + newCompositeNode(grammarAccess.getAttributeGroupAccess().getSlotTemplateInformationSlotParserRuleCall_0_0()); + } + lv_slot_0_0=ruleTemplateInformationSlot + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + } + set( + $current, + "slot", + lv_slot_0_0, + "com.b2international.snowowl.snomed.etl.Etl.TemplateInformationSlot"); + afterParserOrEnumRuleCall(); + } + ) + )? + this_CURLY_OPEN_1=RULE_CURLY_OPEN + { + newLeafNode(this_CURLY_OPEN_1, grammarAccess.getAttributeGroupAccess().getCURLY_OPENTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getAttributeGroupAccess().getAttributesAttributeParserRuleCall_2_0()); + } + lv_attributes_2_0=ruleAttribute + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + } + add( + $current, + "attributes", + lv_attributes_2_0, + "com.b2international.snowowl.snomed.etl.Etl.Attribute"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + this_COMMA_3=RULE_COMMA + { + newLeafNode(this_COMMA_3, grammarAccess.getAttributeGroupAccess().getCOMMATerminalRuleCall_3_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getAttributeGroupAccess().getAttributesAttributeParserRuleCall_3_1_0()); + } + lv_attributes_4_0=ruleAttribute + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + } + add( + $current, + "attributes", + lv_attributes_4_0, + "com.b2international.snowowl.snomed.etl.Etl.Attribute"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + this_CURLY_CLOSE_5=RULE_CURLY_CLOSE + { + newLeafNode(this_CURLY_CLOSE_5, grammarAccess.getAttributeGroupAccess().getCURLY_CLOSETerminalRuleCall_4()); + } + ) +; + +// Entry rule entryRuleAttribute +entryRuleAttribute returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAttributeRule()); } + iv_ruleAttribute=ruleAttribute + { $current=$iv_ruleAttribute.current; } + EOF; + +// Rule Attribute +ruleAttribute returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + newCompositeNode(grammarAccess.getAttributeAccess().getSlotTemplateInformationSlotParserRuleCall_0_0()); + } + lv_slot_0_0=ruleTemplateInformationSlot + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAttributeRule()); + } + set( + $current, + "slot", + lv_slot_0_0, + "com.b2international.snowowl.snomed.etl.Etl.TemplateInformationSlot"); + afterParserOrEnumRuleCall(); + } + ) + )? + ( + ( + { + newCompositeNode(grammarAccess.getAttributeAccess().getNameConceptReferenceParserRuleCall_1_0()); + } + lv_name_1_0=ruleConceptReference + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAttributeRule()); + } + set( + $current, + "name", + lv_name_1_0, + "com.b2international.snowowl.snomed.etl.Etl.ConceptReference"); + afterParserOrEnumRuleCall(); + } + ) + ) + this_EQUAL_2=RULE_EQUAL + { + newLeafNode(this_EQUAL_2, grammarAccess.getAttributeAccess().getEQUALTerminalRuleCall_2()); + } + ( + ( + { + newCompositeNode(grammarAccess.getAttributeAccess().getValueAttributeValueParserRuleCall_3_0()); + } + lv_value_3_0=ruleAttributeValue + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAttributeRule()); + } + set( + $current, + "value", + lv_value_3_0, + "com.b2international.snowowl.snomed.etl.Etl.AttributeValue"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleAttributeValue +entryRuleAttributeValue returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAttributeValueRule()); } + iv_ruleAttributeValue=ruleAttributeValue + { $current=$iv_ruleAttributeValue.current; } + EOF; + +// Rule AttributeValue +ruleAttributeValue returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getAttributeValueAccess().getConceptReferenceParserRuleCall_0()); + } + this_ConceptReference_0=ruleConceptReference + { + $current = $this_ConceptReference_0.current; + afterParserOrEnumRuleCall(); + } + | + ( + this_ROUND_OPEN_1=RULE_ROUND_OPEN + { + newLeafNode(this_ROUND_OPEN_1, grammarAccess.getAttributeValueAccess().getROUND_OPENTerminalRuleCall_1_0()); + } + { + /* */ + } + { + newCompositeNode(grammarAccess.getAttributeValueAccess().getSubExpressionParserRuleCall_1_1()); + } + this_SubExpression_2=ruleSubExpression + { + $current = $this_SubExpression_2.current; + afterParserOrEnumRuleCall(); + } + this_ROUND_CLOSE_3=RULE_ROUND_CLOSE + { + newLeafNode(this_ROUND_CLOSE_3, grammarAccess.getAttributeValueAccess().getROUND_CLOSETerminalRuleCall_1_2()); + } + ) + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getAttributeValueAccess().getStringValueParserRuleCall_2()); + } + this_StringValue_4=ruleStringValue + { + $current = $this_StringValue_4.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getAttributeValueAccess().getIntegerValueParserRuleCall_3()); + } + this_IntegerValue_5=ruleIntegerValue + { + $current = $this_IntegerValue_5.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getAttributeValueAccess().getDecimalValueParserRuleCall_4()); + } + this_DecimalValue_6=ruleDecimalValue + { + $current = $this_DecimalValue_6.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getAttributeValueAccess().getConcreteValueReplacementSlotParserRuleCall_5()); + } + this_ConcreteValueReplacementSlot_7=ruleConcreteValueReplacementSlot + { + $current = $this_ConcreteValueReplacementSlot_7.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleConceptIdReplacementSlot +entryRuleConceptIdReplacementSlot returns [EObject current=null]: + { newCompositeNode(grammarAccess.getConceptIdReplacementSlotRule()); } + iv_ruleConceptIdReplacementSlot=ruleConceptIdReplacementSlot + { $current=$iv_ruleConceptIdReplacementSlot.current; } + EOF; + +// Rule ConceptIdReplacementSlot +ruleConceptIdReplacementSlot returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + { + /* */ + } + { + $current = forceCreateModelElement( + grammarAccess.getConceptIdReplacementSlotAccess().getConceptIdReplacementSlotAction_0(), + $current); + } + ) + this_DOUBLE_SQUARE_OPEN_1=RULE_DOUBLE_SQUARE_OPEN + { + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getConceptIdReplacementSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + } + this_PLUS_2=RULE_PLUS + { + newLeafNode(this_PLUS_2, grammarAccess.getConceptIdReplacementSlotAccess().getPLUSTerminalRuleCall_2()); + } + this_ID_3=RULE_ID + { + newLeafNode(this_ID_3, grammarAccess.getConceptIdReplacementSlotAccess().getIDTerminalRuleCall_3()); + } + ( + this_ROUND_OPEN_4=RULE_ROUND_OPEN + { + newLeafNode(this_ROUND_OPEN_4, grammarAccess.getConceptIdReplacementSlotAccess().getROUND_OPENTerminalRuleCall_4_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getConceptIdReplacementSlotAccess().getConstraintExpressionConstraintParserRuleCall_4_1_0()); + } + lv_constraint_5_0=ruleExpressionConstraint + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getConceptIdReplacementSlotRule()); + } + set( + $current, + "constraint", + lv_constraint_5_0, + "com.b2international.snowowl.snomed.ecl.Ecl.ExpressionConstraint"); + afterParserOrEnumRuleCall(); + } + ) + ) + this_ROUND_CLOSE_6=RULE_ROUND_CLOSE + { + newLeafNode(this_ROUND_CLOSE_6, grammarAccess.getConceptIdReplacementSlotAccess().getROUND_CLOSETerminalRuleCall_4_2()); + } + )? + ( + ( + lv_name_7_0=RULE_SLOTNAME_STRING + { + newLeafNode(lv_name_7_0, grammarAccess.getConceptIdReplacementSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_5_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getConceptIdReplacementSlotRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_7_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + } + ) + )? + this_DOUBLE_SQUARE_CLOSE_8=RULE_DOUBLE_SQUARE_CLOSE + { + newLeafNode(this_DOUBLE_SQUARE_CLOSE_8, grammarAccess.getConceptIdReplacementSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_6()); + } + ) +; + +// Entry rule entryRuleExpressionReplacementSlot +entryRuleExpressionReplacementSlot returns [EObject current=null]: + { newCompositeNode(grammarAccess.getExpressionReplacementSlotRule()); } + iv_ruleExpressionReplacementSlot=ruleExpressionReplacementSlot + { $current=$iv_ruleExpressionReplacementSlot.current; } + EOF; + +// Rule ExpressionReplacementSlot +ruleExpressionReplacementSlot returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + { + /* */ + } + { + $current = forceCreateModelElement( + grammarAccess.getExpressionReplacementSlotAccess().getExpressionReplacementSlotAction_0(), + $current); + } + ) + this_DOUBLE_SQUARE_OPEN_1=RULE_DOUBLE_SQUARE_OPEN + { + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getExpressionReplacementSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + } + this_PLUS_2=RULE_PLUS + { + newLeafNode(this_PLUS_2, grammarAccess.getExpressionReplacementSlotAccess().getPLUSTerminalRuleCall_2()); + } + ( + this_SCG_3=RULE_SCG + { + newLeafNode(this_SCG_3, grammarAccess.getExpressionReplacementSlotAccess().getSCGTerminalRuleCall_3()); + } + )? + ( + this_ROUND_OPEN_4=RULE_ROUND_OPEN + { + newLeafNode(this_ROUND_OPEN_4, grammarAccess.getExpressionReplacementSlotAccess().getROUND_OPENTerminalRuleCall_4_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getExpressionReplacementSlotAccess().getConstraintExpressionConstraintParserRuleCall_4_1_0()); + } + lv_constraint_5_0=ruleExpressionConstraint + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getExpressionReplacementSlotRule()); + } + set( + $current, + "constraint", + lv_constraint_5_0, + "com.b2international.snowowl.snomed.ecl.Ecl.ExpressionConstraint"); + afterParserOrEnumRuleCall(); + } + ) + ) + this_ROUND_CLOSE_6=RULE_ROUND_CLOSE + { + newLeafNode(this_ROUND_CLOSE_6, grammarAccess.getExpressionReplacementSlotAccess().getROUND_CLOSETerminalRuleCall_4_2()); + } + )? + ( + ( + lv_name_7_0=RULE_SLOTNAME_STRING + { + newLeafNode(lv_name_7_0, grammarAccess.getExpressionReplacementSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_5_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getExpressionReplacementSlotRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_7_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + } + ) + )? + this_DOUBLE_SQUARE_CLOSE_8=RULE_DOUBLE_SQUARE_CLOSE + { + newLeafNode(this_DOUBLE_SQUARE_CLOSE_8, grammarAccess.getExpressionReplacementSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_6()); + } + ) +; + +// Entry rule entryRuleTokenReplacementSlot +entryRuleTokenReplacementSlot returns [EObject current=null]: + { newCompositeNode(grammarAccess.getTokenReplacementSlotRule()); } + iv_ruleTokenReplacementSlot=ruleTokenReplacementSlot + { $current=$iv_ruleTokenReplacementSlot.current; } + EOF; + +// Rule TokenReplacementSlot +ruleTokenReplacementSlot returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + { + /* */ + } + { + $current = forceCreateModelElement( + grammarAccess.getTokenReplacementSlotAccess().getTokenReplacementSlotAction_0(), + $current); + } + ) + this_DOUBLE_SQUARE_OPEN_1=RULE_DOUBLE_SQUARE_OPEN + { + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getTokenReplacementSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + } + this_PLUS_2=RULE_PLUS + { + newLeafNode(this_PLUS_2, grammarAccess.getTokenReplacementSlotAccess().getPLUSTerminalRuleCall_2()); + } + this_TOK_3=RULE_TOK + { + newLeafNode(this_TOK_3, grammarAccess.getTokenReplacementSlotAccess().getTOKTerminalRuleCall_3()); + } + ( + this_ROUND_OPEN_4=RULE_ROUND_OPEN + { + newLeafNode(this_ROUND_OPEN_4, grammarAccess.getTokenReplacementSlotAccess().getROUND_OPENTerminalRuleCall_4_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getTokenReplacementSlotAccess().getTokensSlotTokenParserRuleCall_4_1_0()); + } + lv_tokens_5_0=ruleSlotToken + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getTokenReplacementSlotRule()); + } + add( + $current, + "tokens", + lv_tokens_5_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotToken"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + ( + { + newCompositeNode(grammarAccess.getTokenReplacementSlotAccess().getTokensSlotTokenParserRuleCall_4_2_0()); + } + lv_tokens_6_0=ruleSlotToken + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getTokenReplacementSlotRule()); + } + add( + $current, + "tokens", + lv_tokens_6_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotToken"); + afterParserOrEnumRuleCall(); + } + ) + )* + this_ROUND_CLOSE_7=RULE_ROUND_CLOSE + { + newLeafNode(this_ROUND_CLOSE_7, grammarAccess.getTokenReplacementSlotAccess().getROUND_CLOSETerminalRuleCall_4_3()); + } + )? + ( + ( + lv_name_8_0=RULE_SLOTNAME_STRING + { + newLeafNode(lv_name_8_0, grammarAccess.getTokenReplacementSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_5_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getTokenReplacementSlotRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_8_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + } + ) + )? + this_DOUBLE_SQUARE_CLOSE_9=RULE_DOUBLE_SQUARE_CLOSE + { + newLeafNode(this_DOUBLE_SQUARE_CLOSE_9, grammarAccess.getTokenReplacementSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_6()); + } + ) +; + +// Entry rule entryRuleTemplateInformationSlot +entryRuleTemplateInformationSlot returns [EObject current=null]: + { newCompositeNode(grammarAccess.getTemplateInformationSlotRule()); } + iv_ruleTemplateInformationSlot=ruleTemplateInformationSlot + { $current=$iv_ruleTemplateInformationSlot.current; } + EOF; + +// Rule TemplateInformationSlot +ruleTemplateInformationSlot returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + { + /* */ + } + { + $current = forceCreateModelElement( + grammarAccess.getTemplateInformationSlotAccess().getTemplateInformationSlotAction_0(), + $current); + } + ) + this_DOUBLE_SQUARE_OPEN_1=RULE_DOUBLE_SQUARE_OPEN + { + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getTemplateInformationSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getTemplateInformationSlotAccess().getCardinalityEtlCardinalityParserRuleCall_2_0()); + } + lv_cardinality_2_0=ruleEtlCardinality + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getTemplateInformationSlotRule()); + } + set( + $current, + "cardinality", + lv_cardinality_2_0, + "com.b2international.snowowl.snomed.etl.Etl.EtlCardinality"); + afterParserOrEnumRuleCall(); + } + ) + )? + ( + ( + lv_name_3_0=RULE_SLOTNAME_STRING + { + newLeafNode(lv_name_3_0, grammarAccess.getTemplateInformationSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_3_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getTemplateInformationSlotRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_3_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + } + ) + )? + this_DOUBLE_SQUARE_CLOSE_4=RULE_DOUBLE_SQUARE_CLOSE + { + newLeafNode(this_DOUBLE_SQUARE_CLOSE_4, grammarAccess.getTemplateInformationSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_4()); + } + ) +; + +// Entry rule entryRuleConcreteValueReplacementSlot +entryRuleConcreteValueReplacementSlot returns [EObject current=null]: + { newCompositeNode(grammarAccess.getConcreteValueReplacementSlotRule()); } + iv_ruleConcreteValueReplacementSlot=ruleConcreteValueReplacementSlot + { $current=$iv_ruleConcreteValueReplacementSlot.current; } + EOF; + +// Rule ConcreteValueReplacementSlot +ruleConcreteValueReplacementSlot returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getConcreteValueReplacementSlotAccess().getStringReplacementSlotParserRuleCall_0()); + } + this_StringReplacementSlot_0=ruleStringReplacementSlot + { + $current = $this_StringReplacementSlot_0.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getConcreteValueReplacementSlotAccess().getIntegerReplacementSlotParserRuleCall_1()); + } + this_IntegerReplacementSlot_1=ruleIntegerReplacementSlot + { + $current = $this_IntegerReplacementSlot_1.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getConcreteValueReplacementSlotAccess().getDecimalReplacementSlotParserRuleCall_2()); + } + this_DecimalReplacementSlot_2=ruleDecimalReplacementSlot + { + $current = $this_DecimalReplacementSlot_2.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleStringReplacementSlot +entryRuleStringReplacementSlot returns [EObject current=null]: + { newCompositeNode(grammarAccess.getStringReplacementSlotRule()); } + iv_ruleStringReplacementSlot=ruleStringReplacementSlot + { $current=$iv_ruleStringReplacementSlot.current; } + EOF; + +// Rule StringReplacementSlot +ruleStringReplacementSlot returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + { + /* */ + } + { + $current = forceCreateModelElement( + grammarAccess.getStringReplacementSlotAccess().getStringReplacementSlotAction_0(), + $current); + } + ) + this_DOUBLE_SQUARE_OPEN_1=RULE_DOUBLE_SQUARE_OPEN + { + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getStringReplacementSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + } + this_PLUS_2=RULE_PLUS + { + newLeafNode(this_PLUS_2, grammarAccess.getStringReplacementSlotAccess().getPLUSTerminalRuleCall_2()); + } + this_STR_3=RULE_STR + { + newLeafNode(this_STR_3, grammarAccess.getStringReplacementSlotAccess().getSTRTerminalRuleCall_3()); + } + ( + this_ROUND_OPEN_4=RULE_ROUND_OPEN + { + newLeafNode(this_ROUND_OPEN_4, grammarAccess.getStringReplacementSlotAccess().getROUND_OPENTerminalRuleCall_4_0()); + } + ( + ( + lv_values_5_0=RULE_STRING + { + newLeafNode(lv_values_5_0, grammarAccess.getStringReplacementSlotAccess().getValuesSTRINGTerminalRuleCall_4_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getStringReplacementSlotRule()); + } + addWithLastConsumed( + $current, + "values", + lv_values_5_0, + "com.b2international.snowowl.snomed.ecl.Ecl.STRING"); + } + ) + ) + ( + ( + lv_values_6_0=RULE_STRING + { + newLeafNode(lv_values_6_0, grammarAccess.getStringReplacementSlotAccess().getValuesSTRINGTerminalRuleCall_4_2_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getStringReplacementSlotRule()); + } + addWithLastConsumed( + $current, + "values", + lv_values_6_0, + "com.b2international.snowowl.snomed.ecl.Ecl.STRING"); + } + ) + )* + this_ROUND_CLOSE_7=RULE_ROUND_CLOSE + { + newLeafNode(this_ROUND_CLOSE_7, grammarAccess.getStringReplacementSlotAccess().getROUND_CLOSETerminalRuleCall_4_3()); + } + )? + ( + ( + lv_name_8_0=RULE_SLOTNAME_STRING + { + newLeafNode(lv_name_8_0, grammarAccess.getStringReplacementSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_5_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getStringReplacementSlotRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_8_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + } + ) + )? + this_DOUBLE_SQUARE_CLOSE_9=RULE_DOUBLE_SQUARE_CLOSE + { + newLeafNode(this_DOUBLE_SQUARE_CLOSE_9, grammarAccess.getStringReplacementSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_6()); + } + ) +; + +// Entry rule entryRuleIntegerReplacementSlot +entryRuleIntegerReplacementSlot returns [EObject current=null]: + { newCompositeNode(grammarAccess.getIntegerReplacementSlotRule()); } + iv_ruleIntegerReplacementSlot=ruleIntegerReplacementSlot + { $current=$iv_ruleIntegerReplacementSlot.current; } + EOF; + +// Rule IntegerReplacementSlot +ruleIntegerReplacementSlot returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + { + /* */ + } + { + $current = forceCreateModelElement( + grammarAccess.getIntegerReplacementSlotAccess().getIntegerReplacementSlotAction_0(), + $current); + } + ) + this_DOUBLE_SQUARE_OPEN_1=RULE_DOUBLE_SQUARE_OPEN + { + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getIntegerReplacementSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + } + this_PLUS_2=RULE_PLUS + { + newLeafNode(this_PLUS_2, grammarAccess.getIntegerReplacementSlotAccess().getPLUSTerminalRuleCall_2()); + } + this_INT_3=RULE_INT + { + newLeafNode(this_INT_3, grammarAccess.getIntegerReplacementSlotAccess().getINTTerminalRuleCall_3()); + } + ( + this_ROUND_OPEN_4=RULE_ROUND_OPEN + { + newLeafNode(this_ROUND_OPEN_4, grammarAccess.getIntegerReplacementSlotAccess().getROUND_OPENTerminalRuleCall_4_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getIntegerReplacementSlotAccess().getValuesSlotIntegerParserRuleCall_4_1_0()); + } + lv_values_5_0=ruleSlotInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getIntegerReplacementSlotRule()); + } + add( + $current, + "values", + lv_values_5_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotInteger"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + ( + { + newCompositeNode(grammarAccess.getIntegerReplacementSlotAccess().getValuesSlotIntegerParserRuleCall_4_2_0()); + } + lv_values_6_0=ruleSlotInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getIntegerReplacementSlotRule()); + } + add( + $current, + "values", + lv_values_6_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotInteger"); + afterParserOrEnumRuleCall(); + } + ) + )* + this_ROUND_CLOSE_7=RULE_ROUND_CLOSE + { + newLeafNode(this_ROUND_CLOSE_7, grammarAccess.getIntegerReplacementSlotAccess().getROUND_CLOSETerminalRuleCall_4_3()); + } + )? + ( + ( + lv_name_8_0=RULE_SLOTNAME_STRING + { + newLeafNode(lv_name_8_0, grammarAccess.getIntegerReplacementSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_5_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getIntegerReplacementSlotRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_8_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + } + ) + )? + this_DOUBLE_SQUARE_CLOSE_9=RULE_DOUBLE_SQUARE_CLOSE + { + newLeafNode(this_DOUBLE_SQUARE_CLOSE_9, grammarAccess.getIntegerReplacementSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_6()); + } + ) +; + +// Entry rule entryRuleDecimalReplacementSlot +entryRuleDecimalReplacementSlot returns [EObject current=null]: + { newCompositeNode(grammarAccess.getDecimalReplacementSlotRule()); } + iv_ruleDecimalReplacementSlot=ruleDecimalReplacementSlot + { $current=$iv_ruleDecimalReplacementSlot.current; } + EOF; + +// Rule DecimalReplacementSlot +ruleDecimalReplacementSlot returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + { + /* */ + } + { + $current = forceCreateModelElement( + grammarAccess.getDecimalReplacementSlotAccess().getDecimalReplacementSlotAction_0(), + $current); + } + ) + this_DOUBLE_SQUARE_OPEN_1=RULE_DOUBLE_SQUARE_OPEN + { + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getDecimalReplacementSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + } + this_PLUS_2=RULE_PLUS + { + newLeafNode(this_PLUS_2, grammarAccess.getDecimalReplacementSlotAccess().getPLUSTerminalRuleCall_2()); + } + this_DEC_3=RULE_DEC + { + newLeafNode(this_DEC_3, grammarAccess.getDecimalReplacementSlotAccess().getDECTerminalRuleCall_3()); + } + ( + this_ROUND_OPEN_4=RULE_ROUND_OPEN + { + newLeafNode(this_ROUND_OPEN_4, grammarAccess.getDecimalReplacementSlotAccess().getROUND_OPENTerminalRuleCall_4_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getDecimalReplacementSlotAccess().getValuesSlotDecimalParserRuleCall_4_1_0()); + } + lv_values_5_0=ruleSlotDecimal + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getDecimalReplacementSlotRule()); + } + add( + $current, + "values", + lv_values_5_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotDecimal"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + ( + { + newCompositeNode(grammarAccess.getDecimalReplacementSlotAccess().getValuesSlotDecimalParserRuleCall_4_2_0()); + } + lv_values_6_0=ruleSlotDecimal + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getDecimalReplacementSlotRule()); + } + add( + $current, + "values", + lv_values_6_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotDecimal"); + afterParserOrEnumRuleCall(); + } + ) + )* + this_ROUND_CLOSE_7=RULE_ROUND_CLOSE + { + newLeafNode(this_ROUND_CLOSE_7, grammarAccess.getDecimalReplacementSlotAccess().getROUND_CLOSETerminalRuleCall_4_3()); + } + )? + ( + ( + lv_name_8_0=RULE_SLOTNAME_STRING + { + newLeafNode(lv_name_8_0, grammarAccess.getDecimalReplacementSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_5_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getDecimalReplacementSlotRule()); + } + setWithLastConsumed( + $current, + "name", + lv_name_8_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + } + ) + )? + this_DOUBLE_SQUARE_CLOSE_9=RULE_DOUBLE_SQUARE_CLOSE + { + newLeafNode(this_DOUBLE_SQUARE_CLOSE_9, grammarAccess.getDecimalReplacementSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_6()); + } + ) +; + +// Entry rule entryRuleEtlCardinality +entryRuleEtlCardinality returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEtlCardinalityRule()); } + iv_ruleEtlCardinality=ruleEtlCardinality + { $current=$iv_ruleEtlCardinality.current; } + EOF; + +// Rule EtlCardinality +ruleEtlCardinality returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + this_TILDE_0=RULE_TILDE + { + newLeafNode(this_TILDE_0, grammarAccess.getEtlCardinalityAccess().getTILDETerminalRuleCall_0()); + } + )? + ( + ( + { + newCompositeNode(grammarAccess.getEtlCardinalityAccess().getMinNonNegativeIntegerParserRuleCall_1_0()); + } + lv_min_1_0=ruleNonNegativeInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getEtlCardinalityRule()); + } + set( + $current, + "min", + lv_min_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeInteger"); + afterParserOrEnumRuleCall(); + } + ) + ) + this_TO_2=RULE_TO + { + newLeafNode(this_TO_2, grammarAccess.getEtlCardinalityAccess().getTOTerminalRuleCall_2()); + } + ( + ( + { + newCompositeNode(grammarAccess.getEtlCardinalityAccess().getMaxMaxValueParserRuleCall_3_0()); + } + lv_max_3_0=ruleMaxValue + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getEtlCardinalityRule()); + } + set( + $current, + "max", + lv_max_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.MaxValue"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleConceptReplacementSlot +entryRuleConceptReplacementSlot returns [EObject current=null]: + { newCompositeNode(grammarAccess.getConceptReplacementSlotRule()); } + iv_ruleConceptReplacementSlot=ruleConceptReplacementSlot + { $current=$iv_ruleConceptReplacementSlot.current; } + EOF; + +// Rule ConceptReplacementSlot +ruleConceptReplacementSlot returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getConceptReplacementSlotAccess().getConceptIdReplacementSlotParserRuleCall_0()); + } + this_ConceptIdReplacementSlot_0=ruleConceptIdReplacementSlot + { + $current = $this_ConceptIdReplacementSlot_0.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getConceptReplacementSlotAccess().getExpressionReplacementSlotParserRuleCall_1()); + } + this_ExpressionReplacementSlot_1=ruleExpressionReplacementSlot + { + $current = $this_ExpressionReplacementSlot_1.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleConceptReference +entryRuleConceptReference returns [EObject current=null]: + { newCompositeNode(grammarAccess.getConceptReferenceRule()); } + iv_ruleConceptReference=ruleConceptReference + { $current=$iv_ruleConceptReference.current; } + EOF; + +// Rule ConceptReference +ruleConceptReference returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + newCompositeNode(grammarAccess.getConceptReferenceAccess().getSlotConceptReplacementSlotParserRuleCall_0_0()); + } + lv_slot_0_0=ruleConceptReplacementSlot + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getConceptReferenceRule()); + } + set( + $current, + "slot", + lv_slot_0_0, + "com.b2international.snowowl.snomed.etl.Etl.ConceptReplacementSlot"); + afterParserOrEnumRuleCall(); + } + ) + ) + | + ( + ( + ( + { + newCompositeNode(grammarAccess.getConceptReferenceAccess().getIdSnomedIdentifierParserRuleCall_1_0_0()); + } + lv_id_1_0=ruleSnomedIdentifier + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getConceptReferenceRule()); + } + set( + $current, + "id", + lv_id_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SnomedIdentifier"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + ( + lv_term_2_0=RULE_TERM_STRING + { + newLeafNode(lv_term_2_0, grammarAccess.getConceptReferenceAccess().getTermTERM_STRINGTerminalRuleCall_1_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getConceptReferenceRule()); + } + setWithLastConsumed( + $current, + "term", + lv_term_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.TERM_STRING"); + } + ) + )? + ) + ) +; + +// Entry rule entryRuleSlotToken +entryRuleSlotToken returns [String current=null]: + { newCompositeNode(grammarAccess.getSlotTokenRule()); } + iv_ruleSlotToken=ruleSlotToken + { $current=$iv_ruleSlotToken.current.getText(); } + EOF; + +// Rule SlotToken +ruleSlotToken returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_EQUIVALENT_TO_0=RULE_EQUIVALENT_TO + { + $current.merge(this_EQUIVALENT_TO_0); + } + { + newLeafNode(this_EQUIVALENT_TO_0, grammarAccess.getSlotTokenAccess().getEQUIVALENT_TOTerminalRuleCall_0()); + } + | + this_SUBTYPE_OF_1=RULE_SUBTYPE_OF + { + $current.merge(this_SUBTYPE_OF_1); + } + { + newLeafNode(this_SUBTYPE_OF_1, grammarAccess.getSlotTokenAccess().getSUBTYPE_OFTerminalRuleCall_1()); + } + | + this_COMMA_2=RULE_COMMA + { + $current.merge(this_COMMA_2); + } + { + newLeafNode(this_COMMA_2, grammarAccess.getSlotTokenAccess().getCOMMATerminalRuleCall_2()); + } + | + this_CONJUNCTION_3=RULE_CONJUNCTION + { + $current.merge(this_CONJUNCTION_3); + } + { + newLeafNode(this_CONJUNCTION_3, grammarAccess.getSlotTokenAccess().getCONJUNCTIONTerminalRuleCall_3()); + } + | + this_DISJUNCTION_4=RULE_DISJUNCTION + { + $current.merge(this_DISJUNCTION_4); + } + { + newLeafNode(this_DISJUNCTION_4, grammarAccess.getSlotTokenAccess().getDISJUNCTIONTerminalRuleCall_4()); + } + | + this_EXCLUSION_5=RULE_EXCLUSION + { + $current.merge(this_EXCLUSION_5); + } + { + newLeafNode(this_EXCLUSION_5, grammarAccess.getSlotTokenAccess().getEXCLUSIONTerminalRuleCall_5()); + } + | + this_REVERSED_6=RULE_REVERSED + { + $current.merge(this_REVERSED_6); + } + { + newLeafNode(this_REVERSED_6, grammarAccess.getSlotTokenAccess().getREVERSEDTerminalRuleCall_6()); + } + | + this_CARET_7=RULE_CARET + { + $current.merge(this_CARET_7); + } + { + newLeafNode(this_CARET_7, grammarAccess.getSlotTokenAccess().getCARETTerminalRuleCall_7()); + } + | + this_LT_8=RULE_LT + { + $current.merge(this_LT_8); + } + { + newLeafNode(this_LT_8, grammarAccess.getSlotTokenAccess().getLTTerminalRuleCall_8()); + } + | + this_LTE_9=RULE_LTE + { + $current.merge(this_LTE_9); + } + { + newLeafNode(this_LTE_9, grammarAccess.getSlotTokenAccess().getLTETerminalRuleCall_9()); + } + | + this_DBL_LT_10=RULE_DBL_LT + { + $current.merge(this_DBL_LT_10); + } + { + newLeafNode(this_DBL_LT_10, grammarAccess.getSlotTokenAccess().getDBL_LTTerminalRuleCall_10()); + } + | + this_LT_EM_11=RULE_LT_EM + { + $current.merge(this_LT_EM_11); + } + { + newLeafNode(this_LT_EM_11, grammarAccess.getSlotTokenAccess().getLT_EMTerminalRuleCall_11()); + } + | + this_GT_12=RULE_GT + { + $current.merge(this_GT_12); + } + { + newLeafNode(this_GT_12, grammarAccess.getSlotTokenAccess().getGTTerminalRuleCall_12()); + } + | + this_GTE_13=RULE_GTE + { + $current.merge(this_GTE_13); + } + { + newLeafNode(this_GTE_13, grammarAccess.getSlotTokenAccess().getGTETerminalRuleCall_13()); + } + | + this_DBL_GT_14=RULE_DBL_GT + { + $current.merge(this_DBL_GT_14); + } + { + newLeafNode(this_DBL_GT_14, grammarAccess.getSlotTokenAccess().getDBL_GTTerminalRuleCall_14()); + } + | + this_GT_EM_15=RULE_GT_EM + { + $current.merge(this_GT_EM_15); + } + { + newLeafNode(this_GT_EM_15, grammarAccess.getSlotTokenAccess().getGT_EMTerminalRuleCall_15()); + } + | + this_EQUAL_16=RULE_EQUAL + { + $current.merge(this_EQUAL_16); + } + { + newLeafNode(this_EQUAL_16, grammarAccess.getSlotTokenAccess().getEQUALTerminalRuleCall_16()); + } + | + this_NOT_EQUAL_17=RULE_NOT_EQUAL + { + $current.merge(this_NOT_EQUAL_17); + } + { + newLeafNode(this_NOT_EQUAL_17, grammarAccess.getSlotTokenAccess().getNOT_EQUALTerminalRuleCall_17()); + } + ) +; + +// Entry rule entryRuleStringValue +entryRuleStringValue returns [EObject current=null]: + { newCompositeNode(grammarAccess.getStringValueRule()); } + iv_ruleStringValue=ruleStringValue + { $current=$iv_ruleStringValue.current; } + EOF; + +// Rule StringValue +ruleStringValue returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + lv_value_0_0=RULE_STRING + { + newLeafNode(lv_value_0_0, grammarAccess.getStringValueAccess().getValueSTRINGTerminalRuleCall_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getStringValueRule()); + } + setWithLastConsumed( + $current, + "value", + lv_value_0_0, + "com.b2international.snowowl.snomed.ecl.Ecl.STRING"); + } + ) + ) +; + +// Entry rule entryRuleIntegerValue +entryRuleIntegerValue returns [EObject current=null]: + { newCompositeNode(grammarAccess.getIntegerValueRule()); } + iv_ruleIntegerValue=ruleIntegerValue + { $current=$iv_ruleIntegerValue.current; } + EOF; + +// Rule IntegerValue +ruleIntegerValue returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_HASH_0=RULE_HASH + { + newLeafNode(this_HASH_0, grammarAccess.getIntegerValueAccess().getHASHTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getIntegerValueAccess().getValueIntegerParserRuleCall_1_0()); + } + lv_value_1_0=ruleInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getIntegerValueRule()); + } + set( + $current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleDecimalValue +entryRuleDecimalValue returns [EObject current=null]: + { newCompositeNode(grammarAccess.getDecimalValueRule()); } + iv_ruleDecimalValue=ruleDecimalValue + { $current=$iv_ruleDecimalValue.current; } + EOF; + +// Rule DecimalValue +ruleDecimalValue returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_HASH_0=RULE_HASH + { + newLeafNode(this_HASH_0, grammarAccess.getDecimalValueAccess().getHASHTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getDecimalValueAccess().getValueDecimalParserRuleCall_1_0()); + } + lv_value_1_0=ruleDecimal + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getDecimalValueRule()); + } + set( + $current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleSlotInteger +entryRuleSlotInteger returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSlotIntegerRule()); } + iv_ruleSlotInteger=ruleSlotInteger + { $current=$iv_ruleSlotInteger.current; } + EOF; + +// Rule SlotInteger +ruleSlotInteger returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getSlotIntegerAccess().getSlotIntegerRangeParserRuleCall_0()); + } + this_SlotIntegerRange_0=ruleSlotIntegerRange + { + $current = $this_SlotIntegerRange_0.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getSlotIntegerAccess().getSlotIntegerValueParserRuleCall_1()); + } + this_SlotIntegerValue_1=ruleSlotIntegerValue + { + $current = $this_SlotIntegerValue_1.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleSlotIntegerValue +entryRuleSlotIntegerValue returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSlotIntegerValueRule()); } + iv_ruleSlotIntegerValue=ruleSlotIntegerValue + { $current=$iv_ruleSlotIntegerValue.current; } + EOF; + +// Rule SlotIntegerValue +ruleSlotIntegerValue returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_HASH_0=RULE_HASH + { + newLeafNode(this_HASH_0, grammarAccess.getSlotIntegerValueAccess().getHASHTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getSlotIntegerValueAccess().getValueNonNegativeIntegerParserRuleCall_1_0()); + } + lv_value_1_0=ruleNonNegativeInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSlotIntegerValueRule()); + } + set( + $current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeInteger"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleSlotIntegerRange +entryRuleSlotIntegerRange returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSlotIntegerRangeRule()); } + iv_ruleSlotIntegerRange=ruleSlotIntegerRange + { $current=$iv_ruleSlotIntegerRange.current; } + EOF; + +// Rule SlotIntegerRange +ruleSlotIntegerRange returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + ( + { + newCompositeNode(grammarAccess.getSlotIntegerRangeAccess().getMinimumSlotIntegerMinimumValueParserRuleCall_0_0_0()); + } + lv_minimum_0_0=ruleSlotIntegerMinimumValue + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSlotIntegerRangeRule()); + } + set( + $current, + "minimum", + lv_minimum_0_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotIntegerMinimumValue"); + afterParserOrEnumRuleCall(); + } + ) + ) + this_TO_1=RULE_TO + { + newLeafNode(this_TO_1, grammarAccess.getSlotIntegerRangeAccess().getTOTerminalRuleCall_0_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getSlotIntegerRangeAccess().getMaximumSlotIntegerMaximumValueParserRuleCall_0_2_0()); + } + lv_maximum_2_0=ruleSlotIntegerMaximumValue + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSlotIntegerRangeRule()); + } + set( + $current, + "maximum", + lv_maximum_2_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotIntegerMaximumValue"); + afterParserOrEnumRuleCall(); + } + ) + )? + ) + | + ( + this_TO_3=RULE_TO + { + newLeafNode(this_TO_3, grammarAccess.getSlotIntegerRangeAccess().getTOTerminalRuleCall_1_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getSlotIntegerRangeAccess().getMaximumSlotIntegerMaximumValueParserRuleCall_1_1_0()); + } + lv_maximum_4_0=ruleSlotIntegerMaximumValue + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSlotIntegerRangeRule()); + } + set( + $current, + "maximum", + lv_maximum_4_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotIntegerMaximumValue"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) + ) +; + +// Entry rule entryRuleSlotIntegerMinimumValue +entryRuleSlotIntegerMinimumValue returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSlotIntegerMinimumValueRule()); } + iv_ruleSlotIntegerMinimumValue=ruleSlotIntegerMinimumValue + { $current=$iv_ruleSlotIntegerMinimumValue.current; } + EOF; + +// Rule SlotIntegerMinimumValue +ruleSlotIntegerMinimumValue returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + lv_exclusive_0_0=RULE_GT + { + newLeafNode(lv_exclusive_0_0, grammarAccess.getSlotIntegerMinimumValueAccess().getExclusiveGTTerminalRuleCall_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getSlotIntegerMinimumValueRule()); + } + setWithLastConsumed( + $current, + "exclusive", + true, + "com.b2international.snowowl.snomed.ecl.Ecl.GT"); + } + ) + )? + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getSlotIntegerMinimumValueAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getSlotIntegerMinimumValueAccess().getValueNonNegativeIntegerParserRuleCall_2_0()); + } + lv_value_2_0=ruleNonNegativeInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSlotIntegerMinimumValueRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeInteger"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleSlotIntegerMaximumValue +entryRuleSlotIntegerMaximumValue returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSlotIntegerMaximumValueRule()); } + iv_ruleSlotIntegerMaximumValue=ruleSlotIntegerMaximumValue + { $current=$iv_ruleSlotIntegerMaximumValue.current; } + EOF; + +// Rule SlotIntegerMaximumValue +ruleSlotIntegerMaximumValue returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + lv_exclusive_0_0=RULE_LT + { + newLeafNode(lv_exclusive_0_0, grammarAccess.getSlotIntegerMaximumValueAccess().getExclusiveLTTerminalRuleCall_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getSlotIntegerMaximumValueRule()); + } + setWithLastConsumed( + $current, + "exclusive", + true, + "com.b2international.snowowl.snomed.ecl.Ecl.LT"); + } + ) + )? + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getSlotIntegerMaximumValueAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getSlotIntegerMaximumValueAccess().getValueNonNegativeIntegerParserRuleCall_2_0()); + } + lv_value_2_0=ruleNonNegativeInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSlotIntegerMaximumValueRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeInteger"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleSlotDecimal +entryRuleSlotDecimal returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSlotDecimalRule()); } + iv_ruleSlotDecimal=ruleSlotDecimal + { $current=$iv_ruleSlotDecimal.current; } + EOF; + +// Rule SlotDecimal +ruleSlotDecimal returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getSlotDecimalAccess().getSlotDecimalRangeParserRuleCall_0()); + } + this_SlotDecimalRange_0=ruleSlotDecimalRange + { + $current = $this_SlotDecimalRange_0.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getSlotDecimalAccess().getSlotDecimalValueParserRuleCall_1()); + } + this_SlotDecimalValue_1=ruleSlotDecimalValue + { + $current = $this_SlotDecimalValue_1.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleSlotDecimalValue +entryRuleSlotDecimalValue returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSlotDecimalValueRule()); } + iv_ruleSlotDecimalValue=ruleSlotDecimalValue + { $current=$iv_ruleSlotDecimalValue.current; } + EOF; + +// Rule SlotDecimalValue +ruleSlotDecimalValue returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_HASH_0=RULE_HASH + { + newLeafNode(this_HASH_0, grammarAccess.getSlotDecimalValueAccess().getHASHTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getSlotDecimalValueAccess().getValueNonNegativeDecimalParserRuleCall_1_0()); + } + lv_value_1_0=ruleNonNegativeDecimal + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSlotDecimalValueRule()); + } + set( + $current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeDecimal"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleSlotDecimalRange +entryRuleSlotDecimalRange returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSlotDecimalRangeRule()); } + iv_ruleSlotDecimalRange=ruleSlotDecimalRange + { $current=$iv_ruleSlotDecimalRange.current; } + EOF; + +// Rule SlotDecimalRange +ruleSlotDecimalRange returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + ( + { + newCompositeNode(grammarAccess.getSlotDecimalRangeAccess().getMinimumSlotDecimalMinimumValueParserRuleCall_0_0_0()); + } + lv_minimum_0_0=ruleSlotDecimalMinimumValue + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSlotDecimalRangeRule()); + } + set( + $current, + "minimum", + lv_minimum_0_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotDecimalMinimumValue"); + afterParserOrEnumRuleCall(); + } + ) + ) + this_TO_1=RULE_TO + { + newLeafNode(this_TO_1, grammarAccess.getSlotDecimalRangeAccess().getTOTerminalRuleCall_0_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getSlotDecimalRangeAccess().getMaximumSlotDecimalMaximumValueParserRuleCall_0_2_0()); + } + lv_maximum_2_0=ruleSlotDecimalMaximumValue + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSlotDecimalRangeRule()); + } + set( + $current, + "maximum", + lv_maximum_2_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotDecimalMaximumValue"); + afterParserOrEnumRuleCall(); + } + ) + )? + ) + | + ( + this_TO_3=RULE_TO + { + newLeafNode(this_TO_3, grammarAccess.getSlotDecimalRangeAccess().getTOTerminalRuleCall_1_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getSlotDecimalRangeAccess().getMaximumSlotDecimalMaximumValueParserRuleCall_1_1_0()); + } + lv_maximum_4_0=ruleSlotDecimalMaximumValue + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSlotDecimalRangeRule()); + } + set( + $current, + "maximum", + lv_maximum_4_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotDecimalMaximumValue"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) + ) +; + +// Entry rule entryRuleSlotDecimalMinimumValue +entryRuleSlotDecimalMinimumValue returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSlotDecimalMinimumValueRule()); } + iv_ruleSlotDecimalMinimumValue=ruleSlotDecimalMinimumValue + { $current=$iv_ruleSlotDecimalMinimumValue.current; } + EOF; + +// Rule SlotDecimalMinimumValue +ruleSlotDecimalMinimumValue returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + lv_exclusive_0_0=RULE_GT + { + newLeafNode(lv_exclusive_0_0, grammarAccess.getSlotDecimalMinimumValueAccess().getExclusiveGTTerminalRuleCall_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getSlotDecimalMinimumValueRule()); + } + setWithLastConsumed( + $current, + "exclusive", + true, + "com.b2international.snowowl.snomed.ecl.Ecl.GT"); + } + ) + )? + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getSlotDecimalMinimumValueAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getSlotDecimalMinimumValueAccess().getValueNonNegativeDecimalParserRuleCall_2_0()); + } + lv_value_2_0=ruleNonNegativeDecimal + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSlotDecimalMinimumValueRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeDecimal"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleSlotDecimalMaximumValue +entryRuleSlotDecimalMaximumValue returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSlotDecimalMaximumValueRule()); } + iv_ruleSlotDecimalMaximumValue=ruleSlotDecimalMaximumValue + { $current=$iv_ruleSlotDecimalMaximumValue.current; } + EOF; + +// Rule SlotDecimalMaximumValue +ruleSlotDecimalMaximumValue returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + lv_exclusive_0_0=RULE_LT + { + newLeafNode(lv_exclusive_0_0, grammarAccess.getSlotDecimalMaximumValueAccess().getExclusiveLTTerminalRuleCall_0_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getSlotDecimalMaximumValueRule()); + } + setWithLastConsumed( + $current, + "exclusive", + true, + "com.b2international.snowowl.snomed.ecl.Ecl.LT"); + } + ) + )? + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getSlotDecimalMaximumValueAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getSlotDecimalMaximumValueAccess().getValueNonNegativeDecimalParserRuleCall_2_0()); + } + lv_value_2_0=ruleNonNegativeDecimal + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getSlotDecimalMaximumValueRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeDecimal"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleExpressionConstraint +entryRuleExpressionConstraint returns [EObject current=null]: + { newCompositeNode(grammarAccess.getExpressionConstraintRule()); } + iv_ruleExpressionConstraint=ruleExpressionConstraint + { $current=$iv_ruleExpressionConstraint.current; } + EOF; + +// Rule ExpressionConstraint +ruleExpressionConstraint returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + { + /* */ + } + { + newCompositeNode(grammarAccess.getExpressionConstraintAccess().getOrExpressionConstraintParserRuleCall()); + } + this_OrExpressionConstraint_0=ruleOrExpressionConstraint + { + $current = $this_OrExpressionConstraint_0.current; + afterParserOrEnumRuleCall(); + } +; + +// Entry rule entryRuleOrExpressionConstraint +entryRuleOrExpressionConstraint returns [EObject current=null]: + { newCompositeNode(grammarAccess.getOrExpressionConstraintRule()); } + iv_ruleOrExpressionConstraint=ruleOrExpressionConstraint + { $current=$iv_ruleOrExpressionConstraint.current; } + EOF; + +// Rule OrExpressionConstraint +ruleOrExpressionConstraint returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getOrExpressionConstraintAccess().getAndExpressionConstraintParserRuleCall_0()); + } + this_AndExpressionConstraint_0=ruleAndExpressionConstraint + { + $current = $this_AndExpressionConstraint_0.current; + afterParserOrEnumRuleCall(); + } + ( + ( + { + /* */ + } + { + $current = forceCreateModelElementAndSet( + grammarAccess.getOrExpressionConstraintAccess().getOrExpressionConstraintLeftAction_1_0(), + $current); + } + ) + this_DISJUNCTION_2=RULE_DISJUNCTION + { + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrExpressionConstraintAccess().getDISJUNCTIONTerminalRuleCall_1_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getOrExpressionConstraintAccess().getRightAndExpressionConstraintParserRuleCall_1_2_0()); + } + lv_right_3_0=ruleAndExpressionConstraint + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getOrExpressionConstraintRule()); + } + set( + $current, + "right", + lv_right_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.AndExpressionConstraint"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + ) +; + +// Entry rule entryRuleAndExpressionConstraint +entryRuleAndExpressionConstraint returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAndExpressionConstraintRule()); } + iv_ruleAndExpressionConstraint=ruleAndExpressionConstraint + { $current=$iv_ruleAndExpressionConstraint.current; } + EOF; + +// Rule AndExpressionConstraint +ruleAndExpressionConstraint returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getAndExpressionConstraintAccess().getExclusionExpressionConstraintParserRuleCall_0()); + } + this_ExclusionExpressionConstraint_0=ruleExclusionExpressionConstraint + { + $current = $this_ExclusionExpressionConstraint_0.current; + afterParserOrEnumRuleCall(); + } + ( + ( + { + /* */ + } + { + $current = forceCreateModelElementAndSet( + grammarAccess.getAndExpressionConstraintAccess().getAndExpressionConstraintLeftAction_1_0(), + $current); + } + ) + ( + this_CONJUNCTION_2=RULE_CONJUNCTION + { + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndExpressionConstraintAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); + } + | + this_COMMA_3=RULE_COMMA + { + newLeafNode(this_COMMA_3, grammarAccess.getAndExpressionConstraintAccess().getCOMMATerminalRuleCall_1_1_1()); + } + ) + ( + ( + { + newCompositeNode(grammarAccess.getAndExpressionConstraintAccess().getRightExclusionExpressionConstraintParserRuleCall_1_2_0()); + } + lv_right_4_0=ruleExclusionExpressionConstraint + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAndExpressionConstraintRule()); + } + set( + $current, + "right", + lv_right_4_0, + "com.b2international.snowowl.snomed.ecl.Ecl.ExclusionExpressionConstraint"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + ) +; + +// Entry rule entryRuleExclusionExpressionConstraint +entryRuleExclusionExpressionConstraint returns [EObject current=null]: + { newCompositeNode(grammarAccess.getExclusionExpressionConstraintRule()); } + iv_ruleExclusionExpressionConstraint=ruleExclusionExpressionConstraint + { $current=$iv_ruleExclusionExpressionConstraint.current; } + EOF; + +// Rule ExclusionExpressionConstraint +ruleExclusionExpressionConstraint returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getExclusionExpressionConstraintAccess().getRefinedExpressionConstraintParserRuleCall_0()); + } + this_RefinedExpressionConstraint_0=ruleRefinedExpressionConstraint + { + $current = $this_RefinedExpressionConstraint_0.current; + afterParserOrEnumRuleCall(); + } + ( + ( + { + /* */ + } + { + $current = forceCreateModelElementAndSet( + grammarAccess.getExclusionExpressionConstraintAccess().getExclusionExpressionConstraintLeftAction_1_0(), + $current); + } + ) + this_EXCLUSION_2=RULE_EXCLUSION + { + newLeafNode(this_EXCLUSION_2, grammarAccess.getExclusionExpressionConstraintAccess().getEXCLUSIONTerminalRuleCall_1_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getExclusionExpressionConstraintAccess().getRightRefinedExpressionConstraintParserRuleCall_1_2_0()); + } + lv_right_3_0=ruleRefinedExpressionConstraint + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getExclusionExpressionConstraintRule()); + } + set( + $current, + "right", + lv_right_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.RefinedExpressionConstraint"); + afterParserOrEnumRuleCall(); + } + ) + ) + )? + ) +; + +// Entry rule entryRuleRefinedExpressionConstraint +entryRuleRefinedExpressionConstraint returns [EObject current=null]: + { newCompositeNode(grammarAccess.getRefinedExpressionConstraintRule()); } + iv_ruleRefinedExpressionConstraint=ruleRefinedExpressionConstraint + { $current=$iv_ruleRefinedExpressionConstraint.current; } + EOF; + +// Rule RefinedExpressionConstraint +ruleRefinedExpressionConstraint returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getRefinedExpressionConstraintAccess().getDottedExpressionConstraintParserRuleCall_0()); + } + this_DottedExpressionConstraint_0=ruleDottedExpressionConstraint + { + $current = $this_DottedExpressionConstraint_0.current; + afterParserOrEnumRuleCall(); + } + ( + ( + { + /* */ + } + { + $current = forceCreateModelElementAndSet( + grammarAccess.getRefinedExpressionConstraintAccess().getRefinedExpressionConstraintConstraintAction_1_0(), + $current); + } + ) + this_COLON_2=RULE_COLON + { + newLeafNode(this_COLON_2, grammarAccess.getRefinedExpressionConstraintAccess().getCOLONTerminalRuleCall_1_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getRefinedExpressionConstraintAccess().getRefinementEclRefinementParserRuleCall_1_2_0()); + } + lv_refinement_3_0=ruleEclRefinement + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getRefinedExpressionConstraintRule()); + } + set( + $current, + "refinement", + lv_refinement_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclRefinement"); + afterParserOrEnumRuleCall(); + } + ) + ) + )? + ) +; + +// Entry rule entryRuleDottedExpressionConstraint +entryRuleDottedExpressionConstraint returns [EObject current=null]: + { newCompositeNode(grammarAccess.getDottedExpressionConstraintRule()); } + iv_ruleDottedExpressionConstraint=ruleDottedExpressionConstraint + { $current=$iv_ruleDottedExpressionConstraint.current; } + EOF; + +// Rule DottedExpressionConstraint +ruleDottedExpressionConstraint returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getDottedExpressionConstraintAccess().getSubExpressionConstraintParserRuleCall_0()); + } + this_SubExpressionConstraint_0=ruleSubExpressionConstraint + { + $current = $this_SubExpressionConstraint_0.current; + afterParserOrEnumRuleCall(); + } + ( + ( + { + /* */ + } + { + $current = forceCreateModelElementAndSet( + grammarAccess.getDottedExpressionConstraintAccess().getDottedExpressionConstraintConstraintAction_1_0(), + $current); + } + ) + this_DOT_2=RULE_DOT + { + newLeafNode(this_DOT_2, grammarAccess.getDottedExpressionConstraintAccess().getDOTTerminalRuleCall_1_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getDottedExpressionConstraintAccess().getAttributeSubExpressionConstraintParserRuleCall_1_2_0()); + } + lv_attribute_3_0=ruleSubExpressionConstraint + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getDottedExpressionConstraintRule()); + } + set( + $current, + "attribute", + lv_attribute_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SubExpressionConstraint"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + ) +; + +// Entry rule entryRuleSubExpressionConstraint +entryRuleSubExpressionConstraint returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSubExpressionConstraintRule()); } + iv_ruleSubExpressionConstraint=ruleSubExpressionConstraint + { $current=$iv_ruleSubExpressionConstraint.current; } + EOF; + +// Rule SubExpressionConstraint +ruleSubExpressionConstraint returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getChildOfParserRuleCall_0()); + } + this_ChildOf_0=ruleChildOf + { + $current = $this_ChildOf_0.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getDescendantOfParserRuleCall_1()); + } + this_DescendantOf_1=ruleDescendantOf + { + $current = $this_DescendantOf_1.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getDescendantOrSelfOfParserRuleCall_2()); + } + this_DescendantOrSelfOf_2=ruleDescendantOrSelfOf + { + $current = $this_DescendantOrSelfOf_2.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getParentOfParserRuleCall_3()); + } + this_ParentOf_3=ruleParentOf + { + $current = $this_ParentOf_3.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getAncestorOfParserRuleCall_4()); + } + this_AncestorOf_4=ruleAncestorOf + { + $current = $this_AncestorOf_4.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getAncestorOrSelfOfParserRuleCall_5()); + } + this_AncestorOrSelfOf_5=ruleAncestorOrSelfOf + { + $current = $this_AncestorOrSelfOf_5.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getEclFocusConceptParserRuleCall_6()); + } + this_EclFocusConcept_6=ruleEclFocusConcept + { + $current = $this_EclFocusConcept_6.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleEclFocusConcept +entryRuleEclFocusConcept returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclFocusConceptRule()); } + iv_ruleEclFocusConcept=ruleEclFocusConcept + { $current=$iv_ruleEclFocusConcept.current; } + EOF; + +// Rule EclFocusConcept +ruleEclFocusConcept returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getMemberOfParserRuleCall_0()); + } + this_MemberOf_0=ruleMemberOf + { + $current = $this_MemberOf_0.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getEclConceptReferenceParserRuleCall_1()); + } + this_EclConceptReference_1=ruleEclConceptReference + { + $current = $this_EclConceptReference_1.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getAnyParserRuleCall_2()); + } + this_Any_2=ruleAny + { + $current = $this_Any_2.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getNestedExpressionParserRuleCall_3()); + } + this_NestedExpression_3=ruleNestedExpression + { + $current = $this_NestedExpression_3.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleChildOf +entryRuleChildOf returns [EObject current=null]: + { newCompositeNode(grammarAccess.getChildOfRule()); } + iv_ruleChildOf=ruleChildOf + { $current=$iv_ruleChildOf.current; } + EOF; + +// Rule ChildOf +ruleChildOf returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_LT_EM_0=RULE_LT_EM + { + newLeafNode(this_LT_EM_0, grammarAccess.getChildOfAccess().getLT_EMTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getChildOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); + } + lv_constraint_1_0=ruleEclFocusConcept + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getChildOfRule()); + } + set( + $current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleDescendantOf +entryRuleDescendantOf returns [EObject current=null]: + { newCompositeNode(grammarAccess.getDescendantOfRule()); } + iv_ruleDescendantOf=ruleDescendantOf + { $current=$iv_ruleDescendantOf.current; } + EOF; + +// Rule DescendantOf +ruleDescendantOf returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_LT_0=RULE_LT + { + newLeafNode(this_LT_0, grammarAccess.getDescendantOfAccess().getLTTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getDescendantOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); + } + lv_constraint_1_0=ruleEclFocusConcept + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getDescendantOfRule()); + } + set( + $current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleDescendantOrSelfOf +entryRuleDescendantOrSelfOf returns [EObject current=null]: + { newCompositeNode(grammarAccess.getDescendantOrSelfOfRule()); } + iv_ruleDescendantOrSelfOf=ruleDescendantOrSelfOf + { $current=$iv_ruleDescendantOrSelfOf.current; } + EOF; + +// Rule DescendantOrSelfOf +ruleDescendantOrSelfOf returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_DBL_LT_0=RULE_DBL_LT + { + newLeafNode(this_DBL_LT_0, grammarAccess.getDescendantOrSelfOfAccess().getDBL_LTTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getDescendantOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); + } + lv_constraint_1_0=ruleEclFocusConcept + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getDescendantOrSelfOfRule()); + } + set( + $current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleParentOf +entryRuleParentOf returns [EObject current=null]: + { newCompositeNode(grammarAccess.getParentOfRule()); } + iv_ruleParentOf=ruleParentOf + { $current=$iv_ruleParentOf.current; } + EOF; + +// Rule ParentOf +ruleParentOf returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_GT_EM_0=RULE_GT_EM + { + newLeafNode(this_GT_EM_0, grammarAccess.getParentOfAccess().getGT_EMTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getParentOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); + } + lv_constraint_1_0=ruleEclFocusConcept + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getParentOfRule()); + } + set( + $current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleAncestorOf +entryRuleAncestorOf returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAncestorOfRule()); } + iv_ruleAncestorOf=ruleAncestorOf + { $current=$iv_ruleAncestorOf.current; } + EOF; + +// Rule AncestorOf +ruleAncestorOf returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_GT_0=RULE_GT + { + newLeafNode(this_GT_0, grammarAccess.getAncestorOfAccess().getGTTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getAncestorOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); + } + lv_constraint_1_0=ruleEclFocusConcept + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAncestorOfRule()); + } + set( + $current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleAncestorOrSelfOf +entryRuleAncestorOrSelfOf returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAncestorOrSelfOfRule()); } + iv_ruleAncestorOrSelfOf=ruleAncestorOrSelfOf + { $current=$iv_ruleAncestorOrSelfOf.current; } + EOF; + +// Rule AncestorOrSelfOf +ruleAncestorOrSelfOf returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_DBL_GT_0=RULE_DBL_GT + { + newLeafNode(this_DBL_GT_0, grammarAccess.getAncestorOrSelfOfAccess().getDBL_GTTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getAncestorOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); + } + lv_constraint_1_0=ruleEclFocusConcept + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAncestorOrSelfOfRule()); + } + set( + $current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleMemberOf +entryRuleMemberOf returns [EObject current=null]: + { newCompositeNode(grammarAccess.getMemberOfRule()); } + iv_ruleMemberOf=ruleMemberOf + { $current=$iv_ruleMemberOf.current; } + EOF; + +// Rule MemberOf +ruleMemberOf returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_CARET_0=RULE_CARET + { + newLeafNode(this_CARET_0, grammarAccess.getMemberOfAccess().getCARETTerminalRuleCall_0()); + } + ( + ( + ( + { + newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintEclConceptReferenceParserRuleCall_1_0_0()); + } + lv_constraint_1_1=ruleEclConceptReference + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getMemberOfRule()); + } + set( + $current, + "constraint", + lv_constraint_1_1, + "com.b2international.snowowl.snomed.ecl.Ecl.EclConceptReference"); + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintAnyParserRuleCall_1_0_1()); + } + lv_constraint_1_2=ruleAny + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getMemberOfRule()); + } + set( + $current, + "constraint", + lv_constraint_1_2, + "com.b2international.snowowl.snomed.ecl.Ecl.Any"); + afterParserOrEnumRuleCall(); + } + | + { + newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintNestedExpressionParserRuleCall_1_0_2()); + } + lv_constraint_1_3=ruleNestedExpression + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getMemberOfRule()); + } + set( + $current, + "constraint", + lv_constraint_1_3, + "com.b2international.snowowl.snomed.ecl.Ecl.NestedExpression"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) + ) +; + +// Entry rule entryRuleEclConceptReference +entryRuleEclConceptReference returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclConceptReferenceRule()); } + iv_ruleEclConceptReference=ruleEclConceptReference + { $current=$iv_ruleEclConceptReference.current; } + EOF; + +// Rule EclConceptReference +ruleEclConceptReference returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + newCompositeNode(grammarAccess.getEclConceptReferenceAccess().getIdSnomedIdentifierParserRuleCall_0_0()); + } + lv_id_0_0=ruleSnomedIdentifier + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getEclConceptReferenceRule()); + } + set( + $current, + "id", + lv_id_0_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SnomedIdentifier"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + ( + lv_term_1_0=RULE_TERM_STRING + { + newLeafNode(lv_term_1_0, grammarAccess.getEclConceptReferenceAccess().getTermTERM_STRINGTerminalRuleCall_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getEclConceptReferenceRule()); + } + setWithLastConsumed( + $current, + "term", + lv_term_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.TERM_STRING"); + } + ) + )? + ) +; + +// Entry rule entryRuleAny +entryRuleAny returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAnyRule()); } + iv_ruleAny=ruleAny + { $current=$iv_ruleAny.current; } + EOF; + +// Rule Any +ruleAny returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_WILDCARD_0=RULE_WILDCARD + { + newLeafNode(this_WILDCARD_0, grammarAccess.getAnyAccess().getWILDCARDTerminalRuleCall_0()); + } + ( + { + /* */ + } + { + $current = forceCreateModelElement( + grammarAccess.getAnyAccess().getAnyAction_1(), + $current); + } + ) + ) +; + +// Entry rule entryRuleEclRefinement +entryRuleEclRefinement returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclRefinementRule()); } + iv_ruleEclRefinement=ruleEclRefinement + { $current=$iv_ruleEclRefinement.current; } + EOF; + +// Rule EclRefinement +ruleEclRefinement returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + { + /* */ + } + { + newCompositeNode(grammarAccess.getEclRefinementAccess().getOrRefinementParserRuleCall()); + } + this_OrRefinement_0=ruleOrRefinement + { + $current = $this_OrRefinement_0.current; + afterParserOrEnumRuleCall(); + } +; + +// Entry rule entryRuleOrRefinement +entryRuleOrRefinement returns [EObject current=null]: + { newCompositeNode(grammarAccess.getOrRefinementRule()); } + iv_ruleOrRefinement=ruleOrRefinement + { $current=$iv_ruleOrRefinement.current; } + EOF; + +// Rule OrRefinement +ruleOrRefinement returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getOrRefinementAccess().getAndRefinementParserRuleCall_0()); + } + this_AndRefinement_0=ruleAndRefinement + { + $current = $this_AndRefinement_0.current; + afterParserOrEnumRuleCall(); + } + ( + (RULE_DISJUNCTION)=> + ( + ( + { + /* */ + } + { + $current = forceCreateModelElementAndSet( + grammarAccess.getOrRefinementAccess().getOrRefinementLeftAction_1_0_0(), + $current); + } + ) + this_DISJUNCTION_2=RULE_DISJUNCTION + { + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrRefinementAccess().getDISJUNCTIONTerminalRuleCall_1_0_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getOrRefinementAccess().getRightAndRefinementParserRuleCall_1_0_2_0()); + } + lv_right_3_0=ruleAndRefinement + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getOrRefinementRule()); + } + set( + $current, + "right", + lv_right_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.AndRefinement"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) + )* + ) +; + +// Entry rule entryRuleAndRefinement +entryRuleAndRefinement returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAndRefinementRule()); } + iv_ruleAndRefinement=ruleAndRefinement + { $current=$iv_ruleAndRefinement.current; } + EOF; + +// Rule AndRefinement +ruleAndRefinement returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getAndRefinementAccess().getSubRefinementParserRuleCall_0()); + } + this_SubRefinement_0=ruleSubRefinement + { + $current = $this_SubRefinement_0.current; + afterParserOrEnumRuleCall(); + } + ( + (RULE_CONJUNCTION | RULE_COMMA)=> + ( + ( + { + /* */ + } + { + $current = forceCreateModelElementAndSet( + grammarAccess.getAndRefinementAccess().getAndRefinementLeftAction_1_0_0(), + $current); + } + ) + ( + this_CONJUNCTION_2=RULE_CONJUNCTION + { + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndRefinementAccess().getCONJUNCTIONTerminalRuleCall_1_0_1_0()); + } + | + this_COMMA_3=RULE_COMMA + { + newLeafNode(this_COMMA_3, grammarAccess.getAndRefinementAccess().getCOMMATerminalRuleCall_1_0_1_1()); + } + ) + ( + ( + { + newCompositeNode(grammarAccess.getAndRefinementAccess().getRightSubRefinementParserRuleCall_1_0_2_0()); + } + lv_right_4_0=ruleSubRefinement + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAndRefinementRule()); + } + set( + $current, + "right", + lv_right_4_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SubRefinement"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) + )* + ) +; + +// Entry rule entryRuleSubRefinement +entryRuleSubRefinement returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSubRefinementRule()); } + iv_ruleSubRefinement=ruleSubRefinement + { $current=$iv_ruleSubRefinement.current; } + EOF; + +// Rule SubRefinement +ruleSubRefinement returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getSubRefinementAccess().getAttributeConstraintParserRuleCall_0()); + } + this_AttributeConstraint_0=ruleAttributeConstraint + { + $current = $this_AttributeConstraint_0.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getSubRefinementAccess().getEclAttributeGroupParserRuleCall_1()); + } + this_EclAttributeGroup_1=ruleEclAttributeGroup + { + $current = $this_EclAttributeGroup_1.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getSubRefinementAccess().getNestedRefinementParserRuleCall_2()); + } + this_NestedRefinement_2=ruleNestedRefinement + { + $current = $this_NestedRefinement_2.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleNestedRefinement +entryRuleNestedRefinement returns [EObject current=null]: + { newCompositeNode(grammarAccess.getNestedRefinementRule()); } + iv_ruleNestedRefinement=ruleNestedRefinement + { $current=$iv_ruleNestedRefinement.current; } + EOF; + +// Rule NestedRefinement +ruleNestedRefinement returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_ROUND_OPEN_0=RULE_ROUND_OPEN + { + newLeafNode(this_ROUND_OPEN_0, grammarAccess.getNestedRefinementAccess().getROUND_OPENTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getNestedRefinementAccess().getNestedEclRefinementParserRuleCall_1_0()); + } + lv_nested_1_0=ruleEclRefinement + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getNestedRefinementRule()); + } + set( + $current, + "nested", + lv_nested_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclRefinement"); + afterParserOrEnumRuleCall(); + } + ) + ) + this_ROUND_CLOSE_2=RULE_ROUND_CLOSE + { + newLeafNode(this_ROUND_CLOSE_2, grammarAccess.getNestedRefinementAccess().getROUND_CLOSETerminalRuleCall_2()); + } + ) +; + +// Entry rule entryRuleEclAttributeGroup +entryRuleEclAttributeGroup returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclAttributeGroupRule()); } + iv_ruleEclAttributeGroup=ruleEclAttributeGroup + { $current=$iv_ruleEclAttributeGroup.current; } + EOF; + +// Rule EclAttributeGroup +ruleEclAttributeGroup returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + newCompositeNode(grammarAccess.getEclAttributeGroupAccess().getCardinalityCardinalityParserRuleCall_0_0()); + } + lv_cardinality_0_0=ruleCardinality + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getEclAttributeGroupRule()); + } + set( + $current, + "cardinality", + lv_cardinality_0_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Cardinality"); + afterParserOrEnumRuleCall(); + } + ) + )? + this_CURLY_OPEN_1=RULE_CURLY_OPEN + { + newLeafNode(this_CURLY_OPEN_1, grammarAccess.getEclAttributeGroupAccess().getCURLY_OPENTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getEclAttributeGroupAccess().getRefinementEclAttributeSetParserRuleCall_2_0()); + } + lv_refinement_2_0=ruleEclAttributeSet + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getEclAttributeGroupRule()); + } + set( + $current, + "refinement", + lv_refinement_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeSet"); + afterParserOrEnumRuleCall(); + } + ) + ) + this_CURLY_CLOSE_3=RULE_CURLY_CLOSE + { + newLeafNode(this_CURLY_CLOSE_3, grammarAccess.getEclAttributeGroupAccess().getCURLY_CLOSETerminalRuleCall_3()); + } + ) +; + +// Entry rule entryRuleEclAttributeSet +entryRuleEclAttributeSet returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclAttributeSetRule()); } + iv_ruleEclAttributeSet=ruleEclAttributeSet + { $current=$iv_ruleEclAttributeSet.current; } + EOF; + +// Rule EclAttributeSet +ruleEclAttributeSet returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + { + /* */ + } + { + newCompositeNode(grammarAccess.getEclAttributeSetAccess().getOrAttributeSetParserRuleCall()); + } + this_OrAttributeSet_0=ruleOrAttributeSet + { + $current = $this_OrAttributeSet_0.current; + afterParserOrEnumRuleCall(); + } +; + +// Entry rule entryRuleOrAttributeSet +entryRuleOrAttributeSet returns [EObject current=null]: + { newCompositeNode(grammarAccess.getOrAttributeSetRule()); } + iv_ruleOrAttributeSet=ruleOrAttributeSet + { $current=$iv_ruleOrAttributeSet.current; } + EOF; + +// Rule OrAttributeSet +ruleOrAttributeSet returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getOrAttributeSetAccess().getAndAttributeSetParserRuleCall_0()); + } + this_AndAttributeSet_0=ruleAndAttributeSet + { + $current = $this_AndAttributeSet_0.current; + afterParserOrEnumRuleCall(); + } + ( + ( + { + /* */ + } + { + $current = forceCreateModelElementAndSet( + grammarAccess.getOrAttributeSetAccess().getOrRefinementLeftAction_1_0(), + $current); + } + ) + this_DISJUNCTION_2=RULE_DISJUNCTION + { + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrAttributeSetAccess().getDISJUNCTIONTerminalRuleCall_1_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getOrAttributeSetAccess().getRightAndAttributeSetParserRuleCall_1_2_0()); + } + lv_right_3_0=ruleAndAttributeSet + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getOrAttributeSetRule()); + } + set( + $current, + "right", + lv_right_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.AndAttributeSet"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + ) +; + +// Entry rule entryRuleAndAttributeSet +entryRuleAndAttributeSet returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAndAttributeSetRule()); } + iv_ruleAndAttributeSet=ruleAndAttributeSet + { $current=$iv_ruleAndAttributeSet.current; } + EOF; + +// Rule AndAttributeSet +ruleAndAttributeSet returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getAndAttributeSetAccess().getSubAttributeSetParserRuleCall_0()); + } + this_SubAttributeSet_0=ruleSubAttributeSet + { + $current = $this_SubAttributeSet_0.current; + afterParserOrEnumRuleCall(); + } + ( + ( + { + /* */ + } + { + $current = forceCreateModelElementAndSet( + grammarAccess.getAndAttributeSetAccess().getAndRefinementLeftAction_1_0(), + $current); + } + ) + ( + this_CONJUNCTION_2=RULE_CONJUNCTION + { + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndAttributeSetAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); + } + | + this_COMMA_3=RULE_COMMA + { + newLeafNode(this_COMMA_3, grammarAccess.getAndAttributeSetAccess().getCOMMATerminalRuleCall_1_1_1()); + } + ) + ( + ( + { + newCompositeNode(grammarAccess.getAndAttributeSetAccess().getRightSubAttributeSetParserRuleCall_1_2_0()); + } + lv_right_4_0=ruleSubAttributeSet + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAndAttributeSetRule()); + } + set( + $current, + "right", + lv_right_4_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SubAttributeSet"); + afterParserOrEnumRuleCall(); + } + ) + ) + )* + ) +; + +// Entry rule entryRuleSubAttributeSet +entryRuleSubAttributeSet returns [EObject current=null]: + { newCompositeNode(grammarAccess.getSubAttributeSetRule()); } + iv_ruleSubAttributeSet=ruleSubAttributeSet + { $current=$iv_ruleSubAttributeSet.current; } + EOF; + +// Rule SubAttributeSet +ruleSubAttributeSet returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getSubAttributeSetAccess().getAttributeConstraintParserRuleCall_0()); + } + this_AttributeConstraint_0=ruleAttributeConstraint + { + $current = $this_AttributeConstraint_0.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getSubAttributeSetAccess().getNestedAttributeSetParserRuleCall_1()); + } + this_NestedAttributeSet_1=ruleNestedAttributeSet + { + $current = $this_NestedAttributeSet_1.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleNestedAttributeSet +entryRuleNestedAttributeSet returns [EObject current=null]: + { newCompositeNode(grammarAccess.getNestedAttributeSetRule()); } + iv_ruleNestedAttributeSet=ruleNestedAttributeSet + { $current=$iv_ruleNestedAttributeSet.current; } + EOF; + +// Rule NestedAttributeSet +ruleNestedAttributeSet returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_ROUND_OPEN_0=RULE_ROUND_OPEN + { + newLeafNode(this_ROUND_OPEN_0, grammarAccess.getNestedAttributeSetAccess().getROUND_OPENTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getNestedAttributeSetAccess().getNestedEclAttributeSetParserRuleCall_1_0()); + } + lv_nested_1_0=ruleEclAttributeSet + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getNestedAttributeSetRule()); + } + set( + $current, + "nested", + lv_nested_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeSet"); + afterParserOrEnumRuleCall(); + } + ) + ) + this_ROUND_CLOSE_2=RULE_ROUND_CLOSE + { + newLeafNode(this_ROUND_CLOSE_2, grammarAccess.getNestedAttributeSetAccess().getROUND_CLOSETerminalRuleCall_2()); + } + ) +; + +// Entry rule entryRuleAttributeConstraint +entryRuleAttributeConstraint returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAttributeConstraintRule()); } + iv_ruleAttributeConstraint=ruleAttributeConstraint + { $current=$iv_ruleAttributeConstraint.current; } + EOF; + +// Rule AttributeConstraint +ruleAttributeConstraint returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + ( + ( + { + newCompositeNode(grammarAccess.getAttributeConstraintAccess().getCardinalityCardinalityParserRuleCall_0_0()); + } + lv_cardinality_0_0=ruleCardinality + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAttributeConstraintRule()); + } + set( + $current, + "cardinality", + lv_cardinality_0_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Cardinality"); + afterParserOrEnumRuleCall(); + } + ) + )? + ( + ( + lv_reversed_1_0=RULE_REVERSED + { + newLeafNode(lv_reversed_1_0, grammarAccess.getAttributeConstraintAccess().getReversedREVERSEDTerminalRuleCall_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getAttributeConstraintRule()); + } + setWithLastConsumed( + $current, + "reversed", + true, + "com.b2international.snowowl.snomed.ecl.Ecl.REVERSED"); + } + ) + )? + ( + ( + { + newCompositeNode(grammarAccess.getAttributeConstraintAccess().getAttributeSubExpressionConstraintParserRuleCall_2_0()); + } + lv_attribute_2_0=ruleSubExpressionConstraint + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAttributeConstraintRule()); + } + set( + $current, + "attribute", + lv_attribute_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SubExpressionConstraint"); + afterParserOrEnumRuleCall(); + } + ) + ) + ( + ( + { + newCompositeNode(grammarAccess.getAttributeConstraintAccess().getComparisonComparisonParserRuleCall_3_0()); + } + lv_comparison_3_0=ruleComparison + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAttributeConstraintRule()); + } + set( + $current, + "comparison", + lv_comparison_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Comparison"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleCardinality +entryRuleCardinality returns [EObject current=null]: + { newCompositeNode(grammarAccess.getCardinalityRule()); } + iv_ruleCardinality=ruleCardinality + { $current=$iv_ruleCardinality.current; } + EOF; + +// Rule Cardinality +ruleCardinality returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_SQUARE_OPEN_0=RULE_SQUARE_OPEN + { + newLeafNode(this_SQUARE_OPEN_0, grammarAccess.getCardinalityAccess().getSQUARE_OPENTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getCardinalityAccess().getMinNonNegativeIntegerParserRuleCall_1_0()); + } + lv_min_1_0=ruleNonNegativeInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getCardinalityRule()); + } + set( + $current, + "min", + lv_min_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeInteger"); + afterParserOrEnumRuleCall(); + } + ) + ) + this_TO_2=RULE_TO + { + newLeafNode(this_TO_2, grammarAccess.getCardinalityAccess().getTOTerminalRuleCall_2()); + } + ( + ( + { + newCompositeNode(grammarAccess.getCardinalityAccess().getMaxMaxValueParserRuleCall_3_0()); + } + lv_max_3_0=ruleMaxValue + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getCardinalityRule()); + } + set( + $current, + "max", + lv_max_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.MaxValue"); + afterParserOrEnumRuleCall(); + } + ) + ) + this_SQUARE_CLOSE_4=RULE_SQUARE_CLOSE + { + newLeafNode(this_SQUARE_CLOSE_4, grammarAccess.getCardinalityAccess().getSQUARE_CLOSETerminalRuleCall_4()); + } + ) +; + +// Entry rule entryRuleComparison +entryRuleComparison returns [EObject current=null]: + { newCompositeNode(grammarAccess.getComparisonRule()); } + iv_ruleComparison=ruleComparison + { $current=$iv_ruleComparison.current; } + EOF; + +// Rule Comparison +ruleComparison returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getComparisonAccess().getAttributeComparisonParserRuleCall_0()); + } + this_AttributeComparison_0=ruleAttributeComparison + { + $current = $this_AttributeComparison_0.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getComparisonAccess().getDataTypeComparisonParserRuleCall_1()); + } + this_DataTypeComparison_1=ruleDataTypeComparison + { + $current = $this_DataTypeComparison_1.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleAttributeComparison +entryRuleAttributeComparison returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAttributeComparisonRule()); } + iv_ruleAttributeComparison=ruleAttributeComparison + { $current=$iv_ruleAttributeComparison.current; } + EOF; + +// Rule AttributeComparison +ruleAttributeComparison returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getAttributeComparisonAccess().getAttributeValueEqualsParserRuleCall_0()); + } + this_AttributeValueEquals_0=ruleAttributeValueEquals + { + $current = $this_AttributeValueEquals_0.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getAttributeComparisonAccess().getAttributeValueNotEqualsParserRuleCall_1()); + } + this_AttributeValueNotEquals_1=ruleAttributeValueNotEquals + { + $current = $this_AttributeValueNotEquals_1.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleDataTypeComparison +entryRuleDataTypeComparison returns [EObject current=null]: + { newCompositeNode(grammarAccess.getDataTypeComparisonRule()); } + iv_ruleDataTypeComparison=ruleDataTypeComparison + { $current=$iv_ruleDataTypeComparison.current; } + EOF; + +// Rule DataTypeComparison +ruleDataTypeComparison returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getBooleanValueEqualsParserRuleCall_0()); + } + this_BooleanValueEquals_0=ruleBooleanValueEquals + { + $current = $this_BooleanValueEquals_0.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getBooleanValueNotEqualsParserRuleCall_1()); + } + this_BooleanValueNotEquals_1=ruleBooleanValueNotEquals + { + $current = $this_BooleanValueNotEquals_1.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getStringValueEqualsParserRuleCall_2()); + } + this_StringValueEquals_2=ruleStringValueEquals + { + $current = $this_StringValueEquals_2.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getStringValueNotEqualsParserRuleCall_3()); + } + this_StringValueNotEquals_3=ruleStringValueNotEquals + { + $current = $this_StringValueNotEquals_3.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getIntegerValueEqualsParserRuleCall_4()); + } + this_IntegerValueEquals_4=ruleIntegerValueEquals + { + $current = $this_IntegerValueEquals_4.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getIntegerValueNotEqualsParserRuleCall_5()); + } + this_IntegerValueNotEquals_5=ruleIntegerValueNotEquals + { + $current = $this_IntegerValueNotEquals_5.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getIntegerValueGreaterThanParserRuleCall_6()); + } + this_IntegerValueGreaterThan_6=ruleIntegerValueGreaterThan + { + $current = $this_IntegerValueGreaterThan_6.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getIntegerValueGreaterThanEqualsParserRuleCall_7()); + } + this_IntegerValueGreaterThanEquals_7=ruleIntegerValueGreaterThanEquals + { + $current = $this_IntegerValueGreaterThanEquals_7.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getIntegerValueLessThanParserRuleCall_8()); + } + this_IntegerValueLessThan_8=ruleIntegerValueLessThan + { + $current = $this_IntegerValueLessThan_8.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getIntegerValueLessThanEqualsParserRuleCall_9()); + } + this_IntegerValueLessThanEquals_9=ruleIntegerValueLessThanEquals + { + $current = $this_IntegerValueLessThanEquals_9.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getDecimalValueEqualsParserRuleCall_10()); + } + this_DecimalValueEquals_10=ruleDecimalValueEquals + { + $current = $this_DecimalValueEquals_10.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getDecimalValueNotEqualsParserRuleCall_11()); + } + this_DecimalValueNotEquals_11=ruleDecimalValueNotEquals + { + $current = $this_DecimalValueNotEquals_11.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getDecimalValueGreaterThanParserRuleCall_12()); + } + this_DecimalValueGreaterThan_12=ruleDecimalValueGreaterThan + { + $current = $this_DecimalValueGreaterThan_12.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getDecimalValueGreaterThanEqualsParserRuleCall_13()); + } + this_DecimalValueGreaterThanEquals_13=ruleDecimalValueGreaterThanEquals + { + $current = $this_DecimalValueGreaterThanEquals_13.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getDecimalValueLessThanParserRuleCall_14()); + } + this_DecimalValueLessThan_14=ruleDecimalValueLessThan + { + $current = $this_DecimalValueLessThan_14.current; + afterParserOrEnumRuleCall(); + } + | + { + /* */ + } + { + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getDecimalValueLessThanEqualsParserRuleCall_15()); + } + this_DecimalValueLessThanEquals_15=ruleDecimalValueLessThanEquals + { + $current = $this_DecimalValueLessThanEquals_15.current; + afterParserOrEnumRuleCall(); + } + ) +; + +// Entry rule entryRuleAttributeValueEquals +entryRuleAttributeValueEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAttributeValueEqualsRule()); } + iv_ruleAttributeValueEquals=ruleAttributeValueEquals + { $current=$iv_ruleAttributeValueEquals.current; } + EOF; + +// Rule AttributeValueEquals +ruleAttributeValueEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_EQUAL_0=RULE_EQUAL + { + newLeafNode(this_EQUAL_0, grammarAccess.getAttributeValueEqualsAccess().getEQUALTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getAttributeValueEqualsAccess().getConstraintSubExpressionConstraintParserRuleCall_1_0()); + } + lv_constraint_1_0=ruleSubExpressionConstraint + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAttributeValueEqualsRule()); + } + set( + $current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SubExpressionConstraint"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleAttributeValueNotEquals +entryRuleAttributeValueNotEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getAttributeValueNotEqualsRule()); } + iv_ruleAttributeValueNotEquals=ruleAttributeValueNotEquals + { $current=$iv_ruleAttributeValueNotEquals.current; } + EOF; + +// Rule AttributeValueNotEquals +ruleAttributeValueNotEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_NOT_EQUAL_0=RULE_NOT_EQUAL + { + newLeafNode(this_NOT_EQUAL_0, grammarAccess.getAttributeValueNotEqualsAccess().getNOT_EQUALTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getAttributeValueNotEqualsAccess().getConstraintSubExpressionConstraintParserRuleCall_1_0()); + } + lv_constraint_1_0=ruleSubExpressionConstraint + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getAttributeValueNotEqualsRule()); + } + set( + $current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SubExpressionConstraint"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleBooleanValueEquals +entryRuleBooleanValueEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getBooleanValueEqualsRule()); } + iv_ruleBooleanValueEquals=ruleBooleanValueEquals + { $current=$iv_ruleBooleanValueEquals.current; } + EOF; + +// Rule BooleanValueEquals +ruleBooleanValueEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_EQUAL_0=RULE_EQUAL + { + newLeafNode(this_EQUAL_0, grammarAccess.getBooleanValueEqualsAccess().getEQUALTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getBooleanValueEqualsAccess().getValueBooleanParserRuleCall_1_0()); + } + lv_value_1_0=ruleBoolean + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getBooleanValueEqualsRule()); + } + set( + $current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Boolean"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleBooleanValueNotEquals +entryRuleBooleanValueNotEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getBooleanValueNotEqualsRule()); } + iv_ruleBooleanValueNotEquals=ruleBooleanValueNotEquals + { $current=$iv_ruleBooleanValueNotEquals.current; } + EOF; + +// Rule BooleanValueNotEquals +ruleBooleanValueNotEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_NOT_EQUAL_0=RULE_NOT_EQUAL + { + newLeafNode(this_NOT_EQUAL_0, grammarAccess.getBooleanValueNotEqualsAccess().getNOT_EQUALTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getBooleanValueNotEqualsAccess().getValueBooleanParserRuleCall_1_0()); + } + lv_value_1_0=ruleBoolean + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getBooleanValueNotEqualsRule()); + } + set( + $current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Boolean"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleStringValueEquals +entryRuleStringValueEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getStringValueEqualsRule()); } + iv_ruleStringValueEquals=ruleStringValueEquals + { $current=$iv_ruleStringValueEquals.current; } + EOF; + +// Rule StringValueEquals +ruleStringValueEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_EQUAL_0=RULE_EQUAL + { + newLeafNode(this_EQUAL_0, grammarAccess.getStringValueEqualsAccess().getEQUALTerminalRuleCall_0()); + } + ( + ( + lv_value_1_0=RULE_STRING + { + newLeafNode(lv_value_1_0, grammarAccess.getStringValueEqualsAccess().getValueSTRINGTerminalRuleCall_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getStringValueEqualsRule()); + } + setWithLastConsumed( + $current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.STRING"); + } + ) + ) + ) +; + +// Entry rule entryRuleStringValueNotEquals +entryRuleStringValueNotEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getStringValueNotEqualsRule()); } + iv_ruleStringValueNotEquals=ruleStringValueNotEquals + { $current=$iv_ruleStringValueNotEquals.current; } + EOF; + +// Rule StringValueNotEquals +ruleStringValueNotEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_NOT_EQUAL_0=RULE_NOT_EQUAL + { + newLeafNode(this_NOT_EQUAL_0, grammarAccess.getStringValueNotEqualsAccess().getNOT_EQUALTerminalRuleCall_0()); + } + ( + ( + lv_value_1_0=RULE_STRING + { + newLeafNode(lv_value_1_0, grammarAccess.getStringValueNotEqualsAccess().getValueSTRINGTerminalRuleCall_1_0()); + } + { + if ($current==null) { + $current = createModelElement(grammarAccess.getStringValueNotEqualsRule()); + } + setWithLastConsumed( + $current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.STRING"); + } + ) + ) + ) +; + +// Entry rule entryRuleIntegerValueEquals +entryRuleIntegerValueEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getIntegerValueEqualsRule()); } + iv_ruleIntegerValueEquals=ruleIntegerValueEquals + { $current=$iv_ruleIntegerValueEquals.current; } + EOF; + +// Rule IntegerValueEquals +ruleIntegerValueEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_EQUAL_0=RULE_EQUAL + { + newLeafNode(this_EQUAL_0, grammarAccess.getIntegerValueEqualsAccess().getEQUALTerminalRuleCall_0()); + } + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getIntegerValueEqualsAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getIntegerValueEqualsAccess().getValueIntegerParserRuleCall_2_0()); + } + lv_value_2_0=ruleInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getIntegerValueEqualsRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleIntegerValueNotEquals +entryRuleIntegerValueNotEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getIntegerValueNotEqualsRule()); } + iv_ruleIntegerValueNotEquals=ruleIntegerValueNotEquals + { $current=$iv_ruleIntegerValueNotEquals.current; } + EOF; + +// Rule IntegerValueNotEquals +ruleIntegerValueNotEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_NOT_EQUAL_0=RULE_NOT_EQUAL + { + newLeafNode(this_NOT_EQUAL_0, grammarAccess.getIntegerValueNotEqualsAccess().getNOT_EQUALTerminalRuleCall_0()); + } + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getIntegerValueNotEqualsAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getIntegerValueNotEqualsAccess().getValueIntegerParserRuleCall_2_0()); + } + lv_value_2_0=ruleInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getIntegerValueNotEqualsRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleIntegerValueGreaterThan +entryRuleIntegerValueGreaterThan returns [EObject current=null]: + { newCompositeNode(grammarAccess.getIntegerValueGreaterThanRule()); } + iv_ruleIntegerValueGreaterThan=ruleIntegerValueGreaterThan + { $current=$iv_ruleIntegerValueGreaterThan.current; } + EOF; + +// Rule IntegerValueGreaterThan +ruleIntegerValueGreaterThan returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_GT_0=RULE_GT + { + newLeafNode(this_GT_0, grammarAccess.getIntegerValueGreaterThanAccess().getGTTerminalRuleCall_0()); + } + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getIntegerValueGreaterThanAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getIntegerValueGreaterThanAccess().getValueIntegerParserRuleCall_2_0()); + } + lv_value_2_0=ruleInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getIntegerValueGreaterThanRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleIntegerValueLessThan +entryRuleIntegerValueLessThan returns [EObject current=null]: + { newCompositeNode(grammarAccess.getIntegerValueLessThanRule()); } + iv_ruleIntegerValueLessThan=ruleIntegerValueLessThan + { $current=$iv_ruleIntegerValueLessThan.current; } + EOF; + +// Rule IntegerValueLessThan +ruleIntegerValueLessThan returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_LT_0=RULE_LT + { + newLeafNode(this_LT_0, grammarAccess.getIntegerValueLessThanAccess().getLTTerminalRuleCall_0()); + } + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getIntegerValueLessThanAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getIntegerValueLessThanAccess().getValueIntegerParserRuleCall_2_0()); + } + lv_value_2_0=ruleInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getIntegerValueLessThanRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleIntegerValueGreaterThanEquals +entryRuleIntegerValueGreaterThanEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getIntegerValueGreaterThanEqualsRule()); } + iv_ruleIntegerValueGreaterThanEquals=ruleIntegerValueGreaterThanEquals + { $current=$iv_ruleIntegerValueGreaterThanEquals.current; } + EOF; + +// Rule IntegerValueGreaterThanEquals +ruleIntegerValueGreaterThanEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_GTE_0=RULE_GTE + { + newLeafNode(this_GTE_0, grammarAccess.getIntegerValueGreaterThanEqualsAccess().getGTETerminalRuleCall_0()); + } + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getIntegerValueGreaterThanEqualsAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getIntegerValueGreaterThanEqualsAccess().getValueIntegerParserRuleCall_2_0()); + } + lv_value_2_0=ruleInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getIntegerValueGreaterThanEqualsRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleIntegerValueLessThanEquals +entryRuleIntegerValueLessThanEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getIntegerValueLessThanEqualsRule()); } + iv_ruleIntegerValueLessThanEquals=ruleIntegerValueLessThanEquals + { $current=$iv_ruleIntegerValueLessThanEquals.current; } + EOF; + +// Rule IntegerValueLessThanEquals +ruleIntegerValueLessThanEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_LTE_0=RULE_LTE + { + newLeafNode(this_LTE_0, grammarAccess.getIntegerValueLessThanEqualsAccess().getLTETerminalRuleCall_0()); + } + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getIntegerValueLessThanEqualsAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getIntegerValueLessThanEqualsAccess().getValueIntegerParserRuleCall_2_0()); + } + lv_value_2_0=ruleInteger + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getIntegerValueLessThanEqualsRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleDecimalValueEquals +entryRuleDecimalValueEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getDecimalValueEqualsRule()); } + iv_ruleDecimalValueEquals=ruleDecimalValueEquals + { $current=$iv_ruleDecimalValueEquals.current; } + EOF; + +// Rule DecimalValueEquals +ruleDecimalValueEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_EQUAL_0=RULE_EQUAL + { + newLeafNode(this_EQUAL_0, grammarAccess.getDecimalValueEqualsAccess().getEQUALTerminalRuleCall_0()); + } + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getDecimalValueEqualsAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getDecimalValueEqualsAccess().getValueDecimalParserRuleCall_2_0()); + } + lv_value_2_0=ruleDecimal + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getDecimalValueEqualsRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleDecimalValueNotEquals +entryRuleDecimalValueNotEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getDecimalValueNotEqualsRule()); } + iv_ruleDecimalValueNotEquals=ruleDecimalValueNotEquals + { $current=$iv_ruleDecimalValueNotEquals.current; } + EOF; + +// Rule DecimalValueNotEquals +ruleDecimalValueNotEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_NOT_EQUAL_0=RULE_NOT_EQUAL + { + newLeafNode(this_NOT_EQUAL_0, grammarAccess.getDecimalValueNotEqualsAccess().getNOT_EQUALTerminalRuleCall_0()); + } + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getDecimalValueNotEqualsAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getDecimalValueNotEqualsAccess().getValueDecimalParserRuleCall_2_0()); + } + lv_value_2_0=ruleDecimal + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getDecimalValueNotEqualsRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleDecimalValueGreaterThan +entryRuleDecimalValueGreaterThan returns [EObject current=null]: + { newCompositeNode(grammarAccess.getDecimalValueGreaterThanRule()); } + iv_ruleDecimalValueGreaterThan=ruleDecimalValueGreaterThan + { $current=$iv_ruleDecimalValueGreaterThan.current; } + EOF; + +// Rule DecimalValueGreaterThan +ruleDecimalValueGreaterThan returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_GT_0=RULE_GT + { + newLeafNode(this_GT_0, grammarAccess.getDecimalValueGreaterThanAccess().getGTTerminalRuleCall_0()); + } + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getDecimalValueGreaterThanAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getDecimalValueGreaterThanAccess().getValueDecimalParserRuleCall_2_0()); + } + lv_value_2_0=ruleDecimal + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getDecimalValueGreaterThanRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleDecimalValueLessThan +entryRuleDecimalValueLessThan returns [EObject current=null]: + { newCompositeNode(grammarAccess.getDecimalValueLessThanRule()); } + iv_ruleDecimalValueLessThan=ruleDecimalValueLessThan + { $current=$iv_ruleDecimalValueLessThan.current; } + EOF; + +// Rule DecimalValueLessThan +ruleDecimalValueLessThan returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_LT_0=RULE_LT + { + newLeafNode(this_LT_0, grammarAccess.getDecimalValueLessThanAccess().getLTTerminalRuleCall_0()); + } + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getDecimalValueLessThanAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getDecimalValueLessThanAccess().getValueDecimalParserRuleCall_2_0()); + } + lv_value_2_0=ruleDecimal + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getDecimalValueLessThanRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleDecimalValueGreaterThanEquals +entryRuleDecimalValueGreaterThanEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getDecimalValueGreaterThanEqualsRule()); } + iv_ruleDecimalValueGreaterThanEquals=ruleDecimalValueGreaterThanEquals + { $current=$iv_ruleDecimalValueGreaterThanEquals.current; } + EOF; + +// Rule DecimalValueGreaterThanEquals +ruleDecimalValueGreaterThanEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_GTE_0=RULE_GTE + { + newLeafNode(this_GTE_0, grammarAccess.getDecimalValueGreaterThanEqualsAccess().getGTETerminalRuleCall_0()); + } + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getDecimalValueGreaterThanEqualsAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getDecimalValueGreaterThanEqualsAccess().getValueDecimalParserRuleCall_2_0()); + } + lv_value_2_0=ruleDecimal + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getDecimalValueGreaterThanEqualsRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleDecimalValueLessThanEquals +entryRuleDecimalValueLessThanEquals returns [EObject current=null]: + { newCompositeNode(grammarAccess.getDecimalValueLessThanEqualsRule()); } + iv_ruleDecimalValueLessThanEquals=ruleDecimalValueLessThanEquals + { $current=$iv_ruleDecimalValueLessThanEquals.current; } + EOF; + +// Rule DecimalValueLessThanEquals +ruleDecimalValueLessThanEquals returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_LTE_0=RULE_LTE + { + newLeafNode(this_LTE_0, grammarAccess.getDecimalValueLessThanEqualsAccess().getLTETerminalRuleCall_0()); + } + this_HASH_1=RULE_HASH + { + newLeafNode(this_HASH_1, grammarAccess.getDecimalValueLessThanEqualsAccess().getHASHTerminalRuleCall_1()); + } + ( + ( + { + newCompositeNode(grammarAccess.getDecimalValueLessThanEqualsAccess().getValueDecimalParserRuleCall_2_0()); + } + lv_value_2_0=ruleDecimal + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getDecimalValueLessThanEqualsRule()); + } + set( + $current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + } + ) + ) + ) +; + +// Entry rule entryRuleNestedExpression +entryRuleNestedExpression returns [EObject current=null]: + { newCompositeNode(grammarAccess.getNestedExpressionRule()); } + iv_ruleNestedExpression=ruleNestedExpression + { $current=$iv_ruleNestedExpression.current; } + EOF; + +// Rule NestedExpression +ruleNestedExpression returns [EObject current=null] +@init { + enterRule(); +} +@after { + leaveRule(); +}: + ( + this_ROUND_OPEN_0=RULE_ROUND_OPEN + { + newLeafNode(this_ROUND_OPEN_0, grammarAccess.getNestedExpressionAccess().getROUND_OPENTerminalRuleCall_0()); + } + ( + ( + { + newCompositeNode(grammarAccess.getNestedExpressionAccess().getNestedExpressionConstraintParserRuleCall_1_0()); + } + lv_nested_1_0=ruleExpressionConstraint + { + if ($current==null) { + $current = createModelElementForParent(grammarAccess.getNestedExpressionRule()); + } + set( + $current, + "nested", + lv_nested_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.ExpressionConstraint"); + afterParserOrEnumRuleCall(); + } + ) + ) + this_ROUND_CLOSE_2=RULE_ROUND_CLOSE + { + newLeafNode(this_ROUND_CLOSE_2, grammarAccess.getNestedExpressionAccess().getROUND_CLOSETerminalRuleCall_2()); + } + ) +; + +// Entry rule entryRuleSnomedIdentifier +entryRuleSnomedIdentifier returns [String current=null]@init { + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +}: + { newCompositeNode(grammarAccess.getSnomedIdentifierRule()); } + iv_ruleSnomedIdentifier=ruleSnomedIdentifier + { $current=$iv_ruleSnomedIdentifier.current.getText(); } + EOF; +finally { + myHiddenTokenState.restore(); +} + +// Rule SnomedIdentifier +ruleSnomedIdentifier returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +} +@after { + leaveRule(); +}: + ( + this_DIGIT_NONZERO_0=RULE_DIGIT_NONZERO + { + $current.merge(this_DIGIT_NONZERO_0); + } + { + newLeafNode(this_DIGIT_NONZERO_0, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_0()); + } + ( + this_DIGIT_NONZERO_1=RULE_DIGIT_NONZERO + { + $current.merge(this_DIGIT_NONZERO_1); + } + { + newLeafNode(this_DIGIT_NONZERO_1, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_1_0()); + } + | + this_ZERO_2=RULE_ZERO + { + $current.merge(this_ZERO_2); + } + { + newLeafNode(this_ZERO_2, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_1_1()); + } + ) + ( + this_DIGIT_NONZERO_3=RULE_DIGIT_NONZERO + { + $current.merge(this_DIGIT_NONZERO_3); + } + { + newLeafNode(this_DIGIT_NONZERO_3, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_2_0()); + } + | + this_ZERO_4=RULE_ZERO + { + $current.merge(this_ZERO_4); + } + { + newLeafNode(this_ZERO_4, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_2_1()); + } + ) + ( + this_DIGIT_NONZERO_5=RULE_DIGIT_NONZERO + { + $current.merge(this_DIGIT_NONZERO_5); + } + { + newLeafNode(this_DIGIT_NONZERO_5, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_3_0()); + } + | + this_ZERO_6=RULE_ZERO + { + $current.merge(this_ZERO_6); + } + { + newLeafNode(this_ZERO_6, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_3_1()); + } + ) + ( + this_DIGIT_NONZERO_7=RULE_DIGIT_NONZERO + { + $current.merge(this_DIGIT_NONZERO_7); + } + { + newLeafNode(this_DIGIT_NONZERO_7, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_4_0()); + } + | + this_ZERO_8=RULE_ZERO + { + $current.merge(this_ZERO_8); + } + { + newLeafNode(this_ZERO_8, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_4_1()); + } + ) + ( + this_DIGIT_NONZERO_9=RULE_DIGIT_NONZERO + { + $current.merge(this_DIGIT_NONZERO_9); + } + { + newLeafNode(this_DIGIT_NONZERO_9, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_5_0()); + } + | + this_ZERO_10=RULE_ZERO + { + $current.merge(this_ZERO_10); + } + { + newLeafNode(this_ZERO_10, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_5_1()); + } + )+ + ) +; +finally { + myHiddenTokenState.restore(); +} + +// Entry rule entryRuleNonNegativeInteger +entryRuleNonNegativeInteger returns [String current=null]@init { + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +}: + { newCompositeNode(grammarAccess.getNonNegativeIntegerRule()); } + iv_ruleNonNegativeInteger=ruleNonNegativeInteger + { $current=$iv_ruleNonNegativeInteger.current.getText(); } + EOF; +finally { + myHiddenTokenState.restore(); +} + +// Rule NonNegativeInteger +ruleNonNegativeInteger returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +} +@after { + leaveRule(); +}: + ( + this_ZERO_0=RULE_ZERO + { + $current.merge(this_ZERO_0); + } + { + newLeafNode(this_ZERO_0, grammarAccess.getNonNegativeIntegerAccess().getZEROTerminalRuleCall_0()); + } + | + ( + this_DIGIT_NONZERO_1=RULE_DIGIT_NONZERO + { + $current.merge(this_DIGIT_NONZERO_1); + } + { + newLeafNode(this_DIGIT_NONZERO_1, grammarAccess.getNonNegativeIntegerAccess().getDIGIT_NONZEROTerminalRuleCall_1_0()); + } + ( + this_DIGIT_NONZERO_2=RULE_DIGIT_NONZERO + { + $current.merge(this_DIGIT_NONZERO_2); + } + { + newLeafNode(this_DIGIT_NONZERO_2, grammarAccess.getNonNegativeIntegerAccess().getDIGIT_NONZEROTerminalRuleCall_1_1_0()); + } + | + this_ZERO_3=RULE_ZERO + { + $current.merge(this_ZERO_3); + } + { + newLeafNode(this_ZERO_3, grammarAccess.getNonNegativeIntegerAccess().getZEROTerminalRuleCall_1_1_1()); + } + )* + ) + ) +; +finally { + myHiddenTokenState.restore(); +} + +// Entry rule entryRuleMaxValue +entryRuleMaxValue returns [String current=null]@init { + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +}: + { newCompositeNode(grammarAccess.getMaxValueRule()); } + iv_ruleMaxValue=ruleMaxValue + { $current=$iv_ruleMaxValue.current.getText(); } + EOF; +finally { + myHiddenTokenState.restore(); +} + +// Rule MaxValue +ruleMaxValue returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +} +@after { + leaveRule(); +}: + ( + { + newCompositeNode(grammarAccess.getMaxValueAccess().getNonNegativeIntegerParserRuleCall_0()); + } + this_NonNegativeInteger_0=ruleNonNegativeInteger + { + $current.merge(this_NonNegativeInteger_0); + } + { + afterParserOrEnumRuleCall(); + } + | + this_WILDCARD_1=RULE_WILDCARD + { + $current.merge(this_WILDCARD_1); + } + { + newLeafNode(this_WILDCARD_1, grammarAccess.getMaxValueAccess().getWILDCARDTerminalRuleCall_1()); + } + ) +; +finally { + myHiddenTokenState.restore(); +} + +// Entry rule entryRuleInteger +entryRuleInteger returns [String current=null]@init { + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +}: + { newCompositeNode(grammarAccess.getIntegerRule()); } + iv_ruleInteger=ruleInteger + { $current=$iv_ruleInteger.current.getText(); } + EOF; +finally { + myHiddenTokenState.restore(); +} + +// Rule Integer +ruleInteger returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +} +@after { + leaveRule(); +}: + ( + ( + this_PLUS_0=RULE_PLUS + { + $current.merge(this_PLUS_0); + } + { + newLeafNode(this_PLUS_0, grammarAccess.getIntegerAccess().getPLUSTerminalRuleCall_0_0()); + } + | + this_DASH_1=RULE_DASH + { + $current.merge(this_DASH_1); + } + { + newLeafNode(this_DASH_1, grammarAccess.getIntegerAccess().getDASHTerminalRuleCall_0_1()); + } + )? + { + newCompositeNode(grammarAccess.getIntegerAccess().getNonNegativeIntegerParserRuleCall_1()); + } + this_NonNegativeInteger_2=ruleNonNegativeInteger + { + $current.merge(this_NonNegativeInteger_2); + } + { + afterParserOrEnumRuleCall(); + } + ) +; +finally { + myHiddenTokenState.restore(); +} + +// Entry rule entryRuleDecimal +entryRuleDecimal returns [String current=null]@init { + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +}: + { newCompositeNode(grammarAccess.getDecimalRule()); } + iv_ruleDecimal=ruleDecimal + { $current=$iv_ruleDecimal.current.getText(); } + EOF; +finally { + myHiddenTokenState.restore(); +} + +// Rule Decimal +ruleDecimal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +} +@after { + leaveRule(); +}: + ( + ( + this_PLUS_0=RULE_PLUS + { + $current.merge(this_PLUS_0); + } + { + newLeafNode(this_PLUS_0, grammarAccess.getDecimalAccess().getPLUSTerminalRuleCall_0_0()); + } + | + this_DASH_1=RULE_DASH + { + $current.merge(this_DASH_1); + } + { + newLeafNode(this_DASH_1, grammarAccess.getDecimalAccess().getDASHTerminalRuleCall_0_1()); + } + )? + { + newCompositeNode(grammarAccess.getDecimalAccess().getNonNegativeDecimalParserRuleCall_1()); + } + this_NonNegativeDecimal_2=ruleNonNegativeDecimal + { + $current.merge(this_NonNegativeDecimal_2); + } + { + afterParserOrEnumRuleCall(); + } + ) +; +finally { + myHiddenTokenState.restore(); +} + +// Entry rule entryRuleNonNegativeDecimal +entryRuleNonNegativeDecimal returns [String current=null]@init { + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +}: + { newCompositeNode(grammarAccess.getNonNegativeDecimalRule()); } + iv_ruleNonNegativeDecimal=ruleNonNegativeDecimal + { $current=$iv_ruleNonNegativeDecimal.current.getText(); } + EOF; +finally { + myHiddenTokenState.restore(); +} + +// Rule NonNegativeDecimal +ruleNonNegativeDecimal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +} +@after { + leaveRule(); +}: + ( + { + newCompositeNode(grammarAccess.getNonNegativeDecimalAccess().getNonNegativeIntegerParserRuleCall_0()); + } + this_NonNegativeInteger_0=ruleNonNegativeInteger + { + $current.merge(this_NonNegativeInteger_0); + } + { + afterParserOrEnumRuleCall(); + } + this_DOT_1=RULE_DOT + { + $current.merge(this_DOT_1); + } + { + newLeafNode(this_DOT_1, grammarAccess.getNonNegativeDecimalAccess().getDOTTerminalRuleCall_1()); + } + ( + this_DIGIT_NONZERO_2=RULE_DIGIT_NONZERO + { + $current.merge(this_DIGIT_NONZERO_2); + } + { + newLeafNode(this_DIGIT_NONZERO_2, grammarAccess.getNonNegativeDecimalAccess().getDIGIT_NONZEROTerminalRuleCall_2_0()); + } + | + this_ZERO_3=RULE_ZERO + { + $current.merge(this_ZERO_3); + } + { + newLeafNode(this_ZERO_3, grammarAccess.getNonNegativeDecimalAccess().getZEROTerminalRuleCall_2_1()); + } + )* + ) +; +finally { + myHiddenTokenState.restore(); +} + +// Entry rule entryRuleBoolean +entryRuleBoolean returns [String current=null]@init { + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +}: + { newCompositeNode(grammarAccess.getBooleanRule()); } + iv_ruleBoolean=ruleBoolean + { $current=$iv_ruleBoolean.current.getText(); } + EOF; +finally { + myHiddenTokenState.restore(); +} + +// Rule Boolean +ruleBoolean returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] +@init { + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); +} +@after { + leaveRule(); +}: + ( + kw=True + { + $current.merge(kw); + newLeafNode(kw, grammarAccess.getBooleanAccess().getTrueKeyword_0()); + } + | + kw=False + { + $current.merge(kw); + newLeafNode(kw, grammarAccess.getBooleanAccess().getFalseKeyword_1()); + } + ) +; +finally { + myHiddenTokenState.restore(); +} diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/internal/InternalEtlParser.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/internal/InternalEtlParser.java new file mode 100644 index 00000000000..65365fa2e1d --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/internal/InternalEtlParser.java @@ -0,0 +1,18001 @@ +package com.b2international.snowowl.snomed.etl.parser.antlr.internal; + +import org.eclipse.xtext.*; +import org.eclipse.xtext.parser.*; +import org.eclipse.xtext.parser.impl.*; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; +import org.eclipse.xtext.parser.antlr.XtextTokenStream; +import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; +import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; +import com.b2international.snowowl.snomed.etl.services.EtlGrammarAccess; + + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +@SuppressWarnings("all") +public class InternalEtlParser extends AbstractInternalAntlrParser { + public static final String[] tokenNames = new String[] { + "", "", "", "", "False", "True", "RULE_DOUBLE_SQUARE_OPEN", "RULE_DOUBLE_SQUARE_CLOSE", "RULE_TILDE", "RULE_AT", "RULE_ID", "RULE_SCG", "RULE_TOK", "RULE_STR", "RULE_INT", "RULE_DEC", "RULE_EQUIVALENT_TO", "RULE_SUBTYPE_OF", "RULE_STRING", "RULE_WS", "RULE_SQUARE_OPEN", "RULE_SQUARE_CLOSE", "RULE_SLOTNAME_STRING", "RULE_TERM_STRING", "RULE_REVERSED", "RULE_TO", "RULE_COMMA", "RULE_CONJUNCTION", "RULE_DISJUNCTION", "RULE_EXCLUSION", "RULE_ZERO", "RULE_DIGIT_NONZERO", "RULE_COLON", "RULE_CURLY_OPEN", "RULE_CURLY_CLOSE", "RULE_ROUND_OPEN", "RULE_ROUND_CLOSE", "RULE_PLUS", "RULE_DASH", "RULE_CARET", "RULE_DOT", "RULE_WILDCARD", "RULE_EQUAL", "RULE_NOT_EQUAL", "RULE_LT", "RULE_GT", "RULE_DBL_LT", "RULE_DBL_GT", "RULE_LT_EM", "RULE_GT_EM", "RULE_GTE", "RULE_LTE", "RULE_HASH", "RULE_ML_COMMENT", "RULE_SL_COMMENT" + }; + public static final int RULE_DIGIT_NONZERO=31; + public static final int RULE_CURLY_OPEN=33; + public static final int RULE_TO=25; + public static final int RULE_ROUND_CLOSE=36; + public static final int RULE_DBL_GT=47; + public static final int True=5; + public static final int RULE_GT=45; + public static final int False=4; + public static final int RULE_SLOTNAME_STRING=22; + public static final int RULE_SCG=11; + public static final int RULE_GTE=50; + public static final int RULE_DOUBLE_SQUARE_OPEN=6; + public static final int RULE_EQUIVALENT_TO=16; + public static final int RULE_ROUND_OPEN=35; + public static final int RULE_DBL_LT=46; + public static final int RULE_NOT_EQUAL=43; + public static final int RULE_SQUARE_CLOSE=21; + public static final int RULE_ID=10; + public static final int RULE_SQUARE_OPEN=20; + public static final int RULE_EQUAL=42; + public static final int RULE_DEC=15; + public static final int RULE_COMMA=26; + public static final int RULE_LT_EM=48; + public static final int RULE_CURLY_CLOSE=34; + public static final int RULE_ZERO=30; + public static final int RULE_COLON=32; + public static final int RULE_TILDE=8; + public static final int RULE_LT=44; + public static final int RULE_INT=14; + public static final int RULE_ML_COMMENT=53; + public static final int RULE_DOUBLE_SQUARE_CLOSE=7; + public static final int RULE_LTE=51; + public static final int RULE_STRING=18; + public static final int RULE_AT=9; + public static final int RULE_REVERSED=24; + public static final int RULE_SL_COMMENT=54; + public static final int RULE_HASH=52; + public static final int RULE_TOK=12; + public static final int RULE_DASH=38; + public static final int RULE_PLUS=37; + public static final int RULE_DOT=40; + public static final int EOF=-1; + public static final int RULE_SUBTYPE_OF=17; + public static final int RULE_WS=19; + public static final int RULE_GT_EM=49; + public static final int RULE_EXCLUSION=29; + public static final int RULE_CARET=39; + public static final int RULE_CONJUNCTION=27; + public static final int RULE_STR=13; + public static final int RULE_WILDCARD=41; + public static final int RULE_DISJUNCTION=28; + public static final int RULE_TERM_STRING=23; + + // delegates + // delegators + + + public InternalEtlParser(TokenStream input) { + this(input, new RecognizerSharedState()); + } + public InternalEtlParser(TokenStream input, RecognizerSharedState state) { + super(input, state); + + } + + + public String[] getTokenNames() { return InternalEtlParser.tokenNames; } + public String getGrammarFileName() { return "InternalEtlParser.g"; } + + + + /* + This grammar contains a lot of empty actions to work around a bug in ANTLR. + Otherwise the ANTLR tool will create synpreds that cannot be compiled in some rare cases. + */ + + private EtlGrammarAccess grammarAccess; + + public InternalEtlParser(TokenStream input, EtlGrammarAccess grammarAccess) { + this(input); + this.grammarAccess = grammarAccess; + registerRules(grammarAccess.getGrammar()); + } + + @Override + protected String getFirstRuleName() { + return "ExpressionTemplate"; + } + + @Override + protected EtlGrammarAccess getGrammarAccess() { + return grammarAccess; + } + + + + + // $ANTLR start "entryRuleExpressionTemplate" + // InternalEtlParser.g:75:1: entryRuleExpressionTemplate returns [EObject current=null] : iv_ruleExpressionTemplate= ruleExpressionTemplate EOF ; + public final EObject entryRuleExpressionTemplate() throws RecognitionException { + EObject current = null; + + EObject iv_ruleExpressionTemplate = null; + + + try { + // InternalEtlParser.g:75:59: (iv_ruleExpressionTemplate= ruleExpressionTemplate EOF ) + // InternalEtlParser.g:76:2: iv_ruleExpressionTemplate= ruleExpressionTemplate EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getExpressionTemplateRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleExpressionTemplate=ruleExpressionTemplate(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleExpressionTemplate; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleExpressionTemplate" + + + // $ANTLR start "ruleExpressionTemplate" + // InternalEtlParser.g:82:1: ruleExpressionTemplate returns [EObject current=null] : ( () ( ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO ) | ( (lv_slot_3_0= ruleTokenReplacementSlot ) ) )? ( (lv_expression_4_0= ruleSubExpression ) ) )? ) ; + public final EObject ruleExpressionTemplate() throws RecognitionException { + EObject current = null; + + Token lv_primitive_1_0=null; + Token this_EQUIVALENT_TO_2=null; + EObject lv_slot_3_0 = null; + + EObject lv_expression_4_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:88:2: ( ( () ( ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO ) | ( (lv_slot_3_0= ruleTokenReplacementSlot ) ) )? ( (lv_expression_4_0= ruleSubExpression ) ) )? ) ) + // InternalEtlParser.g:89:2: ( () ( ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO ) | ( (lv_slot_3_0= ruleTokenReplacementSlot ) ) )? ( (lv_expression_4_0= ruleSubExpression ) ) )? ) + { + // InternalEtlParser.g:89:2: ( () ( ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO ) | ( (lv_slot_3_0= ruleTokenReplacementSlot ) ) )? ( (lv_expression_4_0= ruleSubExpression ) ) )? ) + // InternalEtlParser.g:90:3: () ( ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO ) | ( (lv_slot_3_0= ruleTokenReplacementSlot ) ) )? ( (lv_expression_4_0= ruleSubExpression ) ) )? + { + // InternalEtlParser.g:90:3: () + // InternalEtlParser.g:91:4: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElement( + grammarAccess.getExpressionTemplateAccess().getExpressionTemplateAction_0(), + current); + + } + + } + + // InternalEtlParser.g:100:3: ( ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO ) | ( (lv_slot_3_0= ruleTokenReplacementSlot ) ) )? ( (lv_expression_4_0= ruleSubExpression ) ) )? + int alt3=2; + int LA3_0 = input.LA(1); + + if ( (LA3_0==RULE_DOUBLE_SQUARE_OPEN||(LA3_0>=RULE_EQUIVALENT_TO && LA3_0<=RULE_SUBTYPE_OF)||LA3_0==RULE_DIGIT_NONZERO) ) { + alt3=1; + } + switch (alt3) { + case 1 : + // InternalEtlParser.g:101:4: ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO ) | ( (lv_slot_3_0= ruleTokenReplacementSlot ) ) )? ( (lv_expression_4_0= ruleSubExpression ) ) + { + // InternalEtlParser.g:101:4: ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO ) | ( (lv_slot_3_0= ruleTokenReplacementSlot ) ) )? + int alt2=3; + int LA2_0 = input.LA(1); + + if ( ((LA2_0>=RULE_EQUIVALENT_TO && LA2_0<=RULE_SUBTYPE_OF)) ) { + alt2=1; + } + else if ( (LA2_0==RULE_DOUBLE_SQUARE_OPEN) ) { + int LA2_2 = input.LA(2); + + if ( (LA2_2==RULE_PLUS) ) { + int LA2_4 = input.LA(3); + + if ( (LA2_4==RULE_TOK) ) { + alt2=2; + } + } + } + switch (alt2) { + case 1 : + // InternalEtlParser.g:102:5: ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO ) + { + // InternalEtlParser.g:102:5: ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO ) + int alt1=2; + int LA1_0 = input.LA(1); + + if ( (LA1_0==RULE_SUBTYPE_OF) ) { + alt1=1; + } + else if ( (LA1_0==RULE_EQUIVALENT_TO) ) { + alt1=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 1, 0, input); + + throw nvae; + } + switch (alt1) { + case 1 : + // InternalEtlParser.g:103:6: ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) + { + // InternalEtlParser.g:103:6: ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) + // InternalEtlParser.g:104:7: (lv_primitive_1_0= RULE_SUBTYPE_OF ) + { + // InternalEtlParser.g:104:7: (lv_primitive_1_0= RULE_SUBTYPE_OF ) + // InternalEtlParser.g:105:8: lv_primitive_1_0= RULE_SUBTYPE_OF + { + lv_primitive_1_0=(Token)match(input,RULE_SUBTYPE_OF,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_primitive_1_0, grammarAccess.getExpressionTemplateAccess().getPrimitiveSUBTYPE_OFTerminalRuleCall_1_0_0_0_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getExpressionTemplateRule()); + } + setWithLastConsumed( + current, + "primitive", + true, + "com.b2international.snowowl.snomed.etl.Etl.SUBTYPE_OF"); + + } + + } + + + } + + + } + break; + case 2 : + // InternalEtlParser.g:122:6: this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO + { + this_EQUIVALENT_TO_2=(Token)match(input,RULE_EQUIVALENT_TO,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_EQUIVALENT_TO_2, grammarAccess.getExpressionTemplateAccess().getEQUIVALENT_TOTerminalRuleCall_1_0_0_1()); + + } + + } + break; + + } + + + } + break; + case 2 : + // InternalEtlParser.g:128:5: ( (lv_slot_3_0= ruleTokenReplacementSlot ) ) + { + // InternalEtlParser.g:128:5: ( (lv_slot_3_0= ruleTokenReplacementSlot ) ) + // InternalEtlParser.g:129:6: (lv_slot_3_0= ruleTokenReplacementSlot ) + { + // InternalEtlParser.g:129:6: (lv_slot_3_0= ruleTokenReplacementSlot ) + // InternalEtlParser.g:130:7: lv_slot_3_0= ruleTokenReplacementSlot + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getExpressionTemplateAccess().getSlotTokenReplacementSlotParserRuleCall_1_0_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_3); + lv_slot_3_0=ruleTokenReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getExpressionTemplateRule()); + } + set( + current, + "slot", + lv_slot_3_0, + "com.b2international.snowowl.snomed.etl.Etl.TokenReplacementSlot"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + } + + // InternalEtlParser.g:148:4: ( (lv_expression_4_0= ruleSubExpression ) ) + // InternalEtlParser.g:149:5: (lv_expression_4_0= ruleSubExpression ) + { + // InternalEtlParser.g:149:5: (lv_expression_4_0= ruleSubExpression ) + // InternalEtlParser.g:150:6: lv_expression_4_0= ruleSubExpression + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getExpressionTemplateAccess().getExpressionSubExpressionParserRuleCall_1_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_expression_4_0=ruleSubExpression(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getExpressionTemplateRule()); + } + set( + current, + "expression", + lv_expression_4_0, + "com.b2international.snowowl.snomed.etl.Etl.SubExpression"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleExpressionTemplate" + + + // $ANTLR start "entryRuleSubExpression" + // InternalEtlParser.g:172:1: entryRuleSubExpression returns [EObject current=null] : iv_ruleSubExpression= ruleSubExpression EOF ; + public final EObject entryRuleSubExpression() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSubExpression = null; + + + try { + // InternalEtlParser.g:172:54: (iv_ruleSubExpression= ruleSubExpression EOF ) + // InternalEtlParser.g:173:2: iv_ruleSubExpression= ruleSubExpression EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSubExpressionRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSubExpression=ruleSubExpression(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSubExpression; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSubExpression" + + + // $ANTLR start "ruleSubExpression" + // InternalEtlParser.g:179:1: ruleSubExpression returns [EObject current=null] : ( ( (lv_focusConcepts_0_0= ruleFocusConcept ) ) (this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleFocusConcept ) ) )* (this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) )? ) ; + public final EObject ruleSubExpression() throws RecognitionException { + EObject current = null; + + Token this_PLUS_1=null; + Token this_COLON_3=null; + EObject lv_focusConcepts_0_0 = null; + + EObject lv_focusConcepts_2_0 = null; + + EObject lv_refinement_4_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:185:2: ( ( ( (lv_focusConcepts_0_0= ruleFocusConcept ) ) (this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleFocusConcept ) ) )* (this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) )? ) ) + // InternalEtlParser.g:186:2: ( ( (lv_focusConcepts_0_0= ruleFocusConcept ) ) (this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleFocusConcept ) ) )* (this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) )? ) + { + // InternalEtlParser.g:186:2: ( ( (lv_focusConcepts_0_0= ruleFocusConcept ) ) (this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleFocusConcept ) ) )* (this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) )? ) + // InternalEtlParser.g:187:3: ( (lv_focusConcepts_0_0= ruleFocusConcept ) ) (this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleFocusConcept ) ) )* (this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) )? + { + // InternalEtlParser.g:187:3: ( (lv_focusConcepts_0_0= ruleFocusConcept ) ) + // InternalEtlParser.g:188:4: (lv_focusConcepts_0_0= ruleFocusConcept ) + { + // InternalEtlParser.g:188:4: (lv_focusConcepts_0_0= ruleFocusConcept ) + // InternalEtlParser.g:189:5: lv_focusConcepts_0_0= ruleFocusConcept + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubExpressionAccess().getFocusConceptsFocusConceptParserRuleCall_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_4); + lv_focusConcepts_0_0=ruleFocusConcept(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSubExpressionRule()); + } + add( + current, + "focusConcepts", + lv_focusConcepts_0_0, + "com.b2international.snowowl.snomed.etl.Etl.FocusConcept"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + // InternalEtlParser.g:206:3: (this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleFocusConcept ) ) )* + loop4: + do { + int alt4=2; + int LA4_0 = input.LA(1); + + if ( (LA4_0==RULE_PLUS) ) { + alt4=1; + } + + + switch (alt4) { + case 1 : + // InternalEtlParser.g:207:4: this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleFocusConcept ) ) + { + this_PLUS_1=(Token)match(input,RULE_PLUS,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_PLUS_1, grammarAccess.getSubExpressionAccess().getPLUSTerminalRuleCall_1_0()); + + } + // InternalEtlParser.g:211:4: ( (lv_focusConcepts_2_0= ruleFocusConcept ) ) + // InternalEtlParser.g:212:5: (lv_focusConcepts_2_0= ruleFocusConcept ) + { + // InternalEtlParser.g:212:5: (lv_focusConcepts_2_0= ruleFocusConcept ) + // InternalEtlParser.g:213:6: lv_focusConcepts_2_0= ruleFocusConcept + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubExpressionAccess().getFocusConceptsFocusConceptParserRuleCall_1_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_4); + lv_focusConcepts_2_0=ruleFocusConcept(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSubExpressionRule()); + } + add( + current, + "focusConcepts", + lv_focusConcepts_2_0, + "com.b2international.snowowl.snomed.etl.Etl.FocusConcept"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + default : + break loop4; + } + } while (true); + + // InternalEtlParser.g:231:3: (this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) )? + int alt5=2; + int LA5_0 = input.LA(1); + + if ( (LA5_0==RULE_COLON) ) { + alt5=1; + } + switch (alt5) { + case 1 : + // InternalEtlParser.g:232:4: this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) + { + this_COLON_3=(Token)match(input,RULE_COLON,FollowSets000.FOLLOW_5); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_COLON_3, grammarAccess.getSubExpressionAccess().getCOLONTerminalRuleCall_2_0()); + + } + // InternalEtlParser.g:236:4: ( (lv_refinement_4_0= ruleRefinement ) ) + // InternalEtlParser.g:237:5: (lv_refinement_4_0= ruleRefinement ) + { + // InternalEtlParser.g:237:5: (lv_refinement_4_0= ruleRefinement ) + // InternalEtlParser.g:238:6: lv_refinement_4_0= ruleRefinement + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubExpressionAccess().getRefinementRefinementParserRuleCall_2_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_refinement_4_0=ruleRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSubExpressionRule()); + } + set( + current, + "refinement", + lv_refinement_4_0, + "com.b2international.snowowl.snomed.etl.Etl.Refinement"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSubExpression" + + + // $ANTLR start "entryRuleFocusConcept" + // InternalEtlParser.g:260:1: entryRuleFocusConcept returns [EObject current=null] : iv_ruleFocusConcept= ruleFocusConcept EOF ; + public final EObject entryRuleFocusConcept() throws RecognitionException { + EObject current = null; + + EObject iv_ruleFocusConcept = null; + + + try { + // InternalEtlParser.g:260:53: (iv_ruleFocusConcept= ruleFocusConcept EOF ) + // InternalEtlParser.g:261:2: iv_ruleFocusConcept= ruleFocusConcept EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getFocusConceptRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleFocusConcept=ruleFocusConcept(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleFocusConcept; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleFocusConcept" + + + // $ANTLR start "ruleFocusConcept" + // InternalEtlParser.g:267:1: ruleFocusConcept returns [EObject current=null] : ( ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? ( (lv_concept_1_0= ruleConceptReference ) ) ) ; + public final EObject ruleFocusConcept() throws RecognitionException { + EObject current = null; + + EObject lv_slot_0_0 = null; + + EObject lv_concept_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:273:2: ( ( ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? ( (lv_concept_1_0= ruleConceptReference ) ) ) ) + // InternalEtlParser.g:274:2: ( ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? ( (lv_concept_1_0= ruleConceptReference ) ) ) + { + // InternalEtlParser.g:274:2: ( ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? ( (lv_concept_1_0= ruleConceptReference ) ) ) + // InternalEtlParser.g:275:3: ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? ( (lv_concept_1_0= ruleConceptReference ) ) + { + // InternalEtlParser.g:275:3: ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? + int alt6=2; + int LA6_0 = input.LA(1); + + if ( (LA6_0==RULE_DOUBLE_SQUARE_OPEN) ) { + int LA6_1 = input.LA(2); + + if ( ((LA6_1>=RULE_DOUBLE_SQUARE_CLOSE && LA6_1<=RULE_TILDE)||LA6_1==RULE_SLOTNAME_STRING||(LA6_1>=RULE_ZERO && LA6_1<=RULE_DIGIT_NONZERO)) ) { + alt6=1; + } + } + switch (alt6) { + case 1 : + // InternalEtlParser.g:276:4: (lv_slot_0_0= ruleTemplateInformationSlot ) + { + // InternalEtlParser.g:276:4: (lv_slot_0_0= ruleTemplateInformationSlot ) + // InternalEtlParser.g:277:5: lv_slot_0_0= ruleTemplateInformationSlot + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getFocusConceptAccess().getSlotTemplateInformationSlotParserRuleCall_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_3); + lv_slot_0_0=ruleTemplateInformationSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getFocusConceptRule()); + } + set( + current, + "slot", + lv_slot_0_0, + "com.b2international.snowowl.snomed.etl.Etl.TemplateInformationSlot"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + break; + + } + + // InternalEtlParser.g:294:3: ( (lv_concept_1_0= ruleConceptReference ) ) + // InternalEtlParser.g:295:4: (lv_concept_1_0= ruleConceptReference ) + { + // InternalEtlParser.g:295:4: (lv_concept_1_0= ruleConceptReference ) + // InternalEtlParser.g:296:5: lv_concept_1_0= ruleConceptReference + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getFocusConceptAccess().getConceptConceptReferenceParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_concept_1_0=ruleConceptReference(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getFocusConceptRule()); + } + set( + current, + "concept", + lv_concept_1_0, + "com.b2international.snowowl.snomed.etl.Etl.ConceptReference"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleFocusConcept" + + + // $ANTLR start "entryRuleRefinement" + // InternalEtlParser.g:317:1: entryRuleRefinement returns [EObject current=null] : iv_ruleRefinement= ruleRefinement EOF ; + public final EObject entryRuleRefinement() throws RecognitionException { + EObject current = null; + + EObject iv_ruleRefinement = null; + + + try { + // InternalEtlParser.g:317:51: (iv_ruleRefinement= ruleRefinement EOF ) + // InternalEtlParser.g:318:2: iv_ruleRefinement= ruleRefinement EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getRefinementRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleRefinement=ruleRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleRefinement; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleRefinement" + + + // $ANTLR start "ruleRefinement" + // InternalEtlParser.g:324:1: ruleRefinement returns [EObject current=null] : ( ( ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) | ( (lv_groups_3_0= ruleAttributeGroup ) ) ) ( (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) )* ) ; + public final EObject ruleRefinement() throws RecognitionException { + EObject current = null; + + Token this_COMMA_1=null; + Token this_COMMA_4=null; + EObject lv_attributes_0_0 = null; + + EObject lv_attributes_2_0 = null; + + EObject lv_groups_3_0 = null; + + EObject lv_groups_5_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:330:2: ( ( ( ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) | ( (lv_groups_3_0= ruleAttributeGroup ) ) ) ( (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) )* ) ) + // InternalEtlParser.g:331:2: ( ( ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) | ( (lv_groups_3_0= ruleAttributeGroup ) ) ) ( (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) )* ) + { + // InternalEtlParser.g:331:2: ( ( ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) | ( (lv_groups_3_0= ruleAttributeGroup ) ) ) ( (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) )* ) + // InternalEtlParser.g:332:3: ( ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) | ( (lv_groups_3_0= ruleAttributeGroup ) ) ) ( (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) )* + { + // InternalEtlParser.g:332:3: ( ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) | ( (lv_groups_3_0= ruleAttributeGroup ) ) ) + int alt8=2; + alt8 = dfa8.predict(input); + switch (alt8) { + case 1 : + // InternalEtlParser.g:333:4: ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) + { + // InternalEtlParser.g:333:4: ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) + // InternalEtlParser.g:334:5: ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* + { + // InternalEtlParser.g:334:5: ( (lv_attributes_0_0= ruleAttribute ) ) + // InternalEtlParser.g:335:6: (lv_attributes_0_0= ruleAttribute ) + { + // InternalEtlParser.g:335:6: (lv_attributes_0_0= ruleAttribute ) + // InternalEtlParser.g:336:7: lv_attributes_0_0= ruleAttribute + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getRefinementAccess().getAttributesAttributeParserRuleCall_0_0_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_6); + lv_attributes_0_0=ruleAttribute(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getRefinementRule()); + } + add( + current, + "attributes", + lv_attributes_0_0, + "com.b2international.snowowl.snomed.etl.Etl.Attribute"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + // InternalEtlParser.g:353:5: (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* + loop7: + do { + int alt7=2; + alt7 = dfa7.predict(input); + switch (alt7) { + case 1 : + // InternalEtlParser.g:354:6: this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) + { + this_COMMA_1=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_COMMA_1, grammarAccess.getRefinementAccess().getCOMMATerminalRuleCall_0_0_1_0()); + + } + // InternalEtlParser.g:358:6: ( (lv_attributes_2_0= ruleAttribute ) ) + // InternalEtlParser.g:359:7: (lv_attributes_2_0= ruleAttribute ) + { + // InternalEtlParser.g:359:7: (lv_attributes_2_0= ruleAttribute ) + // InternalEtlParser.g:360:8: lv_attributes_2_0= ruleAttribute + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getRefinementAccess().getAttributesAttributeParserRuleCall_0_0_1_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_6); + lv_attributes_2_0=ruleAttribute(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getRefinementRule()); + } + add( + current, + "attributes", + lv_attributes_2_0, + "com.b2international.snowowl.snomed.etl.Etl.Attribute"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + default : + break loop7; + } + } while (true); + + + } + + + } + break; + case 2 : + // InternalEtlParser.g:380:4: ( (lv_groups_3_0= ruleAttributeGroup ) ) + { + // InternalEtlParser.g:380:4: ( (lv_groups_3_0= ruleAttributeGroup ) ) + // InternalEtlParser.g:381:5: (lv_groups_3_0= ruleAttributeGroup ) + { + // InternalEtlParser.g:381:5: (lv_groups_3_0= ruleAttributeGroup ) + // InternalEtlParser.g:382:6: lv_groups_3_0= ruleAttributeGroup + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getRefinementAccess().getGroupsAttributeGroupParserRuleCall_0_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_6); + lv_groups_3_0=ruleAttributeGroup(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getRefinementRule()); + } + add( + current, + "groups", + lv_groups_3_0, + "com.b2international.snowowl.snomed.etl.Etl.AttributeGroup"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + } + + // InternalEtlParser.g:400:3: ( (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) )* + loop10: + do { + int alt10=2; + int LA10_0 = input.LA(1); + + if ( (LA10_0==RULE_DOUBLE_SQUARE_OPEN||LA10_0==RULE_COMMA||LA10_0==RULE_CURLY_OPEN) ) { + alt10=1; + } + + + switch (alt10) { + case 1 : + // InternalEtlParser.g:401:4: (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) + { + // InternalEtlParser.g:401:4: (this_COMMA_4= RULE_COMMA )? + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0==RULE_COMMA) ) { + alt9=1; + } + switch (alt9) { + case 1 : + // InternalEtlParser.g:402:5: this_COMMA_4= RULE_COMMA + { + this_COMMA_4=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_5); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_COMMA_4, grammarAccess.getRefinementAccess().getCOMMATerminalRuleCall_1_0()); + + } + + } + break; + + } + + // InternalEtlParser.g:407:4: ( (lv_groups_5_0= ruleAttributeGroup ) ) + // InternalEtlParser.g:408:5: (lv_groups_5_0= ruleAttributeGroup ) + { + // InternalEtlParser.g:408:5: (lv_groups_5_0= ruleAttributeGroup ) + // InternalEtlParser.g:409:6: lv_groups_5_0= ruleAttributeGroup + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getRefinementAccess().getGroupsAttributeGroupParserRuleCall_1_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_6); + lv_groups_5_0=ruleAttributeGroup(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getRefinementRule()); + } + add( + current, + "groups", + lv_groups_5_0, + "com.b2international.snowowl.snomed.etl.Etl.AttributeGroup"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + default : + break loop10; + } + } while (true); + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleRefinement" + + + // $ANTLR start "entryRuleAttributeGroup" + // InternalEtlParser.g:431:1: entryRuleAttributeGroup returns [EObject current=null] : iv_ruleAttributeGroup= ruleAttributeGroup EOF ; + public final EObject entryRuleAttributeGroup() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAttributeGroup = null; + + + try { + // InternalEtlParser.g:431:55: (iv_ruleAttributeGroup= ruleAttributeGroup EOF ) + // InternalEtlParser.g:432:2: iv_ruleAttributeGroup= ruleAttributeGroup EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAttributeGroupRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAttributeGroup=ruleAttributeGroup(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAttributeGroup; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAttributeGroup" + + + // $ANTLR start "ruleAttributeGroup" + // InternalEtlParser.g:438:1: ruleAttributeGroup returns [EObject current=null] : ( ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_attributes_2_0= ruleAttribute ) ) (this_COMMA_3= RULE_COMMA ( (lv_attributes_4_0= ruleAttribute ) ) )* this_CURLY_CLOSE_5= RULE_CURLY_CLOSE ) ; + public final EObject ruleAttributeGroup() throws RecognitionException { + EObject current = null; + + Token this_CURLY_OPEN_1=null; + Token this_COMMA_3=null; + Token this_CURLY_CLOSE_5=null; + EObject lv_slot_0_0 = null; + + EObject lv_attributes_2_0 = null; + + EObject lv_attributes_4_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:444:2: ( ( ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_attributes_2_0= ruleAttribute ) ) (this_COMMA_3= RULE_COMMA ( (lv_attributes_4_0= ruleAttribute ) ) )* this_CURLY_CLOSE_5= RULE_CURLY_CLOSE ) ) + // InternalEtlParser.g:445:2: ( ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_attributes_2_0= ruleAttribute ) ) (this_COMMA_3= RULE_COMMA ( (lv_attributes_4_0= ruleAttribute ) ) )* this_CURLY_CLOSE_5= RULE_CURLY_CLOSE ) + { + // InternalEtlParser.g:445:2: ( ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_attributes_2_0= ruleAttribute ) ) (this_COMMA_3= RULE_COMMA ( (lv_attributes_4_0= ruleAttribute ) ) )* this_CURLY_CLOSE_5= RULE_CURLY_CLOSE ) + // InternalEtlParser.g:446:3: ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_attributes_2_0= ruleAttribute ) ) (this_COMMA_3= RULE_COMMA ( (lv_attributes_4_0= ruleAttribute ) ) )* this_CURLY_CLOSE_5= RULE_CURLY_CLOSE + { + // InternalEtlParser.g:446:3: ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? + int alt11=2; + int LA11_0 = input.LA(1); + + if ( (LA11_0==RULE_DOUBLE_SQUARE_OPEN) ) { + alt11=1; + } + switch (alt11) { + case 1 : + // InternalEtlParser.g:447:4: (lv_slot_0_0= ruleTemplateInformationSlot ) + { + // InternalEtlParser.g:447:4: (lv_slot_0_0= ruleTemplateInformationSlot ) + // InternalEtlParser.g:448:5: lv_slot_0_0= ruleTemplateInformationSlot + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeGroupAccess().getSlotTemplateInformationSlotParserRuleCall_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_7); + lv_slot_0_0=ruleTemplateInformationSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + } + set( + current, + "slot", + lv_slot_0_0, + "com.b2international.snowowl.snomed.etl.Etl.TemplateInformationSlot"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + break; + + } + + this_CURLY_OPEN_1=(Token)match(input,RULE_CURLY_OPEN,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_CURLY_OPEN_1, grammarAccess.getAttributeGroupAccess().getCURLY_OPENTerminalRuleCall_1()); + + } + // InternalEtlParser.g:469:3: ( (lv_attributes_2_0= ruleAttribute ) ) + // InternalEtlParser.g:470:4: (lv_attributes_2_0= ruleAttribute ) + { + // InternalEtlParser.g:470:4: (lv_attributes_2_0= ruleAttribute ) + // InternalEtlParser.g:471:5: lv_attributes_2_0= ruleAttribute + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeGroupAccess().getAttributesAttributeParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_8); + lv_attributes_2_0=ruleAttribute(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + } + add( + current, + "attributes", + lv_attributes_2_0, + "com.b2international.snowowl.snomed.etl.Etl.Attribute"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + // InternalEtlParser.g:488:3: (this_COMMA_3= RULE_COMMA ( (lv_attributes_4_0= ruleAttribute ) ) )* + loop12: + do { + int alt12=2; + int LA12_0 = input.LA(1); + + if ( (LA12_0==RULE_COMMA) ) { + alt12=1; + } + + + switch (alt12) { + case 1 : + // InternalEtlParser.g:489:4: this_COMMA_3= RULE_COMMA ( (lv_attributes_4_0= ruleAttribute ) ) + { + this_COMMA_3=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_COMMA_3, grammarAccess.getAttributeGroupAccess().getCOMMATerminalRuleCall_3_0()); + + } + // InternalEtlParser.g:493:4: ( (lv_attributes_4_0= ruleAttribute ) ) + // InternalEtlParser.g:494:5: (lv_attributes_4_0= ruleAttribute ) + { + // InternalEtlParser.g:494:5: (lv_attributes_4_0= ruleAttribute ) + // InternalEtlParser.g:495:6: lv_attributes_4_0= ruleAttribute + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeGroupAccess().getAttributesAttributeParserRuleCall_3_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_8); + lv_attributes_4_0=ruleAttribute(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + } + add( + current, + "attributes", + lv_attributes_4_0, + "com.b2international.snowowl.snomed.etl.Etl.Attribute"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + default : + break loop12; + } + } while (true); + + this_CURLY_CLOSE_5=(Token)match(input,RULE_CURLY_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_CURLY_CLOSE_5, grammarAccess.getAttributeGroupAccess().getCURLY_CLOSETerminalRuleCall_4()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAttributeGroup" + + + // $ANTLR start "entryRuleAttribute" + // InternalEtlParser.g:521:1: entryRuleAttribute returns [EObject current=null] : iv_ruleAttribute= ruleAttribute EOF ; + public final EObject entryRuleAttribute() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAttribute = null; + + + try { + // InternalEtlParser.g:521:50: (iv_ruleAttribute= ruleAttribute EOF ) + // InternalEtlParser.g:522:2: iv_ruleAttribute= ruleAttribute EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAttributeRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAttribute=ruleAttribute(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAttribute; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAttribute" + + + // $ANTLR start "ruleAttribute" + // InternalEtlParser.g:528:1: ruleAttribute returns [EObject current=null] : ( ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? ( (lv_name_1_0= ruleConceptReference ) ) this_EQUAL_2= RULE_EQUAL ( (lv_value_3_0= ruleAttributeValue ) ) ) ; + public final EObject ruleAttribute() throws RecognitionException { + EObject current = null; + + Token this_EQUAL_2=null; + EObject lv_slot_0_0 = null; + + EObject lv_name_1_0 = null; + + EObject lv_value_3_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:534:2: ( ( ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? ( (lv_name_1_0= ruleConceptReference ) ) this_EQUAL_2= RULE_EQUAL ( (lv_value_3_0= ruleAttributeValue ) ) ) ) + // InternalEtlParser.g:535:2: ( ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? ( (lv_name_1_0= ruleConceptReference ) ) this_EQUAL_2= RULE_EQUAL ( (lv_value_3_0= ruleAttributeValue ) ) ) + { + // InternalEtlParser.g:535:2: ( ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? ( (lv_name_1_0= ruleConceptReference ) ) this_EQUAL_2= RULE_EQUAL ( (lv_value_3_0= ruleAttributeValue ) ) ) + // InternalEtlParser.g:536:3: ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? ( (lv_name_1_0= ruleConceptReference ) ) this_EQUAL_2= RULE_EQUAL ( (lv_value_3_0= ruleAttributeValue ) ) + { + // InternalEtlParser.g:536:3: ( (lv_slot_0_0= ruleTemplateInformationSlot ) )? + int alt13=2; + int LA13_0 = input.LA(1); + + if ( (LA13_0==RULE_DOUBLE_SQUARE_OPEN) ) { + int LA13_1 = input.LA(2); + + if ( ((LA13_1>=RULE_DOUBLE_SQUARE_CLOSE && LA13_1<=RULE_TILDE)||LA13_1==RULE_SLOTNAME_STRING||(LA13_1>=RULE_ZERO && LA13_1<=RULE_DIGIT_NONZERO)) ) { + alt13=1; + } + } + switch (alt13) { + case 1 : + // InternalEtlParser.g:537:4: (lv_slot_0_0= ruleTemplateInformationSlot ) + { + // InternalEtlParser.g:537:4: (lv_slot_0_0= ruleTemplateInformationSlot ) + // InternalEtlParser.g:538:5: lv_slot_0_0= ruleTemplateInformationSlot + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeAccess().getSlotTemplateInformationSlotParserRuleCall_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_3); + lv_slot_0_0=ruleTemplateInformationSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeRule()); + } + set( + current, + "slot", + lv_slot_0_0, + "com.b2international.snowowl.snomed.etl.Etl.TemplateInformationSlot"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + break; + + } + + // InternalEtlParser.g:555:3: ( (lv_name_1_0= ruleConceptReference ) ) + // InternalEtlParser.g:556:4: (lv_name_1_0= ruleConceptReference ) + { + // InternalEtlParser.g:556:4: (lv_name_1_0= ruleConceptReference ) + // InternalEtlParser.g:557:5: lv_name_1_0= ruleConceptReference + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeAccess().getNameConceptReferenceParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_9); + lv_name_1_0=ruleConceptReference(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeRule()); + } + set( + current, + "name", + lv_name_1_0, + "com.b2international.snowowl.snomed.etl.Etl.ConceptReference"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + this_EQUAL_2=(Token)match(input,RULE_EQUAL,FollowSets000.FOLLOW_10); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_EQUAL_2, grammarAccess.getAttributeAccess().getEQUALTerminalRuleCall_2()); + + } + // InternalEtlParser.g:578:3: ( (lv_value_3_0= ruleAttributeValue ) ) + // InternalEtlParser.g:579:4: (lv_value_3_0= ruleAttributeValue ) + { + // InternalEtlParser.g:579:4: (lv_value_3_0= ruleAttributeValue ) + // InternalEtlParser.g:580:5: lv_value_3_0= ruleAttributeValue + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeAccess().getValueAttributeValueParserRuleCall_3_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_3_0=ruleAttributeValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeRule()); + } + set( + current, + "value", + lv_value_3_0, + "com.b2international.snowowl.snomed.etl.Etl.AttributeValue"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAttribute" + + + // $ANTLR start "entryRuleAttributeValue" + // InternalEtlParser.g:601:1: entryRuleAttributeValue returns [EObject current=null] : iv_ruleAttributeValue= ruleAttributeValue EOF ; + public final EObject entryRuleAttributeValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAttributeValue = null; + + + try { + // InternalEtlParser.g:601:55: (iv_ruleAttributeValue= ruleAttributeValue EOF ) + // InternalEtlParser.g:602:2: iv_ruleAttributeValue= ruleAttributeValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAttributeValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAttributeValue=ruleAttributeValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAttributeValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAttributeValue" + + + // $ANTLR start "ruleAttributeValue" + // InternalEtlParser.g:608:1: ruleAttributeValue returns [EObject current=null] : (this_ConceptReference_0= ruleConceptReference | (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) | this_StringValue_4= ruleStringValue | this_IntegerValue_5= ruleIntegerValue | this_DecimalValue_6= ruleDecimalValue | this_ConcreteValueReplacementSlot_7= ruleConcreteValueReplacementSlot ) ; + public final EObject ruleAttributeValue() throws RecognitionException { + EObject current = null; + + Token this_ROUND_OPEN_1=null; + Token this_ROUND_CLOSE_3=null; + EObject this_ConceptReference_0 = null; + + EObject this_SubExpression_2 = null; + + EObject this_StringValue_4 = null; + + EObject this_IntegerValue_5 = null; + + EObject this_DecimalValue_6 = null; + + EObject this_ConcreteValueReplacementSlot_7 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:614:2: ( (this_ConceptReference_0= ruleConceptReference | (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) | this_StringValue_4= ruleStringValue | this_IntegerValue_5= ruleIntegerValue | this_DecimalValue_6= ruleDecimalValue | this_ConcreteValueReplacementSlot_7= ruleConcreteValueReplacementSlot ) ) + // InternalEtlParser.g:615:2: (this_ConceptReference_0= ruleConceptReference | (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) | this_StringValue_4= ruleStringValue | this_IntegerValue_5= ruleIntegerValue | this_DecimalValue_6= ruleDecimalValue | this_ConcreteValueReplacementSlot_7= ruleConcreteValueReplacementSlot ) + { + // InternalEtlParser.g:615:2: (this_ConceptReference_0= ruleConceptReference | (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) | this_StringValue_4= ruleStringValue | this_IntegerValue_5= ruleIntegerValue | this_DecimalValue_6= ruleDecimalValue | this_ConcreteValueReplacementSlot_7= ruleConcreteValueReplacementSlot ) + int alt14=6; + alt14 = dfa14.predict(input); + switch (alt14) { + case 1 : + // InternalEtlParser.g:616:3: this_ConceptReference_0= ruleConceptReference + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeValueAccess().getConceptReferenceParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_ConceptReference_0=ruleConceptReference(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_ConceptReference_0; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:628:3: (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) + { + // InternalEtlParser.g:628:3: (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) + // InternalEtlParser.g:629:4: this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE + { + this_ROUND_OPEN_1=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_OPEN_1, grammarAccess.getAttributeValueAccess().getROUND_OPENTerminalRuleCall_1_0()); + + } + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeValueAccess().getSubExpressionParserRuleCall_1_1()); + + } + pushFollow(FollowSets000.FOLLOW_11); + this_SubExpression_2=ruleSubExpression(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_SubExpression_2; + afterParserOrEnumRuleCall(); + + } + this_ROUND_CLOSE_3=(Token)match(input,RULE_ROUND_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_CLOSE_3, grammarAccess.getAttributeValueAccess().getROUND_CLOSETerminalRuleCall_1_2()); + + } + + } + + + } + break; + case 3 : + // InternalEtlParser.g:650:3: this_StringValue_4= ruleStringValue + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeValueAccess().getStringValueParserRuleCall_2()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_StringValue_4=ruleStringValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_StringValue_4; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 4 : + // InternalEtlParser.g:662:3: this_IntegerValue_5= ruleIntegerValue + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeValueAccess().getIntegerValueParserRuleCall_3()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_IntegerValue_5=ruleIntegerValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_IntegerValue_5; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 5 : + // InternalEtlParser.g:674:3: this_DecimalValue_6= ruleDecimalValue + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeValueAccess().getDecimalValueParserRuleCall_4()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_DecimalValue_6=ruleDecimalValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_DecimalValue_6; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 6 : + // InternalEtlParser.g:686:3: this_ConcreteValueReplacementSlot_7= ruleConcreteValueReplacementSlot + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeValueAccess().getConcreteValueReplacementSlotParserRuleCall_5()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_ConcreteValueReplacementSlot_7=ruleConcreteValueReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_ConcreteValueReplacementSlot_7; + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAttributeValue" + + + // $ANTLR start "entryRuleConceptIdReplacementSlot" + // InternalEtlParser.g:701:1: entryRuleConceptIdReplacementSlot returns [EObject current=null] : iv_ruleConceptIdReplacementSlot= ruleConceptIdReplacementSlot EOF ; + public final EObject entryRuleConceptIdReplacementSlot() throws RecognitionException { + EObject current = null; + + EObject iv_ruleConceptIdReplacementSlot = null; + + + try { + // InternalEtlParser.g:701:65: (iv_ruleConceptIdReplacementSlot= ruleConceptIdReplacementSlot EOF ) + // InternalEtlParser.g:702:2: iv_ruleConceptIdReplacementSlot= ruleConceptIdReplacementSlot EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getConceptIdReplacementSlotRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleConceptIdReplacementSlot=ruleConceptIdReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleConceptIdReplacementSlot; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleConceptIdReplacementSlot" + + + // $ANTLR start "ruleConceptIdReplacementSlot" + // InternalEtlParser.g:708:1: ruleConceptIdReplacementSlot returns [EObject current=null] : ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_ID_3= RULE_ID (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE )? ( (lv_name_7_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_8= RULE_DOUBLE_SQUARE_CLOSE ) ; + public final EObject ruleConceptIdReplacementSlot() throws RecognitionException { + EObject current = null; + + Token this_DOUBLE_SQUARE_OPEN_1=null; + Token this_PLUS_2=null; + Token this_ID_3=null; + Token this_ROUND_OPEN_4=null; + Token this_ROUND_CLOSE_6=null; + Token lv_name_7_0=null; + Token this_DOUBLE_SQUARE_CLOSE_8=null; + EObject lv_constraint_5_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:714:2: ( ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_ID_3= RULE_ID (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE )? ( (lv_name_7_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_8= RULE_DOUBLE_SQUARE_CLOSE ) ) + // InternalEtlParser.g:715:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_ID_3= RULE_ID (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE )? ( (lv_name_7_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_8= RULE_DOUBLE_SQUARE_CLOSE ) + { + // InternalEtlParser.g:715:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_ID_3= RULE_ID (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE )? ( (lv_name_7_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_8= RULE_DOUBLE_SQUARE_CLOSE ) + // InternalEtlParser.g:716:3: () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_ID_3= RULE_ID (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE )? ( (lv_name_7_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_8= RULE_DOUBLE_SQUARE_CLOSE + { + // InternalEtlParser.g:716:3: () + // InternalEtlParser.g:717:4: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElement( + grammarAccess.getConceptIdReplacementSlotAccess().getConceptIdReplacementSlotAction_0(), + current); + + } + + } + + this_DOUBLE_SQUARE_OPEN_1=(Token)match(input,RULE_DOUBLE_SQUARE_OPEN,FollowSets000.FOLLOW_12); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getConceptIdReplacementSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + + } + this_PLUS_2=(Token)match(input,RULE_PLUS,FollowSets000.FOLLOW_13); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_PLUS_2, grammarAccess.getConceptIdReplacementSlotAccess().getPLUSTerminalRuleCall_2()); + + } + this_ID_3=(Token)match(input,RULE_ID,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ID_3, grammarAccess.getConceptIdReplacementSlotAccess().getIDTerminalRuleCall_3()); + + } + // InternalEtlParser.g:738:3: (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE )? + int alt15=2; + int LA15_0 = input.LA(1); + + if ( (LA15_0==RULE_ROUND_OPEN) ) { + alt15=1; + } + switch (alt15) { + case 1 : + // InternalEtlParser.g:739:4: this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE + { + this_ROUND_OPEN_4=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_OPEN_4, grammarAccess.getConceptIdReplacementSlotAccess().getROUND_OPENTerminalRuleCall_4_0()); + + } + // InternalEtlParser.g:743:4: ( (lv_constraint_5_0= ruleExpressionConstraint ) ) + // InternalEtlParser.g:744:5: (lv_constraint_5_0= ruleExpressionConstraint ) + { + // InternalEtlParser.g:744:5: (lv_constraint_5_0= ruleExpressionConstraint ) + // InternalEtlParser.g:745:6: lv_constraint_5_0= ruleExpressionConstraint + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getConceptIdReplacementSlotAccess().getConstraintExpressionConstraintParserRuleCall_4_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_11); + lv_constraint_5_0=ruleExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getConceptIdReplacementSlotRule()); + } + set( + current, + "constraint", + lv_constraint_5_0, + "com.b2international.snowowl.snomed.ecl.Ecl.ExpressionConstraint"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + this_ROUND_CLOSE_6=(Token)match(input,RULE_ROUND_CLOSE,FollowSets000.FOLLOW_16); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_CLOSE_6, grammarAccess.getConceptIdReplacementSlotAccess().getROUND_CLOSETerminalRuleCall_4_2()); + + } + + } + break; + + } + + // InternalEtlParser.g:767:3: ( (lv_name_7_0= RULE_SLOTNAME_STRING ) )? + int alt16=2; + int LA16_0 = input.LA(1); + + if ( (LA16_0==RULE_SLOTNAME_STRING) ) { + alt16=1; + } + switch (alt16) { + case 1 : + // InternalEtlParser.g:768:4: (lv_name_7_0= RULE_SLOTNAME_STRING ) + { + // InternalEtlParser.g:768:4: (lv_name_7_0= RULE_SLOTNAME_STRING ) + // InternalEtlParser.g:769:5: lv_name_7_0= RULE_SLOTNAME_STRING + { + lv_name_7_0=(Token)match(input,RULE_SLOTNAME_STRING,FollowSets000.FOLLOW_17); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_name_7_0, grammarAccess.getConceptIdReplacementSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_5_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getConceptIdReplacementSlotRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_7_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + + } + + } + + + } + break; + + } + + this_DOUBLE_SQUARE_CLOSE_8=(Token)match(input,RULE_DOUBLE_SQUARE_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_CLOSE_8, grammarAccess.getConceptIdReplacementSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_6()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleConceptIdReplacementSlot" + + + // $ANTLR start "entryRuleExpressionReplacementSlot" + // InternalEtlParser.g:793:1: entryRuleExpressionReplacementSlot returns [EObject current=null] : iv_ruleExpressionReplacementSlot= ruleExpressionReplacementSlot EOF ; + public final EObject entryRuleExpressionReplacementSlot() throws RecognitionException { + EObject current = null; + + EObject iv_ruleExpressionReplacementSlot = null; + + + try { + // InternalEtlParser.g:793:66: (iv_ruleExpressionReplacementSlot= ruleExpressionReplacementSlot EOF ) + // InternalEtlParser.g:794:2: iv_ruleExpressionReplacementSlot= ruleExpressionReplacementSlot EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getExpressionReplacementSlotRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleExpressionReplacementSlot=ruleExpressionReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleExpressionReplacementSlot; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleExpressionReplacementSlot" + + + // $ANTLR start "ruleExpressionReplacementSlot" + // InternalEtlParser.g:800:1: ruleExpressionReplacementSlot returns [EObject current=null] : ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS (this_SCG_3= RULE_SCG )? (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE )? ( (lv_name_7_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_8= RULE_DOUBLE_SQUARE_CLOSE ) ; + public final EObject ruleExpressionReplacementSlot() throws RecognitionException { + EObject current = null; + + Token this_DOUBLE_SQUARE_OPEN_1=null; + Token this_PLUS_2=null; + Token this_SCG_3=null; + Token this_ROUND_OPEN_4=null; + Token this_ROUND_CLOSE_6=null; + Token lv_name_7_0=null; + Token this_DOUBLE_SQUARE_CLOSE_8=null; + EObject lv_constraint_5_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:806:2: ( ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS (this_SCG_3= RULE_SCG )? (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE )? ( (lv_name_7_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_8= RULE_DOUBLE_SQUARE_CLOSE ) ) + // InternalEtlParser.g:807:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS (this_SCG_3= RULE_SCG )? (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE )? ( (lv_name_7_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_8= RULE_DOUBLE_SQUARE_CLOSE ) + { + // InternalEtlParser.g:807:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS (this_SCG_3= RULE_SCG )? (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE )? ( (lv_name_7_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_8= RULE_DOUBLE_SQUARE_CLOSE ) + // InternalEtlParser.g:808:3: () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS (this_SCG_3= RULE_SCG )? (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE )? ( (lv_name_7_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_8= RULE_DOUBLE_SQUARE_CLOSE + { + // InternalEtlParser.g:808:3: () + // InternalEtlParser.g:809:4: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElement( + grammarAccess.getExpressionReplacementSlotAccess().getExpressionReplacementSlotAction_0(), + current); + + } + + } + + this_DOUBLE_SQUARE_OPEN_1=(Token)match(input,RULE_DOUBLE_SQUARE_OPEN,FollowSets000.FOLLOW_12); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getExpressionReplacementSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + + } + this_PLUS_2=(Token)match(input,RULE_PLUS,FollowSets000.FOLLOW_18); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_PLUS_2, grammarAccess.getExpressionReplacementSlotAccess().getPLUSTerminalRuleCall_2()); + + } + // InternalEtlParser.g:826:3: (this_SCG_3= RULE_SCG )? + int alt17=2; + int LA17_0 = input.LA(1); + + if ( (LA17_0==RULE_SCG) ) { + alt17=1; + } + switch (alt17) { + case 1 : + // InternalEtlParser.g:827:4: this_SCG_3= RULE_SCG + { + this_SCG_3=(Token)match(input,RULE_SCG,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_SCG_3, grammarAccess.getExpressionReplacementSlotAccess().getSCGTerminalRuleCall_3()); + + } + + } + break; + + } + + // InternalEtlParser.g:832:3: (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE )? + int alt18=2; + int LA18_0 = input.LA(1); + + if ( (LA18_0==RULE_ROUND_OPEN) ) { + alt18=1; + } + switch (alt18) { + case 1 : + // InternalEtlParser.g:833:4: this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_constraint_5_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_6= RULE_ROUND_CLOSE + { + this_ROUND_OPEN_4=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_OPEN_4, grammarAccess.getExpressionReplacementSlotAccess().getROUND_OPENTerminalRuleCall_4_0()); + + } + // InternalEtlParser.g:837:4: ( (lv_constraint_5_0= ruleExpressionConstraint ) ) + // InternalEtlParser.g:838:5: (lv_constraint_5_0= ruleExpressionConstraint ) + { + // InternalEtlParser.g:838:5: (lv_constraint_5_0= ruleExpressionConstraint ) + // InternalEtlParser.g:839:6: lv_constraint_5_0= ruleExpressionConstraint + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getExpressionReplacementSlotAccess().getConstraintExpressionConstraintParserRuleCall_4_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_11); + lv_constraint_5_0=ruleExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getExpressionReplacementSlotRule()); + } + set( + current, + "constraint", + lv_constraint_5_0, + "com.b2international.snowowl.snomed.ecl.Ecl.ExpressionConstraint"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + this_ROUND_CLOSE_6=(Token)match(input,RULE_ROUND_CLOSE,FollowSets000.FOLLOW_16); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_CLOSE_6, grammarAccess.getExpressionReplacementSlotAccess().getROUND_CLOSETerminalRuleCall_4_2()); + + } + + } + break; + + } + + // InternalEtlParser.g:861:3: ( (lv_name_7_0= RULE_SLOTNAME_STRING ) )? + int alt19=2; + int LA19_0 = input.LA(1); + + if ( (LA19_0==RULE_SLOTNAME_STRING) ) { + alt19=1; + } + switch (alt19) { + case 1 : + // InternalEtlParser.g:862:4: (lv_name_7_0= RULE_SLOTNAME_STRING ) + { + // InternalEtlParser.g:862:4: (lv_name_7_0= RULE_SLOTNAME_STRING ) + // InternalEtlParser.g:863:5: lv_name_7_0= RULE_SLOTNAME_STRING + { + lv_name_7_0=(Token)match(input,RULE_SLOTNAME_STRING,FollowSets000.FOLLOW_17); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_name_7_0, grammarAccess.getExpressionReplacementSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_5_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getExpressionReplacementSlotRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_7_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + + } + + } + + + } + break; + + } + + this_DOUBLE_SQUARE_CLOSE_8=(Token)match(input,RULE_DOUBLE_SQUARE_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_CLOSE_8, grammarAccess.getExpressionReplacementSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_6()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleExpressionReplacementSlot" + + + // $ANTLR start "entryRuleTokenReplacementSlot" + // InternalEtlParser.g:887:1: entryRuleTokenReplacementSlot returns [EObject current=null] : iv_ruleTokenReplacementSlot= ruleTokenReplacementSlot EOF ; + public final EObject entryRuleTokenReplacementSlot() throws RecognitionException { + EObject current = null; + + EObject iv_ruleTokenReplacementSlot = null; + + + try { + // InternalEtlParser.g:887:61: (iv_ruleTokenReplacementSlot= ruleTokenReplacementSlot EOF ) + // InternalEtlParser.g:888:2: iv_ruleTokenReplacementSlot= ruleTokenReplacementSlot EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getTokenReplacementSlotRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleTokenReplacementSlot=ruleTokenReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleTokenReplacementSlot; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleTokenReplacementSlot" + + + // $ANTLR start "ruleTokenReplacementSlot" + // InternalEtlParser.g:894:1: ruleTokenReplacementSlot returns [EObject current=null] : ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_TOK_3= RULE_TOK (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_tokens_5_0= ruleSlotToken ) ) ( (lv_tokens_6_0= ruleSlotToken ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) ; + public final EObject ruleTokenReplacementSlot() throws RecognitionException { + EObject current = null; + + Token this_DOUBLE_SQUARE_OPEN_1=null; + Token this_PLUS_2=null; + Token this_TOK_3=null; + Token this_ROUND_OPEN_4=null; + Token this_ROUND_CLOSE_7=null; + Token lv_name_8_0=null; + Token this_DOUBLE_SQUARE_CLOSE_9=null; + AntlrDatatypeRuleToken lv_tokens_5_0 = null; + + AntlrDatatypeRuleToken lv_tokens_6_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:900:2: ( ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_TOK_3= RULE_TOK (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_tokens_5_0= ruleSlotToken ) ) ( (lv_tokens_6_0= ruleSlotToken ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) ) + // InternalEtlParser.g:901:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_TOK_3= RULE_TOK (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_tokens_5_0= ruleSlotToken ) ) ( (lv_tokens_6_0= ruleSlotToken ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) + { + // InternalEtlParser.g:901:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_TOK_3= RULE_TOK (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_tokens_5_0= ruleSlotToken ) ) ( (lv_tokens_6_0= ruleSlotToken ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) + // InternalEtlParser.g:902:3: () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_TOK_3= RULE_TOK (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_tokens_5_0= ruleSlotToken ) ) ( (lv_tokens_6_0= ruleSlotToken ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE + { + // InternalEtlParser.g:902:3: () + // InternalEtlParser.g:903:4: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElement( + grammarAccess.getTokenReplacementSlotAccess().getTokenReplacementSlotAction_0(), + current); + + } + + } + + this_DOUBLE_SQUARE_OPEN_1=(Token)match(input,RULE_DOUBLE_SQUARE_OPEN,FollowSets000.FOLLOW_12); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getTokenReplacementSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + + } + this_PLUS_2=(Token)match(input,RULE_PLUS,FollowSets000.FOLLOW_19); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_PLUS_2, grammarAccess.getTokenReplacementSlotAccess().getPLUSTerminalRuleCall_2()); + + } + this_TOK_3=(Token)match(input,RULE_TOK,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_TOK_3, grammarAccess.getTokenReplacementSlotAccess().getTOKTerminalRuleCall_3()); + + } + // InternalEtlParser.g:924:3: (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_tokens_5_0= ruleSlotToken ) ) ( (lv_tokens_6_0= ruleSlotToken ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? + int alt21=2; + int LA21_0 = input.LA(1); + + if ( (LA21_0==RULE_ROUND_OPEN) ) { + alt21=1; + } + switch (alt21) { + case 1 : + // InternalEtlParser.g:925:4: this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_tokens_5_0= ruleSlotToken ) ) ( (lv_tokens_6_0= ruleSlotToken ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE + { + this_ROUND_OPEN_4=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_20); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_OPEN_4, grammarAccess.getTokenReplacementSlotAccess().getROUND_OPENTerminalRuleCall_4_0()); + + } + // InternalEtlParser.g:929:4: ( (lv_tokens_5_0= ruleSlotToken ) ) + // InternalEtlParser.g:930:5: (lv_tokens_5_0= ruleSlotToken ) + { + // InternalEtlParser.g:930:5: (lv_tokens_5_0= ruleSlotToken ) + // InternalEtlParser.g:931:6: lv_tokens_5_0= ruleSlotToken + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getTokenReplacementSlotAccess().getTokensSlotTokenParserRuleCall_4_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_21); + lv_tokens_5_0=ruleSlotToken(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getTokenReplacementSlotRule()); + } + add( + current, + "tokens", + lv_tokens_5_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotToken"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + // InternalEtlParser.g:948:4: ( (lv_tokens_6_0= ruleSlotToken ) )* + loop20: + do { + int alt20=2; + int LA20_0 = input.LA(1); + + if ( ((LA20_0>=RULE_EQUIVALENT_TO && LA20_0<=RULE_SUBTYPE_OF)||LA20_0==RULE_REVERSED||(LA20_0>=RULE_COMMA && LA20_0<=RULE_EXCLUSION)||LA20_0==RULE_CARET||(LA20_0>=RULE_EQUAL && LA20_0<=RULE_LTE)) ) { + alt20=1; + } + + + switch (alt20) { + case 1 : + // InternalEtlParser.g:949:5: (lv_tokens_6_0= ruleSlotToken ) + { + // InternalEtlParser.g:949:5: (lv_tokens_6_0= ruleSlotToken ) + // InternalEtlParser.g:950:6: lv_tokens_6_0= ruleSlotToken + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getTokenReplacementSlotAccess().getTokensSlotTokenParserRuleCall_4_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_21); + lv_tokens_6_0=ruleSlotToken(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getTokenReplacementSlotRule()); + } + add( + current, + "tokens", + lv_tokens_6_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotToken"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + break; + + default : + break loop20; + } + } while (true); + + this_ROUND_CLOSE_7=(Token)match(input,RULE_ROUND_CLOSE,FollowSets000.FOLLOW_16); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_CLOSE_7, grammarAccess.getTokenReplacementSlotAccess().getROUND_CLOSETerminalRuleCall_4_3()); + + } + + } + break; + + } + + // InternalEtlParser.g:972:3: ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? + int alt22=2; + int LA22_0 = input.LA(1); + + if ( (LA22_0==RULE_SLOTNAME_STRING) ) { + alt22=1; + } + switch (alt22) { + case 1 : + // InternalEtlParser.g:973:4: (lv_name_8_0= RULE_SLOTNAME_STRING ) + { + // InternalEtlParser.g:973:4: (lv_name_8_0= RULE_SLOTNAME_STRING ) + // InternalEtlParser.g:974:5: lv_name_8_0= RULE_SLOTNAME_STRING + { + lv_name_8_0=(Token)match(input,RULE_SLOTNAME_STRING,FollowSets000.FOLLOW_17); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_name_8_0, grammarAccess.getTokenReplacementSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_5_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getTokenReplacementSlotRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_8_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + + } + + } + + + } + break; + + } + + this_DOUBLE_SQUARE_CLOSE_9=(Token)match(input,RULE_DOUBLE_SQUARE_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_CLOSE_9, grammarAccess.getTokenReplacementSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_6()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleTokenReplacementSlot" + + + // $ANTLR start "entryRuleTemplateInformationSlot" + // InternalEtlParser.g:998:1: entryRuleTemplateInformationSlot returns [EObject current=null] : iv_ruleTemplateInformationSlot= ruleTemplateInformationSlot EOF ; + public final EObject entryRuleTemplateInformationSlot() throws RecognitionException { + EObject current = null; + + EObject iv_ruleTemplateInformationSlot = null; + + + try { + // InternalEtlParser.g:998:64: (iv_ruleTemplateInformationSlot= ruleTemplateInformationSlot EOF ) + // InternalEtlParser.g:999:2: iv_ruleTemplateInformationSlot= ruleTemplateInformationSlot EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getTemplateInformationSlotRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleTemplateInformationSlot=ruleTemplateInformationSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleTemplateInformationSlot; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleTemplateInformationSlot" + + + // $ANTLR start "ruleTemplateInformationSlot" + // InternalEtlParser.g:1005:1: ruleTemplateInformationSlot returns [EObject current=null] : ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN ( (lv_cardinality_2_0= ruleEtlCardinality ) )? ( (lv_name_3_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_4= RULE_DOUBLE_SQUARE_CLOSE ) ; + public final EObject ruleTemplateInformationSlot() throws RecognitionException { + EObject current = null; + + Token this_DOUBLE_SQUARE_OPEN_1=null; + Token lv_name_3_0=null; + Token this_DOUBLE_SQUARE_CLOSE_4=null; + EObject lv_cardinality_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:1011:2: ( ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN ( (lv_cardinality_2_0= ruleEtlCardinality ) )? ( (lv_name_3_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_4= RULE_DOUBLE_SQUARE_CLOSE ) ) + // InternalEtlParser.g:1012:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN ( (lv_cardinality_2_0= ruleEtlCardinality ) )? ( (lv_name_3_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_4= RULE_DOUBLE_SQUARE_CLOSE ) + { + // InternalEtlParser.g:1012:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN ( (lv_cardinality_2_0= ruleEtlCardinality ) )? ( (lv_name_3_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_4= RULE_DOUBLE_SQUARE_CLOSE ) + // InternalEtlParser.g:1013:3: () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN ( (lv_cardinality_2_0= ruleEtlCardinality ) )? ( (lv_name_3_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_4= RULE_DOUBLE_SQUARE_CLOSE + { + // InternalEtlParser.g:1013:3: () + // InternalEtlParser.g:1014:4: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElement( + grammarAccess.getTemplateInformationSlotAccess().getTemplateInformationSlotAction_0(), + current); + + } + + } + + this_DOUBLE_SQUARE_OPEN_1=(Token)match(input,RULE_DOUBLE_SQUARE_OPEN,FollowSets000.FOLLOW_22); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getTemplateInformationSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + + } + // InternalEtlParser.g:1027:3: ( (lv_cardinality_2_0= ruleEtlCardinality ) )? + int alt23=2; + int LA23_0 = input.LA(1); + + if ( (LA23_0==RULE_TILDE||(LA23_0>=RULE_ZERO && LA23_0<=RULE_DIGIT_NONZERO)) ) { + alt23=1; + } + switch (alt23) { + case 1 : + // InternalEtlParser.g:1028:4: (lv_cardinality_2_0= ruleEtlCardinality ) + { + // InternalEtlParser.g:1028:4: (lv_cardinality_2_0= ruleEtlCardinality ) + // InternalEtlParser.g:1029:5: lv_cardinality_2_0= ruleEtlCardinality + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getTemplateInformationSlotAccess().getCardinalityEtlCardinalityParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_16); + lv_cardinality_2_0=ruleEtlCardinality(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getTemplateInformationSlotRule()); + } + set( + current, + "cardinality", + lv_cardinality_2_0, + "com.b2international.snowowl.snomed.etl.Etl.EtlCardinality"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + break; + + } + + // InternalEtlParser.g:1046:3: ( (lv_name_3_0= RULE_SLOTNAME_STRING ) )? + int alt24=2; + int LA24_0 = input.LA(1); + + if ( (LA24_0==RULE_SLOTNAME_STRING) ) { + alt24=1; + } + switch (alt24) { + case 1 : + // InternalEtlParser.g:1047:4: (lv_name_3_0= RULE_SLOTNAME_STRING ) + { + // InternalEtlParser.g:1047:4: (lv_name_3_0= RULE_SLOTNAME_STRING ) + // InternalEtlParser.g:1048:5: lv_name_3_0= RULE_SLOTNAME_STRING + { + lv_name_3_0=(Token)match(input,RULE_SLOTNAME_STRING,FollowSets000.FOLLOW_17); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_name_3_0, grammarAccess.getTemplateInformationSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_3_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getTemplateInformationSlotRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_3_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + + } + + } + + + } + break; + + } + + this_DOUBLE_SQUARE_CLOSE_4=(Token)match(input,RULE_DOUBLE_SQUARE_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_CLOSE_4, grammarAccess.getTemplateInformationSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_4()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleTemplateInformationSlot" + + + // $ANTLR start "entryRuleConcreteValueReplacementSlot" + // InternalEtlParser.g:1072:1: entryRuleConcreteValueReplacementSlot returns [EObject current=null] : iv_ruleConcreteValueReplacementSlot= ruleConcreteValueReplacementSlot EOF ; + public final EObject entryRuleConcreteValueReplacementSlot() throws RecognitionException { + EObject current = null; + + EObject iv_ruleConcreteValueReplacementSlot = null; + + + try { + // InternalEtlParser.g:1072:69: (iv_ruleConcreteValueReplacementSlot= ruleConcreteValueReplacementSlot EOF ) + // InternalEtlParser.g:1073:2: iv_ruleConcreteValueReplacementSlot= ruleConcreteValueReplacementSlot EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getConcreteValueReplacementSlotRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleConcreteValueReplacementSlot=ruleConcreteValueReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleConcreteValueReplacementSlot; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleConcreteValueReplacementSlot" + + + // $ANTLR start "ruleConcreteValueReplacementSlot" + // InternalEtlParser.g:1079:1: ruleConcreteValueReplacementSlot returns [EObject current=null] : (this_StringReplacementSlot_0= ruleStringReplacementSlot | this_IntegerReplacementSlot_1= ruleIntegerReplacementSlot | this_DecimalReplacementSlot_2= ruleDecimalReplacementSlot ) ; + public final EObject ruleConcreteValueReplacementSlot() throws RecognitionException { + EObject current = null; + + EObject this_StringReplacementSlot_0 = null; + + EObject this_IntegerReplacementSlot_1 = null; + + EObject this_DecimalReplacementSlot_2 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:1085:2: ( (this_StringReplacementSlot_0= ruleStringReplacementSlot | this_IntegerReplacementSlot_1= ruleIntegerReplacementSlot | this_DecimalReplacementSlot_2= ruleDecimalReplacementSlot ) ) + // InternalEtlParser.g:1086:2: (this_StringReplacementSlot_0= ruleStringReplacementSlot | this_IntegerReplacementSlot_1= ruleIntegerReplacementSlot | this_DecimalReplacementSlot_2= ruleDecimalReplacementSlot ) + { + // InternalEtlParser.g:1086:2: (this_StringReplacementSlot_0= ruleStringReplacementSlot | this_IntegerReplacementSlot_1= ruleIntegerReplacementSlot | this_DecimalReplacementSlot_2= ruleDecimalReplacementSlot ) + int alt25=3; + int LA25_0 = input.LA(1); + + if ( (LA25_0==RULE_DOUBLE_SQUARE_OPEN) ) { + int LA25_1 = input.LA(2); + + if ( (LA25_1==RULE_PLUS) ) { + switch ( input.LA(3) ) { + case RULE_STR: + { + alt25=1; + } + break; + case RULE_DEC: + { + alt25=3; + } + break; + case RULE_INT: + { + alt25=2; + } + break; + default: + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 25, 2, input); + + throw nvae; + } + + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 25, 1, input); + + throw nvae; + } + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 25, 0, input); + + throw nvae; + } + switch (alt25) { + case 1 : + // InternalEtlParser.g:1087:3: this_StringReplacementSlot_0= ruleStringReplacementSlot + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getConcreteValueReplacementSlotAccess().getStringReplacementSlotParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_StringReplacementSlot_0=ruleStringReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_StringReplacementSlot_0; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:1099:3: this_IntegerReplacementSlot_1= ruleIntegerReplacementSlot + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getConcreteValueReplacementSlotAccess().getIntegerReplacementSlotParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_IntegerReplacementSlot_1=ruleIntegerReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_IntegerReplacementSlot_1; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 3 : + // InternalEtlParser.g:1111:3: this_DecimalReplacementSlot_2= ruleDecimalReplacementSlot + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getConcreteValueReplacementSlotAccess().getDecimalReplacementSlotParserRuleCall_2()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_DecimalReplacementSlot_2=ruleDecimalReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_DecimalReplacementSlot_2; + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleConcreteValueReplacementSlot" + + + // $ANTLR start "entryRuleStringReplacementSlot" + // InternalEtlParser.g:1126:1: entryRuleStringReplacementSlot returns [EObject current=null] : iv_ruleStringReplacementSlot= ruleStringReplacementSlot EOF ; + public final EObject entryRuleStringReplacementSlot() throws RecognitionException { + EObject current = null; + + EObject iv_ruleStringReplacementSlot = null; + + + try { + // InternalEtlParser.g:1126:62: (iv_ruleStringReplacementSlot= ruleStringReplacementSlot EOF ) + // InternalEtlParser.g:1127:2: iv_ruleStringReplacementSlot= ruleStringReplacementSlot EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getStringReplacementSlotRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleStringReplacementSlot=ruleStringReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleStringReplacementSlot; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleStringReplacementSlot" + + + // $ANTLR start "ruleStringReplacementSlot" + // InternalEtlParser.g:1133:1: ruleStringReplacementSlot returns [EObject current=null] : ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_STR_3= RULE_STR (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= RULE_STRING ) ) ( (lv_values_6_0= RULE_STRING ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) ; + public final EObject ruleStringReplacementSlot() throws RecognitionException { + EObject current = null; + + Token this_DOUBLE_SQUARE_OPEN_1=null; + Token this_PLUS_2=null; + Token this_STR_3=null; + Token this_ROUND_OPEN_4=null; + Token lv_values_5_0=null; + Token lv_values_6_0=null; + Token this_ROUND_CLOSE_7=null; + Token lv_name_8_0=null; + Token this_DOUBLE_SQUARE_CLOSE_9=null; + + + enterRule(); + + try { + // InternalEtlParser.g:1139:2: ( ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_STR_3= RULE_STR (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= RULE_STRING ) ) ( (lv_values_6_0= RULE_STRING ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) ) + // InternalEtlParser.g:1140:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_STR_3= RULE_STR (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= RULE_STRING ) ) ( (lv_values_6_0= RULE_STRING ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) + { + // InternalEtlParser.g:1140:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_STR_3= RULE_STR (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= RULE_STRING ) ) ( (lv_values_6_0= RULE_STRING ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) + // InternalEtlParser.g:1141:3: () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_STR_3= RULE_STR (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= RULE_STRING ) ) ( (lv_values_6_0= RULE_STRING ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE + { + // InternalEtlParser.g:1141:3: () + // InternalEtlParser.g:1142:4: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElement( + grammarAccess.getStringReplacementSlotAccess().getStringReplacementSlotAction_0(), + current); + + } + + } + + this_DOUBLE_SQUARE_OPEN_1=(Token)match(input,RULE_DOUBLE_SQUARE_OPEN,FollowSets000.FOLLOW_12); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getStringReplacementSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + + } + this_PLUS_2=(Token)match(input,RULE_PLUS,FollowSets000.FOLLOW_23); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_PLUS_2, grammarAccess.getStringReplacementSlotAccess().getPLUSTerminalRuleCall_2()); + + } + this_STR_3=(Token)match(input,RULE_STR,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_STR_3, grammarAccess.getStringReplacementSlotAccess().getSTRTerminalRuleCall_3()); + + } + // InternalEtlParser.g:1163:3: (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= RULE_STRING ) ) ( (lv_values_6_0= RULE_STRING ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? + int alt27=2; + int LA27_0 = input.LA(1); + + if ( (LA27_0==RULE_ROUND_OPEN) ) { + alt27=1; + } + switch (alt27) { + case 1 : + // InternalEtlParser.g:1164:4: this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= RULE_STRING ) ) ( (lv_values_6_0= RULE_STRING ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE + { + this_ROUND_OPEN_4=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_24); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_OPEN_4, grammarAccess.getStringReplacementSlotAccess().getROUND_OPENTerminalRuleCall_4_0()); + + } + // InternalEtlParser.g:1168:4: ( (lv_values_5_0= RULE_STRING ) ) + // InternalEtlParser.g:1169:5: (lv_values_5_0= RULE_STRING ) + { + // InternalEtlParser.g:1169:5: (lv_values_5_0= RULE_STRING ) + // InternalEtlParser.g:1170:6: lv_values_5_0= RULE_STRING + { + lv_values_5_0=(Token)match(input,RULE_STRING,FollowSets000.FOLLOW_25); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_values_5_0, grammarAccess.getStringReplacementSlotAccess().getValuesSTRINGTerminalRuleCall_4_1_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getStringReplacementSlotRule()); + } + addWithLastConsumed( + current, + "values", + lv_values_5_0, + "com.b2international.snowowl.snomed.ecl.Ecl.STRING"); + + } + + } + + + } + + // InternalEtlParser.g:1186:4: ( (lv_values_6_0= RULE_STRING ) )* + loop26: + do { + int alt26=2; + int LA26_0 = input.LA(1); + + if ( (LA26_0==RULE_STRING) ) { + alt26=1; + } + + + switch (alt26) { + case 1 : + // InternalEtlParser.g:1187:5: (lv_values_6_0= RULE_STRING ) + { + // InternalEtlParser.g:1187:5: (lv_values_6_0= RULE_STRING ) + // InternalEtlParser.g:1188:6: lv_values_6_0= RULE_STRING + { + lv_values_6_0=(Token)match(input,RULE_STRING,FollowSets000.FOLLOW_25); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_values_6_0, grammarAccess.getStringReplacementSlotAccess().getValuesSTRINGTerminalRuleCall_4_2_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getStringReplacementSlotRule()); + } + addWithLastConsumed( + current, + "values", + lv_values_6_0, + "com.b2international.snowowl.snomed.ecl.Ecl.STRING"); + + } + + } + + + } + break; + + default : + break loop26; + } + } while (true); + + this_ROUND_CLOSE_7=(Token)match(input,RULE_ROUND_CLOSE,FollowSets000.FOLLOW_16); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_CLOSE_7, grammarAccess.getStringReplacementSlotAccess().getROUND_CLOSETerminalRuleCall_4_3()); + + } + + } + break; + + } + + // InternalEtlParser.g:1209:3: ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? + int alt28=2; + int LA28_0 = input.LA(1); + + if ( (LA28_0==RULE_SLOTNAME_STRING) ) { + alt28=1; + } + switch (alt28) { + case 1 : + // InternalEtlParser.g:1210:4: (lv_name_8_0= RULE_SLOTNAME_STRING ) + { + // InternalEtlParser.g:1210:4: (lv_name_8_0= RULE_SLOTNAME_STRING ) + // InternalEtlParser.g:1211:5: lv_name_8_0= RULE_SLOTNAME_STRING + { + lv_name_8_0=(Token)match(input,RULE_SLOTNAME_STRING,FollowSets000.FOLLOW_17); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_name_8_0, grammarAccess.getStringReplacementSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_5_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getStringReplacementSlotRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_8_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + + } + + } + + + } + break; + + } + + this_DOUBLE_SQUARE_CLOSE_9=(Token)match(input,RULE_DOUBLE_SQUARE_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_CLOSE_9, grammarAccess.getStringReplacementSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_6()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleStringReplacementSlot" + + + // $ANTLR start "entryRuleIntegerReplacementSlot" + // InternalEtlParser.g:1235:1: entryRuleIntegerReplacementSlot returns [EObject current=null] : iv_ruleIntegerReplacementSlot= ruleIntegerReplacementSlot EOF ; + public final EObject entryRuleIntegerReplacementSlot() throws RecognitionException { + EObject current = null; + + EObject iv_ruleIntegerReplacementSlot = null; + + + try { + // InternalEtlParser.g:1235:63: (iv_ruleIntegerReplacementSlot= ruleIntegerReplacementSlot EOF ) + // InternalEtlParser.g:1236:2: iv_ruleIntegerReplacementSlot= ruleIntegerReplacementSlot EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getIntegerReplacementSlotRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleIntegerReplacementSlot=ruleIntegerReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleIntegerReplacementSlot; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleIntegerReplacementSlot" + + + // $ANTLR start "ruleIntegerReplacementSlot" + // InternalEtlParser.g:1242:1: ruleIntegerReplacementSlot returns [EObject current=null] : ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_INT_3= RULE_INT (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotInteger ) ) ( (lv_values_6_0= ruleSlotInteger ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) ; + public final EObject ruleIntegerReplacementSlot() throws RecognitionException { + EObject current = null; + + Token this_DOUBLE_SQUARE_OPEN_1=null; + Token this_PLUS_2=null; + Token this_INT_3=null; + Token this_ROUND_OPEN_4=null; + Token this_ROUND_CLOSE_7=null; + Token lv_name_8_0=null; + Token this_DOUBLE_SQUARE_CLOSE_9=null; + EObject lv_values_5_0 = null; + + EObject lv_values_6_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:1248:2: ( ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_INT_3= RULE_INT (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotInteger ) ) ( (lv_values_6_0= ruleSlotInteger ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) ) + // InternalEtlParser.g:1249:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_INT_3= RULE_INT (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotInteger ) ) ( (lv_values_6_0= ruleSlotInteger ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) + { + // InternalEtlParser.g:1249:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_INT_3= RULE_INT (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotInteger ) ) ( (lv_values_6_0= ruleSlotInteger ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) + // InternalEtlParser.g:1250:3: () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_INT_3= RULE_INT (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotInteger ) ) ( (lv_values_6_0= ruleSlotInteger ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE + { + // InternalEtlParser.g:1250:3: () + // InternalEtlParser.g:1251:4: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElement( + grammarAccess.getIntegerReplacementSlotAccess().getIntegerReplacementSlotAction_0(), + current); + + } + + } + + this_DOUBLE_SQUARE_OPEN_1=(Token)match(input,RULE_DOUBLE_SQUARE_OPEN,FollowSets000.FOLLOW_12); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getIntegerReplacementSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + + } + this_PLUS_2=(Token)match(input,RULE_PLUS,FollowSets000.FOLLOW_26); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_PLUS_2, grammarAccess.getIntegerReplacementSlotAccess().getPLUSTerminalRuleCall_2()); + + } + this_INT_3=(Token)match(input,RULE_INT,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_INT_3, grammarAccess.getIntegerReplacementSlotAccess().getINTTerminalRuleCall_3()); + + } + // InternalEtlParser.g:1272:3: (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotInteger ) ) ( (lv_values_6_0= ruleSlotInteger ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? + int alt30=2; + int LA30_0 = input.LA(1); + + if ( (LA30_0==RULE_ROUND_OPEN) ) { + alt30=1; + } + switch (alt30) { + case 1 : + // InternalEtlParser.g:1273:4: this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotInteger ) ) ( (lv_values_6_0= ruleSlotInteger ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE + { + this_ROUND_OPEN_4=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_27); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_OPEN_4, grammarAccess.getIntegerReplacementSlotAccess().getROUND_OPENTerminalRuleCall_4_0()); + + } + // InternalEtlParser.g:1277:4: ( (lv_values_5_0= ruleSlotInteger ) ) + // InternalEtlParser.g:1278:5: (lv_values_5_0= ruleSlotInteger ) + { + // InternalEtlParser.g:1278:5: (lv_values_5_0= ruleSlotInteger ) + // InternalEtlParser.g:1279:6: lv_values_5_0= ruleSlotInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getIntegerReplacementSlotAccess().getValuesSlotIntegerParserRuleCall_4_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_28); + lv_values_5_0=ruleSlotInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getIntegerReplacementSlotRule()); + } + add( + current, + "values", + lv_values_5_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotInteger"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + // InternalEtlParser.g:1296:4: ( (lv_values_6_0= ruleSlotInteger ) )* + loop29: + do { + int alt29=2; + int LA29_0 = input.LA(1); + + if ( (LA29_0==RULE_TO||LA29_0==RULE_GT||LA29_0==RULE_HASH) ) { + alt29=1; + } + + + switch (alt29) { + case 1 : + // InternalEtlParser.g:1297:5: (lv_values_6_0= ruleSlotInteger ) + { + // InternalEtlParser.g:1297:5: (lv_values_6_0= ruleSlotInteger ) + // InternalEtlParser.g:1298:6: lv_values_6_0= ruleSlotInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getIntegerReplacementSlotAccess().getValuesSlotIntegerParserRuleCall_4_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_28); + lv_values_6_0=ruleSlotInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getIntegerReplacementSlotRule()); + } + add( + current, + "values", + lv_values_6_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotInteger"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + break; + + default : + break loop29; + } + } while (true); + + this_ROUND_CLOSE_7=(Token)match(input,RULE_ROUND_CLOSE,FollowSets000.FOLLOW_16); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_CLOSE_7, grammarAccess.getIntegerReplacementSlotAccess().getROUND_CLOSETerminalRuleCall_4_3()); + + } + + } + break; + + } + + // InternalEtlParser.g:1320:3: ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? + int alt31=2; + int LA31_0 = input.LA(1); + + if ( (LA31_0==RULE_SLOTNAME_STRING) ) { + alt31=1; + } + switch (alt31) { + case 1 : + // InternalEtlParser.g:1321:4: (lv_name_8_0= RULE_SLOTNAME_STRING ) + { + // InternalEtlParser.g:1321:4: (lv_name_8_0= RULE_SLOTNAME_STRING ) + // InternalEtlParser.g:1322:5: lv_name_8_0= RULE_SLOTNAME_STRING + { + lv_name_8_0=(Token)match(input,RULE_SLOTNAME_STRING,FollowSets000.FOLLOW_17); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_name_8_0, grammarAccess.getIntegerReplacementSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_5_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getIntegerReplacementSlotRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_8_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + + } + + } + + + } + break; + + } + + this_DOUBLE_SQUARE_CLOSE_9=(Token)match(input,RULE_DOUBLE_SQUARE_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_CLOSE_9, grammarAccess.getIntegerReplacementSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_6()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleIntegerReplacementSlot" + + + // $ANTLR start "entryRuleDecimalReplacementSlot" + // InternalEtlParser.g:1346:1: entryRuleDecimalReplacementSlot returns [EObject current=null] : iv_ruleDecimalReplacementSlot= ruleDecimalReplacementSlot EOF ; + public final EObject entryRuleDecimalReplacementSlot() throws RecognitionException { + EObject current = null; + + EObject iv_ruleDecimalReplacementSlot = null; + + + try { + // InternalEtlParser.g:1346:63: (iv_ruleDecimalReplacementSlot= ruleDecimalReplacementSlot EOF ) + // InternalEtlParser.g:1347:2: iv_ruleDecimalReplacementSlot= ruleDecimalReplacementSlot EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDecimalReplacementSlotRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDecimalReplacementSlot=ruleDecimalReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDecimalReplacementSlot; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleDecimalReplacementSlot" + + + // $ANTLR start "ruleDecimalReplacementSlot" + // InternalEtlParser.g:1353:1: ruleDecimalReplacementSlot returns [EObject current=null] : ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_DEC_3= RULE_DEC (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotDecimal ) ) ( (lv_values_6_0= ruleSlotDecimal ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) ; + public final EObject ruleDecimalReplacementSlot() throws RecognitionException { + EObject current = null; + + Token this_DOUBLE_SQUARE_OPEN_1=null; + Token this_PLUS_2=null; + Token this_DEC_3=null; + Token this_ROUND_OPEN_4=null; + Token this_ROUND_CLOSE_7=null; + Token lv_name_8_0=null; + Token this_DOUBLE_SQUARE_CLOSE_9=null; + EObject lv_values_5_0 = null; + + EObject lv_values_6_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:1359:2: ( ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_DEC_3= RULE_DEC (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotDecimal ) ) ( (lv_values_6_0= ruleSlotDecimal ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) ) + // InternalEtlParser.g:1360:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_DEC_3= RULE_DEC (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotDecimal ) ) ( (lv_values_6_0= ruleSlotDecimal ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) + { + // InternalEtlParser.g:1360:2: ( () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_DEC_3= RULE_DEC (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotDecimal ) ) ( (lv_values_6_0= ruleSlotDecimal ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE ) + // InternalEtlParser.g:1361:3: () this_DOUBLE_SQUARE_OPEN_1= RULE_DOUBLE_SQUARE_OPEN this_PLUS_2= RULE_PLUS this_DEC_3= RULE_DEC (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotDecimal ) ) ( (lv_values_6_0= ruleSlotDecimal ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? this_DOUBLE_SQUARE_CLOSE_9= RULE_DOUBLE_SQUARE_CLOSE + { + // InternalEtlParser.g:1361:3: () + // InternalEtlParser.g:1362:4: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElement( + grammarAccess.getDecimalReplacementSlotAccess().getDecimalReplacementSlotAction_0(), + current); + + } + + } + + this_DOUBLE_SQUARE_OPEN_1=(Token)match(input,RULE_DOUBLE_SQUARE_OPEN,FollowSets000.FOLLOW_12); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_OPEN_1, grammarAccess.getDecimalReplacementSlotAccess().getDOUBLE_SQUARE_OPENTerminalRuleCall_1()); + + } + this_PLUS_2=(Token)match(input,RULE_PLUS,FollowSets000.FOLLOW_29); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_PLUS_2, grammarAccess.getDecimalReplacementSlotAccess().getPLUSTerminalRuleCall_2()); + + } + this_DEC_3=(Token)match(input,RULE_DEC,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DEC_3, grammarAccess.getDecimalReplacementSlotAccess().getDECTerminalRuleCall_3()); + + } + // InternalEtlParser.g:1383:3: (this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotDecimal ) ) ( (lv_values_6_0= ruleSlotDecimal ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE )? + int alt33=2; + int LA33_0 = input.LA(1); + + if ( (LA33_0==RULE_ROUND_OPEN) ) { + alt33=1; + } + switch (alt33) { + case 1 : + // InternalEtlParser.g:1384:4: this_ROUND_OPEN_4= RULE_ROUND_OPEN ( (lv_values_5_0= ruleSlotDecimal ) ) ( (lv_values_6_0= ruleSlotDecimal ) )* this_ROUND_CLOSE_7= RULE_ROUND_CLOSE + { + this_ROUND_OPEN_4=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_27); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_OPEN_4, grammarAccess.getDecimalReplacementSlotAccess().getROUND_OPENTerminalRuleCall_4_0()); + + } + // InternalEtlParser.g:1388:4: ( (lv_values_5_0= ruleSlotDecimal ) ) + // InternalEtlParser.g:1389:5: (lv_values_5_0= ruleSlotDecimal ) + { + // InternalEtlParser.g:1389:5: (lv_values_5_0= ruleSlotDecimal ) + // InternalEtlParser.g:1390:6: lv_values_5_0= ruleSlotDecimal + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDecimalReplacementSlotAccess().getValuesSlotDecimalParserRuleCall_4_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_28); + lv_values_5_0=ruleSlotDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getDecimalReplacementSlotRule()); + } + add( + current, + "values", + lv_values_5_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotDecimal"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + // InternalEtlParser.g:1407:4: ( (lv_values_6_0= ruleSlotDecimal ) )* + loop32: + do { + int alt32=2; + int LA32_0 = input.LA(1); + + if ( (LA32_0==RULE_TO||LA32_0==RULE_GT||LA32_0==RULE_HASH) ) { + alt32=1; + } + + + switch (alt32) { + case 1 : + // InternalEtlParser.g:1408:5: (lv_values_6_0= ruleSlotDecimal ) + { + // InternalEtlParser.g:1408:5: (lv_values_6_0= ruleSlotDecimal ) + // InternalEtlParser.g:1409:6: lv_values_6_0= ruleSlotDecimal + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDecimalReplacementSlotAccess().getValuesSlotDecimalParserRuleCall_4_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_28); + lv_values_6_0=ruleSlotDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getDecimalReplacementSlotRule()); + } + add( + current, + "values", + lv_values_6_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotDecimal"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + break; + + default : + break loop32; + } + } while (true); + + this_ROUND_CLOSE_7=(Token)match(input,RULE_ROUND_CLOSE,FollowSets000.FOLLOW_16); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_CLOSE_7, grammarAccess.getDecimalReplacementSlotAccess().getROUND_CLOSETerminalRuleCall_4_3()); + + } + + } + break; + + } + + // InternalEtlParser.g:1431:3: ( (lv_name_8_0= RULE_SLOTNAME_STRING ) )? + int alt34=2; + int LA34_0 = input.LA(1); + + if ( (LA34_0==RULE_SLOTNAME_STRING) ) { + alt34=1; + } + switch (alt34) { + case 1 : + // InternalEtlParser.g:1432:4: (lv_name_8_0= RULE_SLOTNAME_STRING ) + { + // InternalEtlParser.g:1432:4: (lv_name_8_0= RULE_SLOTNAME_STRING ) + // InternalEtlParser.g:1433:5: lv_name_8_0= RULE_SLOTNAME_STRING + { + lv_name_8_0=(Token)match(input,RULE_SLOTNAME_STRING,FollowSets000.FOLLOW_17); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_name_8_0, grammarAccess.getDecimalReplacementSlotAccess().getNameSLOTNAME_STRINGTerminalRuleCall_5_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getDecimalReplacementSlotRule()); + } + setWithLastConsumed( + current, + "name", + lv_name_8_0, + "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + + } + + } + + + } + break; + + } + + this_DOUBLE_SQUARE_CLOSE_9=(Token)match(input,RULE_DOUBLE_SQUARE_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOUBLE_SQUARE_CLOSE_9, grammarAccess.getDecimalReplacementSlotAccess().getDOUBLE_SQUARE_CLOSETerminalRuleCall_6()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleDecimalReplacementSlot" + + + // $ANTLR start "entryRuleEtlCardinality" + // InternalEtlParser.g:1457:1: entryRuleEtlCardinality returns [EObject current=null] : iv_ruleEtlCardinality= ruleEtlCardinality EOF ; + public final EObject entryRuleEtlCardinality() throws RecognitionException { + EObject current = null; + + EObject iv_ruleEtlCardinality = null; + + + try { + // InternalEtlParser.g:1457:55: (iv_ruleEtlCardinality= ruleEtlCardinality EOF ) + // InternalEtlParser.g:1458:2: iv_ruleEtlCardinality= ruleEtlCardinality EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getEtlCardinalityRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleEtlCardinality=ruleEtlCardinality(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleEtlCardinality; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleEtlCardinality" + + + // $ANTLR start "ruleEtlCardinality" + // InternalEtlParser.g:1464:1: ruleEtlCardinality returns [EObject current=null] : ( (this_TILDE_0= RULE_TILDE )? ( (lv_min_1_0= ruleNonNegativeInteger ) ) this_TO_2= RULE_TO ( (lv_max_3_0= ruleMaxValue ) ) ) ; + public final EObject ruleEtlCardinality() throws RecognitionException { + EObject current = null; + + Token this_TILDE_0=null; + Token this_TO_2=null; + AntlrDatatypeRuleToken lv_min_1_0 = null; + + AntlrDatatypeRuleToken lv_max_3_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:1470:2: ( ( (this_TILDE_0= RULE_TILDE )? ( (lv_min_1_0= ruleNonNegativeInteger ) ) this_TO_2= RULE_TO ( (lv_max_3_0= ruleMaxValue ) ) ) ) + // InternalEtlParser.g:1471:2: ( (this_TILDE_0= RULE_TILDE )? ( (lv_min_1_0= ruleNonNegativeInteger ) ) this_TO_2= RULE_TO ( (lv_max_3_0= ruleMaxValue ) ) ) + { + // InternalEtlParser.g:1471:2: ( (this_TILDE_0= RULE_TILDE )? ( (lv_min_1_0= ruleNonNegativeInteger ) ) this_TO_2= RULE_TO ( (lv_max_3_0= ruleMaxValue ) ) ) + // InternalEtlParser.g:1472:3: (this_TILDE_0= RULE_TILDE )? ( (lv_min_1_0= ruleNonNegativeInteger ) ) this_TO_2= RULE_TO ( (lv_max_3_0= ruleMaxValue ) ) + { + // InternalEtlParser.g:1472:3: (this_TILDE_0= RULE_TILDE )? + int alt35=2; + int LA35_0 = input.LA(1); + + if ( (LA35_0==RULE_TILDE) ) { + alt35=1; + } + switch (alt35) { + case 1 : + // InternalEtlParser.g:1473:4: this_TILDE_0= RULE_TILDE + { + this_TILDE_0=(Token)match(input,RULE_TILDE,FollowSets000.FOLLOW_30); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_TILDE_0, grammarAccess.getEtlCardinalityAccess().getTILDETerminalRuleCall_0()); + + } + + } + break; + + } + + // InternalEtlParser.g:1478:3: ( (lv_min_1_0= ruleNonNegativeInteger ) ) + // InternalEtlParser.g:1479:4: (lv_min_1_0= ruleNonNegativeInteger ) + { + // InternalEtlParser.g:1479:4: (lv_min_1_0= ruleNonNegativeInteger ) + // InternalEtlParser.g:1480:5: lv_min_1_0= ruleNonNegativeInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getEtlCardinalityAccess().getMinNonNegativeIntegerParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_31); + lv_min_1_0=ruleNonNegativeInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getEtlCardinalityRule()); + } + set( + current, + "min", + lv_min_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeInteger"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + this_TO_2=(Token)match(input,RULE_TO,FollowSets000.FOLLOW_32); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_TO_2, grammarAccess.getEtlCardinalityAccess().getTOTerminalRuleCall_2()); + + } + // InternalEtlParser.g:1501:3: ( (lv_max_3_0= ruleMaxValue ) ) + // InternalEtlParser.g:1502:4: (lv_max_3_0= ruleMaxValue ) + { + // InternalEtlParser.g:1502:4: (lv_max_3_0= ruleMaxValue ) + // InternalEtlParser.g:1503:5: lv_max_3_0= ruleMaxValue + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getEtlCardinalityAccess().getMaxMaxValueParserRuleCall_3_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_max_3_0=ruleMaxValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getEtlCardinalityRule()); + } + set( + current, + "max", + lv_max_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.MaxValue"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleEtlCardinality" + + + // $ANTLR start "entryRuleConceptReplacementSlot" + // InternalEtlParser.g:1524:1: entryRuleConceptReplacementSlot returns [EObject current=null] : iv_ruleConceptReplacementSlot= ruleConceptReplacementSlot EOF ; + public final EObject entryRuleConceptReplacementSlot() throws RecognitionException { + EObject current = null; + + EObject iv_ruleConceptReplacementSlot = null; + + + try { + // InternalEtlParser.g:1524:63: (iv_ruleConceptReplacementSlot= ruleConceptReplacementSlot EOF ) + // InternalEtlParser.g:1525:2: iv_ruleConceptReplacementSlot= ruleConceptReplacementSlot EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getConceptReplacementSlotRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleConceptReplacementSlot=ruleConceptReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleConceptReplacementSlot; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleConceptReplacementSlot" + + + // $ANTLR start "ruleConceptReplacementSlot" + // InternalEtlParser.g:1531:1: ruleConceptReplacementSlot returns [EObject current=null] : (this_ConceptIdReplacementSlot_0= ruleConceptIdReplacementSlot | this_ExpressionReplacementSlot_1= ruleExpressionReplacementSlot ) ; + public final EObject ruleConceptReplacementSlot() throws RecognitionException { + EObject current = null; + + EObject this_ConceptIdReplacementSlot_0 = null; + + EObject this_ExpressionReplacementSlot_1 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:1537:2: ( (this_ConceptIdReplacementSlot_0= ruleConceptIdReplacementSlot | this_ExpressionReplacementSlot_1= ruleExpressionReplacementSlot ) ) + // InternalEtlParser.g:1538:2: (this_ConceptIdReplacementSlot_0= ruleConceptIdReplacementSlot | this_ExpressionReplacementSlot_1= ruleExpressionReplacementSlot ) + { + // InternalEtlParser.g:1538:2: (this_ConceptIdReplacementSlot_0= ruleConceptIdReplacementSlot | this_ExpressionReplacementSlot_1= ruleExpressionReplacementSlot ) + int alt36=2; + int LA36_0 = input.LA(1); + + if ( (LA36_0==RULE_DOUBLE_SQUARE_OPEN) ) { + int LA36_1 = input.LA(2); + + if ( (LA36_1==RULE_PLUS) ) { + int LA36_2 = input.LA(3); + + if ( (LA36_2==RULE_ID) ) { + alt36=1; + } + else if ( (LA36_2==RULE_DOUBLE_SQUARE_CLOSE||LA36_2==RULE_SCG||LA36_2==RULE_SLOTNAME_STRING||LA36_2==RULE_ROUND_OPEN) ) { + alt36=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 36, 2, input); + + throw nvae; + } + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 36, 1, input); + + throw nvae; + } + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 36, 0, input); + + throw nvae; + } + switch (alt36) { + case 1 : + // InternalEtlParser.g:1539:3: this_ConceptIdReplacementSlot_0= ruleConceptIdReplacementSlot + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getConceptReplacementSlotAccess().getConceptIdReplacementSlotParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_ConceptIdReplacementSlot_0=ruleConceptIdReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_ConceptIdReplacementSlot_0; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:1551:3: this_ExpressionReplacementSlot_1= ruleExpressionReplacementSlot + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getConceptReplacementSlotAccess().getExpressionReplacementSlotParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_ExpressionReplacementSlot_1=ruleExpressionReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_ExpressionReplacementSlot_1; + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleConceptReplacementSlot" + + + // $ANTLR start "entryRuleConceptReference" + // InternalEtlParser.g:1566:1: entryRuleConceptReference returns [EObject current=null] : iv_ruleConceptReference= ruleConceptReference EOF ; + public final EObject entryRuleConceptReference() throws RecognitionException { + EObject current = null; + + EObject iv_ruleConceptReference = null; + + + try { + // InternalEtlParser.g:1566:57: (iv_ruleConceptReference= ruleConceptReference EOF ) + // InternalEtlParser.g:1567:2: iv_ruleConceptReference= ruleConceptReference EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getConceptReferenceRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleConceptReference=ruleConceptReference(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleConceptReference; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleConceptReference" + + + // $ANTLR start "ruleConceptReference" + // InternalEtlParser.g:1573:1: ruleConceptReference returns [EObject current=null] : ( ( (lv_slot_0_0= ruleConceptReplacementSlot ) ) | ( ( (lv_id_1_0= ruleSnomedIdentifier ) ) ( (lv_term_2_0= RULE_TERM_STRING ) )? ) ) ; + public final EObject ruleConceptReference() throws RecognitionException { + EObject current = null; + + Token lv_term_2_0=null; + EObject lv_slot_0_0 = null; + + AntlrDatatypeRuleToken lv_id_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:1579:2: ( ( ( (lv_slot_0_0= ruleConceptReplacementSlot ) ) | ( ( (lv_id_1_0= ruleSnomedIdentifier ) ) ( (lv_term_2_0= RULE_TERM_STRING ) )? ) ) ) + // InternalEtlParser.g:1580:2: ( ( (lv_slot_0_0= ruleConceptReplacementSlot ) ) | ( ( (lv_id_1_0= ruleSnomedIdentifier ) ) ( (lv_term_2_0= RULE_TERM_STRING ) )? ) ) + { + // InternalEtlParser.g:1580:2: ( ( (lv_slot_0_0= ruleConceptReplacementSlot ) ) | ( ( (lv_id_1_0= ruleSnomedIdentifier ) ) ( (lv_term_2_0= RULE_TERM_STRING ) )? ) ) + int alt38=2; + int LA38_0 = input.LA(1); + + if ( (LA38_0==RULE_DOUBLE_SQUARE_OPEN) ) { + alt38=1; + } + else if ( (LA38_0==RULE_DIGIT_NONZERO) ) { + alt38=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 38, 0, input); + + throw nvae; + } + switch (alt38) { + case 1 : + // InternalEtlParser.g:1581:3: ( (lv_slot_0_0= ruleConceptReplacementSlot ) ) + { + // InternalEtlParser.g:1581:3: ( (lv_slot_0_0= ruleConceptReplacementSlot ) ) + // InternalEtlParser.g:1582:4: (lv_slot_0_0= ruleConceptReplacementSlot ) + { + // InternalEtlParser.g:1582:4: (lv_slot_0_0= ruleConceptReplacementSlot ) + // InternalEtlParser.g:1583:5: lv_slot_0_0= ruleConceptReplacementSlot + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getConceptReferenceAccess().getSlotConceptReplacementSlotParserRuleCall_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_slot_0_0=ruleConceptReplacementSlot(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getConceptReferenceRule()); + } + set( + current, + "slot", + lv_slot_0_0, + "com.b2international.snowowl.snomed.etl.Etl.ConceptReplacementSlot"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + case 2 : + // InternalEtlParser.g:1601:3: ( ( (lv_id_1_0= ruleSnomedIdentifier ) ) ( (lv_term_2_0= RULE_TERM_STRING ) )? ) + { + // InternalEtlParser.g:1601:3: ( ( (lv_id_1_0= ruleSnomedIdentifier ) ) ( (lv_term_2_0= RULE_TERM_STRING ) )? ) + // InternalEtlParser.g:1602:4: ( (lv_id_1_0= ruleSnomedIdentifier ) ) ( (lv_term_2_0= RULE_TERM_STRING ) )? + { + // InternalEtlParser.g:1602:4: ( (lv_id_1_0= ruleSnomedIdentifier ) ) + // InternalEtlParser.g:1603:5: (lv_id_1_0= ruleSnomedIdentifier ) + { + // InternalEtlParser.g:1603:5: (lv_id_1_0= ruleSnomedIdentifier ) + // InternalEtlParser.g:1604:6: lv_id_1_0= ruleSnomedIdentifier + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getConceptReferenceAccess().getIdSnomedIdentifierParserRuleCall_1_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_33); + lv_id_1_0=ruleSnomedIdentifier(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getConceptReferenceRule()); + } + set( + current, + "id", + lv_id_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SnomedIdentifier"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + // InternalEtlParser.g:1621:4: ( (lv_term_2_0= RULE_TERM_STRING ) )? + int alt37=2; + int LA37_0 = input.LA(1); + + if ( (LA37_0==RULE_TERM_STRING) ) { + alt37=1; + } + switch (alt37) { + case 1 : + // InternalEtlParser.g:1622:5: (lv_term_2_0= RULE_TERM_STRING ) + { + // InternalEtlParser.g:1622:5: (lv_term_2_0= RULE_TERM_STRING ) + // InternalEtlParser.g:1623:6: lv_term_2_0= RULE_TERM_STRING + { + lv_term_2_0=(Token)match(input,RULE_TERM_STRING,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_term_2_0, grammarAccess.getConceptReferenceAccess().getTermTERM_STRINGTerminalRuleCall_1_1_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getConceptReferenceRule()); + } + setWithLastConsumed( + current, + "term", + lv_term_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.TERM_STRING"); + + } + + } + + + } + break; + + } + + + } + + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleConceptReference" + + + // $ANTLR start "entryRuleSlotToken" + // InternalEtlParser.g:1644:1: entryRuleSlotToken returns [String current=null] : iv_ruleSlotToken= ruleSlotToken EOF ; + public final String entryRuleSlotToken() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleSlotToken = null; + + + try { + // InternalEtlParser.g:1644:49: (iv_ruleSlotToken= ruleSlotToken EOF ) + // InternalEtlParser.g:1645:2: iv_ruleSlotToken= ruleSlotToken EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSlotTokenRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSlotToken=ruleSlotToken(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSlotToken.getText(); + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSlotToken" + + + // $ANTLR start "ruleSlotToken" + // InternalEtlParser.g:1651:1: ruleSlotToken returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_EQUIVALENT_TO_0= RULE_EQUIVALENT_TO | this_SUBTYPE_OF_1= RULE_SUBTYPE_OF | this_COMMA_2= RULE_COMMA | this_CONJUNCTION_3= RULE_CONJUNCTION | this_DISJUNCTION_4= RULE_DISJUNCTION | this_EXCLUSION_5= RULE_EXCLUSION | this_REVERSED_6= RULE_REVERSED | this_CARET_7= RULE_CARET | this_LT_8= RULE_LT | this_LTE_9= RULE_LTE | this_DBL_LT_10= RULE_DBL_LT | this_LT_EM_11= RULE_LT_EM | this_GT_12= RULE_GT | this_GTE_13= RULE_GTE | this_DBL_GT_14= RULE_DBL_GT | this_GT_EM_15= RULE_GT_EM | this_EQUAL_16= RULE_EQUAL | this_NOT_EQUAL_17= RULE_NOT_EQUAL ) ; + public final AntlrDatatypeRuleToken ruleSlotToken() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_EQUIVALENT_TO_0=null; + Token this_SUBTYPE_OF_1=null; + Token this_COMMA_2=null; + Token this_CONJUNCTION_3=null; + Token this_DISJUNCTION_4=null; + Token this_EXCLUSION_5=null; + Token this_REVERSED_6=null; + Token this_CARET_7=null; + Token this_LT_8=null; + Token this_LTE_9=null; + Token this_DBL_LT_10=null; + Token this_LT_EM_11=null; + Token this_GT_12=null; + Token this_GTE_13=null; + Token this_DBL_GT_14=null; + Token this_GT_EM_15=null; + Token this_EQUAL_16=null; + Token this_NOT_EQUAL_17=null; + + + enterRule(); + + try { + // InternalEtlParser.g:1657:2: ( (this_EQUIVALENT_TO_0= RULE_EQUIVALENT_TO | this_SUBTYPE_OF_1= RULE_SUBTYPE_OF | this_COMMA_2= RULE_COMMA | this_CONJUNCTION_3= RULE_CONJUNCTION | this_DISJUNCTION_4= RULE_DISJUNCTION | this_EXCLUSION_5= RULE_EXCLUSION | this_REVERSED_6= RULE_REVERSED | this_CARET_7= RULE_CARET | this_LT_8= RULE_LT | this_LTE_9= RULE_LTE | this_DBL_LT_10= RULE_DBL_LT | this_LT_EM_11= RULE_LT_EM | this_GT_12= RULE_GT | this_GTE_13= RULE_GTE | this_DBL_GT_14= RULE_DBL_GT | this_GT_EM_15= RULE_GT_EM | this_EQUAL_16= RULE_EQUAL | this_NOT_EQUAL_17= RULE_NOT_EQUAL ) ) + // InternalEtlParser.g:1658:2: (this_EQUIVALENT_TO_0= RULE_EQUIVALENT_TO | this_SUBTYPE_OF_1= RULE_SUBTYPE_OF | this_COMMA_2= RULE_COMMA | this_CONJUNCTION_3= RULE_CONJUNCTION | this_DISJUNCTION_4= RULE_DISJUNCTION | this_EXCLUSION_5= RULE_EXCLUSION | this_REVERSED_6= RULE_REVERSED | this_CARET_7= RULE_CARET | this_LT_8= RULE_LT | this_LTE_9= RULE_LTE | this_DBL_LT_10= RULE_DBL_LT | this_LT_EM_11= RULE_LT_EM | this_GT_12= RULE_GT | this_GTE_13= RULE_GTE | this_DBL_GT_14= RULE_DBL_GT | this_GT_EM_15= RULE_GT_EM | this_EQUAL_16= RULE_EQUAL | this_NOT_EQUAL_17= RULE_NOT_EQUAL ) + { + // InternalEtlParser.g:1658:2: (this_EQUIVALENT_TO_0= RULE_EQUIVALENT_TO | this_SUBTYPE_OF_1= RULE_SUBTYPE_OF | this_COMMA_2= RULE_COMMA | this_CONJUNCTION_3= RULE_CONJUNCTION | this_DISJUNCTION_4= RULE_DISJUNCTION | this_EXCLUSION_5= RULE_EXCLUSION | this_REVERSED_6= RULE_REVERSED | this_CARET_7= RULE_CARET | this_LT_8= RULE_LT | this_LTE_9= RULE_LTE | this_DBL_LT_10= RULE_DBL_LT | this_LT_EM_11= RULE_LT_EM | this_GT_12= RULE_GT | this_GTE_13= RULE_GTE | this_DBL_GT_14= RULE_DBL_GT | this_GT_EM_15= RULE_GT_EM | this_EQUAL_16= RULE_EQUAL | this_NOT_EQUAL_17= RULE_NOT_EQUAL ) + int alt39=18; + switch ( input.LA(1) ) { + case RULE_EQUIVALENT_TO: + { + alt39=1; + } + break; + case RULE_SUBTYPE_OF: + { + alt39=2; + } + break; + case RULE_COMMA: + { + alt39=3; + } + break; + case RULE_CONJUNCTION: + { + alt39=4; + } + break; + case RULE_DISJUNCTION: + { + alt39=5; + } + break; + case RULE_EXCLUSION: + { + alt39=6; + } + break; + case RULE_REVERSED: + { + alt39=7; + } + break; + case RULE_CARET: + { + alt39=8; + } + break; + case RULE_LT: + { + alt39=9; + } + break; + case RULE_LTE: + { + alt39=10; + } + break; + case RULE_DBL_LT: + { + alt39=11; + } + break; + case RULE_LT_EM: + { + alt39=12; + } + break; + case RULE_GT: + { + alt39=13; + } + break; + case RULE_GTE: + { + alt39=14; + } + break; + case RULE_DBL_GT: + { + alt39=15; + } + break; + case RULE_GT_EM: + { + alt39=16; + } + break; + case RULE_EQUAL: + { + alt39=17; + } + break; + case RULE_NOT_EQUAL: + { + alt39=18; + } + break; + default: + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 39, 0, input); + + throw nvae; + } + + switch (alt39) { + case 1 : + // InternalEtlParser.g:1659:3: this_EQUIVALENT_TO_0= RULE_EQUIVALENT_TO + { + this_EQUIVALENT_TO_0=(Token)match(input,RULE_EQUIVALENT_TO,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_EQUIVALENT_TO_0); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_EQUIVALENT_TO_0, grammarAccess.getSlotTokenAccess().getEQUIVALENT_TOTerminalRuleCall_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:1667:3: this_SUBTYPE_OF_1= RULE_SUBTYPE_OF + { + this_SUBTYPE_OF_1=(Token)match(input,RULE_SUBTYPE_OF,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_SUBTYPE_OF_1); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_SUBTYPE_OF_1, grammarAccess.getSlotTokenAccess().getSUBTYPE_OFTerminalRuleCall_1()); + + } + + } + break; + case 3 : + // InternalEtlParser.g:1675:3: this_COMMA_2= RULE_COMMA + { + this_COMMA_2=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_COMMA_2); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_COMMA_2, grammarAccess.getSlotTokenAccess().getCOMMATerminalRuleCall_2()); + + } + + } + break; + case 4 : + // InternalEtlParser.g:1683:3: this_CONJUNCTION_3= RULE_CONJUNCTION + { + this_CONJUNCTION_3=(Token)match(input,RULE_CONJUNCTION,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_CONJUNCTION_3); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_CONJUNCTION_3, grammarAccess.getSlotTokenAccess().getCONJUNCTIONTerminalRuleCall_3()); + + } + + } + break; + case 5 : + // InternalEtlParser.g:1691:3: this_DISJUNCTION_4= RULE_DISJUNCTION + { + this_DISJUNCTION_4=(Token)match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DISJUNCTION_4); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DISJUNCTION_4, grammarAccess.getSlotTokenAccess().getDISJUNCTIONTerminalRuleCall_4()); + + } + + } + break; + case 6 : + // InternalEtlParser.g:1699:3: this_EXCLUSION_5= RULE_EXCLUSION + { + this_EXCLUSION_5=(Token)match(input,RULE_EXCLUSION,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_EXCLUSION_5); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_EXCLUSION_5, grammarAccess.getSlotTokenAccess().getEXCLUSIONTerminalRuleCall_5()); + + } + + } + break; + case 7 : + // InternalEtlParser.g:1707:3: this_REVERSED_6= RULE_REVERSED + { + this_REVERSED_6=(Token)match(input,RULE_REVERSED,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_REVERSED_6); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_REVERSED_6, grammarAccess.getSlotTokenAccess().getREVERSEDTerminalRuleCall_6()); + + } + + } + break; + case 8 : + // InternalEtlParser.g:1715:3: this_CARET_7= RULE_CARET + { + this_CARET_7=(Token)match(input,RULE_CARET,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_CARET_7); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_CARET_7, grammarAccess.getSlotTokenAccess().getCARETTerminalRuleCall_7()); + + } + + } + break; + case 9 : + // InternalEtlParser.g:1723:3: this_LT_8= RULE_LT + { + this_LT_8=(Token)match(input,RULE_LT,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_LT_8); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_LT_8, grammarAccess.getSlotTokenAccess().getLTTerminalRuleCall_8()); + + } + + } + break; + case 10 : + // InternalEtlParser.g:1731:3: this_LTE_9= RULE_LTE + { + this_LTE_9=(Token)match(input,RULE_LTE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_LTE_9); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_LTE_9, grammarAccess.getSlotTokenAccess().getLTETerminalRuleCall_9()); + + } + + } + break; + case 11 : + // InternalEtlParser.g:1739:3: this_DBL_LT_10= RULE_DBL_LT + { + this_DBL_LT_10=(Token)match(input,RULE_DBL_LT,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DBL_LT_10); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DBL_LT_10, grammarAccess.getSlotTokenAccess().getDBL_LTTerminalRuleCall_10()); + + } + + } + break; + case 12 : + // InternalEtlParser.g:1747:3: this_LT_EM_11= RULE_LT_EM + { + this_LT_EM_11=(Token)match(input,RULE_LT_EM,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_LT_EM_11); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_LT_EM_11, grammarAccess.getSlotTokenAccess().getLT_EMTerminalRuleCall_11()); + + } + + } + break; + case 13 : + // InternalEtlParser.g:1755:3: this_GT_12= RULE_GT + { + this_GT_12=(Token)match(input,RULE_GT,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_GT_12); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_GT_12, grammarAccess.getSlotTokenAccess().getGTTerminalRuleCall_12()); + + } + + } + break; + case 14 : + // InternalEtlParser.g:1763:3: this_GTE_13= RULE_GTE + { + this_GTE_13=(Token)match(input,RULE_GTE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_GTE_13); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_GTE_13, grammarAccess.getSlotTokenAccess().getGTETerminalRuleCall_13()); + + } + + } + break; + case 15 : + // InternalEtlParser.g:1771:3: this_DBL_GT_14= RULE_DBL_GT + { + this_DBL_GT_14=(Token)match(input,RULE_DBL_GT,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DBL_GT_14); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DBL_GT_14, grammarAccess.getSlotTokenAccess().getDBL_GTTerminalRuleCall_14()); + + } + + } + break; + case 16 : + // InternalEtlParser.g:1779:3: this_GT_EM_15= RULE_GT_EM + { + this_GT_EM_15=(Token)match(input,RULE_GT_EM,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_GT_EM_15); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_GT_EM_15, grammarAccess.getSlotTokenAccess().getGT_EMTerminalRuleCall_15()); + + } + + } + break; + case 17 : + // InternalEtlParser.g:1787:3: this_EQUAL_16= RULE_EQUAL + { + this_EQUAL_16=(Token)match(input,RULE_EQUAL,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_EQUAL_16); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_EQUAL_16, grammarAccess.getSlotTokenAccess().getEQUALTerminalRuleCall_16()); + + } + + } + break; + case 18 : + // InternalEtlParser.g:1795:3: this_NOT_EQUAL_17= RULE_NOT_EQUAL + { + this_NOT_EQUAL_17=(Token)match(input,RULE_NOT_EQUAL,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_NOT_EQUAL_17); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_NOT_EQUAL_17, grammarAccess.getSlotTokenAccess().getNOT_EQUALTerminalRuleCall_17()); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSlotToken" + + + // $ANTLR start "entryRuleStringValue" + // InternalEtlParser.g:1806:1: entryRuleStringValue returns [EObject current=null] : iv_ruleStringValue= ruleStringValue EOF ; + public final EObject entryRuleStringValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleStringValue = null; + + + try { + // InternalEtlParser.g:1806:52: (iv_ruleStringValue= ruleStringValue EOF ) + // InternalEtlParser.g:1807:2: iv_ruleStringValue= ruleStringValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getStringValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleStringValue=ruleStringValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleStringValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleStringValue" + + + // $ANTLR start "ruleStringValue" + // InternalEtlParser.g:1813:1: ruleStringValue returns [EObject current=null] : ( (lv_value_0_0= RULE_STRING ) ) ; + public final EObject ruleStringValue() throws RecognitionException { + EObject current = null; + + Token lv_value_0_0=null; + + + enterRule(); + + try { + // InternalEtlParser.g:1819:2: ( ( (lv_value_0_0= RULE_STRING ) ) ) + // InternalEtlParser.g:1820:2: ( (lv_value_0_0= RULE_STRING ) ) + { + // InternalEtlParser.g:1820:2: ( (lv_value_0_0= RULE_STRING ) ) + // InternalEtlParser.g:1821:3: (lv_value_0_0= RULE_STRING ) + { + // InternalEtlParser.g:1821:3: (lv_value_0_0= RULE_STRING ) + // InternalEtlParser.g:1822:4: lv_value_0_0= RULE_STRING + { + lv_value_0_0=(Token)match(input,RULE_STRING,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_value_0_0, grammarAccess.getStringValueAccess().getValueSTRINGTerminalRuleCall_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getStringValueRule()); + } + setWithLastConsumed( + current, + "value", + lv_value_0_0, + "com.b2international.snowowl.snomed.ecl.Ecl.STRING"); + + } + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleStringValue" + + + // $ANTLR start "entryRuleIntegerValue" + // InternalEtlParser.g:1841:1: entryRuleIntegerValue returns [EObject current=null] : iv_ruleIntegerValue= ruleIntegerValue EOF ; + public final EObject entryRuleIntegerValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleIntegerValue = null; + + + try { + // InternalEtlParser.g:1841:53: (iv_ruleIntegerValue= ruleIntegerValue EOF ) + // InternalEtlParser.g:1842:2: iv_ruleIntegerValue= ruleIntegerValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getIntegerValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleIntegerValue=ruleIntegerValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleIntegerValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleIntegerValue" + + + // $ANTLR start "ruleIntegerValue" + // InternalEtlParser.g:1848:1: ruleIntegerValue returns [EObject current=null] : (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleInteger ) ) ) ; + public final EObject ruleIntegerValue() throws RecognitionException { + EObject current = null; + + Token this_HASH_0=null; + AntlrDatatypeRuleToken lv_value_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:1854:2: ( (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleInteger ) ) ) ) + // InternalEtlParser.g:1855:2: (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleInteger ) ) ) + { + // InternalEtlParser.g:1855:2: (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleInteger ) ) ) + // InternalEtlParser.g:1856:3: this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleInteger ) ) + { + this_HASH_0=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_0, grammarAccess.getIntegerValueAccess().getHASHTerminalRuleCall_0()); + + } + // InternalEtlParser.g:1860:3: ( (lv_value_1_0= ruleInteger ) ) + // InternalEtlParser.g:1861:4: (lv_value_1_0= ruleInteger ) + { + // InternalEtlParser.g:1861:4: (lv_value_1_0= ruleInteger ) + // InternalEtlParser.g:1862:5: lv_value_1_0= ruleInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getIntegerValueAccess().getValueIntegerParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_1_0=ruleInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getIntegerValueRule()); + } + set( + current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleIntegerValue" + + + // $ANTLR start "entryRuleDecimalValue" + // InternalEtlParser.g:1883:1: entryRuleDecimalValue returns [EObject current=null] : iv_ruleDecimalValue= ruleDecimalValue EOF ; + public final EObject entryRuleDecimalValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleDecimalValue = null; + + + try { + // InternalEtlParser.g:1883:53: (iv_ruleDecimalValue= ruleDecimalValue EOF ) + // InternalEtlParser.g:1884:2: iv_ruleDecimalValue= ruleDecimalValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDecimalValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDecimalValue=ruleDecimalValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDecimalValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleDecimalValue" + + + // $ANTLR start "ruleDecimalValue" + // InternalEtlParser.g:1890:1: ruleDecimalValue returns [EObject current=null] : (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleDecimal ) ) ) ; + public final EObject ruleDecimalValue() throws RecognitionException { + EObject current = null; + + Token this_HASH_0=null; + AntlrDatatypeRuleToken lv_value_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:1896:2: ( (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleDecimal ) ) ) ) + // InternalEtlParser.g:1897:2: (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleDecimal ) ) ) + { + // InternalEtlParser.g:1897:2: (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleDecimal ) ) ) + // InternalEtlParser.g:1898:3: this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleDecimal ) ) + { + this_HASH_0=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_0, grammarAccess.getDecimalValueAccess().getHASHTerminalRuleCall_0()); + + } + // InternalEtlParser.g:1902:3: ( (lv_value_1_0= ruleDecimal ) ) + // InternalEtlParser.g:1903:4: (lv_value_1_0= ruleDecimal ) + { + // InternalEtlParser.g:1903:4: (lv_value_1_0= ruleDecimal ) + // InternalEtlParser.g:1904:5: lv_value_1_0= ruleDecimal + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDecimalValueAccess().getValueDecimalParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_1_0=ruleDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getDecimalValueRule()); + } + set( + current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleDecimalValue" + + + // $ANTLR start "entryRuleSlotInteger" + // InternalEtlParser.g:1925:1: entryRuleSlotInteger returns [EObject current=null] : iv_ruleSlotInteger= ruleSlotInteger EOF ; + public final EObject entryRuleSlotInteger() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSlotInteger = null; + + + try { + // InternalEtlParser.g:1925:52: (iv_ruleSlotInteger= ruleSlotInteger EOF ) + // InternalEtlParser.g:1926:2: iv_ruleSlotInteger= ruleSlotInteger EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSlotIntegerRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSlotInteger=ruleSlotInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSlotInteger; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSlotInteger" + + + // $ANTLR start "ruleSlotInteger" + // InternalEtlParser.g:1932:1: ruleSlotInteger returns [EObject current=null] : (this_SlotIntegerRange_0= ruleSlotIntegerRange | this_SlotIntegerValue_1= ruleSlotIntegerValue ) ; + public final EObject ruleSlotInteger() throws RecognitionException { + EObject current = null; + + EObject this_SlotIntegerRange_0 = null; + + EObject this_SlotIntegerValue_1 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:1938:2: ( (this_SlotIntegerRange_0= ruleSlotIntegerRange | this_SlotIntegerValue_1= ruleSlotIntegerValue ) ) + // InternalEtlParser.g:1939:2: (this_SlotIntegerRange_0= ruleSlotIntegerRange | this_SlotIntegerValue_1= ruleSlotIntegerValue ) + { + // InternalEtlParser.g:1939:2: (this_SlotIntegerRange_0= ruleSlotIntegerRange | this_SlotIntegerValue_1= ruleSlotIntegerValue ) + int alt40=2; + alt40 = dfa40.predict(input); + switch (alt40) { + case 1 : + // InternalEtlParser.g:1940:3: this_SlotIntegerRange_0= ruleSlotIntegerRange + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotIntegerAccess().getSlotIntegerRangeParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_SlotIntegerRange_0=ruleSlotIntegerRange(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_SlotIntegerRange_0; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:1952:3: this_SlotIntegerValue_1= ruleSlotIntegerValue + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotIntegerAccess().getSlotIntegerValueParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_SlotIntegerValue_1=ruleSlotIntegerValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_SlotIntegerValue_1; + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSlotInteger" + + + // $ANTLR start "entryRuleSlotIntegerValue" + // InternalEtlParser.g:1967:1: entryRuleSlotIntegerValue returns [EObject current=null] : iv_ruleSlotIntegerValue= ruleSlotIntegerValue EOF ; + public final EObject entryRuleSlotIntegerValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSlotIntegerValue = null; + + + try { + // InternalEtlParser.g:1967:57: (iv_ruleSlotIntegerValue= ruleSlotIntegerValue EOF ) + // InternalEtlParser.g:1968:2: iv_ruleSlotIntegerValue= ruleSlotIntegerValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSlotIntegerValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSlotIntegerValue=ruleSlotIntegerValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSlotIntegerValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSlotIntegerValue" + + + // $ANTLR start "ruleSlotIntegerValue" + // InternalEtlParser.g:1974:1: ruleSlotIntegerValue returns [EObject current=null] : (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleNonNegativeInteger ) ) ) ; + public final EObject ruleSlotIntegerValue() throws RecognitionException { + EObject current = null; + + Token this_HASH_0=null; + AntlrDatatypeRuleToken lv_value_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:1980:2: ( (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleNonNegativeInteger ) ) ) ) + // InternalEtlParser.g:1981:2: (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleNonNegativeInteger ) ) ) + { + // InternalEtlParser.g:1981:2: (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleNonNegativeInteger ) ) ) + // InternalEtlParser.g:1982:3: this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleNonNegativeInteger ) ) + { + this_HASH_0=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_30); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_0, grammarAccess.getSlotIntegerValueAccess().getHASHTerminalRuleCall_0()); + + } + // InternalEtlParser.g:1986:3: ( (lv_value_1_0= ruleNonNegativeInteger ) ) + // InternalEtlParser.g:1987:4: (lv_value_1_0= ruleNonNegativeInteger ) + { + // InternalEtlParser.g:1987:4: (lv_value_1_0= ruleNonNegativeInteger ) + // InternalEtlParser.g:1988:5: lv_value_1_0= ruleNonNegativeInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotIntegerValueAccess().getValueNonNegativeIntegerParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_1_0=ruleNonNegativeInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSlotIntegerValueRule()); + } + set( + current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeInteger"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSlotIntegerValue" + + + // $ANTLR start "entryRuleSlotIntegerRange" + // InternalEtlParser.g:2009:1: entryRuleSlotIntegerRange returns [EObject current=null] : iv_ruleSlotIntegerRange= ruleSlotIntegerRange EOF ; + public final EObject entryRuleSlotIntegerRange() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSlotIntegerRange = null; + + + try { + // InternalEtlParser.g:2009:57: (iv_ruleSlotIntegerRange= ruleSlotIntegerRange EOF ) + // InternalEtlParser.g:2010:2: iv_ruleSlotIntegerRange= ruleSlotIntegerRange EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSlotIntegerRangeRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSlotIntegerRange=ruleSlotIntegerRange(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSlotIntegerRange; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSlotIntegerRange" + + + // $ANTLR start "ruleSlotIntegerRange" + // InternalEtlParser.g:2016:1: ruleSlotIntegerRange returns [EObject current=null] : ( ( ( (lv_minimum_0_0= ruleSlotIntegerMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotIntegerMaximumValue ) )? ) | (this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotIntegerMaximumValue ) ) ) ) ; + public final EObject ruleSlotIntegerRange() throws RecognitionException { + EObject current = null; + + Token this_TO_1=null; + Token this_TO_3=null; + EObject lv_minimum_0_0 = null; + + EObject lv_maximum_2_0 = null; + + EObject lv_maximum_4_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2022:2: ( ( ( ( (lv_minimum_0_0= ruleSlotIntegerMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotIntegerMaximumValue ) )? ) | (this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotIntegerMaximumValue ) ) ) ) ) + // InternalEtlParser.g:2023:2: ( ( ( (lv_minimum_0_0= ruleSlotIntegerMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotIntegerMaximumValue ) )? ) | (this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotIntegerMaximumValue ) ) ) ) + { + // InternalEtlParser.g:2023:2: ( ( ( (lv_minimum_0_0= ruleSlotIntegerMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotIntegerMaximumValue ) )? ) | (this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotIntegerMaximumValue ) ) ) ) + int alt42=2; + int LA42_0 = input.LA(1); + + if ( (LA42_0==RULE_GT||LA42_0==RULE_HASH) ) { + alt42=1; + } + else if ( (LA42_0==RULE_TO) ) { + alt42=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 42, 0, input); + + throw nvae; + } + switch (alt42) { + case 1 : + // InternalEtlParser.g:2024:3: ( ( (lv_minimum_0_0= ruleSlotIntegerMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotIntegerMaximumValue ) )? ) + { + // InternalEtlParser.g:2024:3: ( ( (lv_minimum_0_0= ruleSlotIntegerMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotIntegerMaximumValue ) )? ) + // InternalEtlParser.g:2025:4: ( (lv_minimum_0_0= ruleSlotIntegerMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotIntegerMaximumValue ) )? + { + // InternalEtlParser.g:2025:4: ( (lv_minimum_0_0= ruleSlotIntegerMinimumValue ) ) + // InternalEtlParser.g:2026:5: (lv_minimum_0_0= ruleSlotIntegerMinimumValue ) + { + // InternalEtlParser.g:2026:5: (lv_minimum_0_0= ruleSlotIntegerMinimumValue ) + // InternalEtlParser.g:2027:6: lv_minimum_0_0= ruleSlotIntegerMinimumValue + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotIntegerRangeAccess().getMinimumSlotIntegerMinimumValueParserRuleCall_0_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_31); + lv_minimum_0_0=ruleSlotIntegerMinimumValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSlotIntegerRangeRule()); + } + set( + current, + "minimum", + lv_minimum_0_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotIntegerMinimumValue"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + this_TO_1=(Token)match(input,RULE_TO,FollowSets000.FOLLOW_35); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_TO_1, grammarAccess.getSlotIntegerRangeAccess().getTOTerminalRuleCall_0_1()); + + } + // InternalEtlParser.g:2048:4: ( (lv_maximum_2_0= ruleSlotIntegerMaximumValue ) )? + int alt41=2; + int LA41_0 = input.LA(1); + + if ( (LA41_0==RULE_LT) ) { + alt41=1; + } + else if ( (LA41_0==RULE_HASH) ) { + int LA41_2 = input.LA(2); + + if ( (LA41_2==RULE_ZERO) ) { + int LA41_4 = input.LA(3); + + if ( (synpred63_InternalEtlParser()) ) { + alt41=1; + } + } + else if ( (LA41_2==RULE_DIGIT_NONZERO) ) { + int LA41_5 = input.LA(3); + + if ( (synpred63_InternalEtlParser()) ) { + alt41=1; + } + } + } + switch (alt41) { + case 1 : + // InternalEtlParser.g:2049:5: (lv_maximum_2_0= ruleSlotIntegerMaximumValue ) + { + // InternalEtlParser.g:2049:5: (lv_maximum_2_0= ruleSlotIntegerMaximumValue ) + // InternalEtlParser.g:2050:6: lv_maximum_2_0= ruleSlotIntegerMaximumValue + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotIntegerRangeAccess().getMaximumSlotIntegerMaximumValueParserRuleCall_0_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_maximum_2_0=ruleSlotIntegerMaximumValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSlotIntegerRangeRule()); + } + set( + current, + "maximum", + lv_maximum_2_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotIntegerMaximumValue"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + break; + + } + + + } + + + } + break; + case 2 : + // InternalEtlParser.g:2069:3: (this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotIntegerMaximumValue ) ) ) + { + // InternalEtlParser.g:2069:3: (this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotIntegerMaximumValue ) ) ) + // InternalEtlParser.g:2070:4: this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotIntegerMaximumValue ) ) + { + this_TO_3=(Token)match(input,RULE_TO,FollowSets000.FOLLOW_36); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_TO_3, grammarAccess.getSlotIntegerRangeAccess().getTOTerminalRuleCall_1_0()); + + } + // InternalEtlParser.g:2074:4: ( (lv_maximum_4_0= ruleSlotIntegerMaximumValue ) ) + // InternalEtlParser.g:2075:5: (lv_maximum_4_0= ruleSlotIntegerMaximumValue ) + { + // InternalEtlParser.g:2075:5: (lv_maximum_4_0= ruleSlotIntegerMaximumValue ) + // InternalEtlParser.g:2076:6: lv_maximum_4_0= ruleSlotIntegerMaximumValue + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotIntegerRangeAccess().getMaximumSlotIntegerMaximumValueParserRuleCall_1_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_maximum_4_0=ruleSlotIntegerMaximumValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSlotIntegerRangeRule()); + } + set( + current, + "maximum", + lv_maximum_4_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotIntegerMaximumValue"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSlotIntegerRange" + + + // $ANTLR start "entryRuleSlotIntegerMinimumValue" + // InternalEtlParser.g:2098:1: entryRuleSlotIntegerMinimumValue returns [EObject current=null] : iv_ruleSlotIntegerMinimumValue= ruleSlotIntegerMinimumValue EOF ; + public final EObject entryRuleSlotIntegerMinimumValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSlotIntegerMinimumValue = null; + + + try { + // InternalEtlParser.g:2098:64: (iv_ruleSlotIntegerMinimumValue= ruleSlotIntegerMinimumValue EOF ) + // InternalEtlParser.g:2099:2: iv_ruleSlotIntegerMinimumValue= ruleSlotIntegerMinimumValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSlotIntegerMinimumValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSlotIntegerMinimumValue=ruleSlotIntegerMinimumValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSlotIntegerMinimumValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSlotIntegerMinimumValue" + + + // $ANTLR start "ruleSlotIntegerMinimumValue" + // InternalEtlParser.g:2105:1: ruleSlotIntegerMinimumValue returns [EObject current=null] : ( ( (lv_exclusive_0_0= RULE_GT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeInteger ) ) ) ; + public final EObject ruleSlotIntegerMinimumValue() throws RecognitionException { + EObject current = null; + + Token lv_exclusive_0_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2111:2: ( ( ( (lv_exclusive_0_0= RULE_GT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeInteger ) ) ) ) + // InternalEtlParser.g:2112:2: ( ( (lv_exclusive_0_0= RULE_GT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeInteger ) ) ) + { + // InternalEtlParser.g:2112:2: ( ( (lv_exclusive_0_0= RULE_GT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeInteger ) ) ) + // InternalEtlParser.g:2113:3: ( (lv_exclusive_0_0= RULE_GT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeInteger ) ) + { + // InternalEtlParser.g:2113:3: ( (lv_exclusive_0_0= RULE_GT ) )? + int alt43=2; + int LA43_0 = input.LA(1); + + if ( (LA43_0==RULE_GT) ) { + alt43=1; + } + switch (alt43) { + case 1 : + // InternalEtlParser.g:2114:4: (lv_exclusive_0_0= RULE_GT ) + { + // InternalEtlParser.g:2114:4: (lv_exclusive_0_0= RULE_GT ) + // InternalEtlParser.g:2115:5: lv_exclusive_0_0= RULE_GT + { + lv_exclusive_0_0=(Token)match(input,RULE_GT,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_exclusive_0_0, grammarAccess.getSlotIntegerMinimumValueAccess().getExclusiveGTTerminalRuleCall_0_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getSlotIntegerMinimumValueRule()); + } + setWithLastConsumed( + current, + "exclusive", + true, + "com.b2international.snowowl.snomed.ecl.Ecl.GT"); + + } + + } + + + } + break; + + } + + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_30); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getSlotIntegerMinimumValueAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:2135:3: ( (lv_value_2_0= ruleNonNegativeInteger ) ) + // InternalEtlParser.g:2136:4: (lv_value_2_0= ruleNonNegativeInteger ) + { + // InternalEtlParser.g:2136:4: (lv_value_2_0= ruleNonNegativeInteger ) + // InternalEtlParser.g:2137:5: lv_value_2_0= ruleNonNegativeInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotIntegerMinimumValueAccess().getValueNonNegativeIntegerParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleNonNegativeInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSlotIntegerMinimumValueRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeInteger"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSlotIntegerMinimumValue" + + + // $ANTLR start "entryRuleSlotIntegerMaximumValue" + // InternalEtlParser.g:2158:1: entryRuleSlotIntegerMaximumValue returns [EObject current=null] : iv_ruleSlotIntegerMaximumValue= ruleSlotIntegerMaximumValue EOF ; + public final EObject entryRuleSlotIntegerMaximumValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSlotIntegerMaximumValue = null; + + + try { + // InternalEtlParser.g:2158:64: (iv_ruleSlotIntegerMaximumValue= ruleSlotIntegerMaximumValue EOF ) + // InternalEtlParser.g:2159:2: iv_ruleSlotIntegerMaximumValue= ruleSlotIntegerMaximumValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSlotIntegerMaximumValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSlotIntegerMaximumValue=ruleSlotIntegerMaximumValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSlotIntegerMaximumValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSlotIntegerMaximumValue" + + + // $ANTLR start "ruleSlotIntegerMaximumValue" + // InternalEtlParser.g:2165:1: ruleSlotIntegerMaximumValue returns [EObject current=null] : ( ( (lv_exclusive_0_0= RULE_LT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeInteger ) ) ) ; + public final EObject ruleSlotIntegerMaximumValue() throws RecognitionException { + EObject current = null; + + Token lv_exclusive_0_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2171:2: ( ( ( (lv_exclusive_0_0= RULE_LT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeInteger ) ) ) ) + // InternalEtlParser.g:2172:2: ( ( (lv_exclusive_0_0= RULE_LT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeInteger ) ) ) + { + // InternalEtlParser.g:2172:2: ( ( (lv_exclusive_0_0= RULE_LT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeInteger ) ) ) + // InternalEtlParser.g:2173:3: ( (lv_exclusive_0_0= RULE_LT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeInteger ) ) + { + // InternalEtlParser.g:2173:3: ( (lv_exclusive_0_0= RULE_LT ) )? + int alt44=2; + int LA44_0 = input.LA(1); + + if ( (LA44_0==RULE_LT) ) { + alt44=1; + } + switch (alt44) { + case 1 : + // InternalEtlParser.g:2174:4: (lv_exclusive_0_0= RULE_LT ) + { + // InternalEtlParser.g:2174:4: (lv_exclusive_0_0= RULE_LT ) + // InternalEtlParser.g:2175:5: lv_exclusive_0_0= RULE_LT + { + lv_exclusive_0_0=(Token)match(input,RULE_LT,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_exclusive_0_0, grammarAccess.getSlotIntegerMaximumValueAccess().getExclusiveLTTerminalRuleCall_0_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getSlotIntegerMaximumValueRule()); + } + setWithLastConsumed( + current, + "exclusive", + true, + "com.b2international.snowowl.snomed.ecl.Ecl.LT"); + + } + + } + + + } + break; + + } + + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_30); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getSlotIntegerMaximumValueAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:2195:3: ( (lv_value_2_0= ruleNonNegativeInteger ) ) + // InternalEtlParser.g:2196:4: (lv_value_2_0= ruleNonNegativeInteger ) + { + // InternalEtlParser.g:2196:4: (lv_value_2_0= ruleNonNegativeInteger ) + // InternalEtlParser.g:2197:5: lv_value_2_0= ruleNonNegativeInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotIntegerMaximumValueAccess().getValueNonNegativeIntegerParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleNonNegativeInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSlotIntegerMaximumValueRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeInteger"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSlotIntegerMaximumValue" + + + // $ANTLR start "entryRuleSlotDecimal" + // InternalEtlParser.g:2218:1: entryRuleSlotDecimal returns [EObject current=null] : iv_ruleSlotDecimal= ruleSlotDecimal EOF ; + public final EObject entryRuleSlotDecimal() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSlotDecimal = null; + + + try { + // InternalEtlParser.g:2218:52: (iv_ruleSlotDecimal= ruleSlotDecimal EOF ) + // InternalEtlParser.g:2219:2: iv_ruleSlotDecimal= ruleSlotDecimal EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSlotDecimalRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSlotDecimal=ruleSlotDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSlotDecimal; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSlotDecimal" + + + // $ANTLR start "ruleSlotDecimal" + // InternalEtlParser.g:2225:1: ruleSlotDecimal returns [EObject current=null] : (this_SlotDecimalRange_0= ruleSlotDecimalRange | this_SlotDecimalValue_1= ruleSlotDecimalValue ) ; + public final EObject ruleSlotDecimal() throws RecognitionException { + EObject current = null; + + EObject this_SlotDecimalRange_0 = null; + + EObject this_SlotDecimalValue_1 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2231:2: ( (this_SlotDecimalRange_0= ruleSlotDecimalRange | this_SlotDecimalValue_1= ruleSlotDecimalValue ) ) + // InternalEtlParser.g:2232:2: (this_SlotDecimalRange_0= ruleSlotDecimalRange | this_SlotDecimalValue_1= ruleSlotDecimalValue ) + { + // InternalEtlParser.g:2232:2: (this_SlotDecimalRange_0= ruleSlotDecimalRange | this_SlotDecimalValue_1= ruleSlotDecimalValue ) + int alt45=2; + alt45 = dfa45.predict(input); + switch (alt45) { + case 1 : + // InternalEtlParser.g:2233:3: this_SlotDecimalRange_0= ruleSlotDecimalRange + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotDecimalAccess().getSlotDecimalRangeParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_SlotDecimalRange_0=ruleSlotDecimalRange(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_SlotDecimalRange_0; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:2245:3: this_SlotDecimalValue_1= ruleSlotDecimalValue + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotDecimalAccess().getSlotDecimalValueParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_SlotDecimalValue_1=ruleSlotDecimalValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_SlotDecimalValue_1; + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSlotDecimal" + + + // $ANTLR start "entryRuleSlotDecimalValue" + // InternalEtlParser.g:2260:1: entryRuleSlotDecimalValue returns [EObject current=null] : iv_ruleSlotDecimalValue= ruleSlotDecimalValue EOF ; + public final EObject entryRuleSlotDecimalValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSlotDecimalValue = null; + + + try { + // InternalEtlParser.g:2260:57: (iv_ruleSlotDecimalValue= ruleSlotDecimalValue EOF ) + // InternalEtlParser.g:2261:2: iv_ruleSlotDecimalValue= ruleSlotDecimalValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSlotDecimalValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSlotDecimalValue=ruleSlotDecimalValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSlotDecimalValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSlotDecimalValue" + + + // $ANTLR start "ruleSlotDecimalValue" + // InternalEtlParser.g:2267:1: ruleSlotDecimalValue returns [EObject current=null] : (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleNonNegativeDecimal ) ) ) ; + public final EObject ruleSlotDecimalValue() throws RecognitionException { + EObject current = null; + + Token this_HASH_0=null; + AntlrDatatypeRuleToken lv_value_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2273:2: ( (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleNonNegativeDecimal ) ) ) ) + // InternalEtlParser.g:2274:2: (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleNonNegativeDecimal ) ) ) + { + // InternalEtlParser.g:2274:2: (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleNonNegativeDecimal ) ) ) + // InternalEtlParser.g:2275:3: this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleNonNegativeDecimal ) ) + { + this_HASH_0=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_0, grammarAccess.getSlotDecimalValueAccess().getHASHTerminalRuleCall_0()); + + } + // InternalEtlParser.g:2279:3: ( (lv_value_1_0= ruleNonNegativeDecimal ) ) + // InternalEtlParser.g:2280:4: (lv_value_1_0= ruleNonNegativeDecimal ) + { + // InternalEtlParser.g:2280:4: (lv_value_1_0= ruleNonNegativeDecimal ) + // InternalEtlParser.g:2281:5: lv_value_1_0= ruleNonNegativeDecimal + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotDecimalValueAccess().getValueNonNegativeDecimalParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_1_0=ruleNonNegativeDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSlotDecimalValueRule()); + } + set( + current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeDecimal"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSlotDecimalValue" + + + // $ANTLR start "entryRuleSlotDecimalRange" + // InternalEtlParser.g:2302:1: entryRuleSlotDecimalRange returns [EObject current=null] : iv_ruleSlotDecimalRange= ruleSlotDecimalRange EOF ; + public final EObject entryRuleSlotDecimalRange() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSlotDecimalRange = null; + + + try { + // InternalEtlParser.g:2302:57: (iv_ruleSlotDecimalRange= ruleSlotDecimalRange EOF ) + // InternalEtlParser.g:2303:2: iv_ruleSlotDecimalRange= ruleSlotDecimalRange EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSlotDecimalRangeRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSlotDecimalRange=ruleSlotDecimalRange(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSlotDecimalRange; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSlotDecimalRange" + + + // $ANTLR start "ruleSlotDecimalRange" + // InternalEtlParser.g:2309:1: ruleSlotDecimalRange returns [EObject current=null] : ( ( ( (lv_minimum_0_0= ruleSlotDecimalMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) )? ) | (this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotDecimalMaximumValue ) ) ) ) ; + public final EObject ruleSlotDecimalRange() throws RecognitionException { + EObject current = null; + + Token this_TO_1=null; + Token this_TO_3=null; + EObject lv_minimum_0_0 = null; + + EObject lv_maximum_2_0 = null; + + EObject lv_maximum_4_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2315:2: ( ( ( ( (lv_minimum_0_0= ruleSlotDecimalMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) )? ) | (this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotDecimalMaximumValue ) ) ) ) ) + // InternalEtlParser.g:2316:2: ( ( ( (lv_minimum_0_0= ruleSlotDecimalMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) )? ) | (this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotDecimalMaximumValue ) ) ) ) + { + // InternalEtlParser.g:2316:2: ( ( ( (lv_minimum_0_0= ruleSlotDecimalMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) )? ) | (this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotDecimalMaximumValue ) ) ) ) + int alt47=2; + int LA47_0 = input.LA(1); + + if ( (LA47_0==RULE_GT||LA47_0==RULE_HASH) ) { + alt47=1; + } + else if ( (LA47_0==RULE_TO) ) { + alt47=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 47, 0, input); + + throw nvae; + } + switch (alt47) { + case 1 : + // InternalEtlParser.g:2317:3: ( ( (lv_minimum_0_0= ruleSlotDecimalMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) )? ) + { + // InternalEtlParser.g:2317:3: ( ( (lv_minimum_0_0= ruleSlotDecimalMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) )? ) + // InternalEtlParser.g:2318:4: ( (lv_minimum_0_0= ruleSlotDecimalMinimumValue ) ) this_TO_1= RULE_TO ( (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) )? + { + // InternalEtlParser.g:2318:4: ( (lv_minimum_0_0= ruleSlotDecimalMinimumValue ) ) + // InternalEtlParser.g:2319:5: (lv_minimum_0_0= ruleSlotDecimalMinimumValue ) + { + // InternalEtlParser.g:2319:5: (lv_minimum_0_0= ruleSlotDecimalMinimumValue ) + // InternalEtlParser.g:2320:6: lv_minimum_0_0= ruleSlotDecimalMinimumValue + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotDecimalRangeAccess().getMinimumSlotDecimalMinimumValueParserRuleCall_0_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_31); + lv_minimum_0_0=ruleSlotDecimalMinimumValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSlotDecimalRangeRule()); + } + set( + current, + "minimum", + lv_minimum_0_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotDecimalMinimumValue"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + this_TO_1=(Token)match(input,RULE_TO,FollowSets000.FOLLOW_35); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_TO_1, grammarAccess.getSlotDecimalRangeAccess().getTOTerminalRuleCall_0_1()); + + } + // InternalEtlParser.g:2341:4: ( (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) )? + int alt46=2; + alt46 = dfa46.predict(input); + switch (alt46) { + case 1 : + // InternalEtlParser.g:2342:5: (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) + { + // InternalEtlParser.g:2342:5: (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) + // InternalEtlParser.g:2343:6: lv_maximum_2_0= ruleSlotDecimalMaximumValue + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotDecimalRangeAccess().getMaximumSlotDecimalMaximumValueParserRuleCall_0_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_maximum_2_0=ruleSlotDecimalMaximumValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSlotDecimalRangeRule()); + } + set( + current, + "maximum", + lv_maximum_2_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotDecimalMaximumValue"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + break; + + } + + + } + + + } + break; + case 2 : + // InternalEtlParser.g:2362:3: (this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotDecimalMaximumValue ) ) ) + { + // InternalEtlParser.g:2362:3: (this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotDecimalMaximumValue ) ) ) + // InternalEtlParser.g:2363:4: this_TO_3= RULE_TO ( (lv_maximum_4_0= ruleSlotDecimalMaximumValue ) ) + { + this_TO_3=(Token)match(input,RULE_TO,FollowSets000.FOLLOW_36); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_TO_3, grammarAccess.getSlotDecimalRangeAccess().getTOTerminalRuleCall_1_0()); + + } + // InternalEtlParser.g:2367:4: ( (lv_maximum_4_0= ruleSlotDecimalMaximumValue ) ) + // InternalEtlParser.g:2368:5: (lv_maximum_4_0= ruleSlotDecimalMaximumValue ) + { + // InternalEtlParser.g:2368:5: (lv_maximum_4_0= ruleSlotDecimalMaximumValue ) + // InternalEtlParser.g:2369:6: lv_maximum_4_0= ruleSlotDecimalMaximumValue + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotDecimalRangeAccess().getMaximumSlotDecimalMaximumValueParserRuleCall_1_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_maximum_4_0=ruleSlotDecimalMaximumValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSlotDecimalRangeRule()); + } + set( + current, + "maximum", + lv_maximum_4_0, + "com.b2international.snowowl.snomed.etl.Etl.SlotDecimalMaximumValue"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSlotDecimalRange" + + + // $ANTLR start "entryRuleSlotDecimalMinimumValue" + // InternalEtlParser.g:2391:1: entryRuleSlotDecimalMinimumValue returns [EObject current=null] : iv_ruleSlotDecimalMinimumValue= ruleSlotDecimalMinimumValue EOF ; + public final EObject entryRuleSlotDecimalMinimumValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSlotDecimalMinimumValue = null; + + + try { + // InternalEtlParser.g:2391:64: (iv_ruleSlotDecimalMinimumValue= ruleSlotDecimalMinimumValue EOF ) + // InternalEtlParser.g:2392:2: iv_ruleSlotDecimalMinimumValue= ruleSlotDecimalMinimumValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSlotDecimalMinimumValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSlotDecimalMinimumValue=ruleSlotDecimalMinimumValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSlotDecimalMinimumValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSlotDecimalMinimumValue" + + + // $ANTLR start "ruleSlotDecimalMinimumValue" + // InternalEtlParser.g:2398:1: ruleSlotDecimalMinimumValue returns [EObject current=null] : ( ( (lv_exclusive_0_0= RULE_GT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeDecimal ) ) ) ; + public final EObject ruleSlotDecimalMinimumValue() throws RecognitionException { + EObject current = null; + + Token lv_exclusive_0_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2404:2: ( ( ( (lv_exclusive_0_0= RULE_GT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeDecimal ) ) ) ) + // InternalEtlParser.g:2405:2: ( ( (lv_exclusive_0_0= RULE_GT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeDecimal ) ) ) + { + // InternalEtlParser.g:2405:2: ( ( (lv_exclusive_0_0= RULE_GT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeDecimal ) ) ) + // InternalEtlParser.g:2406:3: ( (lv_exclusive_0_0= RULE_GT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeDecimal ) ) + { + // InternalEtlParser.g:2406:3: ( (lv_exclusive_0_0= RULE_GT ) )? + int alt48=2; + int LA48_0 = input.LA(1); + + if ( (LA48_0==RULE_GT) ) { + alt48=1; + } + switch (alt48) { + case 1 : + // InternalEtlParser.g:2407:4: (lv_exclusive_0_0= RULE_GT ) + { + // InternalEtlParser.g:2407:4: (lv_exclusive_0_0= RULE_GT ) + // InternalEtlParser.g:2408:5: lv_exclusive_0_0= RULE_GT + { + lv_exclusive_0_0=(Token)match(input,RULE_GT,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_exclusive_0_0, grammarAccess.getSlotDecimalMinimumValueAccess().getExclusiveGTTerminalRuleCall_0_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getSlotDecimalMinimumValueRule()); + } + setWithLastConsumed( + current, + "exclusive", + true, + "com.b2international.snowowl.snomed.ecl.Ecl.GT"); + + } + + } + + + } + break; + + } + + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getSlotDecimalMinimumValueAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:2428:3: ( (lv_value_2_0= ruleNonNegativeDecimal ) ) + // InternalEtlParser.g:2429:4: (lv_value_2_0= ruleNonNegativeDecimal ) + { + // InternalEtlParser.g:2429:4: (lv_value_2_0= ruleNonNegativeDecimal ) + // InternalEtlParser.g:2430:5: lv_value_2_0= ruleNonNegativeDecimal + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotDecimalMinimumValueAccess().getValueNonNegativeDecimalParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleNonNegativeDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSlotDecimalMinimumValueRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeDecimal"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSlotDecimalMinimumValue" + + + // $ANTLR start "entryRuleSlotDecimalMaximumValue" + // InternalEtlParser.g:2451:1: entryRuleSlotDecimalMaximumValue returns [EObject current=null] : iv_ruleSlotDecimalMaximumValue= ruleSlotDecimalMaximumValue EOF ; + public final EObject entryRuleSlotDecimalMaximumValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSlotDecimalMaximumValue = null; + + + try { + // InternalEtlParser.g:2451:64: (iv_ruleSlotDecimalMaximumValue= ruleSlotDecimalMaximumValue EOF ) + // InternalEtlParser.g:2452:2: iv_ruleSlotDecimalMaximumValue= ruleSlotDecimalMaximumValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSlotDecimalMaximumValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSlotDecimalMaximumValue=ruleSlotDecimalMaximumValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSlotDecimalMaximumValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSlotDecimalMaximumValue" + + + // $ANTLR start "ruleSlotDecimalMaximumValue" + // InternalEtlParser.g:2458:1: ruleSlotDecimalMaximumValue returns [EObject current=null] : ( ( (lv_exclusive_0_0= RULE_LT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeDecimal ) ) ) ; + public final EObject ruleSlotDecimalMaximumValue() throws RecognitionException { + EObject current = null; + + Token lv_exclusive_0_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2464:2: ( ( ( (lv_exclusive_0_0= RULE_LT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeDecimal ) ) ) ) + // InternalEtlParser.g:2465:2: ( ( (lv_exclusive_0_0= RULE_LT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeDecimal ) ) ) + { + // InternalEtlParser.g:2465:2: ( ( (lv_exclusive_0_0= RULE_LT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeDecimal ) ) ) + // InternalEtlParser.g:2466:3: ( (lv_exclusive_0_0= RULE_LT ) )? this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleNonNegativeDecimal ) ) + { + // InternalEtlParser.g:2466:3: ( (lv_exclusive_0_0= RULE_LT ) )? + int alt49=2; + int LA49_0 = input.LA(1); + + if ( (LA49_0==RULE_LT) ) { + alt49=1; + } + switch (alt49) { + case 1 : + // InternalEtlParser.g:2467:4: (lv_exclusive_0_0= RULE_LT ) + { + // InternalEtlParser.g:2467:4: (lv_exclusive_0_0= RULE_LT ) + // InternalEtlParser.g:2468:5: lv_exclusive_0_0= RULE_LT + { + lv_exclusive_0_0=(Token)match(input,RULE_LT,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_exclusive_0_0, grammarAccess.getSlotDecimalMaximumValueAccess().getExclusiveLTTerminalRuleCall_0_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getSlotDecimalMaximumValueRule()); + } + setWithLastConsumed( + current, + "exclusive", + true, + "com.b2international.snowowl.snomed.ecl.Ecl.LT"); + + } + + } + + + } + break; + + } + + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getSlotDecimalMaximumValueAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:2488:3: ( (lv_value_2_0= ruleNonNegativeDecimal ) ) + // InternalEtlParser.g:2489:4: (lv_value_2_0= ruleNonNegativeDecimal ) + { + // InternalEtlParser.g:2489:4: (lv_value_2_0= ruleNonNegativeDecimal ) + // InternalEtlParser.g:2490:5: lv_value_2_0= ruleNonNegativeDecimal + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotDecimalMaximumValueAccess().getValueNonNegativeDecimalParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleNonNegativeDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSlotDecimalMaximumValueRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeDecimal"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSlotDecimalMaximumValue" + + + // $ANTLR start "entryRuleExpressionConstraint" + // InternalEtlParser.g:2511:1: entryRuleExpressionConstraint returns [EObject current=null] : iv_ruleExpressionConstraint= ruleExpressionConstraint EOF ; + public final EObject entryRuleExpressionConstraint() throws RecognitionException { + EObject current = null; + + EObject iv_ruleExpressionConstraint = null; + + + try { + // InternalEtlParser.g:2511:61: (iv_ruleExpressionConstraint= ruleExpressionConstraint EOF ) + // InternalEtlParser.g:2512:2: iv_ruleExpressionConstraint= ruleExpressionConstraint EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getExpressionConstraintRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleExpressionConstraint=ruleExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleExpressionConstraint; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleExpressionConstraint" + + + // $ANTLR start "ruleExpressionConstraint" + // InternalEtlParser.g:2518:1: ruleExpressionConstraint returns [EObject current=null] : this_OrExpressionConstraint_0= ruleOrExpressionConstraint ; + public final EObject ruleExpressionConstraint() throws RecognitionException { + EObject current = null; + + EObject this_OrExpressionConstraint_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2524:2: (this_OrExpressionConstraint_0= ruleOrExpressionConstraint ) + // InternalEtlParser.g:2525:2: this_OrExpressionConstraint_0= ruleOrExpressionConstraint + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getExpressionConstraintAccess().getOrExpressionConstraintParserRuleCall()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_OrExpressionConstraint_0=ruleOrExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_OrExpressionConstraint_0; + afterParserOrEnumRuleCall(); + + } + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleExpressionConstraint" + + + // $ANTLR start "entryRuleOrExpressionConstraint" + // InternalEtlParser.g:2539:1: entryRuleOrExpressionConstraint returns [EObject current=null] : iv_ruleOrExpressionConstraint= ruleOrExpressionConstraint EOF ; + public final EObject entryRuleOrExpressionConstraint() throws RecognitionException { + EObject current = null; + + EObject iv_ruleOrExpressionConstraint = null; + + + try { + // InternalEtlParser.g:2539:63: (iv_ruleOrExpressionConstraint= ruleOrExpressionConstraint EOF ) + // InternalEtlParser.g:2540:2: iv_ruleOrExpressionConstraint= ruleOrExpressionConstraint EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getOrExpressionConstraintRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleOrExpressionConstraint=ruleOrExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleOrExpressionConstraint; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleOrExpressionConstraint" + + + // $ANTLR start "ruleOrExpressionConstraint" + // InternalEtlParser.g:2546:1: ruleOrExpressionConstraint returns [EObject current=null] : (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) ; + public final EObject ruleOrExpressionConstraint() throws RecognitionException { + EObject current = null; + + Token this_DISJUNCTION_2=null; + EObject this_AndExpressionConstraint_0 = null; + + EObject lv_right_3_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2552:2: ( (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) ) + // InternalEtlParser.g:2553:2: (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) + { + // InternalEtlParser.g:2553:2: (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) + // InternalEtlParser.g:2554:3: this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getOrExpressionConstraintAccess().getAndExpressionConstraintParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_38); + this_AndExpressionConstraint_0=ruleAndExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_AndExpressionConstraint_0; + afterParserOrEnumRuleCall(); + + } + // InternalEtlParser.g:2565:3: ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* + loop50: + do { + int alt50=2; + int LA50_0 = input.LA(1); + + if ( (LA50_0==RULE_DISJUNCTION) ) { + alt50=1; + } + + + switch (alt50) { + case 1 : + // InternalEtlParser.g:2566:4: () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) + { + // InternalEtlParser.g:2566:4: () + // InternalEtlParser.g:2567:5: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElementAndSet( + grammarAccess.getOrExpressionConstraintAccess().getOrExpressionConstraintLeftAction_1_0(), + current); + + } + + } + + this_DISJUNCTION_2=(Token)match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrExpressionConstraintAccess().getDISJUNCTIONTerminalRuleCall_1_1()); + + } + // InternalEtlParser.g:2580:4: ( (lv_right_3_0= ruleAndExpressionConstraint ) ) + // InternalEtlParser.g:2581:5: (lv_right_3_0= ruleAndExpressionConstraint ) + { + // InternalEtlParser.g:2581:5: (lv_right_3_0= ruleAndExpressionConstraint ) + // InternalEtlParser.g:2582:6: lv_right_3_0= ruleAndExpressionConstraint + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getOrExpressionConstraintAccess().getRightAndExpressionConstraintParserRuleCall_1_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_38); + lv_right_3_0=ruleAndExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getOrExpressionConstraintRule()); + } + set( + current, + "right", + lv_right_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.AndExpressionConstraint"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + default : + break loop50; + } + } while (true); + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleOrExpressionConstraint" + + + // $ANTLR start "entryRuleAndExpressionConstraint" + // InternalEtlParser.g:2604:1: entryRuleAndExpressionConstraint returns [EObject current=null] : iv_ruleAndExpressionConstraint= ruleAndExpressionConstraint EOF ; + public final EObject entryRuleAndExpressionConstraint() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAndExpressionConstraint = null; + + + try { + // InternalEtlParser.g:2604:64: (iv_ruleAndExpressionConstraint= ruleAndExpressionConstraint EOF ) + // InternalEtlParser.g:2605:2: iv_ruleAndExpressionConstraint= ruleAndExpressionConstraint EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAndExpressionConstraintRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAndExpressionConstraint=ruleAndExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAndExpressionConstraint; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAndExpressionConstraint" + + + // $ANTLR start "ruleAndExpressionConstraint" + // InternalEtlParser.g:2611:1: ruleAndExpressionConstraint returns [EObject current=null] : (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) ; + public final EObject ruleAndExpressionConstraint() throws RecognitionException { + EObject current = null; + + Token this_CONJUNCTION_2=null; + Token this_COMMA_3=null; + EObject this_ExclusionExpressionConstraint_0 = null; + + EObject lv_right_4_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2617:2: ( (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) ) + // InternalEtlParser.g:2618:2: (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) + { + // InternalEtlParser.g:2618:2: (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) + // InternalEtlParser.g:2619:3: this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAndExpressionConstraintAccess().getExclusionExpressionConstraintParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_39); + this_ExclusionExpressionConstraint_0=ruleExclusionExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_ExclusionExpressionConstraint_0; + afterParserOrEnumRuleCall(); + + } + // InternalEtlParser.g:2630:3: ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* + loop52: + do { + int alt52=2; + int LA52_0 = input.LA(1); + + if ( ((LA52_0>=RULE_COMMA && LA52_0<=RULE_CONJUNCTION)) ) { + alt52=1; + } + + + switch (alt52) { + case 1 : + // InternalEtlParser.g:2631:4: () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) + { + // InternalEtlParser.g:2631:4: () + // InternalEtlParser.g:2632:5: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElementAndSet( + grammarAccess.getAndExpressionConstraintAccess().getAndExpressionConstraintLeftAction_1_0(), + current); + + } + + } + + // InternalEtlParser.g:2641:4: (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) + int alt51=2; + int LA51_0 = input.LA(1); + + if ( (LA51_0==RULE_CONJUNCTION) ) { + alt51=1; + } + else if ( (LA51_0==RULE_COMMA) ) { + alt51=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 51, 0, input); + + throw nvae; + } + switch (alt51) { + case 1 : + // InternalEtlParser.g:2642:5: this_CONJUNCTION_2= RULE_CONJUNCTION + { + this_CONJUNCTION_2=(Token)match(input,RULE_CONJUNCTION,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndExpressionConstraintAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:2647:5: this_COMMA_3= RULE_COMMA + { + this_COMMA_3=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_COMMA_3, grammarAccess.getAndExpressionConstraintAccess().getCOMMATerminalRuleCall_1_1_1()); + + } + + } + break; + + } + + // InternalEtlParser.g:2652:4: ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) + // InternalEtlParser.g:2653:5: (lv_right_4_0= ruleExclusionExpressionConstraint ) + { + // InternalEtlParser.g:2653:5: (lv_right_4_0= ruleExclusionExpressionConstraint ) + // InternalEtlParser.g:2654:6: lv_right_4_0= ruleExclusionExpressionConstraint + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAndExpressionConstraintAccess().getRightExclusionExpressionConstraintParserRuleCall_1_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_39); + lv_right_4_0=ruleExclusionExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAndExpressionConstraintRule()); + } + set( + current, + "right", + lv_right_4_0, + "com.b2international.snowowl.snomed.ecl.Ecl.ExclusionExpressionConstraint"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + default : + break loop52; + } + } while (true); + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAndExpressionConstraint" + + + // $ANTLR start "entryRuleExclusionExpressionConstraint" + // InternalEtlParser.g:2676:1: entryRuleExclusionExpressionConstraint returns [EObject current=null] : iv_ruleExclusionExpressionConstraint= ruleExclusionExpressionConstraint EOF ; + public final EObject entryRuleExclusionExpressionConstraint() throws RecognitionException { + EObject current = null; + + EObject iv_ruleExclusionExpressionConstraint = null; + + + try { + // InternalEtlParser.g:2676:70: (iv_ruleExclusionExpressionConstraint= ruleExclusionExpressionConstraint EOF ) + // InternalEtlParser.g:2677:2: iv_ruleExclusionExpressionConstraint= ruleExclusionExpressionConstraint EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getExclusionExpressionConstraintRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleExclusionExpressionConstraint=ruleExclusionExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleExclusionExpressionConstraint; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleExclusionExpressionConstraint" + + + // $ANTLR start "ruleExclusionExpressionConstraint" + // InternalEtlParser.g:2683:1: ruleExclusionExpressionConstraint returns [EObject current=null] : (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) ; + public final EObject ruleExclusionExpressionConstraint() throws RecognitionException { + EObject current = null; + + Token this_EXCLUSION_2=null; + EObject this_RefinedExpressionConstraint_0 = null; + + EObject lv_right_3_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2689:2: ( (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) ) + // InternalEtlParser.g:2690:2: (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) + { + // InternalEtlParser.g:2690:2: (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) + // InternalEtlParser.g:2691:3: this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getExclusionExpressionConstraintAccess().getRefinedExpressionConstraintParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_40); + this_RefinedExpressionConstraint_0=ruleRefinedExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_RefinedExpressionConstraint_0; + afterParserOrEnumRuleCall(); + + } + // InternalEtlParser.g:2702:3: ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? + int alt53=2; + int LA53_0 = input.LA(1); + + if ( (LA53_0==RULE_EXCLUSION) ) { + alt53=1; + } + switch (alt53) { + case 1 : + // InternalEtlParser.g:2703:4: () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) + { + // InternalEtlParser.g:2703:4: () + // InternalEtlParser.g:2704:5: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElementAndSet( + grammarAccess.getExclusionExpressionConstraintAccess().getExclusionExpressionConstraintLeftAction_1_0(), + current); + + } + + } + + this_EXCLUSION_2=(Token)match(input,RULE_EXCLUSION,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_EXCLUSION_2, grammarAccess.getExclusionExpressionConstraintAccess().getEXCLUSIONTerminalRuleCall_1_1()); + + } + // InternalEtlParser.g:2717:4: ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) + // InternalEtlParser.g:2718:5: (lv_right_3_0= ruleRefinedExpressionConstraint ) + { + // InternalEtlParser.g:2718:5: (lv_right_3_0= ruleRefinedExpressionConstraint ) + // InternalEtlParser.g:2719:6: lv_right_3_0= ruleRefinedExpressionConstraint + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getExclusionExpressionConstraintAccess().getRightRefinedExpressionConstraintParserRuleCall_1_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_right_3_0=ruleRefinedExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getExclusionExpressionConstraintRule()); + } + set( + current, + "right", + lv_right_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.RefinedExpressionConstraint"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleExclusionExpressionConstraint" + + + // $ANTLR start "entryRuleRefinedExpressionConstraint" + // InternalEtlParser.g:2741:1: entryRuleRefinedExpressionConstraint returns [EObject current=null] : iv_ruleRefinedExpressionConstraint= ruleRefinedExpressionConstraint EOF ; + public final EObject entryRuleRefinedExpressionConstraint() throws RecognitionException { + EObject current = null; + + EObject iv_ruleRefinedExpressionConstraint = null; + + + try { + // InternalEtlParser.g:2741:68: (iv_ruleRefinedExpressionConstraint= ruleRefinedExpressionConstraint EOF ) + // InternalEtlParser.g:2742:2: iv_ruleRefinedExpressionConstraint= ruleRefinedExpressionConstraint EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getRefinedExpressionConstraintRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleRefinedExpressionConstraint=ruleRefinedExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleRefinedExpressionConstraint; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleRefinedExpressionConstraint" + + + // $ANTLR start "ruleRefinedExpressionConstraint" + // InternalEtlParser.g:2748:1: ruleRefinedExpressionConstraint returns [EObject current=null] : (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? ) ; + public final EObject ruleRefinedExpressionConstraint() throws RecognitionException { + EObject current = null; + + Token this_COLON_2=null; + EObject this_DottedExpressionConstraint_0 = null; + + EObject lv_refinement_3_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2754:2: ( (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? ) ) + // InternalEtlParser.g:2755:2: (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? ) + { + // InternalEtlParser.g:2755:2: (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? ) + // InternalEtlParser.g:2756:3: this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getRefinedExpressionConstraintAccess().getDottedExpressionConstraintParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_41); + this_DottedExpressionConstraint_0=ruleDottedExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_DottedExpressionConstraint_0; + afterParserOrEnumRuleCall(); + + } + // InternalEtlParser.g:2767:3: ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? + int alt54=2; + int LA54_0 = input.LA(1); + + if ( (LA54_0==RULE_COLON) ) { + alt54=1; + } + switch (alt54) { + case 1 : + // InternalEtlParser.g:2768:4: () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) + { + // InternalEtlParser.g:2768:4: () + // InternalEtlParser.g:2769:5: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElementAndSet( + grammarAccess.getRefinedExpressionConstraintAccess().getRefinedExpressionConstraintConstraintAction_1_0(), + current); + + } + + } + + this_COLON_2=(Token)match(input,RULE_COLON,FollowSets000.FOLLOW_42); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_COLON_2, grammarAccess.getRefinedExpressionConstraintAccess().getCOLONTerminalRuleCall_1_1()); + + } + // InternalEtlParser.g:2782:4: ( (lv_refinement_3_0= ruleEclRefinement ) ) + // InternalEtlParser.g:2783:5: (lv_refinement_3_0= ruleEclRefinement ) + { + // InternalEtlParser.g:2783:5: (lv_refinement_3_0= ruleEclRefinement ) + // InternalEtlParser.g:2784:6: lv_refinement_3_0= ruleEclRefinement + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getRefinedExpressionConstraintAccess().getRefinementEclRefinementParserRuleCall_1_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_refinement_3_0=ruleEclRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getRefinedExpressionConstraintRule()); + } + set( + current, + "refinement", + lv_refinement_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclRefinement"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleRefinedExpressionConstraint" + + + // $ANTLR start "entryRuleDottedExpressionConstraint" + // InternalEtlParser.g:2806:1: entryRuleDottedExpressionConstraint returns [EObject current=null] : iv_ruleDottedExpressionConstraint= ruleDottedExpressionConstraint EOF ; + public final EObject entryRuleDottedExpressionConstraint() throws RecognitionException { + EObject current = null; + + EObject iv_ruleDottedExpressionConstraint = null; + + + try { + // InternalEtlParser.g:2806:67: (iv_ruleDottedExpressionConstraint= ruleDottedExpressionConstraint EOF ) + // InternalEtlParser.g:2807:2: iv_ruleDottedExpressionConstraint= ruleDottedExpressionConstraint EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDottedExpressionConstraintRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDottedExpressionConstraint=ruleDottedExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDottedExpressionConstraint; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleDottedExpressionConstraint" + + + // $ANTLR start "ruleDottedExpressionConstraint" + // InternalEtlParser.g:2813:1: ruleDottedExpressionConstraint returns [EObject current=null] : (this_SubExpressionConstraint_0= ruleSubExpressionConstraint ( () this_DOT_2= RULE_DOT ( (lv_attribute_3_0= ruleSubExpressionConstraint ) ) )* ) ; + public final EObject ruleDottedExpressionConstraint() throws RecognitionException { + EObject current = null; + + Token this_DOT_2=null; + EObject this_SubExpressionConstraint_0 = null; + + EObject lv_attribute_3_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2819:2: ( (this_SubExpressionConstraint_0= ruleSubExpressionConstraint ( () this_DOT_2= RULE_DOT ( (lv_attribute_3_0= ruleSubExpressionConstraint ) ) )* ) ) + // InternalEtlParser.g:2820:2: (this_SubExpressionConstraint_0= ruleSubExpressionConstraint ( () this_DOT_2= RULE_DOT ( (lv_attribute_3_0= ruleSubExpressionConstraint ) ) )* ) + { + // InternalEtlParser.g:2820:2: (this_SubExpressionConstraint_0= ruleSubExpressionConstraint ( () this_DOT_2= RULE_DOT ( (lv_attribute_3_0= ruleSubExpressionConstraint ) ) )* ) + // InternalEtlParser.g:2821:3: this_SubExpressionConstraint_0= ruleSubExpressionConstraint ( () this_DOT_2= RULE_DOT ( (lv_attribute_3_0= ruleSubExpressionConstraint ) ) )* + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDottedExpressionConstraintAccess().getSubExpressionConstraintParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_43); + this_SubExpressionConstraint_0=ruleSubExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_SubExpressionConstraint_0; + afterParserOrEnumRuleCall(); + + } + // InternalEtlParser.g:2832:3: ( () this_DOT_2= RULE_DOT ( (lv_attribute_3_0= ruleSubExpressionConstraint ) ) )* + loop55: + do { + int alt55=2; + int LA55_0 = input.LA(1); + + if ( (LA55_0==RULE_DOT) ) { + alt55=1; + } + + + switch (alt55) { + case 1 : + // InternalEtlParser.g:2833:4: () this_DOT_2= RULE_DOT ( (lv_attribute_3_0= ruleSubExpressionConstraint ) ) + { + // InternalEtlParser.g:2833:4: () + // InternalEtlParser.g:2834:5: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElementAndSet( + grammarAccess.getDottedExpressionConstraintAccess().getDottedExpressionConstraintConstraintAction_1_0(), + current); + + } + + } + + this_DOT_2=(Token)match(input,RULE_DOT,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DOT_2, grammarAccess.getDottedExpressionConstraintAccess().getDOTTerminalRuleCall_1_1()); + + } + // InternalEtlParser.g:2847:4: ( (lv_attribute_3_0= ruleSubExpressionConstraint ) ) + // InternalEtlParser.g:2848:5: (lv_attribute_3_0= ruleSubExpressionConstraint ) + { + // InternalEtlParser.g:2848:5: (lv_attribute_3_0= ruleSubExpressionConstraint ) + // InternalEtlParser.g:2849:6: lv_attribute_3_0= ruleSubExpressionConstraint + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDottedExpressionConstraintAccess().getAttributeSubExpressionConstraintParserRuleCall_1_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_43); + lv_attribute_3_0=ruleSubExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getDottedExpressionConstraintRule()); + } + set( + current, + "attribute", + lv_attribute_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SubExpressionConstraint"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + default : + break loop55; + } + } while (true); + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleDottedExpressionConstraint" + + + // $ANTLR start "entryRuleSubExpressionConstraint" + // InternalEtlParser.g:2871:1: entryRuleSubExpressionConstraint returns [EObject current=null] : iv_ruleSubExpressionConstraint= ruleSubExpressionConstraint EOF ; + public final EObject entryRuleSubExpressionConstraint() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSubExpressionConstraint = null; + + + try { + // InternalEtlParser.g:2871:64: (iv_ruleSubExpressionConstraint= ruleSubExpressionConstraint EOF ) + // InternalEtlParser.g:2872:2: iv_ruleSubExpressionConstraint= ruleSubExpressionConstraint EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSubExpressionConstraintRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSubExpressionConstraint=ruleSubExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSubExpressionConstraint; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSubExpressionConstraint" + + + // $ANTLR start "ruleSubExpressionConstraint" + // InternalEtlParser.g:2878:1: ruleSubExpressionConstraint returns [EObject current=null] : (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_EclFocusConcept_6= ruleEclFocusConcept ) ; + public final EObject ruleSubExpressionConstraint() throws RecognitionException { + EObject current = null; + + EObject this_ChildOf_0 = null; + + EObject this_DescendantOf_1 = null; + + EObject this_DescendantOrSelfOf_2 = null; + + EObject this_ParentOf_3 = null; + + EObject this_AncestorOf_4 = null; + + EObject this_AncestorOrSelfOf_5 = null; + + EObject this_EclFocusConcept_6 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2884:2: ( (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_EclFocusConcept_6= ruleEclFocusConcept ) ) + // InternalEtlParser.g:2885:2: (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_EclFocusConcept_6= ruleEclFocusConcept ) + { + // InternalEtlParser.g:2885:2: (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_EclFocusConcept_6= ruleEclFocusConcept ) + int alt56=7; + switch ( input.LA(1) ) { + case RULE_LT_EM: + { + alt56=1; + } + break; + case RULE_LT: + { + alt56=2; + } + break; + case RULE_DBL_LT: + { + alt56=3; + } + break; + case RULE_GT_EM: + { + alt56=4; + } + break; + case RULE_GT: + { + alt56=5; + } + break; + case RULE_DBL_GT: + { + alt56=6; + } + break; + case RULE_DIGIT_NONZERO: + case RULE_ROUND_OPEN: + case RULE_CARET: + case RULE_WILDCARD: + { + alt56=7; + } + break; + default: + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 56, 0, input); + + throw nvae; + } + + switch (alt56) { + case 1 : + // InternalEtlParser.g:2886:3: this_ChildOf_0= ruleChildOf + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getChildOfParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_ChildOf_0=ruleChildOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_ChildOf_0; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:2898:3: this_DescendantOf_1= ruleDescendantOf + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getDescendantOfParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_DescendantOf_1=ruleDescendantOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_DescendantOf_1; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 3 : + // InternalEtlParser.g:2910:3: this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getDescendantOrSelfOfParserRuleCall_2()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_DescendantOrSelfOf_2=ruleDescendantOrSelfOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_DescendantOrSelfOf_2; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 4 : + // InternalEtlParser.g:2922:3: this_ParentOf_3= ruleParentOf + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getParentOfParserRuleCall_3()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_ParentOf_3=ruleParentOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_ParentOf_3; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 5 : + // InternalEtlParser.g:2934:3: this_AncestorOf_4= ruleAncestorOf + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getAncestorOfParserRuleCall_4()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_AncestorOf_4=ruleAncestorOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_AncestorOf_4; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 6 : + // InternalEtlParser.g:2946:3: this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getAncestorOrSelfOfParserRuleCall_5()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_AncestorOrSelfOf_5=ruleAncestorOrSelfOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_AncestorOrSelfOf_5; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 7 : + // InternalEtlParser.g:2958:3: this_EclFocusConcept_6= ruleEclFocusConcept + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getEclFocusConceptParserRuleCall_6()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_EclFocusConcept_6=ruleEclFocusConcept(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_EclFocusConcept_6; + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSubExpressionConstraint" + + + // $ANTLR start "entryRuleEclFocusConcept" + // InternalEtlParser.g:2973:1: entryRuleEclFocusConcept returns [EObject current=null] : iv_ruleEclFocusConcept= ruleEclFocusConcept EOF ; + public final EObject entryRuleEclFocusConcept() throws RecognitionException { + EObject current = null; + + EObject iv_ruleEclFocusConcept = null; + + + try { + // InternalEtlParser.g:2973:56: (iv_ruleEclFocusConcept= ruleEclFocusConcept EOF ) + // InternalEtlParser.g:2974:2: iv_ruleEclFocusConcept= ruleEclFocusConcept EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getEclFocusConceptRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleEclFocusConcept=ruleEclFocusConcept(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleEclFocusConcept; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleEclFocusConcept" + + + // $ANTLR start "ruleEclFocusConcept" + // InternalEtlParser.g:2980:1: ruleEclFocusConcept returns [EObject current=null] : (this_MemberOf_0= ruleMemberOf | this_EclConceptReference_1= ruleEclConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) ; + public final EObject ruleEclFocusConcept() throws RecognitionException { + EObject current = null; + + EObject this_MemberOf_0 = null; + + EObject this_EclConceptReference_1 = null; + + EObject this_Any_2 = null; + + EObject this_NestedExpression_3 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:2986:2: ( (this_MemberOf_0= ruleMemberOf | this_EclConceptReference_1= ruleEclConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) ) + // InternalEtlParser.g:2987:2: (this_MemberOf_0= ruleMemberOf | this_EclConceptReference_1= ruleEclConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) + { + // InternalEtlParser.g:2987:2: (this_MemberOf_0= ruleMemberOf | this_EclConceptReference_1= ruleEclConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) + int alt57=4; + switch ( input.LA(1) ) { + case RULE_CARET: + { + alt57=1; + } + break; + case RULE_DIGIT_NONZERO: + { + alt57=2; + } + break; + case RULE_WILDCARD: + { + alt57=3; + } + break; + case RULE_ROUND_OPEN: + { + alt57=4; + } + break; + default: + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 57, 0, input); + + throw nvae; + } + + switch (alt57) { + case 1 : + // InternalEtlParser.g:2988:3: this_MemberOf_0= ruleMemberOf + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getMemberOfParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_MemberOf_0=ruleMemberOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_MemberOf_0; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:3000:3: this_EclConceptReference_1= ruleEclConceptReference + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getEclConceptReferenceParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_EclConceptReference_1=ruleEclConceptReference(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_EclConceptReference_1; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 3 : + // InternalEtlParser.g:3012:3: this_Any_2= ruleAny + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getAnyParserRuleCall_2()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_Any_2=ruleAny(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_Any_2; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 4 : + // InternalEtlParser.g:3024:3: this_NestedExpression_3= ruleNestedExpression + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getNestedExpressionParserRuleCall_3()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_NestedExpression_3=ruleNestedExpression(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_NestedExpression_3; + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleEclFocusConcept" + + + // $ANTLR start "entryRuleChildOf" + // InternalEtlParser.g:3039:1: entryRuleChildOf returns [EObject current=null] : iv_ruleChildOf= ruleChildOf EOF ; + public final EObject entryRuleChildOf() throws RecognitionException { + EObject current = null; + + EObject iv_ruleChildOf = null; + + + try { + // InternalEtlParser.g:3039:48: (iv_ruleChildOf= ruleChildOf EOF ) + // InternalEtlParser.g:3040:2: iv_ruleChildOf= ruleChildOf EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getChildOfRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleChildOf=ruleChildOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleChildOf; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleChildOf" + + + // $ANTLR start "ruleChildOf" + // InternalEtlParser.g:3046:1: ruleChildOf returns [EObject current=null] : (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; + public final EObject ruleChildOf() throws RecognitionException { + EObject current = null; + + Token this_LT_EM_0=null; + EObject lv_constraint_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3052:2: ( (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalEtlParser.g:3053:2: (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + { + // InternalEtlParser.g:3053:2: (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalEtlParser.g:3054:3: this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + { + this_LT_EM_0=(Token)match(input,RULE_LT_EM,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_LT_EM_0, grammarAccess.getChildOfAccess().getLT_EMTerminalRuleCall_0()); + + } + // InternalEtlParser.g:3058:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalEtlParser.g:3059:4: (lv_constraint_1_0= ruleEclFocusConcept ) + { + // InternalEtlParser.g:3059:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalEtlParser.g:3060:5: lv_constraint_1_0= ruleEclFocusConcept + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getChildOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_constraint_1_0=ruleEclFocusConcept(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getChildOfRule()); + } + set( + current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleChildOf" + + + // $ANTLR start "entryRuleDescendantOf" + // InternalEtlParser.g:3081:1: entryRuleDescendantOf returns [EObject current=null] : iv_ruleDescendantOf= ruleDescendantOf EOF ; + public final EObject entryRuleDescendantOf() throws RecognitionException { + EObject current = null; + + EObject iv_ruleDescendantOf = null; + + + try { + // InternalEtlParser.g:3081:53: (iv_ruleDescendantOf= ruleDescendantOf EOF ) + // InternalEtlParser.g:3082:2: iv_ruleDescendantOf= ruleDescendantOf EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDescendantOfRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDescendantOf=ruleDescendantOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDescendantOf; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleDescendantOf" + + + // $ANTLR start "ruleDescendantOf" + // InternalEtlParser.g:3088:1: ruleDescendantOf returns [EObject current=null] : (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; + public final EObject ruleDescendantOf() throws RecognitionException { + EObject current = null; + + Token this_LT_0=null; + EObject lv_constraint_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3094:2: ( (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalEtlParser.g:3095:2: (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + { + // InternalEtlParser.g:3095:2: (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalEtlParser.g:3096:3: this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + { + this_LT_0=(Token)match(input,RULE_LT,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_LT_0, grammarAccess.getDescendantOfAccess().getLTTerminalRuleCall_0()); + + } + // InternalEtlParser.g:3100:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalEtlParser.g:3101:4: (lv_constraint_1_0= ruleEclFocusConcept ) + { + // InternalEtlParser.g:3101:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalEtlParser.g:3102:5: lv_constraint_1_0= ruleEclFocusConcept + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDescendantOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_constraint_1_0=ruleEclFocusConcept(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getDescendantOfRule()); + } + set( + current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleDescendantOf" + + + // $ANTLR start "entryRuleDescendantOrSelfOf" + // InternalEtlParser.g:3123:1: entryRuleDescendantOrSelfOf returns [EObject current=null] : iv_ruleDescendantOrSelfOf= ruleDescendantOrSelfOf EOF ; + public final EObject entryRuleDescendantOrSelfOf() throws RecognitionException { + EObject current = null; + + EObject iv_ruleDescendantOrSelfOf = null; + + + try { + // InternalEtlParser.g:3123:59: (iv_ruleDescendantOrSelfOf= ruleDescendantOrSelfOf EOF ) + // InternalEtlParser.g:3124:2: iv_ruleDescendantOrSelfOf= ruleDescendantOrSelfOf EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDescendantOrSelfOfRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDescendantOrSelfOf=ruleDescendantOrSelfOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDescendantOrSelfOf; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleDescendantOrSelfOf" + + + // $ANTLR start "ruleDescendantOrSelfOf" + // InternalEtlParser.g:3130:1: ruleDescendantOrSelfOf returns [EObject current=null] : (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; + public final EObject ruleDescendantOrSelfOf() throws RecognitionException { + EObject current = null; + + Token this_DBL_LT_0=null; + EObject lv_constraint_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3136:2: ( (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalEtlParser.g:3137:2: (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + { + // InternalEtlParser.g:3137:2: (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalEtlParser.g:3138:3: this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + { + this_DBL_LT_0=(Token)match(input,RULE_DBL_LT,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DBL_LT_0, grammarAccess.getDescendantOrSelfOfAccess().getDBL_LTTerminalRuleCall_0()); + + } + // InternalEtlParser.g:3142:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalEtlParser.g:3143:4: (lv_constraint_1_0= ruleEclFocusConcept ) + { + // InternalEtlParser.g:3143:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalEtlParser.g:3144:5: lv_constraint_1_0= ruleEclFocusConcept + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDescendantOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_constraint_1_0=ruleEclFocusConcept(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getDescendantOrSelfOfRule()); + } + set( + current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleDescendantOrSelfOf" + + + // $ANTLR start "entryRuleParentOf" + // InternalEtlParser.g:3165:1: entryRuleParentOf returns [EObject current=null] : iv_ruleParentOf= ruleParentOf EOF ; + public final EObject entryRuleParentOf() throws RecognitionException { + EObject current = null; + + EObject iv_ruleParentOf = null; + + + try { + // InternalEtlParser.g:3165:49: (iv_ruleParentOf= ruleParentOf EOF ) + // InternalEtlParser.g:3166:2: iv_ruleParentOf= ruleParentOf EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getParentOfRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleParentOf=ruleParentOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleParentOf; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleParentOf" + + + // $ANTLR start "ruleParentOf" + // InternalEtlParser.g:3172:1: ruleParentOf returns [EObject current=null] : (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; + public final EObject ruleParentOf() throws RecognitionException { + EObject current = null; + + Token this_GT_EM_0=null; + EObject lv_constraint_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3178:2: ( (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalEtlParser.g:3179:2: (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + { + // InternalEtlParser.g:3179:2: (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalEtlParser.g:3180:3: this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + { + this_GT_EM_0=(Token)match(input,RULE_GT_EM,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_GT_EM_0, grammarAccess.getParentOfAccess().getGT_EMTerminalRuleCall_0()); + + } + // InternalEtlParser.g:3184:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalEtlParser.g:3185:4: (lv_constraint_1_0= ruleEclFocusConcept ) + { + // InternalEtlParser.g:3185:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalEtlParser.g:3186:5: lv_constraint_1_0= ruleEclFocusConcept + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getParentOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_constraint_1_0=ruleEclFocusConcept(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getParentOfRule()); + } + set( + current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleParentOf" + + + // $ANTLR start "entryRuleAncestorOf" + // InternalEtlParser.g:3207:1: entryRuleAncestorOf returns [EObject current=null] : iv_ruleAncestorOf= ruleAncestorOf EOF ; + public final EObject entryRuleAncestorOf() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAncestorOf = null; + + + try { + // InternalEtlParser.g:3207:51: (iv_ruleAncestorOf= ruleAncestorOf EOF ) + // InternalEtlParser.g:3208:2: iv_ruleAncestorOf= ruleAncestorOf EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAncestorOfRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAncestorOf=ruleAncestorOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAncestorOf; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAncestorOf" + + + // $ANTLR start "ruleAncestorOf" + // InternalEtlParser.g:3214:1: ruleAncestorOf returns [EObject current=null] : (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; + public final EObject ruleAncestorOf() throws RecognitionException { + EObject current = null; + + Token this_GT_0=null; + EObject lv_constraint_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3220:2: ( (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalEtlParser.g:3221:2: (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + { + // InternalEtlParser.g:3221:2: (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalEtlParser.g:3222:3: this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + { + this_GT_0=(Token)match(input,RULE_GT,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_GT_0, grammarAccess.getAncestorOfAccess().getGTTerminalRuleCall_0()); + + } + // InternalEtlParser.g:3226:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalEtlParser.g:3227:4: (lv_constraint_1_0= ruleEclFocusConcept ) + { + // InternalEtlParser.g:3227:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalEtlParser.g:3228:5: lv_constraint_1_0= ruleEclFocusConcept + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAncestorOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_constraint_1_0=ruleEclFocusConcept(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAncestorOfRule()); + } + set( + current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAncestorOf" + + + // $ANTLR start "entryRuleAncestorOrSelfOf" + // InternalEtlParser.g:3249:1: entryRuleAncestorOrSelfOf returns [EObject current=null] : iv_ruleAncestorOrSelfOf= ruleAncestorOrSelfOf EOF ; + public final EObject entryRuleAncestorOrSelfOf() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAncestorOrSelfOf = null; + + + try { + // InternalEtlParser.g:3249:57: (iv_ruleAncestorOrSelfOf= ruleAncestorOrSelfOf EOF ) + // InternalEtlParser.g:3250:2: iv_ruleAncestorOrSelfOf= ruleAncestorOrSelfOf EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAncestorOrSelfOfRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAncestorOrSelfOf=ruleAncestorOrSelfOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAncestorOrSelfOf; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAncestorOrSelfOf" + + + // $ANTLR start "ruleAncestorOrSelfOf" + // InternalEtlParser.g:3256:1: ruleAncestorOrSelfOf returns [EObject current=null] : (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; + public final EObject ruleAncestorOrSelfOf() throws RecognitionException { + EObject current = null; + + Token this_DBL_GT_0=null; + EObject lv_constraint_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3262:2: ( (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalEtlParser.g:3263:2: (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + { + // InternalEtlParser.g:3263:2: (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalEtlParser.g:3264:3: this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + { + this_DBL_GT_0=(Token)match(input,RULE_DBL_GT,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DBL_GT_0, grammarAccess.getAncestorOrSelfOfAccess().getDBL_GTTerminalRuleCall_0()); + + } + // InternalEtlParser.g:3268:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalEtlParser.g:3269:4: (lv_constraint_1_0= ruleEclFocusConcept ) + { + // InternalEtlParser.g:3269:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalEtlParser.g:3270:5: lv_constraint_1_0= ruleEclFocusConcept + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAncestorOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_constraint_1_0=ruleEclFocusConcept(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAncestorOrSelfOfRule()); + } + set( + current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAncestorOrSelfOf" + + + // $ANTLR start "entryRuleMemberOf" + // InternalEtlParser.g:3291:1: entryRuleMemberOf returns [EObject current=null] : iv_ruleMemberOf= ruleMemberOf EOF ; + public final EObject entryRuleMemberOf() throws RecognitionException { + EObject current = null; + + EObject iv_ruleMemberOf = null; + + + try { + // InternalEtlParser.g:3291:49: (iv_ruleMemberOf= ruleMemberOf EOF ) + // InternalEtlParser.g:3292:2: iv_ruleMemberOf= ruleMemberOf EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getMemberOfRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleMemberOf=ruleMemberOf(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleMemberOf; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleMemberOf" + + + // $ANTLR start "ruleMemberOf" + // InternalEtlParser.g:3298:1: ruleMemberOf returns [EObject current=null] : (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) ; + public final EObject ruleMemberOf() throws RecognitionException { + EObject current = null; + + Token this_CARET_0=null; + EObject lv_constraint_1_1 = null; + + EObject lv_constraint_1_2 = null; + + EObject lv_constraint_1_3 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3304:2: ( (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) ) + // InternalEtlParser.g:3305:2: (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) + { + // InternalEtlParser.g:3305:2: (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) + // InternalEtlParser.g:3306:3: this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) + { + this_CARET_0=(Token)match(input,RULE_CARET,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_CARET_0, grammarAccess.getMemberOfAccess().getCARETTerminalRuleCall_0()); + + } + // InternalEtlParser.g:3310:3: ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) + // InternalEtlParser.g:3311:4: ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) + { + // InternalEtlParser.g:3311:4: ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) + // InternalEtlParser.g:3312:5: (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) + { + // InternalEtlParser.g:3312:5: (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) + int alt58=3; + switch ( input.LA(1) ) { + case RULE_DIGIT_NONZERO: + { + alt58=1; + } + break; + case RULE_WILDCARD: + { + alt58=2; + } + break; + case RULE_ROUND_OPEN: + { + alt58=3; + } + break; + default: + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 58, 0, input); + + throw nvae; + } + + switch (alt58) { + case 1 : + // InternalEtlParser.g:3313:6: lv_constraint_1_1= ruleEclConceptReference + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintEclConceptReferenceParserRuleCall_1_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_constraint_1_1=ruleEclConceptReference(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getMemberOfRule()); + } + set( + current, + "constraint", + lv_constraint_1_1, + "com.b2international.snowowl.snomed.ecl.Ecl.EclConceptReference"); + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:3329:6: lv_constraint_1_2= ruleAny + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintAnyParserRuleCall_1_0_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_constraint_1_2=ruleAny(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getMemberOfRule()); + } + set( + current, + "constraint", + lv_constraint_1_2, + "com.b2international.snowowl.snomed.ecl.Ecl.Any"); + afterParserOrEnumRuleCall(); + + } + + } + break; + case 3 : + // InternalEtlParser.g:3345:6: lv_constraint_1_3= ruleNestedExpression + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintNestedExpressionParserRuleCall_1_0_2()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_constraint_1_3=ruleNestedExpression(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getMemberOfRule()); + } + set( + current, + "constraint", + lv_constraint_1_3, + "com.b2international.snowowl.snomed.ecl.Ecl.NestedExpression"); + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleMemberOf" + + + // $ANTLR start "entryRuleEclConceptReference" + // InternalEtlParser.g:3367:1: entryRuleEclConceptReference returns [EObject current=null] : iv_ruleEclConceptReference= ruleEclConceptReference EOF ; + public final EObject entryRuleEclConceptReference() throws RecognitionException { + EObject current = null; + + EObject iv_ruleEclConceptReference = null; + + + try { + // InternalEtlParser.g:3367:60: (iv_ruleEclConceptReference= ruleEclConceptReference EOF ) + // InternalEtlParser.g:3368:2: iv_ruleEclConceptReference= ruleEclConceptReference EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getEclConceptReferenceRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleEclConceptReference=ruleEclConceptReference(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleEclConceptReference; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleEclConceptReference" + + + // $ANTLR start "ruleEclConceptReference" + // InternalEtlParser.g:3374:1: ruleEclConceptReference returns [EObject current=null] : ( ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? ) ; + public final EObject ruleEclConceptReference() throws RecognitionException { + EObject current = null; + + Token lv_term_1_0=null; + AntlrDatatypeRuleToken lv_id_0_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3380:2: ( ( ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? ) ) + // InternalEtlParser.g:3381:2: ( ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? ) + { + // InternalEtlParser.g:3381:2: ( ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? ) + // InternalEtlParser.g:3382:3: ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? + { + // InternalEtlParser.g:3382:3: ( (lv_id_0_0= ruleSnomedIdentifier ) ) + // InternalEtlParser.g:3383:4: (lv_id_0_0= ruleSnomedIdentifier ) + { + // InternalEtlParser.g:3383:4: (lv_id_0_0= ruleSnomedIdentifier ) + // InternalEtlParser.g:3384:5: lv_id_0_0= ruleSnomedIdentifier + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getEclConceptReferenceAccess().getIdSnomedIdentifierParserRuleCall_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_33); + lv_id_0_0=ruleSnomedIdentifier(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getEclConceptReferenceRule()); + } + set( + current, + "id", + lv_id_0_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SnomedIdentifier"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + // InternalEtlParser.g:3401:3: ( (lv_term_1_0= RULE_TERM_STRING ) )? + int alt59=2; + int LA59_0 = input.LA(1); + + if ( (LA59_0==RULE_TERM_STRING) ) { + alt59=1; + } + switch (alt59) { + case 1 : + // InternalEtlParser.g:3402:4: (lv_term_1_0= RULE_TERM_STRING ) + { + // InternalEtlParser.g:3402:4: (lv_term_1_0= RULE_TERM_STRING ) + // InternalEtlParser.g:3403:5: lv_term_1_0= RULE_TERM_STRING + { + lv_term_1_0=(Token)match(input,RULE_TERM_STRING,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_term_1_0, grammarAccess.getEclConceptReferenceAccess().getTermTERM_STRINGTerminalRuleCall_1_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getEclConceptReferenceRule()); + } + setWithLastConsumed( + current, + "term", + lv_term_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.TERM_STRING"); + + } + + } + + + } + break; + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleEclConceptReference" + + + // $ANTLR start "entryRuleAny" + // InternalEtlParser.g:3423:1: entryRuleAny returns [EObject current=null] : iv_ruleAny= ruleAny EOF ; + public final EObject entryRuleAny() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAny = null; + + + try { + // InternalEtlParser.g:3423:44: (iv_ruleAny= ruleAny EOF ) + // InternalEtlParser.g:3424:2: iv_ruleAny= ruleAny EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAnyRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAny=ruleAny(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAny; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAny" + + + // $ANTLR start "ruleAny" + // InternalEtlParser.g:3430:1: ruleAny returns [EObject current=null] : (this_WILDCARD_0= RULE_WILDCARD () ) ; + public final EObject ruleAny() throws RecognitionException { + EObject current = null; + + Token this_WILDCARD_0=null; + + + enterRule(); + + try { + // InternalEtlParser.g:3436:2: ( (this_WILDCARD_0= RULE_WILDCARD () ) ) + // InternalEtlParser.g:3437:2: (this_WILDCARD_0= RULE_WILDCARD () ) + { + // InternalEtlParser.g:3437:2: (this_WILDCARD_0= RULE_WILDCARD () ) + // InternalEtlParser.g:3438:3: this_WILDCARD_0= RULE_WILDCARD () + { + this_WILDCARD_0=(Token)match(input,RULE_WILDCARD,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_WILDCARD_0, grammarAccess.getAnyAccess().getWILDCARDTerminalRuleCall_0()); + + } + // InternalEtlParser.g:3442:3: () + // InternalEtlParser.g:3443:4: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElement( + grammarAccess.getAnyAccess().getAnyAction_1(), + current); + + } + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAny" + + + // $ANTLR start "entryRuleEclRefinement" + // InternalEtlParser.g:3456:1: entryRuleEclRefinement returns [EObject current=null] : iv_ruleEclRefinement= ruleEclRefinement EOF ; + public final EObject entryRuleEclRefinement() throws RecognitionException { + EObject current = null; + + EObject iv_ruleEclRefinement = null; + + + try { + // InternalEtlParser.g:3456:54: (iv_ruleEclRefinement= ruleEclRefinement EOF ) + // InternalEtlParser.g:3457:2: iv_ruleEclRefinement= ruleEclRefinement EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getEclRefinementRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleEclRefinement=ruleEclRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleEclRefinement; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleEclRefinement" + + + // $ANTLR start "ruleEclRefinement" + // InternalEtlParser.g:3463:1: ruleEclRefinement returns [EObject current=null] : this_OrRefinement_0= ruleOrRefinement ; + public final EObject ruleEclRefinement() throws RecognitionException { + EObject current = null; + + EObject this_OrRefinement_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3469:2: (this_OrRefinement_0= ruleOrRefinement ) + // InternalEtlParser.g:3470:2: this_OrRefinement_0= ruleOrRefinement + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getEclRefinementAccess().getOrRefinementParserRuleCall()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_OrRefinement_0=ruleOrRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_OrRefinement_0; + afterParserOrEnumRuleCall(); + + } + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleEclRefinement" + + + // $ANTLR start "entryRuleOrRefinement" + // InternalEtlParser.g:3484:1: entryRuleOrRefinement returns [EObject current=null] : iv_ruleOrRefinement= ruleOrRefinement EOF ; + public final EObject entryRuleOrRefinement() throws RecognitionException { + EObject current = null; + + EObject iv_ruleOrRefinement = null; + + + try { + // InternalEtlParser.g:3484:53: (iv_ruleOrRefinement= ruleOrRefinement EOF ) + // InternalEtlParser.g:3485:2: iv_ruleOrRefinement= ruleOrRefinement EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getOrRefinementRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleOrRefinement=ruleOrRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleOrRefinement; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleOrRefinement" + + + // $ANTLR start "ruleOrRefinement" + // InternalEtlParser.g:3491:1: ruleOrRefinement returns [EObject current=null] : (this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) ; + public final EObject ruleOrRefinement() throws RecognitionException { + EObject current = null; + + Token this_DISJUNCTION_2=null; + EObject this_AndRefinement_0 = null; + + EObject lv_right_3_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3497:2: ( (this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) ) + // InternalEtlParser.g:3498:2: (this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) + { + // InternalEtlParser.g:3498:2: (this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) + // InternalEtlParser.g:3499:3: this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getOrRefinementAccess().getAndRefinementParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_38); + this_AndRefinement_0=ruleAndRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_AndRefinement_0; + afterParserOrEnumRuleCall(); + + } + // InternalEtlParser.g:3510:3: ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* + loop60: + do { + int alt60=2; + int LA60_0 = input.LA(1); + + if ( (LA60_0==RULE_DISJUNCTION) ) { + int LA60_4 = input.LA(2); + + if ( (synpred90_InternalEtlParser()) ) { + alt60=1; + } + + + } + + + switch (alt60) { + case 1 : + // InternalEtlParser.g:3511:4: ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) + { + // InternalEtlParser.g:3512:4: ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) + // InternalEtlParser.g:3513:5: () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) + { + // InternalEtlParser.g:3513:5: () + // InternalEtlParser.g:3514:6: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElementAndSet( + grammarAccess.getOrRefinementAccess().getOrRefinementLeftAction_1_0_0(), + current); + + } + + } + + this_DISJUNCTION_2=(Token)match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_42); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrRefinementAccess().getDISJUNCTIONTerminalRuleCall_1_0_1()); + + } + // InternalEtlParser.g:3527:5: ( (lv_right_3_0= ruleAndRefinement ) ) + // InternalEtlParser.g:3528:6: (lv_right_3_0= ruleAndRefinement ) + { + // InternalEtlParser.g:3528:6: (lv_right_3_0= ruleAndRefinement ) + // InternalEtlParser.g:3529:7: lv_right_3_0= ruleAndRefinement + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getOrRefinementAccess().getRightAndRefinementParserRuleCall_1_0_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_38); + lv_right_3_0=ruleAndRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getOrRefinementRule()); + } + set( + current, + "right", + lv_right_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.AndRefinement"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + break; + + default : + break loop60; + } + } while (true); + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleOrRefinement" + + + // $ANTLR start "entryRuleAndRefinement" + // InternalEtlParser.g:3552:1: entryRuleAndRefinement returns [EObject current=null] : iv_ruleAndRefinement= ruleAndRefinement EOF ; + public final EObject entryRuleAndRefinement() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAndRefinement = null; + + + try { + // InternalEtlParser.g:3552:54: (iv_ruleAndRefinement= ruleAndRefinement EOF ) + // InternalEtlParser.g:3553:2: iv_ruleAndRefinement= ruleAndRefinement EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAndRefinementRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAndRefinement=ruleAndRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAndRefinement; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAndRefinement" + + + // $ANTLR start "ruleAndRefinement" + // InternalEtlParser.g:3559:1: ruleAndRefinement returns [EObject current=null] : (this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) ; + public final EObject ruleAndRefinement() throws RecognitionException { + EObject current = null; + + Token this_CONJUNCTION_2=null; + Token this_COMMA_3=null; + EObject this_SubRefinement_0 = null; + + EObject lv_right_4_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3565:2: ( (this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) ) + // InternalEtlParser.g:3566:2: (this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) + { + // InternalEtlParser.g:3566:2: (this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) + // InternalEtlParser.g:3567:3: this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAndRefinementAccess().getSubRefinementParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_39); + this_SubRefinement_0=ruleSubRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_SubRefinement_0; + afterParserOrEnumRuleCall(); + + } + // InternalEtlParser.g:3578:3: ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* + loop62: + do { + int alt62=2; + int LA62_0 = input.LA(1); + + if ( (LA62_0==RULE_CONJUNCTION) ) { + int LA62_3 = input.LA(2); + + if ( (synpred92_InternalEtlParser()) ) { + alt62=1; + } + + + } + else if ( (LA62_0==RULE_COMMA) ) { + int LA62_4 = input.LA(2); + + if ( (synpred92_InternalEtlParser()) ) { + alt62=1; + } + + + } + + + switch (alt62) { + case 1 : + // InternalEtlParser.g:3579:4: ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) + { + // InternalEtlParser.g:3580:4: ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) + // InternalEtlParser.g:3581:5: () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) + { + // InternalEtlParser.g:3581:5: () + // InternalEtlParser.g:3582:6: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElementAndSet( + grammarAccess.getAndRefinementAccess().getAndRefinementLeftAction_1_0_0(), + current); + + } + + } + + // InternalEtlParser.g:3591:5: (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) + int alt61=2; + int LA61_0 = input.LA(1); + + if ( (LA61_0==RULE_CONJUNCTION) ) { + alt61=1; + } + else if ( (LA61_0==RULE_COMMA) ) { + alt61=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 61, 0, input); + + throw nvae; + } + switch (alt61) { + case 1 : + // InternalEtlParser.g:3592:6: this_CONJUNCTION_2= RULE_CONJUNCTION + { + this_CONJUNCTION_2=(Token)match(input,RULE_CONJUNCTION,FollowSets000.FOLLOW_42); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndRefinementAccess().getCONJUNCTIONTerminalRuleCall_1_0_1_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:3597:6: this_COMMA_3= RULE_COMMA + { + this_COMMA_3=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_42); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_COMMA_3, grammarAccess.getAndRefinementAccess().getCOMMATerminalRuleCall_1_0_1_1()); + + } + + } + break; + + } + + // InternalEtlParser.g:3602:5: ( (lv_right_4_0= ruleSubRefinement ) ) + // InternalEtlParser.g:3603:6: (lv_right_4_0= ruleSubRefinement ) + { + // InternalEtlParser.g:3603:6: (lv_right_4_0= ruleSubRefinement ) + // InternalEtlParser.g:3604:7: lv_right_4_0= ruleSubRefinement + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAndRefinementAccess().getRightSubRefinementParserRuleCall_1_0_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_39); + lv_right_4_0=ruleSubRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAndRefinementRule()); + } + set( + current, + "right", + lv_right_4_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SubRefinement"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + break; + + default : + break loop62; + } + } while (true); + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAndRefinement" + + + // $ANTLR start "entryRuleSubRefinement" + // InternalEtlParser.g:3627:1: entryRuleSubRefinement returns [EObject current=null] : iv_ruleSubRefinement= ruleSubRefinement EOF ; + public final EObject entryRuleSubRefinement() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSubRefinement = null; + + + try { + // InternalEtlParser.g:3627:54: (iv_ruleSubRefinement= ruleSubRefinement EOF ) + // InternalEtlParser.g:3628:2: iv_ruleSubRefinement= ruleSubRefinement EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSubRefinementRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSubRefinement=ruleSubRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSubRefinement; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSubRefinement" + + + // $ANTLR start "ruleSubRefinement" + // InternalEtlParser.g:3634:1: ruleSubRefinement returns [EObject current=null] : (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) ; + public final EObject ruleSubRefinement() throws RecognitionException { + EObject current = null; + + EObject this_AttributeConstraint_0 = null; + + EObject this_EclAttributeGroup_1 = null; + + EObject this_NestedRefinement_2 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3640:2: ( (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) ) + // InternalEtlParser.g:3641:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) + { + // InternalEtlParser.g:3641:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) + int alt63=3; + alt63 = dfa63.predict(input); + switch (alt63) { + case 1 : + // InternalEtlParser.g:3642:3: this_AttributeConstraint_0= ruleAttributeConstraint + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubRefinementAccess().getAttributeConstraintParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_AttributeConstraint_0=ruleAttributeConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_AttributeConstraint_0; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:3654:3: this_EclAttributeGroup_1= ruleEclAttributeGroup + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubRefinementAccess().getEclAttributeGroupParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_EclAttributeGroup_1=ruleEclAttributeGroup(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_EclAttributeGroup_1; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 3 : + // InternalEtlParser.g:3666:3: this_NestedRefinement_2= ruleNestedRefinement + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubRefinementAccess().getNestedRefinementParserRuleCall_2()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_NestedRefinement_2=ruleNestedRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_NestedRefinement_2; + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSubRefinement" + + + // $ANTLR start "entryRuleNestedRefinement" + // InternalEtlParser.g:3681:1: entryRuleNestedRefinement returns [EObject current=null] : iv_ruleNestedRefinement= ruleNestedRefinement EOF ; + public final EObject entryRuleNestedRefinement() throws RecognitionException { + EObject current = null; + + EObject iv_ruleNestedRefinement = null; + + + try { + // InternalEtlParser.g:3681:57: (iv_ruleNestedRefinement= ruleNestedRefinement EOF ) + // InternalEtlParser.g:3682:2: iv_ruleNestedRefinement= ruleNestedRefinement EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getNestedRefinementRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleNestedRefinement=ruleNestedRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleNestedRefinement; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleNestedRefinement" + + + // $ANTLR start "ruleNestedRefinement" + // InternalEtlParser.g:3688:1: ruleNestedRefinement returns [EObject current=null] : (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ; + public final EObject ruleNestedRefinement() throws RecognitionException { + EObject current = null; + + Token this_ROUND_OPEN_0=null; + Token this_ROUND_CLOSE_2=null; + EObject lv_nested_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3694:2: ( (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ) + // InternalEtlParser.g:3695:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + { + // InternalEtlParser.g:3695:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + // InternalEtlParser.g:3696:3: this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE + { + this_ROUND_OPEN_0=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_42); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_OPEN_0, grammarAccess.getNestedRefinementAccess().getROUND_OPENTerminalRuleCall_0()); + + } + // InternalEtlParser.g:3700:3: ( (lv_nested_1_0= ruleEclRefinement ) ) + // InternalEtlParser.g:3701:4: (lv_nested_1_0= ruleEclRefinement ) + { + // InternalEtlParser.g:3701:4: (lv_nested_1_0= ruleEclRefinement ) + // InternalEtlParser.g:3702:5: lv_nested_1_0= ruleEclRefinement + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getNestedRefinementAccess().getNestedEclRefinementParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_11); + lv_nested_1_0=ruleEclRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getNestedRefinementRule()); + } + set( + current, + "nested", + lv_nested_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclRefinement"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + this_ROUND_CLOSE_2=(Token)match(input,RULE_ROUND_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_CLOSE_2, grammarAccess.getNestedRefinementAccess().getROUND_CLOSETerminalRuleCall_2()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleNestedRefinement" + + + // $ANTLR start "entryRuleEclAttributeGroup" + // InternalEtlParser.g:3727:1: entryRuleEclAttributeGroup returns [EObject current=null] : iv_ruleEclAttributeGroup= ruleEclAttributeGroup EOF ; + public final EObject entryRuleEclAttributeGroup() throws RecognitionException { + EObject current = null; + + EObject iv_ruleEclAttributeGroup = null; + + + try { + // InternalEtlParser.g:3727:58: (iv_ruleEclAttributeGroup= ruleEclAttributeGroup EOF ) + // InternalEtlParser.g:3728:2: iv_ruleEclAttributeGroup= ruleEclAttributeGroup EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getEclAttributeGroupRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleEclAttributeGroup=ruleEclAttributeGroup(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleEclAttributeGroup; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleEclAttributeGroup" + + + // $ANTLR start "ruleEclAttributeGroup" + // InternalEtlParser.g:3734:1: ruleEclAttributeGroup returns [EObject current=null] : ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) ; + public final EObject ruleEclAttributeGroup() throws RecognitionException { + EObject current = null; + + Token this_CURLY_OPEN_1=null; + Token this_CURLY_CLOSE_3=null; + EObject lv_cardinality_0_0 = null; + + EObject lv_refinement_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3740:2: ( ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) ) + // InternalEtlParser.g:3741:2: ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) + { + // InternalEtlParser.g:3741:2: ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) + // InternalEtlParser.g:3742:3: ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE + { + // InternalEtlParser.g:3742:3: ( (lv_cardinality_0_0= ruleCardinality ) )? + int alt64=2; + int LA64_0 = input.LA(1); + + if ( (LA64_0==RULE_SQUARE_OPEN) ) { + alt64=1; + } + switch (alt64) { + case 1 : + // InternalEtlParser.g:3743:4: (lv_cardinality_0_0= ruleCardinality ) + { + // InternalEtlParser.g:3743:4: (lv_cardinality_0_0= ruleCardinality ) + // InternalEtlParser.g:3744:5: lv_cardinality_0_0= ruleCardinality + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getEclAttributeGroupAccess().getCardinalityCardinalityParserRuleCall_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_7); + lv_cardinality_0_0=ruleCardinality(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getEclAttributeGroupRule()); + } + set( + current, + "cardinality", + lv_cardinality_0_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Cardinality"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + break; + + } + + this_CURLY_OPEN_1=(Token)match(input,RULE_CURLY_OPEN,FollowSets000.FOLLOW_44); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_CURLY_OPEN_1, grammarAccess.getEclAttributeGroupAccess().getCURLY_OPENTerminalRuleCall_1()); + + } + // InternalEtlParser.g:3765:3: ( (lv_refinement_2_0= ruleEclAttributeSet ) ) + // InternalEtlParser.g:3766:4: (lv_refinement_2_0= ruleEclAttributeSet ) + { + // InternalEtlParser.g:3766:4: (lv_refinement_2_0= ruleEclAttributeSet ) + // InternalEtlParser.g:3767:5: lv_refinement_2_0= ruleEclAttributeSet + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getEclAttributeGroupAccess().getRefinementEclAttributeSetParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_45); + lv_refinement_2_0=ruleEclAttributeSet(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getEclAttributeGroupRule()); + } + set( + current, + "refinement", + lv_refinement_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeSet"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + this_CURLY_CLOSE_3=(Token)match(input,RULE_CURLY_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_CURLY_CLOSE_3, grammarAccess.getEclAttributeGroupAccess().getCURLY_CLOSETerminalRuleCall_3()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleEclAttributeGroup" + + + // $ANTLR start "entryRuleEclAttributeSet" + // InternalEtlParser.g:3792:1: entryRuleEclAttributeSet returns [EObject current=null] : iv_ruleEclAttributeSet= ruleEclAttributeSet EOF ; + public final EObject entryRuleEclAttributeSet() throws RecognitionException { + EObject current = null; + + EObject iv_ruleEclAttributeSet = null; + + + try { + // InternalEtlParser.g:3792:56: (iv_ruleEclAttributeSet= ruleEclAttributeSet EOF ) + // InternalEtlParser.g:3793:2: iv_ruleEclAttributeSet= ruleEclAttributeSet EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getEclAttributeSetRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleEclAttributeSet=ruleEclAttributeSet(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleEclAttributeSet; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleEclAttributeSet" + + + // $ANTLR start "ruleEclAttributeSet" + // InternalEtlParser.g:3799:1: ruleEclAttributeSet returns [EObject current=null] : this_OrAttributeSet_0= ruleOrAttributeSet ; + public final EObject ruleEclAttributeSet() throws RecognitionException { + EObject current = null; + + EObject this_OrAttributeSet_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3805:2: (this_OrAttributeSet_0= ruleOrAttributeSet ) + // InternalEtlParser.g:3806:2: this_OrAttributeSet_0= ruleOrAttributeSet + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getEclAttributeSetAccess().getOrAttributeSetParserRuleCall()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_OrAttributeSet_0=ruleOrAttributeSet(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_OrAttributeSet_0; + afterParserOrEnumRuleCall(); + + } + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleEclAttributeSet" + + + // $ANTLR start "entryRuleOrAttributeSet" + // InternalEtlParser.g:3820:1: entryRuleOrAttributeSet returns [EObject current=null] : iv_ruleOrAttributeSet= ruleOrAttributeSet EOF ; + public final EObject entryRuleOrAttributeSet() throws RecognitionException { + EObject current = null; + + EObject iv_ruleOrAttributeSet = null; + + + try { + // InternalEtlParser.g:3820:55: (iv_ruleOrAttributeSet= ruleOrAttributeSet EOF ) + // InternalEtlParser.g:3821:2: iv_ruleOrAttributeSet= ruleOrAttributeSet EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getOrAttributeSetRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleOrAttributeSet=ruleOrAttributeSet(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleOrAttributeSet; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleOrAttributeSet" + + + // $ANTLR start "ruleOrAttributeSet" + // InternalEtlParser.g:3827:1: ruleOrAttributeSet returns [EObject current=null] : (this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) ; + public final EObject ruleOrAttributeSet() throws RecognitionException { + EObject current = null; + + Token this_DISJUNCTION_2=null; + EObject this_AndAttributeSet_0 = null; + + EObject lv_right_3_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3833:2: ( (this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) ) + // InternalEtlParser.g:3834:2: (this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) + { + // InternalEtlParser.g:3834:2: (this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) + // InternalEtlParser.g:3835:3: this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getOrAttributeSetAccess().getAndAttributeSetParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_38); + this_AndAttributeSet_0=ruleAndAttributeSet(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_AndAttributeSet_0; + afterParserOrEnumRuleCall(); + + } + // InternalEtlParser.g:3846:3: ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* + loop65: + do { + int alt65=2; + int LA65_0 = input.LA(1); + + if ( (LA65_0==RULE_DISJUNCTION) ) { + alt65=1; + } + + + switch (alt65) { + case 1 : + // InternalEtlParser.g:3847:4: () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) + { + // InternalEtlParser.g:3847:4: () + // InternalEtlParser.g:3848:5: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElementAndSet( + grammarAccess.getOrAttributeSetAccess().getOrRefinementLeftAction_1_0(), + current); + + } + + } + + this_DISJUNCTION_2=(Token)match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_44); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrAttributeSetAccess().getDISJUNCTIONTerminalRuleCall_1_1()); + + } + // InternalEtlParser.g:3861:4: ( (lv_right_3_0= ruleAndAttributeSet ) ) + // InternalEtlParser.g:3862:5: (lv_right_3_0= ruleAndAttributeSet ) + { + // InternalEtlParser.g:3862:5: (lv_right_3_0= ruleAndAttributeSet ) + // InternalEtlParser.g:3863:6: lv_right_3_0= ruleAndAttributeSet + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getOrAttributeSetAccess().getRightAndAttributeSetParserRuleCall_1_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_38); + lv_right_3_0=ruleAndAttributeSet(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getOrAttributeSetRule()); + } + set( + current, + "right", + lv_right_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.AndAttributeSet"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + default : + break loop65; + } + } while (true); + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleOrAttributeSet" + + + // $ANTLR start "entryRuleAndAttributeSet" + // InternalEtlParser.g:3885:1: entryRuleAndAttributeSet returns [EObject current=null] : iv_ruleAndAttributeSet= ruleAndAttributeSet EOF ; + public final EObject entryRuleAndAttributeSet() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAndAttributeSet = null; + + + try { + // InternalEtlParser.g:3885:56: (iv_ruleAndAttributeSet= ruleAndAttributeSet EOF ) + // InternalEtlParser.g:3886:2: iv_ruleAndAttributeSet= ruleAndAttributeSet EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAndAttributeSetRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAndAttributeSet=ruleAndAttributeSet(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAndAttributeSet; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAndAttributeSet" + + + // $ANTLR start "ruleAndAttributeSet" + // InternalEtlParser.g:3892:1: ruleAndAttributeSet returns [EObject current=null] : (this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) ; + public final EObject ruleAndAttributeSet() throws RecognitionException { + EObject current = null; + + Token this_CONJUNCTION_2=null; + Token this_COMMA_3=null; + EObject this_SubAttributeSet_0 = null; + + EObject lv_right_4_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3898:2: ( (this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) ) + // InternalEtlParser.g:3899:2: (this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) + { + // InternalEtlParser.g:3899:2: (this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) + // InternalEtlParser.g:3900:3: this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAndAttributeSetAccess().getSubAttributeSetParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_39); + this_SubAttributeSet_0=ruleSubAttributeSet(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_SubAttributeSet_0; + afterParserOrEnumRuleCall(); + + } + // InternalEtlParser.g:3911:3: ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* + loop67: + do { + int alt67=2; + int LA67_0 = input.LA(1); + + if ( ((LA67_0>=RULE_COMMA && LA67_0<=RULE_CONJUNCTION)) ) { + alt67=1; + } + + + switch (alt67) { + case 1 : + // InternalEtlParser.g:3912:4: () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) + { + // InternalEtlParser.g:3912:4: () + // InternalEtlParser.g:3913:5: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElementAndSet( + grammarAccess.getAndAttributeSetAccess().getAndRefinementLeftAction_1_0(), + current); + + } + + } + + // InternalEtlParser.g:3922:4: (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) + int alt66=2; + int LA66_0 = input.LA(1); + + if ( (LA66_0==RULE_CONJUNCTION) ) { + alt66=1; + } + else if ( (LA66_0==RULE_COMMA) ) { + alt66=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 66, 0, input); + + throw nvae; + } + switch (alt66) { + case 1 : + // InternalEtlParser.g:3923:5: this_CONJUNCTION_2= RULE_CONJUNCTION + { + this_CONJUNCTION_2=(Token)match(input,RULE_CONJUNCTION,FollowSets000.FOLLOW_44); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndAttributeSetAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:3928:5: this_COMMA_3= RULE_COMMA + { + this_COMMA_3=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_44); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_COMMA_3, grammarAccess.getAndAttributeSetAccess().getCOMMATerminalRuleCall_1_1_1()); + + } + + } + break; + + } + + // InternalEtlParser.g:3933:4: ( (lv_right_4_0= ruleSubAttributeSet ) ) + // InternalEtlParser.g:3934:5: (lv_right_4_0= ruleSubAttributeSet ) + { + // InternalEtlParser.g:3934:5: (lv_right_4_0= ruleSubAttributeSet ) + // InternalEtlParser.g:3935:6: lv_right_4_0= ruleSubAttributeSet + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAndAttributeSetAccess().getRightSubAttributeSetParserRuleCall_1_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_39); + lv_right_4_0=ruleSubAttributeSet(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAndAttributeSetRule()); + } + set( + current, + "right", + lv_right_4_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SubAttributeSet"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + default : + break loop67; + } + } while (true); + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAndAttributeSet" + + + // $ANTLR start "entryRuleSubAttributeSet" + // InternalEtlParser.g:3957:1: entryRuleSubAttributeSet returns [EObject current=null] : iv_ruleSubAttributeSet= ruleSubAttributeSet EOF ; + public final EObject entryRuleSubAttributeSet() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSubAttributeSet = null; + + + try { + // InternalEtlParser.g:3957:56: (iv_ruleSubAttributeSet= ruleSubAttributeSet EOF ) + // InternalEtlParser.g:3958:2: iv_ruleSubAttributeSet= ruleSubAttributeSet EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSubAttributeSetRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSubAttributeSet=ruleSubAttributeSet(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSubAttributeSet; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSubAttributeSet" + + + // $ANTLR start "ruleSubAttributeSet" + // InternalEtlParser.g:3964:1: ruleSubAttributeSet returns [EObject current=null] : (this_AttributeConstraint_0= ruleAttributeConstraint | this_NestedAttributeSet_1= ruleNestedAttributeSet ) ; + public final EObject ruleSubAttributeSet() throws RecognitionException { + EObject current = null; + + EObject this_AttributeConstraint_0 = null; + + EObject this_NestedAttributeSet_1 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:3970:2: ( (this_AttributeConstraint_0= ruleAttributeConstraint | this_NestedAttributeSet_1= ruleNestedAttributeSet ) ) + // InternalEtlParser.g:3971:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_NestedAttributeSet_1= ruleNestedAttributeSet ) + { + // InternalEtlParser.g:3971:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_NestedAttributeSet_1= ruleNestedAttributeSet ) + int alt68=2; + alt68 = dfa68.predict(input); + switch (alt68) { + case 1 : + // InternalEtlParser.g:3972:3: this_AttributeConstraint_0= ruleAttributeConstraint + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubAttributeSetAccess().getAttributeConstraintParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_AttributeConstraint_0=ruleAttributeConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_AttributeConstraint_0; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:3984:3: this_NestedAttributeSet_1= ruleNestedAttributeSet + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubAttributeSetAccess().getNestedAttributeSetParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_NestedAttributeSet_1=ruleNestedAttributeSet(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_NestedAttributeSet_1; + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSubAttributeSet" + + + // $ANTLR start "entryRuleNestedAttributeSet" + // InternalEtlParser.g:3999:1: entryRuleNestedAttributeSet returns [EObject current=null] : iv_ruleNestedAttributeSet= ruleNestedAttributeSet EOF ; + public final EObject entryRuleNestedAttributeSet() throws RecognitionException { + EObject current = null; + + EObject iv_ruleNestedAttributeSet = null; + + + try { + // InternalEtlParser.g:3999:59: (iv_ruleNestedAttributeSet= ruleNestedAttributeSet EOF ) + // InternalEtlParser.g:4000:2: iv_ruleNestedAttributeSet= ruleNestedAttributeSet EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getNestedAttributeSetRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleNestedAttributeSet=ruleNestedAttributeSet(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleNestedAttributeSet; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleNestedAttributeSet" + + + // $ANTLR start "ruleNestedAttributeSet" + // InternalEtlParser.g:4006:1: ruleNestedAttributeSet returns [EObject current=null] : (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ; + public final EObject ruleNestedAttributeSet() throws RecognitionException { + EObject current = null; + + Token this_ROUND_OPEN_0=null; + Token this_ROUND_CLOSE_2=null; + EObject lv_nested_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4012:2: ( (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ) + // InternalEtlParser.g:4013:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + { + // InternalEtlParser.g:4013:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + // InternalEtlParser.g:4014:3: this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE + { + this_ROUND_OPEN_0=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_44); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_OPEN_0, grammarAccess.getNestedAttributeSetAccess().getROUND_OPENTerminalRuleCall_0()); + + } + // InternalEtlParser.g:4018:3: ( (lv_nested_1_0= ruleEclAttributeSet ) ) + // InternalEtlParser.g:4019:4: (lv_nested_1_0= ruleEclAttributeSet ) + { + // InternalEtlParser.g:4019:4: (lv_nested_1_0= ruleEclAttributeSet ) + // InternalEtlParser.g:4020:5: lv_nested_1_0= ruleEclAttributeSet + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getNestedAttributeSetAccess().getNestedEclAttributeSetParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_11); + lv_nested_1_0=ruleEclAttributeSet(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getNestedAttributeSetRule()); + } + set( + current, + "nested", + lv_nested_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeSet"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + this_ROUND_CLOSE_2=(Token)match(input,RULE_ROUND_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_CLOSE_2, grammarAccess.getNestedAttributeSetAccess().getROUND_CLOSETerminalRuleCall_2()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleNestedAttributeSet" + + + // $ANTLR start "entryRuleAttributeConstraint" + // InternalEtlParser.g:4045:1: entryRuleAttributeConstraint returns [EObject current=null] : iv_ruleAttributeConstraint= ruleAttributeConstraint EOF ; + public final EObject entryRuleAttributeConstraint() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAttributeConstraint = null; + + + try { + // InternalEtlParser.g:4045:60: (iv_ruleAttributeConstraint= ruleAttributeConstraint EOF ) + // InternalEtlParser.g:4046:2: iv_ruleAttributeConstraint= ruleAttributeConstraint EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAttributeConstraintRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAttributeConstraint=ruleAttributeConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAttributeConstraint; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAttributeConstraint" + + + // $ANTLR start "ruleAttributeConstraint" + // InternalEtlParser.g:4052:1: ruleAttributeConstraint returns [EObject current=null] : ( ( (lv_cardinality_0_0= ruleCardinality ) )? ( (lv_reversed_1_0= RULE_REVERSED ) )? ( (lv_attribute_2_0= ruleSubExpressionConstraint ) ) ( (lv_comparison_3_0= ruleComparison ) ) ) ; + public final EObject ruleAttributeConstraint() throws RecognitionException { + EObject current = null; + + Token lv_reversed_1_0=null; + EObject lv_cardinality_0_0 = null; + + EObject lv_attribute_2_0 = null; + + EObject lv_comparison_3_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4058:2: ( ( ( (lv_cardinality_0_0= ruleCardinality ) )? ( (lv_reversed_1_0= RULE_REVERSED ) )? ( (lv_attribute_2_0= ruleSubExpressionConstraint ) ) ( (lv_comparison_3_0= ruleComparison ) ) ) ) + // InternalEtlParser.g:4059:2: ( ( (lv_cardinality_0_0= ruleCardinality ) )? ( (lv_reversed_1_0= RULE_REVERSED ) )? ( (lv_attribute_2_0= ruleSubExpressionConstraint ) ) ( (lv_comparison_3_0= ruleComparison ) ) ) + { + // InternalEtlParser.g:4059:2: ( ( (lv_cardinality_0_0= ruleCardinality ) )? ( (lv_reversed_1_0= RULE_REVERSED ) )? ( (lv_attribute_2_0= ruleSubExpressionConstraint ) ) ( (lv_comparison_3_0= ruleComparison ) ) ) + // InternalEtlParser.g:4060:3: ( (lv_cardinality_0_0= ruleCardinality ) )? ( (lv_reversed_1_0= RULE_REVERSED ) )? ( (lv_attribute_2_0= ruleSubExpressionConstraint ) ) ( (lv_comparison_3_0= ruleComparison ) ) + { + // InternalEtlParser.g:4060:3: ( (lv_cardinality_0_0= ruleCardinality ) )? + int alt69=2; + int LA69_0 = input.LA(1); + + if ( (LA69_0==RULE_SQUARE_OPEN) ) { + alt69=1; + } + switch (alt69) { + case 1 : + // InternalEtlParser.g:4061:4: (lv_cardinality_0_0= ruleCardinality ) + { + // InternalEtlParser.g:4061:4: (lv_cardinality_0_0= ruleCardinality ) + // InternalEtlParser.g:4062:5: lv_cardinality_0_0= ruleCardinality + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeConstraintAccess().getCardinalityCardinalityParserRuleCall_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_46); + lv_cardinality_0_0=ruleCardinality(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeConstraintRule()); + } + set( + current, + "cardinality", + lv_cardinality_0_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Cardinality"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + break; + + } + + // InternalEtlParser.g:4079:3: ( (lv_reversed_1_0= RULE_REVERSED ) )? + int alt70=2; + int LA70_0 = input.LA(1); + + if ( (LA70_0==RULE_REVERSED) ) { + alt70=1; + } + switch (alt70) { + case 1 : + // InternalEtlParser.g:4080:4: (lv_reversed_1_0= RULE_REVERSED ) + { + // InternalEtlParser.g:4080:4: (lv_reversed_1_0= RULE_REVERSED ) + // InternalEtlParser.g:4081:5: lv_reversed_1_0= RULE_REVERSED + { + lv_reversed_1_0=(Token)match(input,RULE_REVERSED,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_reversed_1_0, grammarAccess.getAttributeConstraintAccess().getReversedREVERSEDTerminalRuleCall_1_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getAttributeConstraintRule()); + } + setWithLastConsumed( + current, + "reversed", + true, + "com.b2international.snowowl.snomed.ecl.Ecl.REVERSED"); + + } + + } + + + } + break; + + } + + // InternalEtlParser.g:4097:3: ( (lv_attribute_2_0= ruleSubExpressionConstraint ) ) + // InternalEtlParser.g:4098:4: (lv_attribute_2_0= ruleSubExpressionConstraint ) + { + // InternalEtlParser.g:4098:4: (lv_attribute_2_0= ruleSubExpressionConstraint ) + // InternalEtlParser.g:4099:5: lv_attribute_2_0= ruleSubExpressionConstraint + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeConstraintAccess().getAttributeSubExpressionConstraintParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_47); + lv_attribute_2_0=ruleSubExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeConstraintRule()); + } + set( + current, + "attribute", + lv_attribute_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SubExpressionConstraint"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + // InternalEtlParser.g:4116:3: ( (lv_comparison_3_0= ruleComparison ) ) + // InternalEtlParser.g:4117:4: (lv_comparison_3_0= ruleComparison ) + { + // InternalEtlParser.g:4117:4: (lv_comparison_3_0= ruleComparison ) + // InternalEtlParser.g:4118:5: lv_comparison_3_0= ruleComparison + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeConstraintAccess().getComparisonComparisonParserRuleCall_3_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_comparison_3_0=ruleComparison(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeConstraintRule()); + } + set( + current, + "comparison", + lv_comparison_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Comparison"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAttributeConstraint" + + + // $ANTLR start "entryRuleCardinality" + // InternalEtlParser.g:4139:1: entryRuleCardinality returns [EObject current=null] : iv_ruleCardinality= ruleCardinality EOF ; + public final EObject entryRuleCardinality() throws RecognitionException { + EObject current = null; + + EObject iv_ruleCardinality = null; + + + try { + // InternalEtlParser.g:4139:52: (iv_ruleCardinality= ruleCardinality EOF ) + // InternalEtlParser.g:4140:2: iv_ruleCardinality= ruleCardinality EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getCardinalityRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleCardinality=ruleCardinality(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleCardinality; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleCardinality" + + + // $ANTLR start "ruleCardinality" + // InternalEtlParser.g:4146:1: ruleCardinality returns [EObject current=null] : (this_SQUARE_OPEN_0= RULE_SQUARE_OPEN ( (lv_min_1_0= ruleNonNegativeInteger ) ) this_TO_2= RULE_TO ( (lv_max_3_0= ruleMaxValue ) ) this_SQUARE_CLOSE_4= RULE_SQUARE_CLOSE ) ; + public final EObject ruleCardinality() throws RecognitionException { + EObject current = null; + + Token this_SQUARE_OPEN_0=null; + Token this_TO_2=null; + Token this_SQUARE_CLOSE_4=null; + AntlrDatatypeRuleToken lv_min_1_0 = null; + + AntlrDatatypeRuleToken lv_max_3_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4152:2: ( (this_SQUARE_OPEN_0= RULE_SQUARE_OPEN ( (lv_min_1_0= ruleNonNegativeInteger ) ) this_TO_2= RULE_TO ( (lv_max_3_0= ruleMaxValue ) ) this_SQUARE_CLOSE_4= RULE_SQUARE_CLOSE ) ) + // InternalEtlParser.g:4153:2: (this_SQUARE_OPEN_0= RULE_SQUARE_OPEN ( (lv_min_1_0= ruleNonNegativeInteger ) ) this_TO_2= RULE_TO ( (lv_max_3_0= ruleMaxValue ) ) this_SQUARE_CLOSE_4= RULE_SQUARE_CLOSE ) + { + // InternalEtlParser.g:4153:2: (this_SQUARE_OPEN_0= RULE_SQUARE_OPEN ( (lv_min_1_0= ruleNonNegativeInteger ) ) this_TO_2= RULE_TO ( (lv_max_3_0= ruleMaxValue ) ) this_SQUARE_CLOSE_4= RULE_SQUARE_CLOSE ) + // InternalEtlParser.g:4154:3: this_SQUARE_OPEN_0= RULE_SQUARE_OPEN ( (lv_min_1_0= ruleNonNegativeInteger ) ) this_TO_2= RULE_TO ( (lv_max_3_0= ruleMaxValue ) ) this_SQUARE_CLOSE_4= RULE_SQUARE_CLOSE + { + this_SQUARE_OPEN_0=(Token)match(input,RULE_SQUARE_OPEN,FollowSets000.FOLLOW_30); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_SQUARE_OPEN_0, grammarAccess.getCardinalityAccess().getSQUARE_OPENTerminalRuleCall_0()); + + } + // InternalEtlParser.g:4158:3: ( (lv_min_1_0= ruleNonNegativeInteger ) ) + // InternalEtlParser.g:4159:4: (lv_min_1_0= ruleNonNegativeInteger ) + { + // InternalEtlParser.g:4159:4: (lv_min_1_0= ruleNonNegativeInteger ) + // InternalEtlParser.g:4160:5: lv_min_1_0= ruleNonNegativeInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getCardinalityAccess().getMinNonNegativeIntegerParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_31); + lv_min_1_0=ruleNonNegativeInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getCardinalityRule()); + } + set( + current, + "min", + lv_min_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.NonNegativeInteger"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + this_TO_2=(Token)match(input,RULE_TO,FollowSets000.FOLLOW_32); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_TO_2, grammarAccess.getCardinalityAccess().getTOTerminalRuleCall_2()); + + } + // InternalEtlParser.g:4181:3: ( (lv_max_3_0= ruleMaxValue ) ) + // InternalEtlParser.g:4182:4: (lv_max_3_0= ruleMaxValue ) + { + // InternalEtlParser.g:4182:4: (lv_max_3_0= ruleMaxValue ) + // InternalEtlParser.g:4183:5: lv_max_3_0= ruleMaxValue + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getCardinalityAccess().getMaxMaxValueParserRuleCall_3_0()); + + } + pushFollow(FollowSets000.FOLLOW_48); + lv_max_3_0=ruleMaxValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getCardinalityRule()); + } + set( + current, + "max", + lv_max_3_0, + "com.b2international.snowowl.snomed.ecl.Ecl.MaxValue"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + this_SQUARE_CLOSE_4=(Token)match(input,RULE_SQUARE_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_SQUARE_CLOSE_4, grammarAccess.getCardinalityAccess().getSQUARE_CLOSETerminalRuleCall_4()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleCardinality" + + + // $ANTLR start "entryRuleComparison" + // InternalEtlParser.g:4208:1: entryRuleComparison returns [EObject current=null] : iv_ruleComparison= ruleComparison EOF ; + public final EObject entryRuleComparison() throws RecognitionException { + EObject current = null; + + EObject iv_ruleComparison = null; + + + try { + // InternalEtlParser.g:4208:51: (iv_ruleComparison= ruleComparison EOF ) + // InternalEtlParser.g:4209:2: iv_ruleComparison= ruleComparison EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getComparisonRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleComparison=ruleComparison(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleComparison; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleComparison" + + + // $ANTLR start "ruleComparison" + // InternalEtlParser.g:4215:1: ruleComparison returns [EObject current=null] : (this_AttributeComparison_0= ruleAttributeComparison | this_DataTypeComparison_1= ruleDataTypeComparison ) ; + public final EObject ruleComparison() throws RecognitionException { + EObject current = null; + + EObject this_AttributeComparison_0 = null; + + EObject this_DataTypeComparison_1 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4221:2: ( (this_AttributeComparison_0= ruleAttributeComparison | this_DataTypeComparison_1= ruleDataTypeComparison ) ) + // InternalEtlParser.g:4222:2: (this_AttributeComparison_0= ruleAttributeComparison | this_DataTypeComparison_1= ruleDataTypeComparison ) + { + // InternalEtlParser.g:4222:2: (this_AttributeComparison_0= ruleAttributeComparison | this_DataTypeComparison_1= ruleDataTypeComparison ) + int alt71=2; + switch ( input.LA(1) ) { + case RULE_EQUAL: + { + int LA71_1 = input.LA(2); + + if ( ((LA71_1>=False && LA71_1<=True)||LA71_1==RULE_STRING||LA71_1==RULE_HASH) ) { + alt71=2; + } + else if ( (LA71_1==RULE_DIGIT_NONZERO||LA71_1==RULE_ROUND_OPEN||LA71_1==RULE_CARET||LA71_1==RULE_WILDCARD||(LA71_1>=RULE_LT && LA71_1<=RULE_GT_EM)) ) { + alt71=1; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 71, 1, input); + + throw nvae; + } + } + break; + case RULE_NOT_EQUAL: + { + int LA71_2 = input.LA(2); + + if ( ((LA71_2>=False && LA71_2<=True)||LA71_2==RULE_STRING||LA71_2==RULE_HASH) ) { + alt71=2; + } + else if ( (LA71_2==RULE_DIGIT_NONZERO||LA71_2==RULE_ROUND_OPEN||LA71_2==RULE_CARET||LA71_2==RULE_WILDCARD||(LA71_2>=RULE_LT && LA71_2<=RULE_GT_EM)) ) { + alt71=1; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 71, 2, input); + + throw nvae; + } + } + break; + case RULE_LT: + case RULE_GT: + case RULE_GTE: + case RULE_LTE: + { + alt71=2; + } + break; + default: + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 71, 0, input); + + throw nvae; + } + + switch (alt71) { + case 1 : + // InternalEtlParser.g:4223:3: this_AttributeComparison_0= ruleAttributeComparison + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getComparisonAccess().getAttributeComparisonParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_AttributeComparison_0=ruleAttributeComparison(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_AttributeComparison_0; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:4235:3: this_DataTypeComparison_1= ruleDataTypeComparison + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getComparisonAccess().getDataTypeComparisonParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_DataTypeComparison_1=ruleDataTypeComparison(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_DataTypeComparison_1; + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleComparison" + + + // $ANTLR start "entryRuleAttributeComparison" + // InternalEtlParser.g:4250:1: entryRuleAttributeComparison returns [EObject current=null] : iv_ruleAttributeComparison= ruleAttributeComparison EOF ; + public final EObject entryRuleAttributeComparison() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAttributeComparison = null; + + + try { + // InternalEtlParser.g:4250:60: (iv_ruleAttributeComparison= ruleAttributeComparison EOF ) + // InternalEtlParser.g:4251:2: iv_ruleAttributeComparison= ruleAttributeComparison EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAttributeComparisonRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAttributeComparison=ruleAttributeComparison(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAttributeComparison; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAttributeComparison" + + + // $ANTLR start "ruleAttributeComparison" + // InternalEtlParser.g:4257:1: ruleAttributeComparison returns [EObject current=null] : (this_AttributeValueEquals_0= ruleAttributeValueEquals | this_AttributeValueNotEquals_1= ruleAttributeValueNotEquals ) ; + public final EObject ruleAttributeComparison() throws RecognitionException { + EObject current = null; + + EObject this_AttributeValueEquals_0 = null; + + EObject this_AttributeValueNotEquals_1 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4263:2: ( (this_AttributeValueEquals_0= ruleAttributeValueEquals | this_AttributeValueNotEquals_1= ruleAttributeValueNotEquals ) ) + // InternalEtlParser.g:4264:2: (this_AttributeValueEquals_0= ruleAttributeValueEquals | this_AttributeValueNotEquals_1= ruleAttributeValueNotEquals ) + { + // InternalEtlParser.g:4264:2: (this_AttributeValueEquals_0= ruleAttributeValueEquals | this_AttributeValueNotEquals_1= ruleAttributeValueNotEquals ) + int alt72=2; + int LA72_0 = input.LA(1); + + if ( (LA72_0==RULE_EQUAL) ) { + alt72=1; + } + else if ( (LA72_0==RULE_NOT_EQUAL) ) { + alt72=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 72, 0, input); + + throw nvae; + } + switch (alt72) { + case 1 : + // InternalEtlParser.g:4265:3: this_AttributeValueEquals_0= ruleAttributeValueEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeComparisonAccess().getAttributeValueEqualsParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_AttributeValueEquals_0=ruleAttributeValueEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_AttributeValueEquals_0; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:4277:3: this_AttributeValueNotEquals_1= ruleAttributeValueNotEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeComparisonAccess().getAttributeValueNotEqualsParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_AttributeValueNotEquals_1=ruleAttributeValueNotEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_AttributeValueNotEquals_1; + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAttributeComparison" + + + // $ANTLR start "entryRuleDataTypeComparison" + // InternalEtlParser.g:4292:1: entryRuleDataTypeComparison returns [EObject current=null] : iv_ruleDataTypeComparison= ruleDataTypeComparison EOF ; + public final EObject entryRuleDataTypeComparison() throws RecognitionException { + EObject current = null; + + EObject iv_ruleDataTypeComparison = null; + + + try { + // InternalEtlParser.g:4292:59: (iv_ruleDataTypeComparison= ruleDataTypeComparison EOF ) + // InternalEtlParser.g:4293:2: iv_ruleDataTypeComparison= ruleDataTypeComparison EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDataTypeComparisonRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDataTypeComparison=ruleDataTypeComparison(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDataTypeComparison; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleDataTypeComparison" + + + // $ANTLR start "ruleDataTypeComparison" + // InternalEtlParser.g:4299:1: ruleDataTypeComparison returns [EObject current=null] : (this_BooleanValueEquals_0= ruleBooleanValueEquals | this_BooleanValueNotEquals_1= ruleBooleanValueNotEquals | this_StringValueEquals_2= ruleStringValueEquals | this_StringValueNotEquals_3= ruleStringValueNotEquals | this_IntegerValueEquals_4= ruleIntegerValueEquals | this_IntegerValueNotEquals_5= ruleIntegerValueNotEquals | this_IntegerValueGreaterThan_6= ruleIntegerValueGreaterThan | this_IntegerValueGreaterThanEquals_7= ruleIntegerValueGreaterThanEquals | this_IntegerValueLessThan_8= ruleIntegerValueLessThan | this_IntegerValueLessThanEquals_9= ruleIntegerValueLessThanEquals | this_DecimalValueEquals_10= ruleDecimalValueEquals | this_DecimalValueNotEquals_11= ruleDecimalValueNotEquals | this_DecimalValueGreaterThan_12= ruleDecimalValueGreaterThan | this_DecimalValueGreaterThanEquals_13= ruleDecimalValueGreaterThanEquals | this_DecimalValueLessThan_14= ruleDecimalValueLessThan | this_DecimalValueLessThanEquals_15= ruleDecimalValueLessThanEquals ) ; + public final EObject ruleDataTypeComparison() throws RecognitionException { + EObject current = null; + + EObject this_BooleanValueEquals_0 = null; + + EObject this_BooleanValueNotEquals_1 = null; + + EObject this_StringValueEquals_2 = null; + + EObject this_StringValueNotEquals_3 = null; + + EObject this_IntegerValueEquals_4 = null; + + EObject this_IntegerValueNotEquals_5 = null; + + EObject this_IntegerValueGreaterThan_6 = null; + + EObject this_IntegerValueGreaterThanEquals_7 = null; + + EObject this_IntegerValueLessThan_8 = null; + + EObject this_IntegerValueLessThanEquals_9 = null; + + EObject this_DecimalValueEquals_10 = null; + + EObject this_DecimalValueNotEquals_11 = null; + + EObject this_DecimalValueGreaterThan_12 = null; + + EObject this_DecimalValueGreaterThanEquals_13 = null; + + EObject this_DecimalValueLessThan_14 = null; + + EObject this_DecimalValueLessThanEquals_15 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4305:2: ( (this_BooleanValueEquals_0= ruleBooleanValueEquals | this_BooleanValueNotEquals_1= ruleBooleanValueNotEquals | this_StringValueEquals_2= ruleStringValueEquals | this_StringValueNotEquals_3= ruleStringValueNotEquals | this_IntegerValueEquals_4= ruleIntegerValueEquals | this_IntegerValueNotEquals_5= ruleIntegerValueNotEquals | this_IntegerValueGreaterThan_6= ruleIntegerValueGreaterThan | this_IntegerValueGreaterThanEquals_7= ruleIntegerValueGreaterThanEquals | this_IntegerValueLessThan_8= ruleIntegerValueLessThan | this_IntegerValueLessThanEquals_9= ruleIntegerValueLessThanEquals | this_DecimalValueEquals_10= ruleDecimalValueEquals | this_DecimalValueNotEquals_11= ruleDecimalValueNotEquals | this_DecimalValueGreaterThan_12= ruleDecimalValueGreaterThan | this_DecimalValueGreaterThanEquals_13= ruleDecimalValueGreaterThanEquals | this_DecimalValueLessThan_14= ruleDecimalValueLessThan | this_DecimalValueLessThanEquals_15= ruleDecimalValueLessThanEquals ) ) + // InternalEtlParser.g:4306:2: (this_BooleanValueEquals_0= ruleBooleanValueEquals | this_BooleanValueNotEquals_1= ruleBooleanValueNotEquals | this_StringValueEquals_2= ruleStringValueEquals | this_StringValueNotEquals_3= ruleStringValueNotEquals | this_IntegerValueEquals_4= ruleIntegerValueEquals | this_IntegerValueNotEquals_5= ruleIntegerValueNotEquals | this_IntegerValueGreaterThan_6= ruleIntegerValueGreaterThan | this_IntegerValueGreaterThanEquals_7= ruleIntegerValueGreaterThanEquals | this_IntegerValueLessThan_8= ruleIntegerValueLessThan | this_IntegerValueLessThanEquals_9= ruleIntegerValueLessThanEquals | this_DecimalValueEquals_10= ruleDecimalValueEquals | this_DecimalValueNotEquals_11= ruleDecimalValueNotEquals | this_DecimalValueGreaterThan_12= ruleDecimalValueGreaterThan | this_DecimalValueGreaterThanEquals_13= ruleDecimalValueGreaterThanEquals | this_DecimalValueLessThan_14= ruleDecimalValueLessThan | this_DecimalValueLessThanEquals_15= ruleDecimalValueLessThanEquals ) + { + // InternalEtlParser.g:4306:2: (this_BooleanValueEquals_0= ruleBooleanValueEquals | this_BooleanValueNotEquals_1= ruleBooleanValueNotEquals | this_StringValueEquals_2= ruleStringValueEquals | this_StringValueNotEquals_3= ruleStringValueNotEquals | this_IntegerValueEquals_4= ruleIntegerValueEquals | this_IntegerValueNotEquals_5= ruleIntegerValueNotEquals | this_IntegerValueGreaterThan_6= ruleIntegerValueGreaterThan | this_IntegerValueGreaterThanEquals_7= ruleIntegerValueGreaterThanEquals | this_IntegerValueLessThan_8= ruleIntegerValueLessThan | this_IntegerValueLessThanEquals_9= ruleIntegerValueLessThanEquals | this_DecimalValueEquals_10= ruleDecimalValueEquals | this_DecimalValueNotEquals_11= ruleDecimalValueNotEquals | this_DecimalValueGreaterThan_12= ruleDecimalValueGreaterThan | this_DecimalValueGreaterThanEquals_13= ruleDecimalValueGreaterThanEquals | this_DecimalValueLessThan_14= ruleDecimalValueLessThan | this_DecimalValueLessThanEquals_15= ruleDecimalValueLessThanEquals ) + int alt73=16; + alt73 = dfa73.predict(input); + switch (alt73) { + case 1 : + // InternalEtlParser.g:4307:3: this_BooleanValueEquals_0= ruleBooleanValueEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getBooleanValueEqualsParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_BooleanValueEquals_0=ruleBooleanValueEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_BooleanValueEquals_0; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:4319:3: this_BooleanValueNotEquals_1= ruleBooleanValueNotEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getBooleanValueNotEqualsParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_BooleanValueNotEquals_1=ruleBooleanValueNotEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_BooleanValueNotEquals_1; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 3 : + // InternalEtlParser.g:4331:3: this_StringValueEquals_2= ruleStringValueEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getStringValueEqualsParserRuleCall_2()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_StringValueEquals_2=ruleStringValueEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_StringValueEquals_2; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 4 : + // InternalEtlParser.g:4343:3: this_StringValueNotEquals_3= ruleStringValueNotEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getStringValueNotEqualsParserRuleCall_3()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_StringValueNotEquals_3=ruleStringValueNotEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_StringValueNotEquals_3; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 5 : + // InternalEtlParser.g:4355:3: this_IntegerValueEquals_4= ruleIntegerValueEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getIntegerValueEqualsParserRuleCall_4()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_IntegerValueEquals_4=ruleIntegerValueEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_IntegerValueEquals_4; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 6 : + // InternalEtlParser.g:4367:3: this_IntegerValueNotEquals_5= ruleIntegerValueNotEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getIntegerValueNotEqualsParserRuleCall_5()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_IntegerValueNotEquals_5=ruleIntegerValueNotEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_IntegerValueNotEquals_5; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 7 : + // InternalEtlParser.g:4379:3: this_IntegerValueGreaterThan_6= ruleIntegerValueGreaterThan + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getIntegerValueGreaterThanParserRuleCall_6()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_IntegerValueGreaterThan_6=ruleIntegerValueGreaterThan(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_IntegerValueGreaterThan_6; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 8 : + // InternalEtlParser.g:4391:3: this_IntegerValueGreaterThanEquals_7= ruleIntegerValueGreaterThanEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getIntegerValueGreaterThanEqualsParserRuleCall_7()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_IntegerValueGreaterThanEquals_7=ruleIntegerValueGreaterThanEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_IntegerValueGreaterThanEquals_7; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 9 : + // InternalEtlParser.g:4403:3: this_IntegerValueLessThan_8= ruleIntegerValueLessThan + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getIntegerValueLessThanParserRuleCall_8()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_IntegerValueLessThan_8=ruleIntegerValueLessThan(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_IntegerValueLessThan_8; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 10 : + // InternalEtlParser.g:4415:3: this_IntegerValueLessThanEquals_9= ruleIntegerValueLessThanEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getIntegerValueLessThanEqualsParserRuleCall_9()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_IntegerValueLessThanEquals_9=ruleIntegerValueLessThanEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_IntegerValueLessThanEquals_9; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 11 : + // InternalEtlParser.g:4427:3: this_DecimalValueEquals_10= ruleDecimalValueEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getDecimalValueEqualsParserRuleCall_10()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_DecimalValueEquals_10=ruleDecimalValueEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_DecimalValueEquals_10; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 12 : + // InternalEtlParser.g:4439:3: this_DecimalValueNotEquals_11= ruleDecimalValueNotEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getDecimalValueNotEqualsParserRuleCall_11()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_DecimalValueNotEquals_11=ruleDecimalValueNotEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_DecimalValueNotEquals_11; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 13 : + // InternalEtlParser.g:4451:3: this_DecimalValueGreaterThan_12= ruleDecimalValueGreaterThan + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getDecimalValueGreaterThanParserRuleCall_12()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_DecimalValueGreaterThan_12=ruleDecimalValueGreaterThan(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_DecimalValueGreaterThan_12; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 14 : + // InternalEtlParser.g:4463:3: this_DecimalValueGreaterThanEquals_13= ruleDecimalValueGreaterThanEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getDecimalValueGreaterThanEqualsParserRuleCall_13()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_DecimalValueGreaterThanEquals_13=ruleDecimalValueGreaterThanEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_DecimalValueGreaterThanEquals_13; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 15 : + // InternalEtlParser.g:4475:3: this_DecimalValueLessThan_14= ruleDecimalValueLessThan + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getDecimalValueLessThanParserRuleCall_14()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_DecimalValueLessThan_14=ruleDecimalValueLessThan(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_DecimalValueLessThan_14; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 16 : + // InternalEtlParser.g:4487:3: this_DecimalValueLessThanEquals_15= ruleDecimalValueLessThanEquals + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDataTypeComparisonAccess().getDecimalValueLessThanEqualsParserRuleCall_15()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_DecimalValueLessThanEquals_15=ruleDecimalValueLessThanEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_DecimalValueLessThanEquals_15; + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleDataTypeComparison" + + + // $ANTLR start "entryRuleAttributeValueEquals" + // InternalEtlParser.g:4502:1: entryRuleAttributeValueEquals returns [EObject current=null] : iv_ruleAttributeValueEquals= ruleAttributeValueEquals EOF ; + public final EObject entryRuleAttributeValueEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAttributeValueEquals = null; + + + try { + // InternalEtlParser.g:4502:61: (iv_ruleAttributeValueEquals= ruleAttributeValueEquals EOF ) + // InternalEtlParser.g:4503:2: iv_ruleAttributeValueEquals= ruleAttributeValueEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAttributeValueEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAttributeValueEquals=ruleAttributeValueEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAttributeValueEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAttributeValueEquals" + + + // $ANTLR start "ruleAttributeValueEquals" + // InternalEtlParser.g:4509:1: ruleAttributeValueEquals returns [EObject current=null] : (this_EQUAL_0= RULE_EQUAL ( (lv_constraint_1_0= ruleSubExpressionConstraint ) ) ) ; + public final EObject ruleAttributeValueEquals() throws RecognitionException { + EObject current = null; + + Token this_EQUAL_0=null; + EObject lv_constraint_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4515:2: ( (this_EQUAL_0= RULE_EQUAL ( (lv_constraint_1_0= ruleSubExpressionConstraint ) ) ) ) + // InternalEtlParser.g:4516:2: (this_EQUAL_0= RULE_EQUAL ( (lv_constraint_1_0= ruleSubExpressionConstraint ) ) ) + { + // InternalEtlParser.g:4516:2: (this_EQUAL_0= RULE_EQUAL ( (lv_constraint_1_0= ruleSubExpressionConstraint ) ) ) + // InternalEtlParser.g:4517:3: this_EQUAL_0= RULE_EQUAL ( (lv_constraint_1_0= ruleSubExpressionConstraint ) ) + { + this_EQUAL_0=(Token)match(input,RULE_EQUAL,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_EQUAL_0, grammarAccess.getAttributeValueEqualsAccess().getEQUALTerminalRuleCall_0()); + + } + // InternalEtlParser.g:4521:3: ( (lv_constraint_1_0= ruleSubExpressionConstraint ) ) + // InternalEtlParser.g:4522:4: (lv_constraint_1_0= ruleSubExpressionConstraint ) + { + // InternalEtlParser.g:4522:4: (lv_constraint_1_0= ruleSubExpressionConstraint ) + // InternalEtlParser.g:4523:5: lv_constraint_1_0= ruleSubExpressionConstraint + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeValueEqualsAccess().getConstraintSubExpressionConstraintParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_constraint_1_0=ruleSubExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeValueEqualsRule()); + } + set( + current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SubExpressionConstraint"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAttributeValueEquals" + + + // $ANTLR start "entryRuleAttributeValueNotEquals" + // InternalEtlParser.g:4544:1: entryRuleAttributeValueNotEquals returns [EObject current=null] : iv_ruleAttributeValueNotEquals= ruleAttributeValueNotEquals EOF ; + public final EObject entryRuleAttributeValueNotEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAttributeValueNotEquals = null; + + + try { + // InternalEtlParser.g:4544:64: (iv_ruleAttributeValueNotEquals= ruleAttributeValueNotEquals EOF ) + // InternalEtlParser.g:4545:2: iv_ruleAttributeValueNotEquals= ruleAttributeValueNotEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAttributeValueNotEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAttributeValueNotEquals=ruleAttributeValueNotEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAttributeValueNotEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAttributeValueNotEquals" + + + // $ANTLR start "ruleAttributeValueNotEquals" + // InternalEtlParser.g:4551:1: ruleAttributeValueNotEquals returns [EObject current=null] : (this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_constraint_1_0= ruleSubExpressionConstraint ) ) ) ; + public final EObject ruleAttributeValueNotEquals() throws RecognitionException { + EObject current = null; + + Token this_NOT_EQUAL_0=null; + EObject lv_constraint_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4557:2: ( (this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_constraint_1_0= ruleSubExpressionConstraint ) ) ) ) + // InternalEtlParser.g:4558:2: (this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_constraint_1_0= ruleSubExpressionConstraint ) ) ) + { + // InternalEtlParser.g:4558:2: (this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_constraint_1_0= ruleSubExpressionConstraint ) ) ) + // InternalEtlParser.g:4559:3: this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_constraint_1_0= ruleSubExpressionConstraint ) ) + { + this_NOT_EQUAL_0=(Token)match(input,RULE_NOT_EQUAL,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_NOT_EQUAL_0, grammarAccess.getAttributeValueNotEqualsAccess().getNOT_EQUALTerminalRuleCall_0()); + + } + // InternalEtlParser.g:4563:3: ( (lv_constraint_1_0= ruleSubExpressionConstraint ) ) + // InternalEtlParser.g:4564:4: (lv_constraint_1_0= ruleSubExpressionConstraint ) + { + // InternalEtlParser.g:4564:4: (lv_constraint_1_0= ruleSubExpressionConstraint ) + // InternalEtlParser.g:4565:5: lv_constraint_1_0= ruleSubExpressionConstraint + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeValueNotEqualsAccess().getConstraintSubExpressionConstraintParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_constraint_1_0=ruleSubExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeValueNotEqualsRule()); + } + set( + current, + "constraint", + lv_constraint_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.SubExpressionConstraint"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAttributeValueNotEquals" + + + // $ANTLR start "entryRuleBooleanValueEquals" + // InternalEtlParser.g:4586:1: entryRuleBooleanValueEquals returns [EObject current=null] : iv_ruleBooleanValueEquals= ruleBooleanValueEquals EOF ; + public final EObject entryRuleBooleanValueEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleBooleanValueEquals = null; + + + try { + // InternalEtlParser.g:4586:59: (iv_ruleBooleanValueEquals= ruleBooleanValueEquals EOF ) + // InternalEtlParser.g:4587:2: iv_ruleBooleanValueEquals= ruleBooleanValueEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getBooleanValueEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleBooleanValueEquals=ruleBooleanValueEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleBooleanValueEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleBooleanValueEquals" + + + // $ANTLR start "ruleBooleanValueEquals" + // InternalEtlParser.g:4593:1: ruleBooleanValueEquals returns [EObject current=null] : (this_EQUAL_0= RULE_EQUAL ( (lv_value_1_0= ruleBoolean ) ) ) ; + public final EObject ruleBooleanValueEquals() throws RecognitionException { + EObject current = null; + + Token this_EQUAL_0=null; + AntlrDatatypeRuleToken lv_value_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4599:2: ( (this_EQUAL_0= RULE_EQUAL ( (lv_value_1_0= ruleBoolean ) ) ) ) + // InternalEtlParser.g:4600:2: (this_EQUAL_0= RULE_EQUAL ( (lv_value_1_0= ruleBoolean ) ) ) + { + // InternalEtlParser.g:4600:2: (this_EQUAL_0= RULE_EQUAL ( (lv_value_1_0= ruleBoolean ) ) ) + // InternalEtlParser.g:4601:3: this_EQUAL_0= RULE_EQUAL ( (lv_value_1_0= ruleBoolean ) ) + { + this_EQUAL_0=(Token)match(input,RULE_EQUAL,FollowSets000.FOLLOW_49); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_EQUAL_0, grammarAccess.getBooleanValueEqualsAccess().getEQUALTerminalRuleCall_0()); + + } + // InternalEtlParser.g:4605:3: ( (lv_value_1_0= ruleBoolean ) ) + // InternalEtlParser.g:4606:4: (lv_value_1_0= ruleBoolean ) + { + // InternalEtlParser.g:4606:4: (lv_value_1_0= ruleBoolean ) + // InternalEtlParser.g:4607:5: lv_value_1_0= ruleBoolean + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getBooleanValueEqualsAccess().getValueBooleanParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_1_0=ruleBoolean(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getBooleanValueEqualsRule()); + } + set( + current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Boolean"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleBooleanValueEquals" + + + // $ANTLR start "entryRuleBooleanValueNotEquals" + // InternalEtlParser.g:4628:1: entryRuleBooleanValueNotEquals returns [EObject current=null] : iv_ruleBooleanValueNotEquals= ruleBooleanValueNotEquals EOF ; + public final EObject entryRuleBooleanValueNotEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleBooleanValueNotEquals = null; + + + try { + // InternalEtlParser.g:4628:62: (iv_ruleBooleanValueNotEquals= ruleBooleanValueNotEquals EOF ) + // InternalEtlParser.g:4629:2: iv_ruleBooleanValueNotEquals= ruleBooleanValueNotEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getBooleanValueNotEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleBooleanValueNotEquals=ruleBooleanValueNotEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleBooleanValueNotEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleBooleanValueNotEquals" + + + // $ANTLR start "ruleBooleanValueNotEquals" + // InternalEtlParser.g:4635:1: ruleBooleanValueNotEquals returns [EObject current=null] : (this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_value_1_0= ruleBoolean ) ) ) ; + public final EObject ruleBooleanValueNotEquals() throws RecognitionException { + EObject current = null; + + Token this_NOT_EQUAL_0=null; + AntlrDatatypeRuleToken lv_value_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4641:2: ( (this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_value_1_0= ruleBoolean ) ) ) ) + // InternalEtlParser.g:4642:2: (this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_value_1_0= ruleBoolean ) ) ) + { + // InternalEtlParser.g:4642:2: (this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_value_1_0= ruleBoolean ) ) ) + // InternalEtlParser.g:4643:3: this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_value_1_0= ruleBoolean ) ) + { + this_NOT_EQUAL_0=(Token)match(input,RULE_NOT_EQUAL,FollowSets000.FOLLOW_49); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_NOT_EQUAL_0, grammarAccess.getBooleanValueNotEqualsAccess().getNOT_EQUALTerminalRuleCall_0()); + + } + // InternalEtlParser.g:4647:3: ( (lv_value_1_0= ruleBoolean ) ) + // InternalEtlParser.g:4648:4: (lv_value_1_0= ruleBoolean ) + { + // InternalEtlParser.g:4648:4: (lv_value_1_0= ruleBoolean ) + // InternalEtlParser.g:4649:5: lv_value_1_0= ruleBoolean + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getBooleanValueNotEqualsAccess().getValueBooleanParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_1_0=ruleBoolean(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getBooleanValueNotEqualsRule()); + } + set( + current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Boolean"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleBooleanValueNotEquals" + + + // $ANTLR start "entryRuleStringValueEquals" + // InternalEtlParser.g:4670:1: entryRuleStringValueEquals returns [EObject current=null] : iv_ruleStringValueEquals= ruleStringValueEquals EOF ; + public final EObject entryRuleStringValueEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleStringValueEquals = null; + + + try { + // InternalEtlParser.g:4670:58: (iv_ruleStringValueEquals= ruleStringValueEquals EOF ) + // InternalEtlParser.g:4671:2: iv_ruleStringValueEquals= ruleStringValueEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getStringValueEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleStringValueEquals=ruleStringValueEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleStringValueEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleStringValueEquals" + + + // $ANTLR start "ruleStringValueEquals" + // InternalEtlParser.g:4677:1: ruleStringValueEquals returns [EObject current=null] : (this_EQUAL_0= RULE_EQUAL ( (lv_value_1_0= RULE_STRING ) ) ) ; + public final EObject ruleStringValueEquals() throws RecognitionException { + EObject current = null; + + Token this_EQUAL_0=null; + Token lv_value_1_0=null; + + + enterRule(); + + try { + // InternalEtlParser.g:4683:2: ( (this_EQUAL_0= RULE_EQUAL ( (lv_value_1_0= RULE_STRING ) ) ) ) + // InternalEtlParser.g:4684:2: (this_EQUAL_0= RULE_EQUAL ( (lv_value_1_0= RULE_STRING ) ) ) + { + // InternalEtlParser.g:4684:2: (this_EQUAL_0= RULE_EQUAL ( (lv_value_1_0= RULE_STRING ) ) ) + // InternalEtlParser.g:4685:3: this_EQUAL_0= RULE_EQUAL ( (lv_value_1_0= RULE_STRING ) ) + { + this_EQUAL_0=(Token)match(input,RULE_EQUAL,FollowSets000.FOLLOW_24); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_EQUAL_0, grammarAccess.getStringValueEqualsAccess().getEQUALTerminalRuleCall_0()); + + } + // InternalEtlParser.g:4689:3: ( (lv_value_1_0= RULE_STRING ) ) + // InternalEtlParser.g:4690:4: (lv_value_1_0= RULE_STRING ) + { + // InternalEtlParser.g:4690:4: (lv_value_1_0= RULE_STRING ) + // InternalEtlParser.g:4691:5: lv_value_1_0= RULE_STRING + { + lv_value_1_0=(Token)match(input,RULE_STRING,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_value_1_0, grammarAccess.getStringValueEqualsAccess().getValueSTRINGTerminalRuleCall_1_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getStringValueEqualsRule()); + } + setWithLastConsumed( + current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.STRING"); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleStringValueEquals" + + + // $ANTLR start "entryRuleStringValueNotEquals" + // InternalEtlParser.g:4711:1: entryRuleStringValueNotEquals returns [EObject current=null] : iv_ruleStringValueNotEquals= ruleStringValueNotEquals EOF ; + public final EObject entryRuleStringValueNotEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleStringValueNotEquals = null; + + + try { + // InternalEtlParser.g:4711:61: (iv_ruleStringValueNotEquals= ruleStringValueNotEquals EOF ) + // InternalEtlParser.g:4712:2: iv_ruleStringValueNotEquals= ruleStringValueNotEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getStringValueNotEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleStringValueNotEquals=ruleStringValueNotEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleStringValueNotEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleStringValueNotEquals" + + + // $ANTLR start "ruleStringValueNotEquals" + // InternalEtlParser.g:4718:1: ruleStringValueNotEquals returns [EObject current=null] : (this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_value_1_0= RULE_STRING ) ) ) ; + public final EObject ruleStringValueNotEquals() throws RecognitionException { + EObject current = null; + + Token this_NOT_EQUAL_0=null; + Token lv_value_1_0=null; + + + enterRule(); + + try { + // InternalEtlParser.g:4724:2: ( (this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_value_1_0= RULE_STRING ) ) ) ) + // InternalEtlParser.g:4725:2: (this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_value_1_0= RULE_STRING ) ) ) + { + // InternalEtlParser.g:4725:2: (this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_value_1_0= RULE_STRING ) ) ) + // InternalEtlParser.g:4726:3: this_NOT_EQUAL_0= RULE_NOT_EQUAL ( (lv_value_1_0= RULE_STRING ) ) + { + this_NOT_EQUAL_0=(Token)match(input,RULE_NOT_EQUAL,FollowSets000.FOLLOW_24); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_NOT_EQUAL_0, grammarAccess.getStringValueNotEqualsAccess().getNOT_EQUALTerminalRuleCall_0()); + + } + // InternalEtlParser.g:4730:3: ( (lv_value_1_0= RULE_STRING ) ) + // InternalEtlParser.g:4731:4: (lv_value_1_0= RULE_STRING ) + { + // InternalEtlParser.g:4731:4: (lv_value_1_0= RULE_STRING ) + // InternalEtlParser.g:4732:5: lv_value_1_0= RULE_STRING + { + lv_value_1_0=(Token)match(input,RULE_STRING,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_value_1_0, grammarAccess.getStringValueNotEqualsAccess().getValueSTRINGTerminalRuleCall_1_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getStringValueNotEqualsRule()); + } + setWithLastConsumed( + current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.STRING"); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleStringValueNotEquals" + + + // $ANTLR start "entryRuleIntegerValueEquals" + // InternalEtlParser.g:4752:1: entryRuleIntegerValueEquals returns [EObject current=null] : iv_ruleIntegerValueEquals= ruleIntegerValueEquals EOF ; + public final EObject entryRuleIntegerValueEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleIntegerValueEquals = null; + + + try { + // InternalEtlParser.g:4752:59: (iv_ruleIntegerValueEquals= ruleIntegerValueEquals EOF ) + // InternalEtlParser.g:4753:2: iv_ruleIntegerValueEquals= ruleIntegerValueEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getIntegerValueEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleIntegerValueEquals=ruleIntegerValueEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleIntegerValueEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleIntegerValueEquals" + + + // $ANTLR start "ruleIntegerValueEquals" + // InternalEtlParser.g:4759:1: ruleIntegerValueEquals returns [EObject current=null] : (this_EQUAL_0= RULE_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) ; + public final EObject ruleIntegerValueEquals() throws RecognitionException { + EObject current = null; + + Token this_EQUAL_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4765:2: ( (this_EQUAL_0= RULE_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) ) + // InternalEtlParser.g:4766:2: (this_EQUAL_0= RULE_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) + { + // InternalEtlParser.g:4766:2: (this_EQUAL_0= RULE_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) + // InternalEtlParser.g:4767:3: this_EQUAL_0= RULE_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) + { + this_EQUAL_0=(Token)match(input,RULE_EQUAL,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_EQUAL_0, grammarAccess.getIntegerValueEqualsAccess().getEQUALTerminalRuleCall_0()); + + } + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getIntegerValueEqualsAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:4775:3: ( (lv_value_2_0= ruleInteger ) ) + // InternalEtlParser.g:4776:4: (lv_value_2_0= ruleInteger ) + { + // InternalEtlParser.g:4776:4: (lv_value_2_0= ruleInteger ) + // InternalEtlParser.g:4777:5: lv_value_2_0= ruleInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getIntegerValueEqualsAccess().getValueIntegerParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getIntegerValueEqualsRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleIntegerValueEquals" + + + // $ANTLR start "entryRuleIntegerValueNotEquals" + // InternalEtlParser.g:4798:1: entryRuleIntegerValueNotEquals returns [EObject current=null] : iv_ruleIntegerValueNotEquals= ruleIntegerValueNotEquals EOF ; + public final EObject entryRuleIntegerValueNotEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleIntegerValueNotEquals = null; + + + try { + // InternalEtlParser.g:4798:62: (iv_ruleIntegerValueNotEquals= ruleIntegerValueNotEquals EOF ) + // InternalEtlParser.g:4799:2: iv_ruleIntegerValueNotEquals= ruleIntegerValueNotEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getIntegerValueNotEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleIntegerValueNotEquals=ruleIntegerValueNotEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleIntegerValueNotEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleIntegerValueNotEquals" + + + // $ANTLR start "ruleIntegerValueNotEquals" + // InternalEtlParser.g:4805:1: ruleIntegerValueNotEquals returns [EObject current=null] : (this_NOT_EQUAL_0= RULE_NOT_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) ; + public final EObject ruleIntegerValueNotEquals() throws RecognitionException { + EObject current = null; + + Token this_NOT_EQUAL_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4811:2: ( (this_NOT_EQUAL_0= RULE_NOT_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) ) + // InternalEtlParser.g:4812:2: (this_NOT_EQUAL_0= RULE_NOT_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) + { + // InternalEtlParser.g:4812:2: (this_NOT_EQUAL_0= RULE_NOT_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) + // InternalEtlParser.g:4813:3: this_NOT_EQUAL_0= RULE_NOT_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) + { + this_NOT_EQUAL_0=(Token)match(input,RULE_NOT_EQUAL,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_NOT_EQUAL_0, grammarAccess.getIntegerValueNotEqualsAccess().getNOT_EQUALTerminalRuleCall_0()); + + } + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getIntegerValueNotEqualsAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:4821:3: ( (lv_value_2_0= ruleInteger ) ) + // InternalEtlParser.g:4822:4: (lv_value_2_0= ruleInteger ) + { + // InternalEtlParser.g:4822:4: (lv_value_2_0= ruleInteger ) + // InternalEtlParser.g:4823:5: lv_value_2_0= ruleInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getIntegerValueNotEqualsAccess().getValueIntegerParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getIntegerValueNotEqualsRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleIntegerValueNotEquals" + + + // $ANTLR start "entryRuleIntegerValueGreaterThan" + // InternalEtlParser.g:4844:1: entryRuleIntegerValueGreaterThan returns [EObject current=null] : iv_ruleIntegerValueGreaterThan= ruleIntegerValueGreaterThan EOF ; + public final EObject entryRuleIntegerValueGreaterThan() throws RecognitionException { + EObject current = null; + + EObject iv_ruleIntegerValueGreaterThan = null; + + + try { + // InternalEtlParser.g:4844:64: (iv_ruleIntegerValueGreaterThan= ruleIntegerValueGreaterThan EOF ) + // InternalEtlParser.g:4845:2: iv_ruleIntegerValueGreaterThan= ruleIntegerValueGreaterThan EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getIntegerValueGreaterThanRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleIntegerValueGreaterThan=ruleIntegerValueGreaterThan(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleIntegerValueGreaterThan; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleIntegerValueGreaterThan" + + + // $ANTLR start "ruleIntegerValueGreaterThan" + // InternalEtlParser.g:4851:1: ruleIntegerValueGreaterThan returns [EObject current=null] : (this_GT_0= RULE_GT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) ; + public final EObject ruleIntegerValueGreaterThan() throws RecognitionException { + EObject current = null; + + Token this_GT_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4857:2: ( (this_GT_0= RULE_GT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) ) + // InternalEtlParser.g:4858:2: (this_GT_0= RULE_GT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) + { + // InternalEtlParser.g:4858:2: (this_GT_0= RULE_GT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) + // InternalEtlParser.g:4859:3: this_GT_0= RULE_GT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) + { + this_GT_0=(Token)match(input,RULE_GT,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_GT_0, grammarAccess.getIntegerValueGreaterThanAccess().getGTTerminalRuleCall_0()); + + } + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getIntegerValueGreaterThanAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:4867:3: ( (lv_value_2_0= ruleInteger ) ) + // InternalEtlParser.g:4868:4: (lv_value_2_0= ruleInteger ) + { + // InternalEtlParser.g:4868:4: (lv_value_2_0= ruleInteger ) + // InternalEtlParser.g:4869:5: lv_value_2_0= ruleInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getIntegerValueGreaterThanAccess().getValueIntegerParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getIntegerValueGreaterThanRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleIntegerValueGreaterThan" + + + // $ANTLR start "entryRuleIntegerValueLessThan" + // InternalEtlParser.g:4890:1: entryRuleIntegerValueLessThan returns [EObject current=null] : iv_ruleIntegerValueLessThan= ruleIntegerValueLessThan EOF ; + public final EObject entryRuleIntegerValueLessThan() throws RecognitionException { + EObject current = null; + + EObject iv_ruleIntegerValueLessThan = null; + + + try { + // InternalEtlParser.g:4890:61: (iv_ruleIntegerValueLessThan= ruleIntegerValueLessThan EOF ) + // InternalEtlParser.g:4891:2: iv_ruleIntegerValueLessThan= ruleIntegerValueLessThan EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getIntegerValueLessThanRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleIntegerValueLessThan=ruleIntegerValueLessThan(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleIntegerValueLessThan; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleIntegerValueLessThan" + + + // $ANTLR start "ruleIntegerValueLessThan" + // InternalEtlParser.g:4897:1: ruleIntegerValueLessThan returns [EObject current=null] : (this_LT_0= RULE_LT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) ; + public final EObject ruleIntegerValueLessThan() throws RecognitionException { + EObject current = null; + + Token this_LT_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4903:2: ( (this_LT_0= RULE_LT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) ) + // InternalEtlParser.g:4904:2: (this_LT_0= RULE_LT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) + { + // InternalEtlParser.g:4904:2: (this_LT_0= RULE_LT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) + // InternalEtlParser.g:4905:3: this_LT_0= RULE_LT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) + { + this_LT_0=(Token)match(input,RULE_LT,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_LT_0, grammarAccess.getIntegerValueLessThanAccess().getLTTerminalRuleCall_0()); + + } + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getIntegerValueLessThanAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:4913:3: ( (lv_value_2_0= ruleInteger ) ) + // InternalEtlParser.g:4914:4: (lv_value_2_0= ruleInteger ) + { + // InternalEtlParser.g:4914:4: (lv_value_2_0= ruleInteger ) + // InternalEtlParser.g:4915:5: lv_value_2_0= ruleInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getIntegerValueLessThanAccess().getValueIntegerParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getIntegerValueLessThanRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleIntegerValueLessThan" + + + // $ANTLR start "entryRuleIntegerValueGreaterThanEquals" + // InternalEtlParser.g:4936:1: entryRuleIntegerValueGreaterThanEquals returns [EObject current=null] : iv_ruleIntegerValueGreaterThanEquals= ruleIntegerValueGreaterThanEquals EOF ; + public final EObject entryRuleIntegerValueGreaterThanEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleIntegerValueGreaterThanEquals = null; + + + try { + // InternalEtlParser.g:4936:70: (iv_ruleIntegerValueGreaterThanEquals= ruleIntegerValueGreaterThanEquals EOF ) + // InternalEtlParser.g:4937:2: iv_ruleIntegerValueGreaterThanEquals= ruleIntegerValueGreaterThanEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getIntegerValueGreaterThanEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleIntegerValueGreaterThanEquals=ruleIntegerValueGreaterThanEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleIntegerValueGreaterThanEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleIntegerValueGreaterThanEquals" + + + // $ANTLR start "ruleIntegerValueGreaterThanEquals" + // InternalEtlParser.g:4943:1: ruleIntegerValueGreaterThanEquals returns [EObject current=null] : (this_GTE_0= RULE_GTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) ; + public final EObject ruleIntegerValueGreaterThanEquals() throws RecognitionException { + EObject current = null; + + Token this_GTE_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4949:2: ( (this_GTE_0= RULE_GTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) ) + // InternalEtlParser.g:4950:2: (this_GTE_0= RULE_GTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) + { + // InternalEtlParser.g:4950:2: (this_GTE_0= RULE_GTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) + // InternalEtlParser.g:4951:3: this_GTE_0= RULE_GTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) + { + this_GTE_0=(Token)match(input,RULE_GTE,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_GTE_0, grammarAccess.getIntegerValueGreaterThanEqualsAccess().getGTETerminalRuleCall_0()); + + } + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getIntegerValueGreaterThanEqualsAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:4959:3: ( (lv_value_2_0= ruleInteger ) ) + // InternalEtlParser.g:4960:4: (lv_value_2_0= ruleInteger ) + { + // InternalEtlParser.g:4960:4: (lv_value_2_0= ruleInteger ) + // InternalEtlParser.g:4961:5: lv_value_2_0= ruleInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getIntegerValueGreaterThanEqualsAccess().getValueIntegerParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getIntegerValueGreaterThanEqualsRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleIntegerValueGreaterThanEquals" + + + // $ANTLR start "entryRuleIntegerValueLessThanEquals" + // InternalEtlParser.g:4982:1: entryRuleIntegerValueLessThanEquals returns [EObject current=null] : iv_ruleIntegerValueLessThanEquals= ruleIntegerValueLessThanEquals EOF ; + public final EObject entryRuleIntegerValueLessThanEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleIntegerValueLessThanEquals = null; + + + try { + // InternalEtlParser.g:4982:67: (iv_ruleIntegerValueLessThanEquals= ruleIntegerValueLessThanEquals EOF ) + // InternalEtlParser.g:4983:2: iv_ruleIntegerValueLessThanEquals= ruleIntegerValueLessThanEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getIntegerValueLessThanEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleIntegerValueLessThanEquals=ruleIntegerValueLessThanEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleIntegerValueLessThanEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleIntegerValueLessThanEquals" + + + // $ANTLR start "ruleIntegerValueLessThanEquals" + // InternalEtlParser.g:4989:1: ruleIntegerValueLessThanEquals returns [EObject current=null] : (this_LTE_0= RULE_LTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) ; + public final EObject ruleIntegerValueLessThanEquals() throws RecognitionException { + EObject current = null; + + Token this_LTE_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:4995:2: ( (this_LTE_0= RULE_LTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) ) + // InternalEtlParser.g:4996:2: (this_LTE_0= RULE_LTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) + { + // InternalEtlParser.g:4996:2: (this_LTE_0= RULE_LTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) ) + // InternalEtlParser.g:4997:3: this_LTE_0= RULE_LTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleInteger ) ) + { + this_LTE_0=(Token)match(input,RULE_LTE,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_LTE_0, grammarAccess.getIntegerValueLessThanEqualsAccess().getLTETerminalRuleCall_0()); + + } + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getIntegerValueLessThanEqualsAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:5005:3: ( (lv_value_2_0= ruleInteger ) ) + // InternalEtlParser.g:5006:4: (lv_value_2_0= ruleInteger ) + { + // InternalEtlParser.g:5006:4: (lv_value_2_0= ruleInteger ) + // InternalEtlParser.g:5007:5: lv_value_2_0= ruleInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getIntegerValueLessThanEqualsAccess().getValueIntegerParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getIntegerValueLessThanEqualsRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Integer"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleIntegerValueLessThanEquals" + + + // $ANTLR start "entryRuleDecimalValueEquals" + // InternalEtlParser.g:5028:1: entryRuleDecimalValueEquals returns [EObject current=null] : iv_ruleDecimalValueEquals= ruleDecimalValueEquals EOF ; + public final EObject entryRuleDecimalValueEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleDecimalValueEquals = null; + + + try { + // InternalEtlParser.g:5028:59: (iv_ruleDecimalValueEquals= ruleDecimalValueEquals EOF ) + // InternalEtlParser.g:5029:2: iv_ruleDecimalValueEquals= ruleDecimalValueEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDecimalValueEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDecimalValueEquals=ruleDecimalValueEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDecimalValueEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleDecimalValueEquals" + + + // $ANTLR start "ruleDecimalValueEquals" + // InternalEtlParser.g:5035:1: ruleDecimalValueEquals returns [EObject current=null] : (this_EQUAL_0= RULE_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) ; + public final EObject ruleDecimalValueEquals() throws RecognitionException { + EObject current = null; + + Token this_EQUAL_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:5041:2: ( (this_EQUAL_0= RULE_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) ) + // InternalEtlParser.g:5042:2: (this_EQUAL_0= RULE_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) + { + // InternalEtlParser.g:5042:2: (this_EQUAL_0= RULE_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) + // InternalEtlParser.g:5043:3: this_EQUAL_0= RULE_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) + { + this_EQUAL_0=(Token)match(input,RULE_EQUAL,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_EQUAL_0, grammarAccess.getDecimalValueEqualsAccess().getEQUALTerminalRuleCall_0()); + + } + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getDecimalValueEqualsAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:5051:3: ( (lv_value_2_0= ruleDecimal ) ) + // InternalEtlParser.g:5052:4: (lv_value_2_0= ruleDecimal ) + { + // InternalEtlParser.g:5052:4: (lv_value_2_0= ruleDecimal ) + // InternalEtlParser.g:5053:5: lv_value_2_0= ruleDecimal + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDecimalValueEqualsAccess().getValueDecimalParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getDecimalValueEqualsRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleDecimalValueEquals" + + + // $ANTLR start "entryRuleDecimalValueNotEquals" + // InternalEtlParser.g:5074:1: entryRuleDecimalValueNotEquals returns [EObject current=null] : iv_ruleDecimalValueNotEquals= ruleDecimalValueNotEquals EOF ; + public final EObject entryRuleDecimalValueNotEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleDecimalValueNotEquals = null; + + + try { + // InternalEtlParser.g:5074:62: (iv_ruleDecimalValueNotEquals= ruleDecimalValueNotEquals EOF ) + // InternalEtlParser.g:5075:2: iv_ruleDecimalValueNotEquals= ruleDecimalValueNotEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDecimalValueNotEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDecimalValueNotEquals=ruleDecimalValueNotEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDecimalValueNotEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleDecimalValueNotEquals" + + + // $ANTLR start "ruleDecimalValueNotEquals" + // InternalEtlParser.g:5081:1: ruleDecimalValueNotEquals returns [EObject current=null] : (this_NOT_EQUAL_0= RULE_NOT_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) ; + public final EObject ruleDecimalValueNotEquals() throws RecognitionException { + EObject current = null; + + Token this_NOT_EQUAL_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:5087:2: ( (this_NOT_EQUAL_0= RULE_NOT_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) ) + // InternalEtlParser.g:5088:2: (this_NOT_EQUAL_0= RULE_NOT_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) + { + // InternalEtlParser.g:5088:2: (this_NOT_EQUAL_0= RULE_NOT_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) + // InternalEtlParser.g:5089:3: this_NOT_EQUAL_0= RULE_NOT_EQUAL this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) + { + this_NOT_EQUAL_0=(Token)match(input,RULE_NOT_EQUAL,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_NOT_EQUAL_0, grammarAccess.getDecimalValueNotEqualsAccess().getNOT_EQUALTerminalRuleCall_0()); + + } + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getDecimalValueNotEqualsAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:5097:3: ( (lv_value_2_0= ruleDecimal ) ) + // InternalEtlParser.g:5098:4: (lv_value_2_0= ruleDecimal ) + { + // InternalEtlParser.g:5098:4: (lv_value_2_0= ruleDecimal ) + // InternalEtlParser.g:5099:5: lv_value_2_0= ruleDecimal + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDecimalValueNotEqualsAccess().getValueDecimalParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getDecimalValueNotEqualsRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleDecimalValueNotEquals" + + + // $ANTLR start "entryRuleDecimalValueGreaterThan" + // InternalEtlParser.g:5120:1: entryRuleDecimalValueGreaterThan returns [EObject current=null] : iv_ruleDecimalValueGreaterThan= ruleDecimalValueGreaterThan EOF ; + public final EObject entryRuleDecimalValueGreaterThan() throws RecognitionException { + EObject current = null; + + EObject iv_ruleDecimalValueGreaterThan = null; + + + try { + // InternalEtlParser.g:5120:64: (iv_ruleDecimalValueGreaterThan= ruleDecimalValueGreaterThan EOF ) + // InternalEtlParser.g:5121:2: iv_ruleDecimalValueGreaterThan= ruleDecimalValueGreaterThan EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDecimalValueGreaterThanRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDecimalValueGreaterThan=ruleDecimalValueGreaterThan(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDecimalValueGreaterThan; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleDecimalValueGreaterThan" + + + // $ANTLR start "ruleDecimalValueGreaterThan" + // InternalEtlParser.g:5127:1: ruleDecimalValueGreaterThan returns [EObject current=null] : (this_GT_0= RULE_GT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) ; + public final EObject ruleDecimalValueGreaterThan() throws RecognitionException { + EObject current = null; + + Token this_GT_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:5133:2: ( (this_GT_0= RULE_GT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) ) + // InternalEtlParser.g:5134:2: (this_GT_0= RULE_GT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) + { + // InternalEtlParser.g:5134:2: (this_GT_0= RULE_GT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) + // InternalEtlParser.g:5135:3: this_GT_0= RULE_GT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) + { + this_GT_0=(Token)match(input,RULE_GT,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_GT_0, grammarAccess.getDecimalValueGreaterThanAccess().getGTTerminalRuleCall_0()); + + } + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getDecimalValueGreaterThanAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:5143:3: ( (lv_value_2_0= ruleDecimal ) ) + // InternalEtlParser.g:5144:4: (lv_value_2_0= ruleDecimal ) + { + // InternalEtlParser.g:5144:4: (lv_value_2_0= ruleDecimal ) + // InternalEtlParser.g:5145:5: lv_value_2_0= ruleDecimal + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDecimalValueGreaterThanAccess().getValueDecimalParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getDecimalValueGreaterThanRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleDecimalValueGreaterThan" + + + // $ANTLR start "entryRuleDecimalValueLessThan" + // InternalEtlParser.g:5166:1: entryRuleDecimalValueLessThan returns [EObject current=null] : iv_ruleDecimalValueLessThan= ruleDecimalValueLessThan EOF ; + public final EObject entryRuleDecimalValueLessThan() throws RecognitionException { + EObject current = null; + + EObject iv_ruleDecimalValueLessThan = null; + + + try { + // InternalEtlParser.g:5166:61: (iv_ruleDecimalValueLessThan= ruleDecimalValueLessThan EOF ) + // InternalEtlParser.g:5167:2: iv_ruleDecimalValueLessThan= ruleDecimalValueLessThan EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDecimalValueLessThanRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDecimalValueLessThan=ruleDecimalValueLessThan(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDecimalValueLessThan; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleDecimalValueLessThan" + + + // $ANTLR start "ruleDecimalValueLessThan" + // InternalEtlParser.g:5173:1: ruleDecimalValueLessThan returns [EObject current=null] : (this_LT_0= RULE_LT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) ; + public final EObject ruleDecimalValueLessThan() throws RecognitionException { + EObject current = null; + + Token this_LT_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:5179:2: ( (this_LT_0= RULE_LT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) ) + // InternalEtlParser.g:5180:2: (this_LT_0= RULE_LT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) + { + // InternalEtlParser.g:5180:2: (this_LT_0= RULE_LT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) + // InternalEtlParser.g:5181:3: this_LT_0= RULE_LT this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) + { + this_LT_0=(Token)match(input,RULE_LT,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_LT_0, grammarAccess.getDecimalValueLessThanAccess().getLTTerminalRuleCall_0()); + + } + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getDecimalValueLessThanAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:5189:3: ( (lv_value_2_0= ruleDecimal ) ) + // InternalEtlParser.g:5190:4: (lv_value_2_0= ruleDecimal ) + { + // InternalEtlParser.g:5190:4: (lv_value_2_0= ruleDecimal ) + // InternalEtlParser.g:5191:5: lv_value_2_0= ruleDecimal + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDecimalValueLessThanAccess().getValueDecimalParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getDecimalValueLessThanRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleDecimalValueLessThan" + + + // $ANTLR start "entryRuleDecimalValueGreaterThanEquals" + // InternalEtlParser.g:5212:1: entryRuleDecimalValueGreaterThanEquals returns [EObject current=null] : iv_ruleDecimalValueGreaterThanEquals= ruleDecimalValueGreaterThanEquals EOF ; + public final EObject entryRuleDecimalValueGreaterThanEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleDecimalValueGreaterThanEquals = null; + + + try { + // InternalEtlParser.g:5212:70: (iv_ruleDecimalValueGreaterThanEquals= ruleDecimalValueGreaterThanEquals EOF ) + // InternalEtlParser.g:5213:2: iv_ruleDecimalValueGreaterThanEquals= ruleDecimalValueGreaterThanEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDecimalValueGreaterThanEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDecimalValueGreaterThanEquals=ruleDecimalValueGreaterThanEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDecimalValueGreaterThanEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleDecimalValueGreaterThanEquals" + + + // $ANTLR start "ruleDecimalValueGreaterThanEquals" + // InternalEtlParser.g:5219:1: ruleDecimalValueGreaterThanEquals returns [EObject current=null] : (this_GTE_0= RULE_GTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) ; + public final EObject ruleDecimalValueGreaterThanEquals() throws RecognitionException { + EObject current = null; + + Token this_GTE_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:5225:2: ( (this_GTE_0= RULE_GTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) ) + // InternalEtlParser.g:5226:2: (this_GTE_0= RULE_GTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) + { + // InternalEtlParser.g:5226:2: (this_GTE_0= RULE_GTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) + // InternalEtlParser.g:5227:3: this_GTE_0= RULE_GTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) + { + this_GTE_0=(Token)match(input,RULE_GTE,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_GTE_0, grammarAccess.getDecimalValueGreaterThanEqualsAccess().getGTETerminalRuleCall_0()); + + } + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getDecimalValueGreaterThanEqualsAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:5235:3: ( (lv_value_2_0= ruleDecimal ) ) + // InternalEtlParser.g:5236:4: (lv_value_2_0= ruleDecimal ) + { + // InternalEtlParser.g:5236:4: (lv_value_2_0= ruleDecimal ) + // InternalEtlParser.g:5237:5: lv_value_2_0= ruleDecimal + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDecimalValueGreaterThanEqualsAccess().getValueDecimalParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getDecimalValueGreaterThanEqualsRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleDecimalValueGreaterThanEquals" + + + // $ANTLR start "entryRuleDecimalValueLessThanEquals" + // InternalEtlParser.g:5258:1: entryRuleDecimalValueLessThanEquals returns [EObject current=null] : iv_ruleDecimalValueLessThanEquals= ruleDecimalValueLessThanEquals EOF ; + public final EObject entryRuleDecimalValueLessThanEquals() throws RecognitionException { + EObject current = null; + + EObject iv_ruleDecimalValueLessThanEquals = null; + + + try { + // InternalEtlParser.g:5258:67: (iv_ruleDecimalValueLessThanEquals= ruleDecimalValueLessThanEquals EOF ) + // InternalEtlParser.g:5259:2: iv_ruleDecimalValueLessThanEquals= ruleDecimalValueLessThanEquals EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDecimalValueLessThanEqualsRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDecimalValueLessThanEquals=ruleDecimalValueLessThanEquals(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDecimalValueLessThanEquals; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleDecimalValueLessThanEquals" + + + // $ANTLR start "ruleDecimalValueLessThanEquals" + // InternalEtlParser.g:5265:1: ruleDecimalValueLessThanEquals returns [EObject current=null] : (this_LTE_0= RULE_LTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) ; + public final EObject ruleDecimalValueLessThanEquals() throws RecognitionException { + EObject current = null; + + Token this_LTE_0=null; + Token this_HASH_1=null; + AntlrDatatypeRuleToken lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:5271:2: ( (this_LTE_0= RULE_LTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) ) + // InternalEtlParser.g:5272:2: (this_LTE_0= RULE_LTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) + { + // InternalEtlParser.g:5272:2: (this_LTE_0= RULE_LTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) ) + // InternalEtlParser.g:5273:3: this_LTE_0= RULE_LTE this_HASH_1= RULE_HASH ( (lv_value_2_0= ruleDecimal ) ) + { + this_LTE_0=(Token)match(input,RULE_LTE,FollowSets000.FOLLOW_37); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_LTE_0, grammarAccess.getDecimalValueLessThanEqualsAccess().getLTETerminalRuleCall_0()); + + } + this_HASH_1=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_1, grammarAccess.getDecimalValueLessThanEqualsAccess().getHASHTerminalRuleCall_1()); + + } + // InternalEtlParser.g:5281:3: ( (lv_value_2_0= ruleDecimal ) ) + // InternalEtlParser.g:5282:4: (lv_value_2_0= ruleDecimal ) + { + // InternalEtlParser.g:5282:4: (lv_value_2_0= ruleDecimal ) + // InternalEtlParser.g:5283:5: lv_value_2_0= ruleDecimal + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDecimalValueLessThanEqualsAccess().getValueDecimalParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getDecimalValueLessThanEqualsRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.ecl.Ecl.Decimal"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleDecimalValueLessThanEquals" + + + // $ANTLR start "entryRuleNestedExpression" + // InternalEtlParser.g:5304:1: entryRuleNestedExpression returns [EObject current=null] : iv_ruleNestedExpression= ruleNestedExpression EOF ; + public final EObject entryRuleNestedExpression() throws RecognitionException { + EObject current = null; + + EObject iv_ruleNestedExpression = null; + + + try { + // InternalEtlParser.g:5304:57: (iv_ruleNestedExpression= ruleNestedExpression EOF ) + // InternalEtlParser.g:5305:2: iv_ruleNestedExpression= ruleNestedExpression EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getNestedExpressionRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleNestedExpression=ruleNestedExpression(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleNestedExpression; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleNestedExpression" + + + // $ANTLR start "ruleNestedExpression" + // InternalEtlParser.g:5311:1: ruleNestedExpression returns [EObject current=null] : (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ; + public final EObject ruleNestedExpression() throws RecognitionException { + EObject current = null; + + Token this_ROUND_OPEN_0=null; + Token this_ROUND_CLOSE_2=null; + EObject lv_nested_1_0 = null; + + + + enterRule(); + + try { + // InternalEtlParser.g:5317:2: ( (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ) + // InternalEtlParser.g:5318:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + { + // InternalEtlParser.g:5318:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + // InternalEtlParser.g:5319:3: this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleExpressionConstraint ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE + { + this_ROUND_OPEN_0=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_15); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_OPEN_0, grammarAccess.getNestedExpressionAccess().getROUND_OPENTerminalRuleCall_0()); + + } + // InternalEtlParser.g:5323:3: ( (lv_nested_1_0= ruleExpressionConstraint ) ) + // InternalEtlParser.g:5324:4: (lv_nested_1_0= ruleExpressionConstraint ) + { + // InternalEtlParser.g:5324:4: (lv_nested_1_0= ruleExpressionConstraint ) + // InternalEtlParser.g:5325:5: lv_nested_1_0= ruleExpressionConstraint + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getNestedExpressionAccess().getNestedExpressionConstraintParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_11); + lv_nested_1_0=ruleExpressionConstraint(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getNestedExpressionRule()); + } + set( + current, + "nested", + lv_nested_1_0, + "com.b2international.snowowl.snomed.ecl.Ecl.ExpressionConstraint"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + this_ROUND_CLOSE_2=(Token)match(input,RULE_ROUND_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_CLOSE_2, grammarAccess.getNestedExpressionAccess().getROUND_CLOSETerminalRuleCall_2()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleNestedExpression" + + + // $ANTLR start "entryRuleSnomedIdentifier" + // InternalEtlParser.g:5350:1: entryRuleSnomedIdentifier returns [String current=null] : iv_ruleSnomedIdentifier= ruleSnomedIdentifier EOF ; + public final String entryRuleSnomedIdentifier() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleSnomedIdentifier = null; + + + + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5352:2: (iv_ruleSnomedIdentifier= ruleSnomedIdentifier EOF ) + // InternalEtlParser.g:5353:2: iv_ruleSnomedIdentifier= ruleSnomedIdentifier EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSnomedIdentifierRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSnomedIdentifier=ruleSnomedIdentifier(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSnomedIdentifier.getText(); + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "entryRuleSnomedIdentifier" + + + // $ANTLR start "ruleSnomedIdentifier" + // InternalEtlParser.g:5362:1: ruleSnomedIdentifier returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ ) ; + public final AntlrDatatypeRuleToken ruleSnomedIdentifier() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_DIGIT_NONZERO_0=null; + Token this_DIGIT_NONZERO_1=null; + Token this_ZERO_2=null; + Token this_DIGIT_NONZERO_3=null; + Token this_ZERO_4=null; + Token this_DIGIT_NONZERO_5=null; + Token this_ZERO_6=null; + Token this_DIGIT_NONZERO_7=null; + Token this_ZERO_8=null; + Token this_DIGIT_NONZERO_9=null; + Token this_ZERO_10=null; + + + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5369:2: ( (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ ) ) + // InternalEtlParser.g:5370:2: (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ ) + { + // InternalEtlParser.g:5370:2: (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ ) + // InternalEtlParser.g:5371:3: this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ + { + this_DIGIT_NONZERO_0=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_50); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_0); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_0, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_0()); + + } + // InternalEtlParser.g:5378:3: (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) + int alt74=2; + int LA74_0 = input.LA(1); + + if ( (LA74_0==RULE_DIGIT_NONZERO) ) { + alt74=1; + } + else if ( (LA74_0==RULE_ZERO) ) { + alt74=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 74, 0, input); + + throw nvae; + } + switch (alt74) { + case 1 : + // InternalEtlParser.g:5379:4: this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_1=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_50); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_1); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_1, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_1_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:5387:4: this_ZERO_2= RULE_ZERO + { + this_ZERO_2=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_50); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_2); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_2, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_1_1()); + + } + + } + break; + + } + + // InternalEtlParser.g:5395:3: (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) + int alt75=2; + int LA75_0 = input.LA(1); + + if ( (LA75_0==RULE_DIGIT_NONZERO) ) { + alt75=1; + } + else if ( (LA75_0==RULE_ZERO) ) { + alt75=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 75, 0, input); + + throw nvae; + } + switch (alt75) { + case 1 : + // InternalEtlParser.g:5396:4: this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_3=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_50); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_3); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_3, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_2_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:5404:4: this_ZERO_4= RULE_ZERO + { + this_ZERO_4=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_50); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_4); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_4, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_2_1()); + + } + + } + break; + + } + + // InternalEtlParser.g:5412:3: (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) + int alt76=2; + int LA76_0 = input.LA(1); + + if ( (LA76_0==RULE_DIGIT_NONZERO) ) { + alt76=1; + } + else if ( (LA76_0==RULE_ZERO) ) { + alt76=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 76, 0, input); + + throw nvae; + } + switch (alt76) { + case 1 : + // InternalEtlParser.g:5413:4: this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_5=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_50); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_5); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_5, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_3_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:5421:4: this_ZERO_6= RULE_ZERO + { + this_ZERO_6=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_50); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_6); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_6, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_3_1()); + + } + + } + break; + + } + + // InternalEtlParser.g:5429:3: (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) + int alt77=2; + int LA77_0 = input.LA(1); + + if ( (LA77_0==RULE_DIGIT_NONZERO) ) { + alt77=1; + } + else if ( (LA77_0==RULE_ZERO) ) { + alt77=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 77, 0, input); + + throw nvae; + } + switch (alt77) { + case 1 : + // InternalEtlParser.g:5430:4: this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_7=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_50); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_7); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_7, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_4_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:5438:4: this_ZERO_8= RULE_ZERO + { + this_ZERO_8=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_50); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_8); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_8, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_4_1()); + + } + + } + break; + + } + + // InternalEtlParser.g:5446:3: (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ + int cnt78=0; + loop78: + do { + int alt78=3; + int LA78_0 = input.LA(1); + + if ( (LA78_0==RULE_DIGIT_NONZERO) ) { + alt78=1; + } + else if ( (LA78_0==RULE_ZERO) ) { + alt78=2; + } + + + switch (alt78) { + case 1 : + // InternalEtlParser.g:5447:4: this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_9=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_51); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_9); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_9, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_5_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:5455:4: this_ZERO_10= RULE_ZERO + { + this_ZERO_10=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_51); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_10); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_10, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_5_1()); + + } + + } + break; + + default : + if ( cnt78 >= 1 ) break loop78; + if (state.backtracking>0) {state.failed=true; return current;} + EarlyExitException eee = + new EarlyExitException(78, input); + throw eee; + } + cnt78++; + } while (true); + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "ruleSnomedIdentifier" + + + // $ANTLR start "entryRuleNonNegativeInteger" + // InternalEtlParser.g:5470:1: entryRuleNonNegativeInteger returns [String current=null] : iv_ruleNonNegativeInteger= ruleNonNegativeInteger EOF ; + public final String entryRuleNonNegativeInteger() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleNonNegativeInteger = null; + + + + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5472:2: (iv_ruleNonNegativeInteger= ruleNonNegativeInteger EOF ) + // InternalEtlParser.g:5473:2: iv_ruleNonNegativeInteger= ruleNonNegativeInteger EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getNonNegativeIntegerRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleNonNegativeInteger=ruleNonNegativeInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleNonNegativeInteger.getText(); + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "entryRuleNonNegativeInteger" + + + // $ANTLR start "ruleNonNegativeInteger" + // InternalEtlParser.g:5482:1: ruleNonNegativeInteger returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ZERO_0= RULE_ZERO | (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) ) ; + public final AntlrDatatypeRuleToken ruleNonNegativeInteger() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_ZERO_0=null; + Token this_DIGIT_NONZERO_1=null; + Token this_DIGIT_NONZERO_2=null; + Token this_ZERO_3=null; + + + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5489:2: ( (this_ZERO_0= RULE_ZERO | (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) ) ) + // InternalEtlParser.g:5490:2: (this_ZERO_0= RULE_ZERO | (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) ) + { + // InternalEtlParser.g:5490:2: (this_ZERO_0= RULE_ZERO | (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) ) + int alt80=2; + int LA80_0 = input.LA(1); + + if ( (LA80_0==RULE_ZERO) ) { + alt80=1; + } + else if ( (LA80_0==RULE_DIGIT_NONZERO) ) { + alt80=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 80, 0, input); + + throw nvae; + } + switch (alt80) { + case 1 : + // InternalEtlParser.g:5491:3: this_ZERO_0= RULE_ZERO + { + this_ZERO_0=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_0); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_0, grammarAccess.getNonNegativeIntegerAccess().getZEROTerminalRuleCall_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:5499:3: (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) + { + // InternalEtlParser.g:5499:3: (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) + // InternalEtlParser.g:5500:4: this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* + { + this_DIGIT_NONZERO_1=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_51); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_1); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_1, grammarAccess.getNonNegativeIntegerAccess().getDIGIT_NONZEROTerminalRuleCall_1_0()); + + } + // InternalEtlParser.g:5507:4: (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* + loop79: + do { + int alt79=3; + int LA79_0 = input.LA(1); + + if ( (LA79_0==RULE_DIGIT_NONZERO) ) { + alt79=1; + } + else if ( (LA79_0==RULE_ZERO) ) { + alt79=2; + } + + + switch (alt79) { + case 1 : + // InternalEtlParser.g:5508:5: this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_2=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_51); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_2); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_2, grammarAccess.getNonNegativeIntegerAccess().getDIGIT_NONZEROTerminalRuleCall_1_1_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:5516:5: this_ZERO_3= RULE_ZERO + { + this_ZERO_3=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_51); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_3); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_3, grammarAccess.getNonNegativeIntegerAccess().getZEROTerminalRuleCall_1_1_1()); + + } + + } + break; + + default : + break loop79; + } + } while (true); + + + } + + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "ruleNonNegativeInteger" + + + // $ANTLR start "entryRuleMaxValue" + // InternalEtlParser.g:5532:1: entryRuleMaxValue returns [String current=null] : iv_ruleMaxValue= ruleMaxValue EOF ; + public final String entryRuleMaxValue() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleMaxValue = null; + + + + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5534:2: (iv_ruleMaxValue= ruleMaxValue EOF ) + // InternalEtlParser.g:5535:2: iv_ruleMaxValue= ruleMaxValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getMaxValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleMaxValue=ruleMaxValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleMaxValue.getText(); + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "entryRuleMaxValue" + + + // $ANTLR start "ruleMaxValue" + // InternalEtlParser.g:5544:1: ruleMaxValue returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_NonNegativeInteger_0= ruleNonNegativeInteger | this_WILDCARD_1= RULE_WILDCARD ) ; + public final AntlrDatatypeRuleToken ruleMaxValue() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_WILDCARD_1=null; + AntlrDatatypeRuleToken this_NonNegativeInteger_0 = null; + + + + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5551:2: ( (this_NonNegativeInteger_0= ruleNonNegativeInteger | this_WILDCARD_1= RULE_WILDCARD ) ) + // InternalEtlParser.g:5552:2: (this_NonNegativeInteger_0= ruleNonNegativeInteger | this_WILDCARD_1= RULE_WILDCARD ) + { + // InternalEtlParser.g:5552:2: (this_NonNegativeInteger_0= ruleNonNegativeInteger | this_WILDCARD_1= RULE_WILDCARD ) + int alt81=2; + int LA81_0 = input.LA(1); + + if ( ((LA81_0>=RULE_ZERO && LA81_0<=RULE_DIGIT_NONZERO)) ) { + alt81=1; + } + else if ( (LA81_0==RULE_WILDCARD) ) { + alt81=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 81, 0, input); + + throw nvae; + } + switch (alt81) { + case 1 : + // InternalEtlParser.g:5553:3: this_NonNegativeInteger_0= ruleNonNegativeInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getMaxValueAccess().getNonNegativeIntegerParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_NonNegativeInteger_0=ruleNonNegativeInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_NonNegativeInteger_0); + + } + if ( state.backtracking==0 ) { + + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalEtlParser.g:5564:3: this_WILDCARD_1= RULE_WILDCARD + { + this_WILDCARD_1=(Token)match(input,RULE_WILDCARD,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_WILDCARD_1); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_WILDCARD_1, grammarAccess.getMaxValueAccess().getWILDCARDTerminalRuleCall_1()); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "ruleMaxValue" + + + // $ANTLR start "entryRuleInteger" + // InternalEtlParser.g:5578:1: entryRuleInteger returns [String current=null] : iv_ruleInteger= ruleInteger EOF ; + public final String entryRuleInteger() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleInteger = null; + + + + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5580:2: (iv_ruleInteger= ruleInteger EOF ) + // InternalEtlParser.g:5581:2: iv_ruleInteger= ruleInteger EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getIntegerRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleInteger=ruleInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleInteger.getText(); + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "entryRuleInteger" + + + // $ANTLR start "ruleInteger" + // InternalEtlParser.g:5590:1: ruleInteger returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeInteger_2= ruleNonNegativeInteger ) ; + public final AntlrDatatypeRuleToken ruleInteger() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_PLUS_0=null; + Token this_DASH_1=null; + AntlrDatatypeRuleToken this_NonNegativeInteger_2 = null; + + + + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5597:2: ( ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeInteger_2= ruleNonNegativeInteger ) ) + // InternalEtlParser.g:5598:2: ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeInteger_2= ruleNonNegativeInteger ) + { + // InternalEtlParser.g:5598:2: ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeInteger_2= ruleNonNegativeInteger ) + // InternalEtlParser.g:5599:3: (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeInteger_2= ruleNonNegativeInteger + { + // InternalEtlParser.g:5599:3: (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? + int alt82=3; + int LA82_0 = input.LA(1); + + if ( (LA82_0==RULE_PLUS) ) { + alt82=1; + } + else if ( (LA82_0==RULE_DASH) ) { + alt82=2; + } + switch (alt82) { + case 1 : + // InternalEtlParser.g:5600:4: this_PLUS_0= RULE_PLUS + { + this_PLUS_0=(Token)match(input,RULE_PLUS,FollowSets000.FOLLOW_30); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_PLUS_0); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_PLUS_0, grammarAccess.getIntegerAccess().getPLUSTerminalRuleCall_0_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:5608:4: this_DASH_1= RULE_DASH + { + this_DASH_1=(Token)match(input,RULE_DASH,FollowSets000.FOLLOW_30); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DASH_1); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DASH_1, grammarAccess.getIntegerAccess().getDASHTerminalRuleCall_0_1()); + + } + + } + break; + + } + + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getIntegerAccess().getNonNegativeIntegerParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_NonNegativeInteger_2=ruleNonNegativeInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_NonNegativeInteger_2); + + } + if ( state.backtracking==0 ) { + + afterParserOrEnumRuleCall(); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "ruleInteger" + + + // $ANTLR start "entryRuleDecimal" + // InternalEtlParser.g:5633:1: entryRuleDecimal returns [String current=null] : iv_ruleDecimal= ruleDecimal EOF ; + public final String entryRuleDecimal() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleDecimal = null; + + + + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5635:2: (iv_ruleDecimal= ruleDecimal EOF ) + // InternalEtlParser.g:5636:2: iv_ruleDecimal= ruleDecimal EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDecimalRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDecimal=ruleDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDecimal.getText(); + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "entryRuleDecimal" + + + // $ANTLR start "ruleDecimal" + // InternalEtlParser.g:5645:1: ruleDecimal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeDecimal_2= ruleNonNegativeDecimal ) ; + public final AntlrDatatypeRuleToken ruleDecimal() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_PLUS_0=null; + Token this_DASH_1=null; + AntlrDatatypeRuleToken this_NonNegativeDecimal_2 = null; + + + + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5652:2: ( ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeDecimal_2= ruleNonNegativeDecimal ) ) + // InternalEtlParser.g:5653:2: ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeDecimal_2= ruleNonNegativeDecimal ) + { + // InternalEtlParser.g:5653:2: ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeDecimal_2= ruleNonNegativeDecimal ) + // InternalEtlParser.g:5654:3: (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeDecimal_2= ruleNonNegativeDecimal + { + // InternalEtlParser.g:5654:3: (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? + int alt83=3; + int LA83_0 = input.LA(1); + + if ( (LA83_0==RULE_PLUS) ) { + alt83=1; + } + else if ( (LA83_0==RULE_DASH) ) { + alt83=2; + } + switch (alt83) { + case 1 : + // InternalEtlParser.g:5655:4: this_PLUS_0= RULE_PLUS + { + this_PLUS_0=(Token)match(input,RULE_PLUS,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_PLUS_0); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_PLUS_0, grammarAccess.getDecimalAccess().getPLUSTerminalRuleCall_0_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:5663:4: this_DASH_1= RULE_DASH + { + this_DASH_1=(Token)match(input,RULE_DASH,FollowSets000.FOLLOW_34); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DASH_1); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DASH_1, grammarAccess.getDecimalAccess().getDASHTerminalRuleCall_0_1()); + + } + + } + break; + + } + + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDecimalAccess().getNonNegativeDecimalParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_NonNegativeDecimal_2=ruleNonNegativeDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_NonNegativeDecimal_2); + + } + if ( state.backtracking==0 ) { + + afterParserOrEnumRuleCall(); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "ruleDecimal" + + + // $ANTLR start "entryRuleNonNegativeDecimal" + // InternalEtlParser.g:5688:1: entryRuleNonNegativeDecimal returns [String current=null] : iv_ruleNonNegativeDecimal= ruleNonNegativeDecimal EOF ; + public final String entryRuleNonNegativeDecimal() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleNonNegativeDecimal = null; + + + + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5690:2: (iv_ruleNonNegativeDecimal= ruleNonNegativeDecimal EOF ) + // InternalEtlParser.g:5691:2: iv_ruleNonNegativeDecimal= ruleNonNegativeDecimal EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getNonNegativeDecimalRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleNonNegativeDecimal=ruleNonNegativeDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleNonNegativeDecimal.getText(); + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "entryRuleNonNegativeDecimal" + + + // $ANTLR start "ruleNonNegativeDecimal" + // InternalEtlParser.g:5700:1: ruleNonNegativeDecimal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_NonNegativeInteger_0= ruleNonNegativeInteger this_DOT_1= RULE_DOT (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) ; + public final AntlrDatatypeRuleToken ruleNonNegativeDecimal() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_DOT_1=null; + Token this_DIGIT_NONZERO_2=null; + Token this_ZERO_3=null; + AntlrDatatypeRuleToken this_NonNegativeInteger_0 = null; + + + + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5707:2: ( (this_NonNegativeInteger_0= ruleNonNegativeInteger this_DOT_1= RULE_DOT (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) ) + // InternalEtlParser.g:5708:2: (this_NonNegativeInteger_0= ruleNonNegativeInteger this_DOT_1= RULE_DOT (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) + { + // InternalEtlParser.g:5708:2: (this_NonNegativeInteger_0= ruleNonNegativeInteger this_DOT_1= RULE_DOT (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) + // InternalEtlParser.g:5709:3: this_NonNegativeInteger_0= ruleNonNegativeInteger this_DOT_1= RULE_DOT (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getNonNegativeDecimalAccess().getNonNegativeIntegerParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_52); + this_NonNegativeInteger_0=ruleNonNegativeInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_NonNegativeInteger_0); + + } + if ( state.backtracking==0 ) { + + afterParserOrEnumRuleCall(); + + } + this_DOT_1=(Token)match(input,RULE_DOT,FollowSets000.FOLLOW_51); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DOT_1); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DOT_1, grammarAccess.getNonNegativeDecimalAccess().getDOTTerminalRuleCall_1()); + + } + // InternalEtlParser.g:5726:3: (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* + loop84: + do { + int alt84=3; + int LA84_0 = input.LA(1); + + if ( (LA84_0==RULE_DIGIT_NONZERO) ) { + alt84=1; + } + else if ( (LA84_0==RULE_ZERO) ) { + alt84=2; + } + + + switch (alt84) { + case 1 : + // InternalEtlParser.g:5727:4: this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_2=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_51); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_2); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_2, grammarAccess.getNonNegativeDecimalAccess().getDIGIT_NONZEROTerminalRuleCall_2_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:5735:4: this_ZERO_3= RULE_ZERO + { + this_ZERO_3=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_51); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_3); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_3, grammarAccess.getNonNegativeDecimalAccess().getZEROTerminalRuleCall_2_1()); + + } + + } + break; + + default : + break loop84; + } + } while (true); + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "ruleNonNegativeDecimal" + + + // $ANTLR start "entryRuleBoolean" + // InternalEtlParser.g:5750:1: entryRuleBoolean returns [String current=null] : iv_ruleBoolean= ruleBoolean EOF ; + public final String entryRuleBoolean() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleBoolean = null; + + + + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5752:2: (iv_ruleBoolean= ruleBoolean EOF ) + // InternalEtlParser.g:5753:2: iv_ruleBoolean= ruleBoolean EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getBooleanRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleBoolean=ruleBoolean(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleBoolean.getText(); + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "entryRuleBoolean" + + + // $ANTLR start "ruleBoolean" + // InternalEtlParser.g:5762:1: ruleBoolean returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= True | kw= False ) ; + public final AntlrDatatypeRuleToken ruleBoolean() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token kw=null; + + + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalEtlParser.g:5769:2: ( (kw= True | kw= False ) ) + // InternalEtlParser.g:5770:2: (kw= True | kw= False ) + { + // InternalEtlParser.g:5770:2: (kw= True | kw= False ) + int alt85=2; + int LA85_0 = input.LA(1); + + if ( (LA85_0==True) ) { + alt85=1; + } + else if ( (LA85_0==False) ) { + alt85=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 85, 0, input); + + throw nvae; + } + switch (alt85) { + case 1 : + // InternalEtlParser.g:5771:3: kw= True + { + kw=(Token)match(input,True,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(kw); + newLeafNode(kw, grammarAccess.getBooleanAccess().getTrueKeyword_0()); + + } + + } + break; + case 2 : + // InternalEtlParser.g:5777:3: kw= False + { + kw=(Token)match(input,False,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(kw); + newLeafNode(kw, grammarAccess.getBooleanAccess().getFalseKeyword_1()); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "ruleBoolean" + + // $ANTLR start synpred62_InternalEtlParser + public final void synpred62_InternalEtlParser_fragment() throws RecognitionException { + EObject this_SlotIntegerRange_0 = null; + + + // InternalEtlParser.g:1940:3: (this_SlotIntegerRange_0= ruleSlotIntegerRange ) + // InternalEtlParser.g:1940:3: this_SlotIntegerRange_0= ruleSlotIntegerRange + { + if ( state.backtracking==0 ) { + + /* */ + + } + pushFollow(FollowSets000.FOLLOW_2); + this_SlotIntegerRange_0=ruleSlotIntegerRange(); + + state._fsp--; + if (state.failed) return ; + + } + } + // $ANTLR end synpred62_InternalEtlParser + + // $ANTLR start synpred63_InternalEtlParser + public final void synpred63_InternalEtlParser_fragment() throws RecognitionException { + EObject lv_maximum_2_0 = null; + + + // InternalEtlParser.g:2049:5: ( (lv_maximum_2_0= ruleSlotIntegerMaximumValue ) ) + // InternalEtlParser.g:2049:5: (lv_maximum_2_0= ruleSlotIntegerMaximumValue ) + { + // InternalEtlParser.g:2049:5: (lv_maximum_2_0= ruleSlotIntegerMaximumValue ) + // InternalEtlParser.g:2050:6: lv_maximum_2_0= ruleSlotIntegerMaximumValue + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotIntegerRangeAccess().getMaximumSlotIntegerMaximumValueParserRuleCall_0_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_maximum_2_0=ruleSlotIntegerMaximumValue(); + + state._fsp--; + if (state.failed) return ; + + } + + + } + } + // $ANTLR end synpred63_InternalEtlParser + + // $ANTLR start synpred67_InternalEtlParser + public final void synpred67_InternalEtlParser_fragment() throws RecognitionException { + EObject this_SlotDecimalRange_0 = null; + + + // InternalEtlParser.g:2233:3: (this_SlotDecimalRange_0= ruleSlotDecimalRange ) + // InternalEtlParser.g:2233:3: this_SlotDecimalRange_0= ruleSlotDecimalRange + { + if ( state.backtracking==0 ) { + + /* */ + + } + pushFollow(FollowSets000.FOLLOW_2); + this_SlotDecimalRange_0=ruleSlotDecimalRange(); + + state._fsp--; + if (state.failed) return ; + + } + } + // $ANTLR end synpred67_InternalEtlParser + + // $ANTLR start synpred68_InternalEtlParser + public final void synpred68_InternalEtlParser_fragment() throws RecognitionException { + EObject lv_maximum_2_0 = null; + + + // InternalEtlParser.g:2342:5: ( (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) ) + // InternalEtlParser.g:2342:5: (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) + { + // InternalEtlParser.g:2342:5: (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) + // InternalEtlParser.g:2343:6: lv_maximum_2_0= ruleSlotDecimalMaximumValue + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSlotDecimalRangeAccess().getMaximumSlotDecimalMaximumValueParserRuleCall_0_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_maximum_2_0=ruleSlotDecimalMaximumValue(); + + state._fsp--; + if (state.failed) return ; + + } + + + } + } + // $ANTLR end synpred68_InternalEtlParser + + // $ANTLR start synpred90_InternalEtlParser + public final void synpred90_InternalEtlParser_fragment() throws RecognitionException { + // InternalEtlParser.g:3511:4: ( RULE_DISJUNCTION ) + // InternalEtlParser.g:3511:5: RULE_DISJUNCTION + { + match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_2); if (state.failed) return ; + + } + } + // $ANTLR end synpred90_InternalEtlParser + + // $ANTLR start synpred92_InternalEtlParser + public final void synpred92_InternalEtlParser_fragment() throws RecognitionException { + // InternalEtlParser.g:3579:4: ( RULE_CONJUNCTION | RULE_COMMA ) + // InternalEtlParser.g: + { + if ( (input.LA(1)>=RULE_COMMA && input.LA(1)<=RULE_CONJUNCTION) ) { + input.consume(); + state.errorRecovery=false;state.failed=false; + } + else { + if (state.backtracking>0) {state.failed=true; return ;} + MismatchedSetException mse = new MismatchedSetException(null,input); + throw mse; + } + + + } + } + // $ANTLR end synpred92_InternalEtlParser + + // $ANTLR start synpred94_InternalEtlParser + public final void synpred94_InternalEtlParser_fragment() throws RecognitionException { + EObject this_AttributeConstraint_0 = null; + + + // InternalEtlParser.g:3642:3: (this_AttributeConstraint_0= ruleAttributeConstraint ) + // InternalEtlParser.g:3642:3: this_AttributeConstraint_0= ruleAttributeConstraint + { + if ( state.backtracking==0 ) { + + /* */ + + } + pushFollow(FollowSets000.FOLLOW_2); + this_AttributeConstraint_0=ruleAttributeConstraint(); + + state._fsp--; + if (state.failed) return ; + + } + } + // $ANTLR end synpred94_InternalEtlParser + + // $ANTLR start synpred95_InternalEtlParser + public final void synpred95_InternalEtlParser_fragment() throws RecognitionException { + EObject this_EclAttributeGroup_1 = null; + + + // InternalEtlParser.g:3654:3: (this_EclAttributeGroup_1= ruleEclAttributeGroup ) + // InternalEtlParser.g:3654:3: this_EclAttributeGroup_1= ruleEclAttributeGroup + { + if ( state.backtracking==0 ) { + + /* */ + + } + pushFollow(FollowSets000.FOLLOW_2); + this_EclAttributeGroup_1=ruleEclAttributeGroup(); + + state._fsp--; + if (state.failed) return ; + + } + } + // $ANTLR end synpred95_InternalEtlParser + + // $ANTLR start synpred100_InternalEtlParser + public final void synpred100_InternalEtlParser_fragment() throws RecognitionException { + EObject this_AttributeConstraint_0 = null; + + + // InternalEtlParser.g:3972:3: (this_AttributeConstraint_0= ruleAttributeConstraint ) + // InternalEtlParser.g:3972:3: this_AttributeConstraint_0= ruleAttributeConstraint + { + if ( state.backtracking==0 ) { + + /* */ + + } + pushFollow(FollowSets000.FOLLOW_2); + this_AttributeConstraint_0=ruleAttributeConstraint(); + + state._fsp--; + if (state.failed) return ; + + } + } + // $ANTLR end synpred100_InternalEtlParser + + // Delegated rules + + public final boolean synpred90_InternalEtlParser() { + state.backtracking++; + int start = input.mark(); + try { + synpred90_InternalEtlParser_fragment(); // can never throw exception + } catch (RecognitionException re) { + System.err.println("impossible: "+re); + } + boolean success = !state.failed; + input.rewind(start); + state.backtracking--; + state.failed=false; + return success; + } + public final boolean synpred95_InternalEtlParser() { + state.backtracking++; + int start = input.mark(); + try { + synpred95_InternalEtlParser_fragment(); // can never throw exception + } catch (RecognitionException re) { + System.err.println("impossible: "+re); + } + boolean success = !state.failed; + input.rewind(start); + state.backtracking--; + state.failed=false; + return success; + } + public final boolean synpred68_InternalEtlParser() { + state.backtracking++; + int start = input.mark(); + try { + synpred68_InternalEtlParser_fragment(); // can never throw exception + } catch (RecognitionException re) { + System.err.println("impossible: "+re); + } + boolean success = !state.failed; + input.rewind(start); + state.backtracking--; + state.failed=false; + return success; + } + public final boolean synpred92_InternalEtlParser() { + state.backtracking++; + int start = input.mark(); + try { + synpred92_InternalEtlParser_fragment(); // can never throw exception + } catch (RecognitionException re) { + System.err.println("impossible: "+re); + } + boolean success = !state.failed; + input.rewind(start); + state.backtracking--; + state.failed=false; + return success; + } + public final boolean synpred67_InternalEtlParser() { + state.backtracking++; + int start = input.mark(); + try { + synpred67_InternalEtlParser_fragment(); // can never throw exception + } catch (RecognitionException re) { + System.err.println("impossible: "+re); + } + boolean success = !state.failed; + input.rewind(start); + state.backtracking--; + state.failed=false; + return success; + } + public final boolean synpred62_InternalEtlParser() { + state.backtracking++; + int start = input.mark(); + try { + synpred62_InternalEtlParser_fragment(); // can never throw exception + } catch (RecognitionException re) { + System.err.println("impossible: "+re); + } + boolean success = !state.failed; + input.rewind(start); + state.backtracking--; + state.failed=false; + return success; + } + public final boolean synpred94_InternalEtlParser() { + state.backtracking++; + int start = input.mark(); + try { + synpred94_InternalEtlParser_fragment(); // can never throw exception + } catch (RecognitionException re) { + System.err.println("impossible: "+re); + } + boolean success = !state.failed; + input.rewind(start); + state.backtracking--; + state.failed=false; + return success; + } + public final boolean synpred100_InternalEtlParser() { + state.backtracking++; + int start = input.mark(); + try { + synpred100_InternalEtlParser_fragment(); // can never throw exception + } catch (RecognitionException re) { + System.err.println("impossible: "+re); + } + boolean success = !state.failed; + input.rewind(start); + state.backtracking--; + state.failed=false; + return success; + } + public final boolean synpred63_InternalEtlParser() { + state.backtracking++; + int start = input.mark(); + try { + synpred63_InternalEtlParser_fragment(); // can never throw exception + } catch (RecognitionException re) { + System.err.println("impossible: "+re); + } + boolean success = !state.failed; + input.rewind(start); + state.backtracking--; + state.failed=false; + return success; + } + + + protected DFA8 dfa8 = new DFA8(this); + protected DFA7 dfa7 = new DFA7(this); + protected DFA14 dfa14 = new DFA14(this); + protected DFA40 dfa40 = new DFA40(this); + protected DFA45 dfa45 = new DFA45(this); + protected DFA46 dfa46 = new DFA46(this); + protected DFA63 dfa63 = new DFA63(this); + protected DFA68 dfa68 = new DFA68(this); + protected DFA73 dfa73 = new DFA73(this); + static final String dfa_1s = "\21\uffff"; + static final String dfa_2s = "\1\6\1\7\2\uffff\1\36\2\31\1\7\1\6\1\36\2\31\5\7"; + static final String dfa_3s = "\1\41\1\45\2\uffff\1\37\1\31\1\37\1\7\1\41\1\51\2\37\1\26\1\37\1\26\2\37"; + static final String dfa_4s = "\2\uffff\1\1\1\2\15\uffff"; + static final String dfa_5s = "\21\uffff}>"; + static final String[] dfa_6s = { + "\1\1\30\uffff\1\2\1\uffff\1\3", + "\1\10\1\4\15\uffff\1\7\7\uffff\1\5\1\6\5\uffff\1\2", + "", + "", + "\1\5\1\6", + "\1\11", + "\1\11\4\uffff\1\13\1\12", + "\1\10", + "\1\2\30\uffff\1\2\1\uffff\1\3", + "\1\14\1\15\11\uffff\1\16", + "\1\11\4\uffff\1\13\1\12", + "\1\11\4\uffff\1\13\1\12", + "\1\10\16\uffff\1\7", + "\1\10\16\uffff\1\7\7\uffff\1\20\1\17", + "\1\10\16\uffff\1\7", + "\1\10\16\uffff\1\7\7\uffff\1\20\1\17", + "\1\10\16\uffff\1\7\7\uffff\1\20\1\17" + }; + + static final short[] dfa_1 = DFA.unpackEncodedString(dfa_1s); + static final char[] dfa_2 = DFA.unpackEncodedStringToUnsignedChars(dfa_2s); + static final char[] dfa_3 = DFA.unpackEncodedStringToUnsignedChars(dfa_3s); + static final short[] dfa_4 = DFA.unpackEncodedString(dfa_4s); + static final short[] dfa_5 = DFA.unpackEncodedString(dfa_5s); + static final short[][] dfa_6 = unpackEncodedStringArray(dfa_6s); + + class DFA8 extends DFA { + + public DFA8(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 8; + this.eot = dfa_1; + this.eof = dfa_1; + this.min = dfa_2; + this.max = dfa_3; + this.accept = dfa_4; + this.special = dfa_5; + this.transition = dfa_6; + } + public String getDescription() { + return "332:3: ( ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) | ( (lv_groups_3_0= ruleAttributeGroup ) ) )"; + } + } + static final String dfa_7s = "\22\uffff"; + static final String dfa_8s = "\1\2\21\uffff"; + static final String dfa_9s = "\2\6\1\uffff\1\7\1\uffff\1\36\2\31\1\7\1\6\1\36\2\31\5\7"; + static final String dfa_10s = "\1\44\1\41\1\uffff\1\45\1\uffff\1\37\1\31\1\37\1\7\1\41\1\51\2\37\1\26\1\37\1\26\2\37"; + static final String dfa_11s = "\2\uffff\1\2\1\uffff\1\1\15\uffff"; + static final String dfa_12s = "\22\uffff}>"; + static final String[] dfa_13s = { + "\1\2\23\uffff\1\1\6\uffff\1\2\2\uffff\1\2", + "\1\3\30\uffff\1\4\1\uffff\1\2", + "", + "\1\11\1\5\15\uffff\1\10\7\uffff\1\6\1\7\5\uffff\1\4", + "", + "\1\6\1\7", + "\1\12", + "\1\12\4\uffff\1\14\1\13", + "\1\11", + "\1\4\30\uffff\1\4\1\uffff\1\2", + "\1\15\1\16\11\uffff\1\17", + "\1\12\4\uffff\1\14\1\13", + "\1\12\4\uffff\1\14\1\13", + "\1\11\16\uffff\1\10", + "\1\11\16\uffff\1\10\7\uffff\1\21\1\20", + "\1\11\16\uffff\1\10", + "\1\11\16\uffff\1\10\7\uffff\1\21\1\20", + "\1\11\16\uffff\1\10\7\uffff\1\21\1\20" + }; + + static final short[] dfa_7 = DFA.unpackEncodedString(dfa_7s); + static final short[] dfa_8 = DFA.unpackEncodedString(dfa_8s); + static final char[] dfa_9 = DFA.unpackEncodedStringToUnsignedChars(dfa_9s); + static final char[] dfa_10 = DFA.unpackEncodedStringToUnsignedChars(dfa_10s); + static final short[] dfa_11 = DFA.unpackEncodedString(dfa_11s); + static final short[] dfa_12 = DFA.unpackEncodedString(dfa_12s); + static final short[][] dfa_13 = unpackEncodedStringArray(dfa_13s); + + class DFA7 extends DFA { + + public DFA7(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 7; + this.eot = dfa_7; + this.eof = dfa_8; + this.min = dfa_9; + this.max = dfa_10; + this.accept = dfa_11; + this.special = dfa_12; + this.transition = dfa_13; + } + public String getDescription() { + return "()* loopback of 353:5: (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )*"; + } + } + static final String dfa_14s = "\20\uffff"; + static final String dfa_15s = "\11\uffff\2\15\3\uffff\2\15"; + static final String dfa_16s = "\1\6\1\45\3\uffff\1\36\1\7\2\36\2\6\3\uffff\2\6"; + static final String dfa_17s = "\1\64\1\45\3\uffff\1\46\1\43\2\37\2\50\3\uffff\2\50"; + static final String dfa_18s = "\2\uffff\1\1\1\2\1\3\6\uffff\1\6\1\5\1\4\2\uffff"; + static final String dfa_19s = "\20\uffff}>"; + static final String[] dfa_20s = { + "\1\1\13\uffff\1\4\14\uffff\1\2\3\uffff\1\3\20\uffff\1\5", + "\1\6", + "", + "", + "", + "\1\11\1\12\5\uffff\1\7\1\10", + "\1\2\2\uffff\2\2\1\uffff\3\13\6\uffff\1\2\14\uffff\1\2", + "\1\11\1\12", + "\1\11\1\12", + "\1\15\23\uffff\1\15\6\uffff\2\15\1\uffff\1\15\3\uffff\1\14", + "\1\15\23\uffff\1\15\3\uffff\1\17\1\16\1\uffff\2\15\1\uffff\1\15\3\uffff\1\14", + "", + "", + "", + "\1\15\23\uffff\1\15\3\uffff\1\17\1\16\1\uffff\2\15\1\uffff\1\15\3\uffff\1\14", + "\1\15\23\uffff\1\15\3\uffff\1\17\1\16\1\uffff\2\15\1\uffff\1\15\3\uffff\1\14" + }; + + static final short[] dfa_14 = DFA.unpackEncodedString(dfa_14s); + static final short[] dfa_15 = DFA.unpackEncodedString(dfa_15s); + static final char[] dfa_16 = DFA.unpackEncodedStringToUnsignedChars(dfa_16s); + static final char[] dfa_17 = DFA.unpackEncodedStringToUnsignedChars(dfa_17s); + static final short[] dfa_18 = DFA.unpackEncodedString(dfa_18s); + static final short[] dfa_19 = DFA.unpackEncodedString(dfa_19s); + static final short[][] dfa_20 = unpackEncodedStringArray(dfa_20s); + + class DFA14 extends DFA { + + public DFA14(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 14; + this.eot = dfa_14; + this.eof = dfa_15; + this.min = dfa_16; + this.max = dfa_17; + this.accept = dfa_18; + this.special = dfa_19; + this.transition = dfa_20; + } + public String getDescription() { + return "615:2: (this_ConceptReference_0= ruleConceptReference | (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) | this_StringValue_4= ruleStringValue | this_IntegerValue_5= ruleIntegerValue | this_DecimalValue_6= ruleDecimalValue | this_ConcreteValueReplacementSlot_7= ruleConcreteValueReplacementSlot )"; + } + } + static final String dfa_21s = "\3\uffff\2\6\1\1\1\uffff\2\6\7\uffff"; + static final String dfa_22s = "\1\31\1\uffff\1\36\3\31\1\uffff\2\31\1\64\2\36\4\0"; + static final String dfa_23s = "\1\64\1\uffff\1\37\3\64\1\uffff\3\64\2\37\4\0"; + static final String dfa_24s = "\1\uffff\1\1\4\uffff\1\2\11\uffff"; + static final String dfa_25s = "\14\uffff\1\1\1\2\1\0\1\3}>"; + static final String[] dfa_26s = { + "\1\1\23\uffff\1\1\6\uffff\1\2", + "", + "\1\3\1\4", + "\1\5\12\uffff\1\6\10\uffff\1\6\6\uffff\1\6", + "\1\5\4\uffff\1\10\1\7\4\uffff\1\6\10\uffff\1\6\6\uffff\1\6", + "\1\1\12\uffff\1\1\7\uffff\1\11\1\1\6\uffff\1\12", + "", + "\1\5\4\uffff\1\10\1\7\4\uffff\1\6\10\uffff\1\6\6\uffff\1\6", + "\1\5\4\uffff\1\10\1\7\4\uffff\1\6\10\uffff\1\6\6\uffff\1\6", + "\1\13", + "\1\14\1\15", + "\1\16\1\17", + "\1\uffff", + "\1\uffff", + "\1\uffff", + "\1\uffff" + }; + static final short[] dfa_21 = DFA.unpackEncodedString(dfa_21s); + static final char[] dfa_22 = DFA.unpackEncodedStringToUnsignedChars(dfa_22s); + static final char[] dfa_23 = DFA.unpackEncodedStringToUnsignedChars(dfa_23s); + static final short[] dfa_24 = DFA.unpackEncodedString(dfa_24s); + static final short[] dfa_25 = DFA.unpackEncodedString(dfa_25s); + static final short[][] dfa_26 = unpackEncodedStringArray(dfa_26s); + + class DFA40 extends DFA { + + public DFA40(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 40; + this.eot = dfa_14; + this.eof = dfa_21; + this.min = dfa_22; + this.max = dfa_23; + this.accept = dfa_24; + this.special = dfa_25; + this.transition = dfa_26; + } + public String getDescription() { + return "1939:2: (this_SlotIntegerRange_0= ruleSlotIntegerRange | this_SlotIntegerValue_1= ruleSlotIntegerValue )"; + } + public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { + TokenStream input = (TokenStream)_input; + int _s = s; + switch ( s ) { + case 0 : + int LA40_14 = input.LA(1); + + + int index40_14 = input.index(); + input.rewind(); + s = -1; + if ( (synpred62_InternalEtlParser()) ) {s = 1;} + + else if ( (true) ) {s = 6;} + + + input.seek(index40_14); + if ( s>=0 ) return s; + break; + case 1 : + int LA40_12 = input.LA(1); + + + int index40_12 = input.index(); + input.rewind(); + s = -1; + if ( (synpred62_InternalEtlParser()) ) {s = 1;} + + else if ( (true) ) {s = 6;} + + + input.seek(index40_12); + if ( s>=0 ) return s; + break; + case 2 : + int LA40_13 = input.LA(1); + + + int index40_13 = input.index(); + input.rewind(); + s = -1; + if ( (synpred62_InternalEtlParser()) ) {s = 1;} + + else if ( (true) ) {s = 6;} + + + input.seek(index40_13); + if ( s>=0 ) return s; + break; + case 3 : + int LA40_15 = input.LA(1); + + + int index40_15 = input.index(); + input.rewind(); + s = -1; + if ( (synpred62_InternalEtlParser()) ) {s = 1;} + + else if ( (true) ) {s = 6;} + + + input.seek(index40_15); + if ( s>=0 ) return s; + break; + } + if (state.backtracking>0) {state.failed=true; return -1;} + NoViableAltException nvae = + new NoViableAltException(getDescription(), 40, _s, input); + error(nvae); + throw nvae; + } + } + static final String dfa_27s = "\31\uffff"; + static final String dfa_28s = "\5\uffff\1\13\2\uffff\2\13\1\1\16\uffff"; + static final String dfa_29s = "\1\31\1\uffff\1\36\1\50\1\36\1\31\2\36\3\31\1\uffff\1\64\2\36\1\50\1\36\1\50\1\36\1\0\2\36\1\0\2\36"; + static final String dfa_30s = "\1\64\1\uffff\1\37\2\50\1\64\2\50\3\64\1\uffff\1\64\2\37\4\50\1\0\2\50\1\0\2\50"; + static final String dfa_31s = "\1\uffff\1\1\11\uffff\1\2\15\uffff"; + static final String dfa_32s = "\23\uffff\1\0\2\uffff\1\1\2\uffff}>"; + static final String[] dfa_33s = { + "\1\1\23\uffff\1\1\6\uffff\1\2", + "", + "\1\3\1\4", + "\1\5", + "\1\7\1\6\10\uffff\1\5", + "\1\12\4\uffff\1\11\1\10\4\uffff\1\13\10\uffff\1\13\6\uffff\1\13", + "\1\7\1\6\10\uffff\1\5", + "\1\7\1\6\10\uffff\1\5", + "\1\12\4\uffff\1\11\1\10\4\uffff\1\13\10\uffff\1\13\6\uffff\1\13", + "\1\12\4\uffff\1\11\1\10\4\uffff\1\13\10\uffff\1\13\6\uffff\1\13", + "\1\1\12\uffff\1\1\7\uffff\1\14\1\1\6\uffff\1\15", + "", + "\1\16", + "\1\17\1\20", + "\1\21\1\22", + "\1\23", + "\1\25\1\24\10\uffff\1\23", + "\1\26", + "\1\30\1\27\10\uffff\1\26", + "\1\uffff", + "\1\25\1\24\10\uffff\1\23", + "\1\25\1\24\10\uffff\1\23", + "\1\uffff", + "\1\30\1\27\10\uffff\1\26", + "\1\30\1\27\10\uffff\1\26" + }; + + static final short[] dfa_27 = DFA.unpackEncodedString(dfa_27s); + static final short[] dfa_28 = DFA.unpackEncodedString(dfa_28s); + static final char[] dfa_29 = DFA.unpackEncodedStringToUnsignedChars(dfa_29s); + static final char[] dfa_30 = DFA.unpackEncodedStringToUnsignedChars(dfa_30s); + static final short[] dfa_31 = DFA.unpackEncodedString(dfa_31s); + static final short[] dfa_32 = DFA.unpackEncodedString(dfa_32s); + static final short[][] dfa_33 = unpackEncodedStringArray(dfa_33s); + + class DFA45 extends DFA { + + public DFA45(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 45; + this.eot = dfa_27; + this.eof = dfa_28; + this.min = dfa_29; + this.max = dfa_30; + this.accept = dfa_31; + this.special = dfa_32; + this.transition = dfa_33; + } + public String getDescription() { + return "2232:2: (this_SlotDecimalRange_0= ruleSlotDecimalRange | this_SlotDecimalValue_1= ruleSlotDecimalValue )"; + } + public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { + TokenStream input = (TokenStream)_input; + int _s = s; + switch ( s ) { + case 0 : + int LA45_19 = input.LA(1); + + + int index45_19 = input.index(); + input.rewind(); + s = -1; + if ( (synpred67_InternalEtlParser()) ) {s = 1;} + + else if ( (true) ) {s = 11;} + + + input.seek(index45_19); + if ( s>=0 ) return s; + break; + case 1 : + int LA45_22 = input.LA(1); + + + int index45_22 = input.index(); + input.rewind(); + s = -1; + if ( (synpred67_InternalEtlParser()) ) {s = 1;} + + else if ( (true) ) {s = 11;} + + + input.seek(index45_22); + if ( s>=0 ) return s; + break; + } + if (state.backtracking>0) {state.failed=true; return -1;} + NoViableAltException nvae = + new NoViableAltException(getDescription(), 45, _s, input); + error(nvae); + throw nvae; + } + } + static final String dfa_34s = "\11\uffff"; + static final String dfa_35s = "\1\3\10\uffff"; + static final String dfa_36s = "\1\31\1\uffff\1\36\1\uffff\1\50\1\36\1\0\2\36"; + static final String dfa_37s = "\1\64\1\uffff\1\37\1\uffff\2\50\1\0\2\50"; + static final String dfa_38s = "\1\uffff\1\1\1\uffff\1\2\5\uffff"; + static final String dfa_39s = "\6\uffff\1\0\2\uffff}>"; + static final String[] dfa_40s = { + "\1\3\12\uffff\1\3\7\uffff\1\1\1\3\6\uffff\1\2", + "", + "\1\4\1\5", + "", + "\1\6", + "\1\10\1\7\10\uffff\1\6", + "\1\uffff", + "\1\10\1\7\10\uffff\1\6", + "\1\10\1\7\10\uffff\1\6" + }; + + static final short[] dfa_34 = DFA.unpackEncodedString(dfa_34s); + static final short[] dfa_35 = DFA.unpackEncodedString(dfa_35s); + static final char[] dfa_36 = DFA.unpackEncodedStringToUnsignedChars(dfa_36s); + static final char[] dfa_37 = DFA.unpackEncodedStringToUnsignedChars(dfa_37s); + static final short[] dfa_38 = DFA.unpackEncodedString(dfa_38s); + static final short[] dfa_39 = DFA.unpackEncodedString(dfa_39s); + static final short[][] dfa_40 = unpackEncodedStringArray(dfa_40s); + + class DFA46 extends DFA { + + public DFA46(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 46; + this.eot = dfa_34; + this.eof = dfa_35; + this.min = dfa_36; + this.max = dfa_37; + this.accept = dfa_38; + this.special = dfa_39; + this.transition = dfa_40; + } + public String getDescription() { + return "2341:4: ( (lv_maximum_2_0= ruleSlotDecimalMaximumValue ) )?"; + } + public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { + TokenStream input = (TokenStream)_input; + int _s = s; + switch ( s ) { + case 0 : + int LA46_6 = input.LA(1); + + + int index46_6 = input.index(); + input.rewind(); + s = -1; + if ( (synpred68_InternalEtlParser()) ) {s = 1;} + + else if ( (true) ) {s = 3;} + + + input.seek(index46_6); + if ( s>=0 ) return s; + break; + } + if (state.backtracking>0) {state.failed=true; return -1;} + NoViableAltException nvae = + new NoViableAltException(getDescription(), 46, _s, input); + error(nvae); + throw nvae; + } + } + static final String dfa_41s = "\17\uffff"; + static final String dfa_42s = "\1\24\1\0\12\uffff\1\0\2\uffff"; + static final String dfa_43s = "\1\61\1\0\12\uffff\1\0\2\uffff"; + static final String dfa_44s = "\2\uffff\1\1\12\uffff\1\2\1\3"; + static final String dfa_45s = "\1\uffff\1\0\12\uffff\1\1\2\uffff}>"; + static final String[] dfa_46s = { + "\1\1\3\uffff\1\2\6\uffff\1\2\1\uffff\1\15\1\uffff\1\14\3\uffff\1\2\1\uffff\1\2\2\uffff\6\2", + "\1\uffff", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\1\uffff", + "", + "" + }; + + static final short[] dfa_41 = DFA.unpackEncodedString(dfa_41s); + static final char[] dfa_42 = DFA.unpackEncodedStringToUnsignedChars(dfa_42s); + static final char[] dfa_43 = DFA.unpackEncodedStringToUnsignedChars(dfa_43s); + static final short[] dfa_44 = DFA.unpackEncodedString(dfa_44s); + static final short[] dfa_45 = DFA.unpackEncodedString(dfa_45s); + static final short[][] dfa_46 = unpackEncodedStringArray(dfa_46s); + + class DFA63 extends DFA { + + public DFA63(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 63; + this.eot = dfa_41; + this.eof = dfa_41; + this.min = dfa_42; + this.max = dfa_43; + this.accept = dfa_44; + this.special = dfa_45; + this.transition = dfa_46; + } + public String getDescription() { + return "3641:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement )"; + } + public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { + TokenStream input = (TokenStream)_input; + int _s = s; + switch ( s ) { + case 0 : + int LA63_1 = input.LA(1); + + + int index63_1 = input.index(); + input.rewind(); + s = -1; + if ( (synpred94_InternalEtlParser()) ) {s = 2;} + + else if ( (synpred95_InternalEtlParser()) ) {s = 13;} + + + input.seek(index63_1); + if ( s>=0 ) return s; + break; + case 1 : + int LA63_12 = input.LA(1); + + + int index63_12 = input.index(); + input.rewind(); + s = -1; + if ( (synpred94_InternalEtlParser()) ) {s = 2;} + + else if ( (true) ) {s = 14;} + + + input.seek(index63_12); + if ( s>=0 ) return s; + break; + } + if (state.backtracking>0) {state.failed=true; return -1;} + NoViableAltException nvae = + new NoViableAltException(getDescription(), 63, _s, input); + error(nvae); + throw nvae; + } + } + static final String dfa_47s = "\16\uffff"; + static final String dfa_48s = "\1\24\13\uffff\1\0\1\uffff"; + static final String dfa_49s = "\1\61\13\uffff\1\0\1\uffff"; + static final String dfa_50s = "\1\uffff\1\1\13\uffff\1\2"; + static final String dfa_51s = "\14\uffff\1\0\1\uffff}>"; + static final String[] dfa_52s = { + "\1\1\3\uffff\1\1\6\uffff\1\1\3\uffff\1\14\3\uffff\1\1\1\uffff\1\1\2\uffff\6\1", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\1\uffff", + "" + }; + + static final short[] dfa_47 = DFA.unpackEncodedString(dfa_47s); + static final char[] dfa_48 = DFA.unpackEncodedStringToUnsignedChars(dfa_48s); + static final char[] dfa_49 = DFA.unpackEncodedStringToUnsignedChars(dfa_49s); + static final short[] dfa_50 = DFA.unpackEncodedString(dfa_50s); + static final short[] dfa_51 = DFA.unpackEncodedString(dfa_51s); + static final short[][] dfa_52 = unpackEncodedStringArray(dfa_52s); + + class DFA68 extends DFA { + + public DFA68(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 68; + this.eot = dfa_47; + this.eof = dfa_47; + this.min = dfa_48; + this.max = dfa_49; + this.accept = dfa_50; + this.special = dfa_51; + this.transition = dfa_52; + } + public String getDescription() { + return "3971:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_NestedAttributeSet_1= ruleNestedAttributeSet )"; + } + public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { + TokenStream input = (TokenStream)_input; + int _s = s; + switch ( s ) { + case 0 : + int LA68_12 = input.LA(1); + + + int index68_12 = input.index(); + input.rewind(); + s = -1; + if ( (synpred100_InternalEtlParser()) ) {s = 1;} + + else if ( (true) ) {s = 13;} + + + input.seek(index68_12); + if ( s>=0 ) return s; + break; + } + if (state.backtracking>0) {state.failed=true; return -1;} + NoViableAltException nvae = + new NoViableAltException(getDescription(), 68, _s, input); + error(nvae); + throw nvae; + } + } + static final String dfa_53s = "\101\uffff"; + static final String dfa_54s = "\23\uffff\2\52\2\uffff\2\55\2\uffff\2\62\2\uffff\2\66\2\uffff\2\72\2\uffff\2\75\2\uffff\2\52\2\uffff\2\55\2\uffff\2\62\2\uffff\2\66\2\uffff\2\72\2\uffff\2\75"; + static final String dfa_55s = "\1\52\2\4\4\64\1\uffff\1\36\2\uffff\1\36\1\uffff\6\36\2\32\2\36\2\32\2\36\2\32\2\36\2\32\2\36\2\32\2\36\2\32\2\uffff\2\32\2\uffff\2\32\2\uffff\2\32\2\uffff\2\32\2\uffff\2\32\2\uffff\2\32"; + static final String dfa_56s = "\1\63\6\64\1\uffff\1\46\2\uffff\1\46\1\uffff\4\46\2\37\2\50\2\37\2\50\2\37\2\50\2\37\2\50\2\37\2\50\2\37\2\50\2\uffff\2\50\2\uffff\2\50\2\uffff\2\50\2\uffff\2\50\2\uffff\2\50\2\uffff\2\50"; + static final String dfa_57s = "\7\uffff\1\3\1\uffff\1\1\1\2\1\uffff\1\4\34\uffff\1\13\1\5\2\uffff\1\6\1\14\2\uffff\1\15\1\7\2\uffff\1\16\1\10\2\uffff\1\17\1\11\2\uffff\1\12\1\20\2\uffff"; + static final String dfa_58s = "\101\uffff}>"; + static final String[] dfa_59s = { + "\1\1\1\2\1\5\1\3\4\uffff\1\4\1\6", + "\2\11\14\uffff\1\7\41\uffff\1\10", + "\2\12\14\uffff\1\14\41\uffff\1\13", + "\1\15", + "\1\16", + "\1\17", + "\1\20", + "", + "\1\23\1\24\5\uffff\1\21\1\22", + "", + "", + "\1\27\1\30\5\uffff\1\25\1\26", + "", + "\1\33\1\34\5\uffff\1\31\1\32", + "\1\37\1\40\5\uffff\1\35\1\36", + "\1\43\1\44\5\uffff\1\41\1\42", + "\1\47\1\50\5\uffff\1\45\1\46", + "\1\23\1\24", + "\1\23\1\24", + "\4\52\4\uffff\1\52\1\uffff\1\52\3\uffff\1\51", + "\4\52\1\54\1\53\2\uffff\1\52\1\uffff\1\52\3\uffff\1\51", + "\1\27\1\30", + "\1\27\1\30", + "\4\55\4\uffff\1\55\1\uffff\1\55\3\uffff\1\56", + "\4\55\1\60\1\57\2\uffff\1\55\1\uffff\1\55\3\uffff\1\56", + "\1\33\1\34", + "\1\33\1\34", + "\4\62\4\uffff\1\62\1\uffff\1\62\3\uffff\1\61", + "\4\62\1\64\1\63\2\uffff\1\62\1\uffff\1\62\3\uffff\1\61", + "\1\37\1\40", + "\1\37\1\40", + "\4\66\4\uffff\1\66\1\uffff\1\66\3\uffff\1\65", + "\4\66\1\70\1\67\2\uffff\1\66\1\uffff\1\66\3\uffff\1\65", + "\1\43\1\44", + "\1\43\1\44", + "\4\72\4\uffff\1\72\1\uffff\1\72\3\uffff\1\71", + "\4\72\1\74\1\73\2\uffff\1\72\1\uffff\1\72\3\uffff\1\71", + "\1\47\1\50", + "\1\47\1\50", + "\4\75\4\uffff\1\75\1\uffff\1\75\3\uffff\1\76", + "\4\75\1\100\1\77\2\uffff\1\75\1\uffff\1\75\3\uffff\1\76", + "", + "", + "\4\52\1\54\1\53\2\uffff\1\52\1\uffff\1\52\3\uffff\1\51", + "\4\52\1\54\1\53\2\uffff\1\52\1\uffff\1\52\3\uffff\1\51", + "", + "", + "\4\55\1\60\1\57\2\uffff\1\55\1\uffff\1\55\3\uffff\1\56", + "\4\55\1\60\1\57\2\uffff\1\55\1\uffff\1\55\3\uffff\1\56", + "", + "", + "\4\62\1\64\1\63\2\uffff\1\62\1\uffff\1\62\3\uffff\1\61", + "\4\62\1\64\1\63\2\uffff\1\62\1\uffff\1\62\3\uffff\1\61", + "", + "", + "\4\66\1\70\1\67\2\uffff\1\66\1\uffff\1\66\3\uffff\1\65", + "\4\66\1\70\1\67\2\uffff\1\66\1\uffff\1\66\3\uffff\1\65", + "", + "", + "\4\72\1\74\1\73\2\uffff\1\72\1\uffff\1\72\3\uffff\1\71", + "\4\72\1\74\1\73\2\uffff\1\72\1\uffff\1\72\3\uffff\1\71", + "", + "", + "\4\75\1\100\1\77\2\uffff\1\75\1\uffff\1\75\3\uffff\1\76", + "\4\75\1\100\1\77\2\uffff\1\75\1\uffff\1\75\3\uffff\1\76" + }; + + static final short[] dfa_53 = DFA.unpackEncodedString(dfa_53s); + static final short[] dfa_54 = DFA.unpackEncodedString(dfa_54s); + static final char[] dfa_55 = DFA.unpackEncodedStringToUnsignedChars(dfa_55s); + static final char[] dfa_56 = DFA.unpackEncodedStringToUnsignedChars(dfa_56s); + static final short[] dfa_57 = DFA.unpackEncodedString(dfa_57s); + static final short[] dfa_58 = DFA.unpackEncodedString(dfa_58s); + static final short[][] dfa_59 = unpackEncodedStringArray(dfa_59s); + + class DFA73 extends DFA { + + public DFA73(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 73; + this.eot = dfa_53; + this.eof = dfa_54; + this.min = dfa_55; + this.max = dfa_56; + this.accept = dfa_57; + this.special = dfa_58; + this.transition = dfa_59; + } + public String getDescription() { + return "4306:2: (this_BooleanValueEquals_0= ruleBooleanValueEquals | this_BooleanValueNotEquals_1= ruleBooleanValueNotEquals | this_StringValueEquals_2= ruleStringValueEquals | this_StringValueNotEquals_3= ruleStringValueNotEquals | this_IntegerValueEquals_4= ruleIntegerValueEquals | this_IntegerValueNotEquals_5= ruleIntegerValueNotEquals | this_IntegerValueGreaterThan_6= ruleIntegerValueGreaterThan | this_IntegerValueGreaterThanEquals_7= ruleIntegerValueGreaterThanEquals | this_IntegerValueLessThan_8= ruleIntegerValueLessThan | this_IntegerValueLessThanEquals_9= ruleIntegerValueLessThanEquals | this_DecimalValueEquals_10= ruleDecimalValueEquals | this_DecimalValueNotEquals_11= ruleDecimalValueNotEquals | this_DecimalValueGreaterThan_12= ruleDecimalValueGreaterThan | this_DecimalValueGreaterThanEquals_13= ruleDecimalValueGreaterThanEquals | this_DecimalValueLessThan_14= ruleDecimalValueLessThan | this_DecimalValueLessThanEquals_15= ruleDecimalValueLessThanEquals )"; + } + } + + + + private static class FollowSets000 { + public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000000080000040L}); + public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000002100000002L}); + public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000280000040L}); + public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000284000042L}); + public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000200000000L}); + public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000404000000L}); + public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000040000000000L}); + public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0010000880040040L}); + public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0000001000000000L}); + public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000002000000000L}); + public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000000000400L}); + public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000800400080L}); + public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0003F28880000040L}); + public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x0000000000400080L}); + public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x0000000000000080L}); + public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000800400880L}); + public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0000000000001000L}); + public static final BitSet FOLLOW_20 = new BitSet(new long[]{0x000FFC803D030000L}); + public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x000FFC903D030000L}); + public static final BitSet FOLLOW_22 = new BitSet(new long[]{0x00000000C0400180L}); + public static final BitSet FOLLOW_23 = new BitSet(new long[]{0x0000000000002000L}); + public static final BitSet FOLLOW_24 = new BitSet(new long[]{0x0000000000040000L}); + public static final BitSet FOLLOW_25 = new BitSet(new long[]{0x0000001000040000L}); + public static final BitSet FOLLOW_26 = new BitSet(new long[]{0x0000000000004000L}); + public static final BitSet FOLLOW_27 = new BitSet(new long[]{0x0010200002000000L}); + public static final BitSet FOLLOW_28 = new BitSet(new long[]{0x0010201002000000L}); + public static final BitSet FOLLOW_29 = new BitSet(new long[]{0x0000000000008000L}); + public static final BitSet FOLLOW_30 = new BitSet(new long[]{0x00000000C0000100L}); + public static final BitSet FOLLOW_31 = new BitSet(new long[]{0x0000000002000000L}); + public static final BitSet FOLLOW_32 = new BitSet(new long[]{0x00000200C0000100L}); + public static final BitSet FOLLOW_33 = new BitSet(new long[]{0x0000000000800002L}); + public static final BitSet FOLLOW_34 = new BitSet(new long[]{0x00000060C0000100L}); + public static final BitSet FOLLOW_35 = new BitSet(new long[]{0x0010100000000002L}); + public static final BitSet FOLLOW_36 = new BitSet(new long[]{0x0010100000000000L}); + public static final BitSet FOLLOW_37 = new BitSet(new long[]{0x0010000000000000L}); + public static final BitSet FOLLOW_38 = new BitSet(new long[]{0x0000000010000002L}); + public static final BitSet FOLLOW_39 = new BitSet(new long[]{0x000000000C000002L}); + public static final BitSet FOLLOW_40 = new BitSet(new long[]{0x0000000020000002L}); + public static final BitSet FOLLOW_41 = new BitSet(new long[]{0x0000000100000002L}); + public static final BitSet FOLLOW_42 = new BitSet(new long[]{0x0003F28A81100040L}); + public static final BitSet FOLLOW_43 = new BitSet(new long[]{0x0000010000000002L}); + public static final BitSet FOLLOW_44 = new BitSet(new long[]{0x0003F28881100040L}); + public static final BitSet FOLLOW_45 = new BitSet(new long[]{0x0000000400000000L}); + public static final BitSet FOLLOW_46 = new BitSet(new long[]{0x0003F28881000040L}); + public static final BitSet FOLLOW_47 = new BitSet(new long[]{0x000C3C0000000000L}); + public static final BitSet FOLLOW_48 = new BitSet(new long[]{0x0000000000200000L}); + public static final BitSet FOLLOW_49 = new BitSet(new long[]{0x0000000000000030L}); + public static final BitSet FOLLOW_50 = new BitSet(new long[]{0x00000000C0000000L}); + public static final BitSet FOLLOW_51 = new BitSet(new long[]{0x00000000C0000002L}); + public static final BitSet FOLLOW_52 = new BitSet(new long[]{0x0000010000000000L}); + } + + +} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/internal/InternalEtlParser.tokens b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/internal/InternalEtlParser.tokens new file mode 100644 index 00000000000..3e1e2ce2df5 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/internal/InternalEtlParser.tokens @@ -0,0 +1,51 @@ +'false'=4 +'true'=5 +RULE_AT=9 +RULE_CARET=39 +RULE_COLON=32 +RULE_COMMA=26 +RULE_CONJUNCTION=27 +RULE_CURLY_CLOSE=34 +RULE_CURLY_OPEN=33 +RULE_DASH=38 +RULE_DBL_GT=47 +RULE_DBL_LT=46 +RULE_DEC=15 +RULE_DIGIT_NONZERO=31 +RULE_DISJUNCTION=28 +RULE_DOT=40 +RULE_DOUBLE_SQUARE_CLOSE=7 +RULE_DOUBLE_SQUARE_OPEN=6 +RULE_EQUAL=42 +RULE_EQUIVALENT_TO=16 +RULE_EXCLUSION=29 +RULE_GT=45 +RULE_GTE=50 +RULE_GT_EM=49 +RULE_HASH=52 +RULE_ID=10 +RULE_INT=14 +RULE_LT=44 +RULE_LTE=51 +RULE_LT_EM=48 +RULE_ML_COMMENT=53 +RULE_NOT_EQUAL=43 +RULE_PLUS=37 +RULE_REVERSED=24 +RULE_ROUND_CLOSE=36 +RULE_ROUND_OPEN=35 +RULE_SCG=11 +RULE_SLOTNAME_STRING=22 +RULE_SL_COMMENT=54 +RULE_SQUARE_CLOSE=21 +RULE_SQUARE_OPEN=20 +RULE_STR=13 +RULE_STRING=18 +RULE_SUBTYPE_OF=17 +RULE_TERM_STRING=23 +RULE_TILDE=8 +RULE_TO=25 +RULE_TOK=12 +RULE_WILDCARD=41 +RULE_WS=19 +RULE_ZERO=30 diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/lexer/InternalEtlLexer.g b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/lexer/InternalEtlLexer.g new file mode 100644 index 00000000000..08f0178c34a --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/lexer/InternalEtlLexer.g @@ -0,0 +1,126 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +lexer grammar InternalEtlLexer; + +@header { +package com.b2international.snowowl.snomed.etl.parser.antlr.lexer; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.parser.antlr.Lexer; +} + +False : ('F'|'f')('A'|'a')('L'|'l')('S'|'s')('E'|'e'); + +True : ('T'|'t')('R'|'r')('U'|'u')('E'|'e'); + +RULE_DOUBLE_SQUARE_OPEN : '[['; + +RULE_DOUBLE_SQUARE_CLOSE : ']]'; + +RULE_TILDE : '~'; + +fragment RULE_AT : '@'; + +RULE_ID : 'id'; + +RULE_SCG : 'scg'; + +RULE_TOK : 'tok'; + +RULE_STR : 'str'; + +RULE_INT : 'int'; + +RULE_DEC : 'dec'; + +RULE_EQUIVALENT_TO : '==='; + +RULE_SUBTYPE_OF : '<<<'; + +RULE_SLOTNAME_STRING : RULE_AT (RULE_STRING|~(('\\'|'"'|'\''|RULE_WS|RULE_AT|RULE_SQUARE_OPEN|RULE_SQUARE_CLOSE))*); + +RULE_TERM_STRING : '|' ~('|')* '|'; + +RULE_REVERSED : 'R'; + +RULE_TO : '..'; + +RULE_COMMA : ','; + +RULE_CONJUNCTION : ('a'|'A') ('n'|'N') ('d'|'D'); + +RULE_DISJUNCTION : ('o'|'O') ('r'|'R'); + +RULE_EXCLUSION : ('m'|'M') ('i'|'I') ('n'|'N') ('u'|'U') ('s'|'S'); + +RULE_ZERO : '0'; + +RULE_DIGIT_NONZERO : '1'..'9'; + +RULE_COLON : ':'; + +RULE_CURLY_OPEN : '{'; + +RULE_CURLY_CLOSE : '}'; + +RULE_ROUND_OPEN : '('; + +RULE_ROUND_CLOSE : ')'; + +RULE_SQUARE_OPEN : '['; + +RULE_SQUARE_CLOSE : ']'; + +RULE_PLUS : '+'; + +RULE_DASH : '-'; + +RULE_CARET : '^'; + +RULE_DOT : '.'; + +RULE_WILDCARD : '*'; + +RULE_EQUAL : '='; + +RULE_NOT_EQUAL : '!='; + +RULE_LT : '<'; + +RULE_GT : '>'; + +RULE_DBL_LT : '<<'; + +RULE_DBL_GT : '>>'; + +RULE_LT_EM : '!'; + +RULE_GTE : '>='; + +RULE_LTE : '<='; + +RULE_HASH : '#'; + +RULE_WS : (' '|'\t'|'\n'|'\r'); + +RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; + +RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; + +RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\''); diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/lexer/InternalEtlLexer.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/lexer/InternalEtlLexer.java new file mode 100644 index 00000000000..4d94b3bd435 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/parser/antlr/lexer/InternalEtlLexer.java @@ -0,0 +1,2092 @@ +package com.b2international.snowowl.snomed.etl.parser.antlr.lexer; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.parser.antlr.Lexer; + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalEtlLexer extends Lexer { + public static final int RULE_DIGIT_NONZERO=31; + public static final int RULE_CURLY_OPEN=33; + public static final int RULE_TO=25; + public static final int RULE_ROUND_CLOSE=36; + public static final int RULE_DBL_GT=47; + public static final int True=5; + public static final int RULE_GT=45; + public static final int False=4; + public static final int RULE_SLOTNAME_STRING=22; + public static final int RULE_SCG=11; + public static final int RULE_GTE=50; + public static final int RULE_DOUBLE_SQUARE_OPEN=6; + public static final int RULE_EQUIVALENT_TO=16; + public static final int RULE_ROUND_OPEN=35; + public static final int RULE_DBL_LT=46; + public static final int RULE_NOT_EQUAL=43; + public static final int RULE_SQUARE_CLOSE=21; + public static final int RULE_ID=10; + public static final int RULE_SQUARE_OPEN=20; + public static final int RULE_EQUAL=42; + public static final int RULE_DEC=15; + public static final int RULE_COMMA=26; + public static final int RULE_LT_EM=48; + public static final int RULE_CURLY_CLOSE=34; + public static final int RULE_ZERO=30; + public static final int RULE_COLON=32; + public static final int RULE_TILDE=8; + public static final int RULE_LT=44; + public static final int RULE_INT=14; + public static final int RULE_ML_COMMENT=53; + public static final int RULE_DOUBLE_SQUARE_CLOSE=7; + public static final int RULE_LTE=51; + public static final int RULE_STRING=18; + public static final int RULE_AT=9; + public static final int RULE_REVERSED=24; + public static final int RULE_SL_COMMENT=54; + public static final int RULE_HASH=52; + public static final int RULE_TOK=12; + public static final int RULE_DASH=38; + public static final int RULE_PLUS=37; + public static final int RULE_DOT=40; + public static final int EOF=-1; + public static final int RULE_SUBTYPE_OF=17; + public static final int RULE_WS=19; + public static final int RULE_GT_EM=49; + public static final int RULE_EXCLUSION=29; + public static final int RULE_CARET=39; + public static final int RULE_CONJUNCTION=27; + public static final int RULE_STR=13; + public static final int RULE_WILDCARD=41; + public static final int RULE_DISJUNCTION=28; + public static final int RULE_TERM_STRING=23; + + // delegates + // delegators + + public InternalEtlLexer() {;} + public InternalEtlLexer(CharStream input) { + this(input, new RecognizerSharedState()); + } + public InternalEtlLexer(CharStream input, RecognizerSharedState state) { + super(input,state); + + } + public String getGrammarFileName() { return "InternalEtlLexer.g"; } + + // $ANTLR start "False" + public final void mFalse() throws RecognitionException { + try { + int _type = False; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:26:7: ( ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) ) + // InternalEtlLexer.g:26:9: ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) + { + if ( input.LA(1)=='F'||input.LA(1)=='f' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='A'||input.LA(1)=='a' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='L'||input.LA(1)=='l' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='S'||input.LA(1)=='s' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='E'||input.LA(1)=='e' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "False" + + // $ANTLR start "True" + public final void mTrue() throws RecognitionException { + try { + int _type = True; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:28:6: ( ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) ) + // InternalEtlLexer.g:28:8: ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) + { + if ( input.LA(1)=='T'||input.LA(1)=='t' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='R'||input.LA(1)=='r' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='U'||input.LA(1)=='u' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='E'||input.LA(1)=='e' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "True" + + // $ANTLR start "RULE_DOUBLE_SQUARE_OPEN" + public final void mRULE_DOUBLE_SQUARE_OPEN() throws RecognitionException { + try { + int _type = RULE_DOUBLE_SQUARE_OPEN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:30:25: ( '[[' ) + // InternalEtlLexer.g:30:27: '[[' + { + match("[["); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DOUBLE_SQUARE_OPEN" + + // $ANTLR start "RULE_DOUBLE_SQUARE_CLOSE" + public final void mRULE_DOUBLE_SQUARE_CLOSE() throws RecognitionException { + try { + int _type = RULE_DOUBLE_SQUARE_CLOSE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:32:26: ( ']]' ) + // InternalEtlLexer.g:32:28: ']]' + { + match("]]"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DOUBLE_SQUARE_CLOSE" + + // $ANTLR start "RULE_TILDE" + public final void mRULE_TILDE() throws RecognitionException { + try { + int _type = RULE_TILDE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:34:12: ( '~' ) + // InternalEtlLexer.g:34:14: '~' + { + match('~'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_TILDE" + + // $ANTLR start "RULE_AT" + public final void mRULE_AT() throws RecognitionException { + try { + // InternalEtlLexer.g:36:18: ( '@' ) + // InternalEtlLexer.g:36:20: '@' + { + match('@'); + + } + + } + finally { + } + } + // $ANTLR end "RULE_AT" + + // $ANTLR start "RULE_ID" + public final void mRULE_ID() throws RecognitionException { + try { + int _type = RULE_ID; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:38:9: ( 'id' ) + // InternalEtlLexer.g:38:11: 'id' + { + match("id"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ID" + + // $ANTLR start "RULE_SCG" + public final void mRULE_SCG() throws RecognitionException { + try { + int _type = RULE_SCG; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:40:10: ( 'scg' ) + // InternalEtlLexer.g:40:12: 'scg' + { + match("scg"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SCG" + + // $ANTLR start "RULE_TOK" + public final void mRULE_TOK() throws RecognitionException { + try { + int _type = RULE_TOK; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:42:10: ( 'tok' ) + // InternalEtlLexer.g:42:12: 'tok' + { + match("tok"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_TOK" + + // $ANTLR start "RULE_STR" + public final void mRULE_STR() throws RecognitionException { + try { + int _type = RULE_STR; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:44:10: ( 'str' ) + // InternalEtlLexer.g:44:12: 'str' + { + match("str"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_STR" + + // $ANTLR start "RULE_INT" + public final void mRULE_INT() throws RecognitionException { + try { + int _type = RULE_INT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:46:10: ( 'int' ) + // InternalEtlLexer.g:46:12: 'int' + { + match("int"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_INT" + + // $ANTLR start "RULE_DEC" + public final void mRULE_DEC() throws RecognitionException { + try { + int _type = RULE_DEC; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:48:10: ( 'dec' ) + // InternalEtlLexer.g:48:12: 'dec' + { + match("dec"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DEC" + + // $ANTLR start "RULE_EQUIVALENT_TO" + public final void mRULE_EQUIVALENT_TO() throws RecognitionException { + try { + int _type = RULE_EQUIVALENT_TO; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:50:20: ( '===' ) + // InternalEtlLexer.g:50:22: '===' + { + match("==="); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_EQUIVALENT_TO" + + // $ANTLR start "RULE_SUBTYPE_OF" + public final void mRULE_SUBTYPE_OF() throws RecognitionException { + try { + int _type = RULE_SUBTYPE_OF; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:52:17: ( '<<<' ) + // InternalEtlLexer.g:52:19: '<<<' + { + match("<<<"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SUBTYPE_OF" + + // $ANTLR start "RULE_SLOTNAME_STRING" + public final void mRULE_SLOTNAME_STRING() throws RecognitionException { + try { + int _type = RULE_SLOTNAME_STRING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:54:22: ( RULE_AT ( RULE_STRING | (~ ( ( '\\\\' | '\"' | '\\'' | RULE_WS | RULE_AT | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE ) ) )* ) ) + // InternalEtlLexer.g:54:24: RULE_AT ( RULE_STRING | (~ ( ( '\\\\' | '\"' | '\\'' | RULE_WS | RULE_AT | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE ) ) )* ) + { + mRULE_AT(); + // InternalEtlLexer.g:54:32: ( RULE_STRING | (~ ( ( '\\\\' | '\"' | '\\'' | RULE_WS | RULE_AT | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE ) ) )* ) + int alt2=2; + int LA2_0 = input.LA(1); + + if ( (LA2_0=='\"'||LA2_0=='\'') ) { + alt2=1; + } + else { + alt2=2;} + switch (alt2) { + case 1 : + // InternalEtlLexer.g:54:33: RULE_STRING + { + mRULE_STRING(); + + } + break; + case 2 : + // InternalEtlLexer.g:54:45: (~ ( ( '\\\\' | '\"' | '\\'' | RULE_WS | RULE_AT | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE ) ) )* + { + // InternalEtlLexer.g:54:45: (~ ( ( '\\\\' | '\"' | '\\'' | RULE_WS | RULE_AT | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE ) ) )* + loop1: + do { + int alt1=2; + int LA1_0 = input.LA(1); + + if ( ((LA1_0>='\u0000' && LA1_0<='\b')||(LA1_0>='\u000B' && LA1_0<='\f')||(LA1_0>='\u000E' && LA1_0<='\u001F')||LA1_0=='!'||(LA1_0>='#' && LA1_0<='&')||(LA1_0>='(' && LA1_0<='?')||(LA1_0>='A' && LA1_0<='Z')||(LA1_0>='^' && LA1_0<='\uFFFF')) ) { + alt1=1; + } + + + switch (alt1) { + case 1 : + // InternalEtlLexer.g:54:45: ~ ( ( '\\\\' | '\"' | '\\'' | RULE_WS | RULE_AT | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='\b')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\u001F')||input.LA(1)=='!'||(input.LA(1)>='#' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='?')||(input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='^' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop1; + } + } while (true); + + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SLOTNAME_STRING" + + // $ANTLR start "RULE_TERM_STRING" + public final void mRULE_TERM_STRING() throws RecognitionException { + try { + int _type = RULE_TERM_STRING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:56:18: ( '|' (~ ( '|' ) )* '|' ) + // InternalEtlLexer.g:56:20: '|' (~ ( '|' ) )* '|' + { + match('|'); + // InternalEtlLexer.g:56:24: (~ ( '|' ) )* + loop3: + do { + int alt3=2; + int LA3_0 = input.LA(1); + + if ( ((LA3_0>='\u0000' && LA3_0<='{')||(LA3_0>='}' && LA3_0<='\uFFFF')) ) { + alt3=1; + } + + + switch (alt3) { + case 1 : + // InternalEtlLexer.g:56:24: ~ ( '|' ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='{')||(input.LA(1)>='}' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop3; + } + } while (true); + + match('|'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_TERM_STRING" + + // $ANTLR start "RULE_REVERSED" + public final void mRULE_REVERSED() throws RecognitionException { + try { + int _type = RULE_REVERSED; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:58:15: ( 'R' ) + // InternalEtlLexer.g:58:17: 'R' + { + match('R'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_REVERSED" + + // $ANTLR start "RULE_TO" + public final void mRULE_TO() throws RecognitionException { + try { + int _type = RULE_TO; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:60:9: ( '..' ) + // InternalEtlLexer.g:60:11: '..' + { + match(".."); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_TO" + + // $ANTLR start "RULE_COMMA" + public final void mRULE_COMMA() throws RecognitionException { + try { + int _type = RULE_COMMA; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:62:12: ( ',' ) + // InternalEtlLexer.g:62:14: ',' + { + match(','); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_COMMA" + + // $ANTLR start "RULE_CONJUNCTION" + public final void mRULE_CONJUNCTION() throws RecognitionException { + try { + int _type = RULE_CONJUNCTION; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:64:18: ( ( 'a' | 'A' ) ( 'n' | 'N' ) ( 'd' | 'D' ) ) + // InternalEtlLexer.g:64:20: ( 'a' | 'A' ) ( 'n' | 'N' ) ( 'd' | 'D' ) + { + if ( input.LA(1)=='A'||input.LA(1)=='a' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='N'||input.LA(1)=='n' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='D'||input.LA(1)=='d' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_CONJUNCTION" + + // $ANTLR start "RULE_DISJUNCTION" + public final void mRULE_DISJUNCTION() throws RecognitionException { + try { + int _type = RULE_DISJUNCTION; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:66:18: ( ( 'o' | 'O' ) ( 'r' | 'R' ) ) + // InternalEtlLexer.g:66:20: ( 'o' | 'O' ) ( 'r' | 'R' ) + { + if ( input.LA(1)=='O'||input.LA(1)=='o' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='R'||input.LA(1)=='r' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DISJUNCTION" + + // $ANTLR start "RULE_EXCLUSION" + public final void mRULE_EXCLUSION() throws RecognitionException { + try { + int _type = RULE_EXCLUSION; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:68:16: ( ( 'm' | 'M' ) ( 'i' | 'I' ) ( 'n' | 'N' ) ( 'u' | 'U' ) ( 's' | 'S' ) ) + // InternalEtlLexer.g:68:18: ( 'm' | 'M' ) ( 'i' | 'I' ) ( 'n' | 'N' ) ( 'u' | 'U' ) ( 's' | 'S' ) + { + if ( input.LA(1)=='M'||input.LA(1)=='m' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='I'||input.LA(1)=='i' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='N'||input.LA(1)=='n' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='U'||input.LA(1)=='u' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='S'||input.LA(1)=='s' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_EXCLUSION" + + // $ANTLR start "RULE_ZERO" + public final void mRULE_ZERO() throws RecognitionException { + try { + int _type = RULE_ZERO; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:70:11: ( '0' ) + // InternalEtlLexer.g:70:13: '0' + { + match('0'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ZERO" + + // $ANTLR start "RULE_DIGIT_NONZERO" + public final void mRULE_DIGIT_NONZERO() throws RecognitionException { + try { + int _type = RULE_DIGIT_NONZERO; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:72:20: ( '1' .. '9' ) + // InternalEtlLexer.g:72:22: '1' .. '9' + { + matchRange('1','9'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DIGIT_NONZERO" + + // $ANTLR start "RULE_COLON" + public final void mRULE_COLON() throws RecognitionException { + try { + int _type = RULE_COLON; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:74:12: ( ':' ) + // InternalEtlLexer.g:74:14: ':' + { + match(':'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_COLON" + + // $ANTLR start "RULE_CURLY_OPEN" + public final void mRULE_CURLY_OPEN() throws RecognitionException { + try { + int _type = RULE_CURLY_OPEN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:76:17: ( '{' ) + // InternalEtlLexer.g:76:19: '{' + { + match('{'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_CURLY_OPEN" + + // $ANTLR start "RULE_CURLY_CLOSE" + public final void mRULE_CURLY_CLOSE() throws RecognitionException { + try { + int _type = RULE_CURLY_CLOSE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:78:18: ( '}' ) + // InternalEtlLexer.g:78:20: '}' + { + match('}'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_CURLY_CLOSE" + + // $ANTLR start "RULE_ROUND_OPEN" + public final void mRULE_ROUND_OPEN() throws RecognitionException { + try { + int _type = RULE_ROUND_OPEN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:80:17: ( '(' ) + // InternalEtlLexer.g:80:19: '(' + { + match('('); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ROUND_OPEN" + + // $ANTLR start "RULE_ROUND_CLOSE" + public final void mRULE_ROUND_CLOSE() throws RecognitionException { + try { + int _type = RULE_ROUND_CLOSE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:82:18: ( ')' ) + // InternalEtlLexer.g:82:20: ')' + { + match(')'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ROUND_CLOSE" + + // $ANTLR start "RULE_SQUARE_OPEN" + public final void mRULE_SQUARE_OPEN() throws RecognitionException { + try { + int _type = RULE_SQUARE_OPEN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:84:18: ( '[' ) + // InternalEtlLexer.g:84:20: '[' + { + match('['); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SQUARE_OPEN" + + // $ANTLR start "RULE_SQUARE_CLOSE" + public final void mRULE_SQUARE_CLOSE() throws RecognitionException { + try { + int _type = RULE_SQUARE_CLOSE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:86:19: ( ']' ) + // InternalEtlLexer.g:86:21: ']' + { + match(']'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SQUARE_CLOSE" + + // $ANTLR start "RULE_PLUS" + public final void mRULE_PLUS() throws RecognitionException { + try { + int _type = RULE_PLUS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:88:11: ( '+' ) + // InternalEtlLexer.g:88:13: '+' + { + match('+'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_PLUS" + + // $ANTLR start "RULE_DASH" + public final void mRULE_DASH() throws RecognitionException { + try { + int _type = RULE_DASH; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:90:11: ( '-' ) + // InternalEtlLexer.g:90:13: '-' + { + match('-'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DASH" + + // $ANTLR start "RULE_CARET" + public final void mRULE_CARET() throws RecognitionException { + try { + int _type = RULE_CARET; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:92:12: ( '^' ) + // InternalEtlLexer.g:92:14: '^' + { + match('^'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_CARET" + + // $ANTLR start "RULE_DOT" + public final void mRULE_DOT() throws RecognitionException { + try { + int _type = RULE_DOT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:94:10: ( '.' ) + // InternalEtlLexer.g:94:12: '.' + { + match('.'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DOT" + + // $ANTLR start "RULE_WILDCARD" + public final void mRULE_WILDCARD() throws RecognitionException { + try { + int _type = RULE_WILDCARD; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:96:15: ( '*' ) + // InternalEtlLexer.g:96:17: '*' + { + match('*'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_WILDCARD" + + // $ANTLR start "RULE_EQUAL" + public final void mRULE_EQUAL() throws RecognitionException { + try { + int _type = RULE_EQUAL; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:98:12: ( '=' ) + // InternalEtlLexer.g:98:14: '=' + { + match('='); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_EQUAL" + + // $ANTLR start "RULE_NOT_EQUAL" + public final void mRULE_NOT_EQUAL() throws RecognitionException { + try { + int _type = RULE_NOT_EQUAL; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:100:16: ( '!=' ) + // InternalEtlLexer.g:100:18: '!=' + { + match("!="); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_NOT_EQUAL" + + // $ANTLR start "RULE_LT" + public final void mRULE_LT() throws RecognitionException { + try { + int _type = RULE_LT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:102:9: ( '<' ) + // InternalEtlLexer.g:102:11: '<' + { + match('<'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_LT" + + // $ANTLR start "RULE_GT" + public final void mRULE_GT() throws RecognitionException { + try { + int _type = RULE_GT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:104:9: ( '>' ) + // InternalEtlLexer.g:104:11: '>' + { + match('>'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_GT" + + // $ANTLR start "RULE_DBL_LT" + public final void mRULE_DBL_LT() throws RecognitionException { + try { + int _type = RULE_DBL_LT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:106:13: ( '<<' ) + // InternalEtlLexer.g:106:15: '<<' + { + match("<<"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DBL_LT" + + // $ANTLR start "RULE_DBL_GT" + public final void mRULE_DBL_GT() throws RecognitionException { + try { + int _type = RULE_DBL_GT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:108:13: ( '>>' ) + // InternalEtlLexer.g:108:15: '>>' + { + match(">>"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DBL_GT" + + // $ANTLR start "RULE_LT_EM" + public final void mRULE_LT_EM() throws RecognitionException { + try { + int _type = RULE_LT_EM; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:110:12: ( '!' ) + // InternalEtlLexer.g:112:14: '>!' + { + match(">!"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_GT_EM" + + // $ANTLR start "RULE_GTE" + public final void mRULE_GTE() throws RecognitionException { + try { + int _type = RULE_GTE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:114:10: ( '>=' ) + // InternalEtlLexer.g:114:12: '>=' + { + match(">="); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_GTE" + + // $ANTLR start "RULE_LTE" + public final void mRULE_LTE() throws RecognitionException { + try { + int _type = RULE_LTE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:116:10: ( '<=' ) + // InternalEtlLexer.g:116:12: '<=' + { + match("<="); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_LTE" + + // $ANTLR start "RULE_HASH" + public final void mRULE_HASH() throws RecognitionException { + try { + int _type = RULE_HASH; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:118:11: ( '#' ) + // InternalEtlLexer.g:118:13: '#' + { + match('#'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_HASH" + + // $ANTLR start "RULE_WS" + public final void mRULE_WS() throws RecognitionException { + try { + int _type = RULE_WS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:120:9: ( ( ' ' | '\\t' | '\\n' | '\\r' ) ) + // InternalEtlLexer.g:120:11: ( ' ' | '\\t' | '\\n' | '\\r' ) + { + if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_WS" + + // $ANTLR start "RULE_ML_COMMENT" + public final void mRULE_ML_COMMENT() throws RecognitionException { + try { + int _type = RULE_ML_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:122:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) + // InternalEtlLexer.g:122:19: '/*' ( options {greedy=false; } : . )* '*/' + { + match("/*"); + + // InternalEtlLexer.g:122:24: ( options {greedy=false; } : . )* + loop4: + do { + int alt4=2; + int LA4_0 = input.LA(1); + + if ( (LA4_0=='*') ) { + int LA4_1 = input.LA(2); + + if ( (LA4_1=='/') ) { + alt4=2; + } + else if ( ((LA4_1>='\u0000' && LA4_1<='.')||(LA4_1>='0' && LA4_1<='\uFFFF')) ) { + alt4=1; + } + + + } + else if ( ((LA4_0>='\u0000' && LA4_0<=')')||(LA4_0>='+' && LA4_0<='\uFFFF')) ) { + alt4=1; + } + + + switch (alt4) { + case 1 : + // InternalEtlLexer.g:122:52: . + { + matchAny(); + + } + break; + + default : + break loop4; + } + } while (true); + + match("*/"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ML_COMMENT" + + // $ANTLR start "RULE_SL_COMMENT" + public final void mRULE_SL_COMMENT() throws RecognitionException { + try { + int _type = RULE_SL_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:124:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) + // InternalEtlLexer.g:124:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? + { + match("//"); + + // InternalEtlLexer.g:124:24: (~ ( ( '\\n' | '\\r' ) ) )* + loop5: + do { + int alt5=2; + int LA5_0 = input.LA(1); + + if ( ((LA5_0>='\u0000' && LA5_0<='\t')||(LA5_0>='\u000B' && LA5_0<='\f')||(LA5_0>='\u000E' && LA5_0<='\uFFFF')) ) { + alt5=1; + } + + + switch (alt5) { + case 1 : + // InternalEtlLexer.g:124:24: ~ ( ( '\\n' | '\\r' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop5; + } + } while (true); + + // InternalEtlLexer.g:124:40: ( ( '\\r' )? '\\n' )? + int alt7=2; + int LA7_0 = input.LA(1); + + if ( (LA7_0=='\n'||LA7_0=='\r') ) { + alt7=1; + } + switch (alt7) { + case 1 : + // InternalEtlLexer.g:124:41: ( '\\r' )? '\\n' + { + // InternalEtlLexer.g:124:41: ( '\\r' )? + int alt6=2; + int LA6_0 = input.LA(1); + + if ( (LA6_0=='\r') ) { + alt6=1; + } + switch (alt6) { + case 1 : + // InternalEtlLexer.g:124:41: '\\r' + { + match('\r'); + + } + break; + + } + + match('\n'); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SL_COMMENT" + + // $ANTLR start "RULE_STRING" + public final void mRULE_STRING() throws RecognitionException { + try { + int _type = RULE_STRING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalEtlLexer.g:126:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) + // InternalEtlLexer.g:126:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + { + // InternalEtlLexer.g:126:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + int alt10=2; + int LA10_0 = input.LA(1); + + if ( (LA10_0=='\"') ) { + alt10=1; + } + else if ( (LA10_0=='\'') ) { + alt10=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 10, 0, input); + + throw nvae; + } + switch (alt10) { + case 1 : + // InternalEtlLexer.g:126:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' + { + match('\"'); + // InternalEtlLexer.g:126:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* + loop8: + do { + int alt8=3; + int LA8_0 = input.LA(1); + + if ( (LA8_0=='\\') ) { + alt8=1; + } + else if ( ((LA8_0>='\u0000' && LA8_0<='!')||(LA8_0>='#' && LA8_0<='[')||(LA8_0>=']' && LA8_0<='\uFFFF')) ) { + alt8=2; + } + + + switch (alt8) { + case 1 : + // InternalEtlLexer.g:126:21: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalEtlLexer.g:126:28: ~ ( ( '\\\\' | '\"' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop8; + } + } while (true); + + match('\"'); + + } + break; + case 2 : + // InternalEtlLexer.g:126:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' + { + match('\''); + // InternalEtlLexer.g:126:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* + loop9: + do { + int alt9=3; + int LA9_0 = input.LA(1); + + if ( (LA9_0=='\\') ) { + alt9=1; + } + else if ( ((LA9_0>='\u0000' && LA9_0<='&')||(LA9_0>='(' && LA9_0<='[')||(LA9_0>=']' && LA9_0<='\uFFFF')) ) { + alt9=2; + } + + + switch (alt9) { + case 1 : + // InternalEtlLexer.g:126:54: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalEtlLexer.g:126:61: ~ ( ( '\\\\' | '\\'' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop9; + } + } while (true); + + match('\''); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_STRING" + + public void mTokens() throws RecognitionException { + // InternalEtlLexer.g:1:8: ( False | True | RULE_DOUBLE_SQUARE_OPEN | RULE_DOUBLE_SQUARE_CLOSE | RULE_TILDE | RULE_ID | RULE_SCG | RULE_TOK | RULE_STR | RULE_INT | RULE_DEC | RULE_EQUIVALENT_TO | RULE_SUBTYPE_OF | RULE_SLOTNAME_STRING | RULE_TERM_STRING | RULE_REVERSED | RULE_TO | RULE_COMMA | RULE_CONJUNCTION | RULE_DISJUNCTION | RULE_EXCLUSION | RULE_ZERO | RULE_DIGIT_NONZERO | RULE_COLON | RULE_CURLY_OPEN | RULE_CURLY_CLOSE | RULE_ROUND_OPEN | RULE_ROUND_CLOSE | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE | RULE_PLUS | RULE_DASH | RULE_CARET | RULE_DOT | RULE_WILDCARD | RULE_EQUAL | RULE_NOT_EQUAL | RULE_LT | RULE_GT | RULE_DBL_LT | RULE_DBL_GT | RULE_LT_EM | RULE_GT_EM | RULE_GTE | RULE_LTE | RULE_HASH | RULE_WS | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_STRING ) + int alt11=50; + alt11 = dfa11.predict(input); + switch (alt11) { + case 1 : + // InternalEtlLexer.g:1:10: False + { + mFalse(); + + } + break; + case 2 : + // InternalEtlLexer.g:1:16: True + { + mTrue(); + + } + break; + case 3 : + // InternalEtlLexer.g:1:21: RULE_DOUBLE_SQUARE_OPEN + { + mRULE_DOUBLE_SQUARE_OPEN(); + + } + break; + case 4 : + // InternalEtlLexer.g:1:45: RULE_DOUBLE_SQUARE_CLOSE + { + mRULE_DOUBLE_SQUARE_CLOSE(); + + } + break; + case 5 : + // InternalEtlLexer.g:1:70: RULE_TILDE + { + mRULE_TILDE(); + + } + break; + case 6 : + // InternalEtlLexer.g:1:81: RULE_ID + { + mRULE_ID(); + + } + break; + case 7 : + // InternalEtlLexer.g:1:89: RULE_SCG + { + mRULE_SCG(); + + } + break; + case 8 : + // InternalEtlLexer.g:1:98: RULE_TOK + { + mRULE_TOK(); + + } + break; + case 9 : + // InternalEtlLexer.g:1:107: RULE_STR + { + mRULE_STR(); + + } + break; + case 10 : + // InternalEtlLexer.g:1:116: RULE_INT + { + mRULE_INT(); + + } + break; + case 11 : + // InternalEtlLexer.g:1:125: RULE_DEC + { + mRULE_DEC(); + + } + break; + case 12 : + // InternalEtlLexer.g:1:134: RULE_EQUIVALENT_TO + { + mRULE_EQUIVALENT_TO(); + + } + break; + case 13 : + // InternalEtlLexer.g:1:153: RULE_SUBTYPE_OF + { + mRULE_SUBTYPE_OF(); + + } + break; + case 14 : + // InternalEtlLexer.g:1:169: RULE_SLOTNAME_STRING + { + mRULE_SLOTNAME_STRING(); + + } + break; + case 15 : + // InternalEtlLexer.g:1:190: RULE_TERM_STRING + { + mRULE_TERM_STRING(); + + } + break; + case 16 : + // InternalEtlLexer.g:1:207: RULE_REVERSED + { + mRULE_REVERSED(); + + } + break; + case 17 : + // InternalEtlLexer.g:1:221: RULE_TO + { + mRULE_TO(); + + } + break; + case 18 : + // InternalEtlLexer.g:1:229: RULE_COMMA + { + mRULE_COMMA(); + + } + break; + case 19 : + // InternalEtlLexer.g:1:240: RULE_CONJUNCTION + { + mRULE_CONJUNCTION(); + + } + break; + case 20 : + // InternalEtlLexer.g:1:257: RULE_DISJUNCTION + { + mRULE_DISJUNCTION(); + + } + break; + case 21 : + // InternalEtlLexer.g:1:274: RULE_EXCLUSION + { + mRULE_EXCLUSION(); + + } + break; + case 22 : + // InternalEtlLexer.g:1:289: RULE_ZERO + { + mRULE_ZERO(); + + } + break; + case 23 : + // InternalEtlLexer.g:1:299: RULE_DIGIT_NONZERO + { + mRULE_DIGIT_NONZERO(); + + } + break; + case 24 : + // InternalEtlLexer.g:1:318: RULE_COLON + { + mRULE_COLON(); + + } + break; + case 25 : + // InternalEtlLexer.g:1:329: RULE_CURLY_OPEN + { + mRULE_CURLY_OPEN(); + + } + break; + case 26 : + // InternalEtlLexer.g:1:345: RULE_CURLY_CLOSE + { + mRULE_CURLY_CLOSE(); + + } + break; + case 27 : + // InternalEtlLexer.g:1:362: RULE_ROUND_OPEN + { + mRULE_ROUND_OPEN(); + + } + break; + case 28 : + // InternalEtlLexer.g:1:378: RULE_ROUND_CLOSE + { + mRULE_ROUND_CLOSE(); + + } + break; + case 29 : + // InternalEtlLexer.g:1:395: RULE_SQUARE_OPEN + { + mRULE_SQUARE_OPEN(); + + } + break; + case 30 : + // InternalEtlLexer.g:1:412: RULE_SQUARE_CLOSE + { + mRULE_SQUARE_CLOSE(); + + } + break; + case 31 : + // InternalEtlLexer.g:1:430: RULE_PLUS + { + mRULE_PLUS(); + + } + break; + case 32 : + // InternalEtlLexer.g:1:440: RULE_DASH + { + mRULE_DASH(); + + } + break; + case 33 : + // InternalEtlLexer.g:1:450: RULE_CARET + { + mRULE_CARET(); + + } + break; + case 34 : + // InternalEtlLexer.g:1:461: RULE_DOT + { + mRULE_DOT(); + + } + break; + case 35 : + // InternalEtlLexer.g:1:470: RULE_WILDCARD + { + mRULE_WILDCARD(); + + } + break; + case 36 : + // InternalEtlLexer.g:1:484: RULE_EQUAL + { + mRULE_EQUAL(); + + } + break; + case 37 : + // InternalEtlLexer.g:1:495: RULE_NOT_EQUAL + { + mRULE_NOT_EQUAL(); + + } + break; + case 38 : + // InternalEtlLexer.g:1:510: RULE_LT + { + mRULE_LT(); + + } + break; + case 39 : + // InternalEtlLexer.g:1:518: RULE_GT + { + mRULE_GT(); + + } + break; + case 40 : + // InternalEtlLexer.g:1:526: RULE_DBL_LT + { + mRULE_DBL_LT(); + + } + break; + case 41 : + // InternalEtlLexer.g:1:538: RULE_DBL_GT + { + mRULE_DBL_GT(); + + } + break; + case 42 : + // InternalEtlLexer.g:1:550: RULE_LT_EM + { + mRULE_LT_EM(); + + } + break; + case 43 : + // InternalEtlLexer.g:1:561: RULE_GT_EM + { + mRULE_GT_EM(); + + } + break; + case 44 : + // InternalEtlLexer.g:1:572: RULE_GTE + { + mRULE_GTE(); + + } + break; + case 45 : + // InternalEtlLexer.g:1:581: RULE_LTE + { + mRULE_LTE(); + + } + break; + case 46 : + // InternalEtlLexer.g:1:590: RULE_HASH + { + mRULE_HASH(); + + } + break; + case 47 : + // InternalEtlLexer.g:1:600: RULE_WS + { + mRULE_WS(); + + } + break; + case 48 : + // InternalEtlLexer.g:1:608: RULE_ML_COMMENT + { + mRULE_ML_COMMENT(); + + } + break; + case 49 : + // InternalEtlLexer.g:1:624: RULE_SL_COMMENT + { + mRULE_SL_COMMENT(); + + } + break; + case 50 : + // InternalEtlLexer.g:1:640: RULE_STRING + { + mRULE_STRING(); + + } + break; + + } + + } + + + protected DFA11 dfa11 = new DFA11(this); + static final String DFA11_eotS = + "\3\uffff\1\47\1\51\5\uffff\1\57\1\63\3\uffff\1\65\20\uffff\1\71\17\uffff\1\75\15\uffff"; + static final String DFA11_eofS = + "\76\uffff"; + static final String DFA11_minS = + "\1\11\1\uffff\1\122\1\133\1\135\1\uffff\1\144\1\143\2\uffff\1\75\1\41\3\uffff\1\56\20\uffff\1\41\2\uffff\1\52\14\uffff\1\74\15\uffff"; + static final String DFA11_maxS = + "\1\176\1\uffff\1\162\1\133\1\135\1\uffff\1\156\1\164\2\uffff\2\75\3\uffff\1\56\20\uffff\1\76\2\uffff\1\57\14\uffff\1\74\15\uffff"; + static final String DFA11_acceptS = + "\1\uffff\1\1\3\uffff\1\5\2\uffff\1\2\1\13\2\uffff\1\16\1\17\1\20\1\uffff\1\22\1\23\1\24\1\25\1\26\1\27\1\30\1\31\1\32\1\33\1\34\1\37\1\40\1\41\1\43\1\45\1\uffff\1\56\1\57\1\uffff\1\62\1\10\1\3\1\35\1\4\1\36\1\6\1\12\1\7\1\11\1\14\1\44\1\uffff\1\52\1\55\1\46\1\21\1\42\1\51\1\53\1\54\1\47\1\60\1\61\1\15\1\50"; + static final String DFA11_specialS = + "\76\uffff}>"; + static final String[] DFA11_transitionS = DFA11_transitionS_.DFA11_transitionS; + private static final class DFA11_transitionS_ { + static final String[] DFA11_transitionS = { + "\2\42\2\uffff\1\42\22\uffff\1\42\1\37\1\44\1\41\3\uffff\1\44\1\31\1\32\1\36\1\33\1\20\1\34\1\17\1\43\1\24\11\25\1\26\1\uffff\1\13\1\12\1\40\1\uffff\1\14\1\21\4\uffff\1\1\6\uffff\1\23\1\uffff\1\22\2\uffff\1\16\1\uffff\1\10\6\uffff\1\3\1\uffff\1\4\1\35\2\uffff\1\21\2\uffff\1\11\1\uffff\1\1\2\uffff\1\6\3\uffff\1\23\1\uffff\1\22\3\uffff\1\7\1\2\6\uffff\1\27\1\15\1\30\1\5", + "", + "\1\10\34\uffff\1\45\2\uffff\1\10", + "\1\46", + "\1\50", + "", + "\1\52\11\uffff\1\53", + "\1\54\20\uffff\1\55", + "", + "", + "\1\56", + "\1\61\32\uffff\1\60\1\62", + "", + "", + "", + "\1\64", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\1\67\33\uffff\1\70\1\66", + "", + "", + "\1\72\4\uffff\1\73", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\1\74", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + }; + } + + static final short[] DFA11_eot = DFA.unpackEncodedString(DFA11_eotS); + static final short[] DFA11_eof = DFA.unpackEncodedString(DFA11_eofS); + static final char[] DFA11_min = DFA.unpackEncodedStringToUnsignedChars(DFA11_minS); + static final char[] DFA11_max = DFA.unpackEncodedStringToUnsignedChars(DFA11_maxS); + static final short[] DFA11_accept = DFA.unpackEncodedString(DFA11_acceptS); + static final short[] DFA11_special = DFA.unpackEncodedString(DFA11_specialS); + static final short[][] DFA11_transition; + + static { + int numStates = DFA11_transitionS.length; + DFA11_transition = new short[numStates][]; + for (int i=0; i parameters = context.getEnabledBooleanParameters(); + if (epackage == EclPackage.eINSTANCE) + switch (semanticObject.eClass().getClassifierID()) { + case EclPackage.ANCESTOR_OF: + sequence_AncestorOf(context, (AncestorOf) semanticObject); + return; + case EclPackage.ANCESTOR_OR_SELF_OF: + sequence_AncestorOrSelfOf(context, (AncestorOrSelfOf) semanticObject); + return; + case EclPackage.AND_EXPRESSION_CONSTRAINT: + sequence_AndExpressionConstraint(context, (AndExpressionConstraint) semanticObject); + return; + case EclPackage.AND_REFINEMENT: + if (rule == grammarAccess.getEclAttributeSetRule() + || rule == grammarAccess.getOrAttributeSetRule() + || action == grammarAccess.getOrAttributeSetAccess().getOrRefinementLeftAction_1_0() + || rule == grammarAccess.getAndAttributeSetRule() + || action == grammarAccess.getAndAttributeSetAccess().getAndRefinementLeftAction_1_0()) { + sequence_AndAttributeSet(context, (AndRefinement) semanticObject); + return; + } + else if (rule == grammarAccess.getEclRefinementRule() + || rule == grammarAccess.getOrRefinementRule() + || action == grammarAccess.getOrRefinementAccess().getOrRefinementLeftAction_1_0_0() + || rule == grammarAccess.getAndRefinementRule() + || action == grammarAccess.getAndRefinementAccess().getAndRefinementLeftAction_1_0_0()) { + sequence_AndRefinement(context, (AndRefinement) semanticObject); + return; + } + else break; + case EclPackage.ANY: + sequence_Any(context, (Any) semanticObject); + return; + case EclPackage.ATTRIBUTE_CONSTRAINT: + sequence_AttributeConstraint(context, (AttributeConstraint) semanticObject); + return; + case EclPackage.ATTRIBUTE_VALUE_EQUALS: + sequence_AttributeValueEquals(context, (AttributeValueEquals) semanticObject); + return; + case EclPackage.ATTRIBUTE_VALUE_NOT_EQUALS: + sequence_AttributeValueNotEquals(context, (AttributeValueNotEquals) semanticObject); + return; + case EclPackage.BOOLEAN_VALUE_EQUALS: + sequence_BooleanValueEquals(context, (BooleanValueEquals) semanticObject); + return; + case EclPackage.BOOLEAN_VALUE_NOT_EQUALS: + sequence_BooleanValueNotEquals(context, (BooleanValueNotEquals) semanticObject); + return; + case EclPackage.CARDINALITY: + sequence_Cardinality(context, (Cardinality) semanticObject); + return; + case EclPackage.CHILD_OF: + sequence_ChildOf(context, (ChildOf) semanticObject); + return; + case EclPackage.DECIMAL_VALUE_EQUALS: + sequence_DecimalValueEquals(context, (DecimalValueEquals) semanticObject); + return; + case EclPackage.DECIMAL_VALUE_GREATER_THAN: + sequence_DecimalValueGreaterThan(context, (DecimalValueGreaterThan) semanticObject); + return; + case EclPackage.DECIMAL_VALUE_GREATER_THAN_EQUALS: + sequence_DecimalValueGreaterThanEquals(context, (DecimalValueGreaterThanEquals) semanticObject); + return; + case EclPackage.DECIMAL_VALUE_LESS_THAN: + sequence_DecimalValueLessThan(context, (DecimalValueLessThan) semanticObject); + return; + case EclPackage.DECIMAL_VALUE_LESS_THAN_EQUALS: + sequence_DecimalValueLessThanEquals(context, (DecimalValueLessThanEquals) semanticObject); + return; + case EclPackage.DECIMAL_VALUE_NOT_EQUALS: + sequence_DecimalValueNotEquals(context, (DecimalValueNotEquals) semanticObject); + return; + case EclPackage.DESCENDANT_OF: + sequence_DescendantOf(context, (DescendantOf) semanticObject); + return; + case EclPackage.DESCENDANT_OR_SELF_OF: + sequence_DescendantOrSelfOf(context, (DescendantOrSelfOf) semanticObject); + return; + case EclPackage.DOTTED_EXPRESSION_CONSTRAINT: + sequence_DottedExpressionConstraint(context, (DottedExpressionConstraint) semanticObject); + return; + case EclPackage.ECL_ATTRIBUTE_GROUP: + sequence_EclAttributeGroup(context, (EclAttributeGroup) semanticObject); + return; + case EclPackage.ECL_CONCEPT_REFERENCE: + sequence_EclConceptReference(context, (EclConceptReference) semanticObject); + return; + case EclPackage.EXCLUSION_EXPRESSION_CONSTRAINT: + sequence_ExclusionExpressionConstraint(context, (ExclusionExpressionConstraint) semanticObject); + return; + case EclPackage.INTEGER_VALUE_EQUALS: + sequence_IntegerValueEquals(context, (IntegerValueEquals) semanticObject); + return; + case EclPackage.INTEGER_VALUE_GREATER_THAN: + sequence_IntegerValueGreaterThan(context, (IntegerValueGreaterThan) semanticObject); + return; + case EclPackage.INTEGER_VALUE_GREATER_THAN_EQUALS: + sequence_IntegerValueGreaterThanEquals(context, (IntegerValueGreaterThanEquals) semanticObject); + return; + case EclPackage.INTEGER_VALUE_LESS_THAN: + sequence_IntegerValueLessThan(context, (IntegerValueLessThan) semanticObject); + return; + case EclPackage.INTEGER_VALUE_LESS_THAN_EQUALS: + sequence_IntegerValueLessThanEquals(context, (IntegerValueLessThanEquals) semanticObject); + return; + case EclPackage.INTEGER_VALUE_NOT_EQUALS: + sequence_IntegerValueNotEquals(context, (IntegerValueNotEquals) semanticObject); + return; + case EclPackage.MEMBER_OF: + sequence_MemberOf(context, (MemberOf) semanticObject); + return; + case EclPackage.NESTED_EXPRESSION: + sequence_NestedExpression(context, (NestedExpression) semanticObject); + return; + case EclPackage.NESTED_REFINEMENT: + if (rule == grammarAccess.getEclAttributeSetRule() + || rule == grammarAccess.getOrAttributeSetRule() + || action == grammarAccess.getOrAttributeSetAccess().getOrRefinementLeftAction_1_0() + || rule == grammarAccess.getAndAttributeSetRule() + || action == grammarAccess.getAndAttributeSetAccess().getAndRefinementLeftAction_1_0() + || rule == grammarAccess.getSubAttributeSetRule() + || rule == grammarAccess.getNestedAttributeSetRule()) { + sequence_NestedAttributeSet(context, (NestedRefinement) semanticObject); + return; + } + else if (rule == grammarAccess.getEclRefinementRule() + || rule == grammarAccess.getOrRefinementRule() + || action == grammarAccess.getOrRefinementAccess().getOrRefinementLeftAction_1_0_0() + || rule == grammarAccess.getAndRefinementRule() + || action == grammarAccess.getAndRefinementAccess().getAndRefinementLeftAction_1_0_0() + || rule == grammarAccess.getSubRefinementRule() + || rule == grammarAccess.getNestedRefinementRule()) { + sequence_NestedRefinement(context, (NestedRefinement) semanticObject); + return; + } + else break; + case EclPackage.OR_EXPRESSION_CONSTRAINT: + sequence_OrExpressionConstraint(context, (OrExpressionConstraint) semanticObject); + return; + case EclPackage.OR_REFINEMENT: + if (rule == grammarAccess.getEclAttributeSetRule() + || rule == grammarAccess.getOrAttributeSetRule() + || action == grammarAccess.getOrAttributeSetAccess().getOrRefinementLeftAction_1_0()) { + sequence_OrAttributeSet(context, (OrRefinement) semanticObject); + return; + } + else if (rule == grammarAccess.getEclRefinementRule() + || rule == grammarAccess.getOrRefinementRule() + || action == grammarAccess.getOrRefinementAccess().getOrRefinementLeftAction_1_0_0()) { + sequence_OrRefinement(context, (OrRefinement) semanticObject); + return; + } + else break; + case EclPackage.PARENT_OF: + sequence_ParentOf(context, (ParentOf) semanticObject); + return; + case EclPackage.REFINED_EXPRESSION_CONSTRAINT: + sequence_RefinedExpressionConstraint(context, (RefinedExpressionConstraint) semanticObject); + return; + case EclPackage.SCRIPT: + sequence_Script(context, (Script) semanticObject); + return; + case EclPackage.STRING_VALUE_EQUALS: + sequence_StringValueEquals(context, (StringValueEquals) semanticObject); + return; + case EclPackage.STRING_VALUE_NOT_EQUALS: + sequence_StringValueNotEquals(context, (StringValueNotEquals) semanticObject); + return; + } + else if (epackage == EtlPackage.eINSTANCE) + switch (semanticObject.eClass().getClassifierID()) { + case EtlPackage.ATTRIBUTE: + sequence_Attribute(context, (Attribute) semanticObject); + return; + case EtlPackage.ATTRIBUTE_GROUP: + sequence_AttributeGroup(context, (AttributeGroup) semanticObject); + return; + case EtlPackage.CONCEPT_ID_REPLACEMENT_SLOT: + sequence_ConceptIdReplacementSlot(context, (ConceptIdReplacementSlot) semanticObject); + return; + case EtlPackage.CONCEPT_REFERENCE: + sequence_ConceptReference(context, (ConceptReference) semanticObject); + return; + case EtlPackage.DECIMAL_REPLACEMENT_SLOT: + sequence_DecimalReplacementSlot(context, (DecimalReplacementSlot) semanticObject); + return; + case EtlPackage.DECIMAL_VALUE: + sequence_DecimalValue(context, (DecimalValue) semanticObject); + return; + case EtlPackage.ETL_CARDINALITY: + sequence_EtlCardinality(context, (EtlCardinality) semanticObject); + return; + case EtlPackage.EXPRESSION_REPLACEMENT_SLOT: + sequence_ExpressionReplacementSlot(context, (ExpressionReplacementSlot) semanticObject); + return; + case EtlPackage.EXPRESSION_TEMPLATE: + sequence_ExpressionTemplate(context, (ExpressionTemplate) semanticObject); + return; + case EtlPackage.FOCUS_CONCEPT: + sequence_FocusConcept(context, (FocusConcept) semanticObject); + return; + case EtlPackage.INTEGER_REPLACEMENT_SLOT: + sequence_IntegerReplacementSlot(context, (IntegerReplacementSlot) semanticObject); + return; + case EtlPackage.INTEGER_VALUE: + sequence_IntegerValue(context, (IntegerValue) semanticObject); + return; + case EtlPackage.REFINEMENT: + sequence_Refinement(context, (Refinement) semanticObject); + return; + case EtlPackage.SLOT_DECIMAL_MAXIMUM_VALUE: + sequence_SlotDecimalMaximumValue(context, (SlotDecimalMaximumValue) semanticObject); + return; + case EtlPackage.SLOT_DECIMAL_MINIMUM_VALUE: + sequence_SlotDecimalMinimumValue(context, (SlotDecimalMinimumValue) semanticObject); + return; + case EtlPackage.SLOT_DECIMAL_RANGE: + sequence_SlotDecimalRange(context, (SlotDecimalRange) semanticObject); + return; + case EtlPackage.SLOT_DECIMAL_VALUE: + sequence_SlotDecimalValue(context, (SlotDecimalValue) semanticObject); + return; + case EtlPackage.SLOT_INTEGER_MAXIMUM_VALUE: + sequence_SlotIntegerMaximumValue(context, (SlotIntegerMaximumValue) semanticObject); + return; + case EtlPackage.SLOT_INTEGER_MINIMUM_VALUE: + sequence_SlotIntegerMinimumValue(context, (SlotIntegerMinimumValue) semanticObject); + return; + case EtlPackage.SLOT_INTEGER_RANGE: + sequence_SlotIntegerRange(context, (SlotIntegerRange) semanticObject); + return; + case EtlPackage.SLOT_INTEGER_VALUE: + sequence_SlotIntegerValue(context, (SlotIntegerValue) semanticObject); + return; + case EtlPackage.STRING_REPLACEMENT_SLOT: + sequence_StringReplacementSlot(context, (StringReplacementSlot) semanticObject); + return; + case EtlPackage.STRING_VALUE: + sequence_StringValue(context, (StringValue) semanticObject); + return; + case EtlPackage.SUB_EXPRESSION: + sequence_SubExpression(context, (SubExpression) semanticObject); + return; + case EtlPackage.TEMPLATE_INFORMATION_SLOT: + sequence_TemplateInformationSlot(context, (TemplateInformationSlot) semanticObject); + return; + case EtlPackage.TOKEN_REPLACEMENT_SLOT: + sequence_TokenReplacementSlot(context, (TokenReplacementSlot) semanticObject); + return; + } + if (errorAcceptor != null) + errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context)); + } + + /** + * Contexts: + * AttributeGroup returns AttributeGroup + * + * Constraint: + * (slot=TemplateInformationSlot? attributes+=Attribute attributes+=Attribute*) + */ + protected void sequence_AttributeGroup(ISerializationContext context, AttributeGroup semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * Attribute returns Attribute + * + * Constraint: + * (slot=TemplateInformationSlot? name=ConceptReference value=AttributeValue) + */ + protected void sequence_Attribute(ISerializationContext context, Attribute semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * ConceptIdReplacementSlot returns ConceptIdReplacementSlot + * ConceptReplacementSlot returns ConceptIdReplacementSlot + * + * Constraint: + * (constraint=ExpressionConstraint? name=SLOTNAME_STRING?) + */ + protected void sequence_ConceptIdReplacementSlot(ISerializationContext context, ConceptIdReplacementSlot semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * AttributeValue returns ConceptReference + * ConceptReference returns ConceptReference + * + * Constraint: + * (slot=ConceptReplacementSlot | (id=SnomedIdentifier term=TERM_STRING?)) + */ + protected void sequence_ConceptReference(ISerializationContext context, ConceptReference semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * AttributeValue returns DecimalReplacementSlot + * ConcreteValueReplacementSlot returns DecimalReplacementSlot + * DecimalReplacementSlot returns DecimalReplacementSlot + * + * Constraint: + * ((values+=SlotDecimal values+=SlotDecimal*)? name=SLOTNAME_STRING?) + */ + protected void sequence_DecimalReplacementSlot(ISerializationContext context, DecimalReplacementSlot semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * AttributeValue returns DecimalValue + * DecimalValue returns DecimalValue + * + * Constraint: + * value=Decimal + */ + protected void sequence_DecimalValue(ISerializationContext context, DecimalValue semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, EtlPackage.Literals.DECIMAL_VALUE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EtlPackage.Literals.DECIMAL_VALUE__VALUE)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getDecimalValueAccess().getValueDecimalParserRuleCall_1_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Contexts: + * EtlCardinality returns EtlCardinality + * + * Constraint: + * (min=NonNegativeInteger max=MaxValue) + */ + protected void sequence_EtlCardinality(ISerializationContext context, EtlCardinality semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, EtlPackage.Literals.ETL_CARDINALITY__MIN) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EtlPackage.Literals.ETL_CARDINALITY__MIN)); + if (transientValues.isValueTransient(semanticObject, EtlPackage.Literals.ETL_CARDINALITY__MAX) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EtlPackage.Literals.ETL_CARDINALITY__MAX)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getEtlCardinalityAccess().getMinNonNegativeIntegerParserRuleCall_1_0(), semanticObject.getMin()); + feeder.accept(grammarAccess.getEtlCardinalityAccess().getMaxMaxValueParserRuleCall_3_0(), semanticObject.getMax()); + feeder.finish(); + } + + + /** + * Contexts: + * ExpressionReplacementSlot returns ExpressionReplacementSlot + * ConceptReplacementSlot returns ExpressionReplacementSlot + * + * Constraint: + * (constraint=ExpressionConstraint? name=SLOTNAME_STRING?) + */ + protected void sequence_ExpressionReplacementSlot(ISerializationContext context, ExpressionReplacementSlot semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * ExpressionTemplate returns ExpressionTemplate + * + * Constraint: + * ((primitive?=SUBTYPE_OF | slot=TokenReplacementSlot)? expression=SubExpression)? + */ + protected void sequence_ExpressionTemplate(ISerializationContext context, ExpressionTemplate semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * FocusConcept returns FocusConcept + * + * Constraint: + * (slot=TemplateInformationSlot? concept=ConceptReference) + */ + protected void sequence_FocusConcept(ISerializationContext context, FocusConcept semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * AttributeValue returns IntegerReplacementSlot + * ConcreteValueReplacementSlot returns IntegerReplacementSlot + * IntegerReplacementSlot returns IntegerReplacementSlot + * + * Constraint: + * ((values+=SlotInteger values+=SlotInteger*)? name=SLOTNAME_STRING?) + */ + protected void sequence_IntegerReplacementSlot(ISerializationContext context, IntegerReplacementSlot semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * AttributeValue returns IntegerValue + * IntegerValue returns IntegerValue + * + * Constraint: + * value=Integer + */ + protected void sequence_IntegerValue(ISerializationContext context, IntegerValue semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, EtlPackage.Literals.INTEGER_VALUE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EtlPackage.Literals.INTEGER_VALUE__VALUE)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getIntegerValueAccess().getValueIntegerParserRuleCall_1_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Contexts: + * Refinement returns Refinement + * + * Constraint: + * (((attributes+=Attribute attributes+=Attribute*) | groups+=AttributeGroup) groups+=AttributeGroup*) + */ + protected void sequence_Refinement(ISerializationContext context, Refinement semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * SlotDecimalMaximumValue returns SlotDecimalMaximumValue + * + * Constraint: + * (exclusive?=LT? value=NonNegativeDecimal) + */ + protected void sequence_SlotDecimalMaximumValue(ISerializationContext context, SlotDecimalMaximumValue semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * SlotDecimalMinimumValue returns SlotDecimalMinimumValue + * + * Constraint: + * (exclusive?=GT? value=NonNegativeDecimal) + */ + protected void sequence_SlotDecimalMinimumValue(ISerializationContext context, SlotDecimalMinimumValue semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * SlotDecimal returns SlotDecimalRange + * SlotDecimalRange returns SlotDecimalRange + * + * Constraint: + * ((minimum=SlotDecimalMinimumValue maximum=SlotDecimalMaximumValue?) | maximum=SlotDecimalMaximumValue) + */ + protected void sequence_SlotDecimalRange(ISerializationContext context, SlotDecimalRange semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * SlotDecimal returns SlotDecimalValue + * SlotDecimalValue returns SlotDecimalValue + * + * Constraint: + * value=NonNegativeDecimal + */ + protected void sequence_SlotDecimalValue(ISerializationContext context, SlotDecimalValue semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, EtlPackage.Literals.SLOT_DECIMAL_VALUE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EtlPackage.Literals.SLOT_DECIMAL_VALUE__VALUE)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getSlotDecimalValueAccess().getValueNonNegativeDecimalParserRuleCall_1_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Contexts: + * SlotIntegerMaximumValue returns SlotIntegerMaximumValue + * + * Constraint: + * (exclusive?=LT? value=NonNegativeInteger) + */ + protected void sequence_SlotIntegerMaximumValue(ISerializationContext context, SlotIntegerMaximumValue semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * SlotIntegerMinimumValue returns SlotIntegerMinimumValue + * + * Constraint: + * (exclusive?=GT? value=NonNegativeInteger) + */ + protected void sequence_SlotIntegerMinimumValue(ISerializationContext context, SlotIntegerMinimumValue semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * SlotInteger returns SlotIntegerRange + * SlotIntegerRange returns SlotIntegerRange + * + * Constraint: + * ((minimum=SlotIntegerMinimumValue maximum=SlotIntegerMaximumValue?) | maximum=SlotIntegerMaximumValue) + */ + protected void sequence_SlotIntegerRange(ISerializationContext context, SlotIntegerRange semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * SlotInteger returns SlotIntegerValue + * SlotIntegerValue returns SlotIntegerValue + * + * Constraint: + * value=NonNegativeInteger + */ + protected void sequence_SlotIntegerValue(ISerializationContext context, SlotIntegerValue semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, EtlPackage.Literals.SLOT_INTEGER_VALUE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EtlPackage.Literals.SLOT_INTEGER_VALUE__VALUE)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getSlotIntegerValueAccess().getValueNonNegativeIntegerParserRuleCall_1_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Contexts: + * AttributeValue returns StringReplacementSlot + * ConcreteValueReplacementSlot returns StringReplacementSlot + * StringReplacementSlot returns StringReplacementSlot + * + * Constraint: + * ((values+=STRING values+=STRING*)? name=SLOTNAME_STRING?) + */ + protected void sequence_StringReplacementSlot(ISerializationContext context, StringReplacementSlot semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * AttributeValue returns StringValue + * StringValue returns StringValue + * + * Constraint: + * value=STRING + */ + protected void sequence_StringValue(ISerializationContext context, StringValue semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, EtlPackage.Literals.STRING_VALUE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, EtlPackage.Literals.STRING_VALUE__VALUE)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getStringValueAccess().getValueSTRINGTerminalRuleCall_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Contexts: + * SubExpression returns SubExpression + * AttributeValue returns SubExpression + * + * Constraint: + * (focusConcepts+=FocusConcept focusConcepts+=FocusConcept* refinement=Refinement?) + */ + protected void sequence_SubExpression(ISerializationContext context, SubExpression semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * TemplateInformationSlot returns TemplateInformationSlot + * + * Constraint: + * (cardinality=EtlCardinality? name=SLOTNAME_STRING?) + */ + protected void sequence_TemplateInformationSlot(ISerializationContext context, TemplateInformationSlot semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * TokenReplacementSlot returns TokenReplacementSlot + * + * Constraint: + * ((tokens+=SlotToken tokens+=SlotToken*)? name=SLOTNAME_STRING?) + */ + protected void sequence_TokenReplacementSlot(ISerializationContext context, TokenReplacementSlot semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + +} diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/serializer/EtlSyntacticSequencer.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/serializer/EtlSyntacticSequencer.java new file mode 100644 index 00000000000..4c021d0609c --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/serializer/EtlSyntacticSequencer.java @@ -0,0 +1,633 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.serializer; + +import com.b2international.snowowl.snomed.etl.services.EtlGrammarAccess; +import com.google.inject.Inject; +import java.util.List; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.IGrammarAccess; +import org.eclipse.xtext.RuleCall; +import org.eclipse.xtext.nodemodel.INode; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.AlternativeAlias; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias; +import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable; +import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; +import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; + +@SuppressWarnings("all") +public class EtlSyntacticSequencer extends AbstractSyntacticSequencer { + + protected EtlGrammarAccess grammarAccess; + protected AbstractElementAlias match_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0; + protected AbstractElementAlias match_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0; + protected AbstractElementAlias match_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0; + protected AbstractElementAlias match_EtlCardinality_TILDETerminalRuleCall_0_q; + protected AbstractElementAlias match_ExpressionReplacementSlot_SCGTerminalRuleCall_3_q; + protected AbstractElementAlias match_ExpressionTemplate_EQUIVALENT_TOTerminalRuleCall_1_0_0_1_q; + protected AbstractElementAlias match_Refinement_COMMATerminalRuleCall_1_0_q; + + @Inject + protected void init(IGrammarAccess access) { + grammarAccess = (EtlGrammarAccess) access; + match_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndAttributeSetAccess().getCOMMATerminalRuleCall_1_1_1()), new TokenAlias(false, false, grammarAccess.getAndAttributeSetAccess().getCONJUNCTIONTerminalRuleCall_1_1_0())); + match_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndExpressionConstraintAccess().getCOMMATerminalRuleCall_1_1_1()), new TokenAlias(false, false, grammarAccess.getAndExpressionConstraintAccess().getCONJUNCTIONTerminalRuleCall_1_1_0())); + match_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndRefinementAccess().getCOMMATerminalRuleCall_1_0_1_1()), new TokenAlias(false, false, grammarAccess.getAndRefinementAccess().getCONJUNCTIONTerminalRuleCall_1_0_1_0())); + match_EtlCardinality_TILDETerminalRuleCall_0_q = new TokenAlias(false, true, grammarAccess.getEtlCardinalityAccess().getTILDETerminalRuleCall_0()); + match_ExpressionReplacementSlot_SCGTerminalRuleCall_3_q = new TokenAlias(false, true, grammarAccess.getExpressionReplacementSlotAccess().getSCGTerminalRuleCall_3()); + match_ExpressionTemplate_EQUIVALENT_TOTerminalRuleCall_1_0_0_1_q = new TokenAlias(false, true, grammarAccess.getExpressionTemplateAccess().getEQUIVALENT_TOTerminalRuleCall_1_0_0_1()); + match_Refinement_COMMATerminalRuleCall_1_0_q = new TokenAlias(false, true, grammarAccess.getRefinementAccess().getCOMMATerminalRuleCall_1_0()); + } + + @Override + protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (ruleCall.getRule() == grammarAccess.getCARETRule()) + return getCARETToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getCOLONRule()) + return getCOLONToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getCOMMARule()) + return getCOMMAToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getCONJUNCTIONRule()) + return getCONJUNCTIONToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getCURLY_CLOSERule()) + return getCURLY_CLOSEToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getCURLY_OPENRule()) + return getCURLY_OPENToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getDBL_GTRule()) + return getDBL_GTToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getDBL_LTRule()) + return getDBL_LTToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getDECRule()) + return getDECToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getDISJUNCTIONRule()) + return getDISJUNCTIONToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getDOTRule()) + return getDOTToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getDOUBLE_SQUARE_CLOSERule()) + return getDOUBLE_SQUARE_CLOSEToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getDOUBLE_SQUARE_OPENRule()) + return getDOUBLE_SQUARE_OPENToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getEQUALRule()) + return getEQUALToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getEQUIVALENT_TORule()) + return getEQUIVALENT_TOToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getEXCLUSIONRule()) + return getEXCLUSIONToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getGTRule()) + return getGTToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getGTERule()) + return getGTEToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getGT_EMRule()) + return getGT_EMToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getHASHRule()) + return getHASHToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getIDRule()) + return getIDToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getINTRule()) + return getINTToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getLTRule()) + return getLTToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getLTERule()) + return getLTEToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getLT_EMRule()) + return getLT_EMToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getNOT_EQUALRule()) + return getNOT_EQUALToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getPLUSRule()) + return getPLUSToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getREVERSEDRule()) + return getREVERSEDToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getROUND_CLOSERule()) + return getROUND_CLOSEToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getROUND_OPENRule()) + return getROUND_OPENToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getSCGRule()) + return getSCGToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getSQUARE_CLOSERule()) + return getSQUARE_CLOSEToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getSQUARE_OPENRule()) + return getSQUARE_OPENToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getSTRRule()) + return getSTRToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getSUBTYPE_OFRule()) + return getSUBTYPE_OFToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getTILDERule()) + return getTILDEToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getTORule()) + return getTOToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getTOKRule()) + return getTOKToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getWILDCARDRule()) + return getWILDCARDToken(semanticObject, ruleCall, node); + return ""; + } + + /** + * terminal CARET: + * '^'; + */ + protected String getCARETToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "^"; + } + + /** + * terminal COLON: + * ':'; + */ + protected String getCOLONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return ":"; + } + + /** + * terminal COMMA: + * ','; + */ + protected String getCOMMAToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return ","; + } + + /** + * terminal CONJUNCTION: + * ('a' | 'A') ('n' | 'N') ('d' | 'D'); + */ + protected String getCONJUNCTIONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "and"; + } + + /** + * terminal CURLY_CLOSE: + * '}'; + */ + protected String getCURLY_CLOSEToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "}"; + } + + /** + * terminal CURLY_OPEN: + * '{'; + */ + protected String getCURLY_OPENToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "{"; + } + + /** + * terminal DBL_GT: + * '>>'; + */ + protected String getDBL_GTToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return ">>"; + } + + /** + * terminal DBL_LT: + * '<<'; + */ + protected String getDBL_LTToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "<<"; + } + + /** + * terminal DEC: + * 'dec'; + */ + protected String getDECToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "dec"; + } + + /** + * terminal DISJUNCTION: + * ('o' | 'O') ('r' | 'R'); + */ + protected String getDISJUNCTIONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "or"; + } + + /** + * terminal DOT: + * '.'; + */ + protected String getDOTToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "."; + } + + /** + * terminal DOUBLE_SQUARE_CLOSE: + * ']]'; + */ + protected String getDOUBLE_SQUARE_CLOSEToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "]]"; + } + + /** + * terminal DOUBLE_SQUARE_OPEN: + * '[['; + */ + protected String getDOUBLE_SQUARE_OPENToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "[["; + } + + /** + * terminal EQUAL: + * '='; + */ + protected String getEQUALToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "="; + } + + /** + * terminal EQUIVALENT_TO: + * '==='; + */ + protected String getEQUIVALENT_TOToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "==="; + } + + /** + * terminal EXCLUSION: + * ('m' | 'M') ('i' | 'I') ('n' | 'N') ('u' | 'U') ('s' | 'S'); + */ + protected String getEXCLUSIONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "minus"; + } + + /** + * terminal GT: + * '>'; + */ + protected String getGTToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return ">"; + } + + /** + * terminal GTE: + * '>='; + */ + protected String getGTEToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return ">="; + } + + /** + * terminal GT_EM: + * '>!'; + */ + protected String getGT_EMToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return ">!"; + } + + /** + * terminal HASH: + * '#'; + */ + protected String getHASHToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "#"; + } + + /** + * terminal ID: + * 'id'; + */ + protected String getIDToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "id"; + } + + /** + * terminal INT: + * 'int'; + */ + protected String getINTToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "int"; + } + + /** + * terminal LT: + * '<'; + */ + protected String getLTToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "<"; + } + + /** + * terminal LTE: + * '<='; + */ + protected String getLTEToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "<="; + } + + /** + * terminal LT_EM: + * ' transitionNodes = collectNodes(fromNode, toNode); + for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { + List syntaxNodes = getNodesFor(transitionNodes, syntax); + if (match_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0.equals(syntax)) + emit_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0.equals(syntax)) + emit_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0.equals(syntax)) + emit_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_EtlCardinality_TILDETerminalRuleCall_0_q.equals(syntax)) + emit_EtlCardinality_TILDETerminalRuleCall_0_q(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_ExpressionReplacementSlot_SCGTerminalRuleCall_3_q.equals(syntax)) + emit_ExpressionReplacementSlot_SCGTerminalRuleCall_3_q(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_ExpressionTemplate_EQUIVALENT_TOTerminalRuleCall_1_0_0_1_q.equals(syntax)) + emit_ExpressionTemplate_EQUIVALENT_TOTerminalRuleCall_1_0_0_1_q(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_Refinement_COMMATerminalRuleCall_1_0_q.equals(syntax)) + emit_Refinement_COMMATerminalRuleCall_1_0_q(semanticObject, getLastNavigableState(), syntaxNodes); + else acceptNodes(getLastNavigableState(), syntaxNodes); + } + } + + /** + * Ambiguous syntax: + * CONJUNCTION | COMMA + * + * This ambiguous syntax occurs at: + * {AndRefinement.left=} (ambiguity) right=SubAttributeSet + */ + protected void emit_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * CONJUNCTION | COMMA + * + * This ambiguous syntax occurs at: + * {AndExpressionConstraint.left=} (ambiguity) right=ExclusionExpressionConstraint + */ + protected void emit_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * CONJUNCTION | COMMA + * + * This ambiguous syntax occurs at: + * {AndRefinement.left=} (ambiguity) right=SubRefinement + */ + protected void emit_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * TILDE? + * + * This ambiguous syntax occurs at: + * (rule start) (ambiguity) min=NonNegativeInteger + */ + protected void emit_EtlCardinality_TILDETerminalRuleCall_0_q(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * SCG? + * + * This ambiguous syntax occurs at: + * (rule start) DOUBLE_SQUARE_OPEN PLUS (ambiguity) DOUBLE_SQUARE_CLOSE (rule start) + * (rule start) DOUBLE_SQUARE_OPEN PLUS (ambiguity) ROUND_OPEN constraint=ExpressionConstraint + * (rule start) DOUBLE_SQUARE_OPEN PLUS (ambiguity) name=SLOTNAME_STRING + */ + protected void emit_ExpressionReplacementSlot_SCGTerminalRuleCall_3_q(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * EQUIVALENT_TO? + * + * This ambiguous syntax occurs at: + * (rule start) (ambiguity) expression=SubExpression + */ + protected void emit_ExpressionTemplate_EQUIVALENT_TOTerminalRuleCall_1_0_0_1_q(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * COMMA? + * + * This ambiguous syntax occurs at: + * attributes+=Attribute (ambiguity) groups+=AttributeGroup + * groups+=AttributeGroup (ambiguity) groups+=AttributeGroup + */ + protected void emit_Refinement_COMMATerminalRuleCall_1_0_q(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/services/EtlGrammarAccess.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/services/EtlGrammarAccess.java new file mode 100644 index 00000000000..3d583ab26c6 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/services/EtlGrammarAccess.java @@ -0,0 +1,2769 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.services; + +import com.b2international.snowowl.snomed.ecl.services.EclGrammarAccess; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import java.util.List; +import org.eclipse.xtext.Action; +import org.eclipse.xtext.Alternatives; +import org.eclipse.xtext.Assignment; +import org.eclipse.xtext.Grammar; +import org.eclipse.xtext.GrammarUtil; +import org.eclipse.xtext.Group; +import org.eclipse.xtext.ParserRule; +import org.eclipse.xtext.RuleCall; +import org.eclipse.xtext.TerminalRule; +import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder; +import org.eclipse.xtext.service.GrammarProvider; + +@Singleton +public class EtlGrammarAccess extends AbstractGrammarElementFinder { + + public class ExpressionTemplateElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.ExpressionTemplate"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Action cExpressionTemplateAction_0 = (Action)cGroup.eContents().get(0); + private final Group cGroup_1 = (Group)cGroup.eContents().get(1); + private final Alternatives cAlternatives_1_0 = (Alternatives)cGroup_1.eContents().get(0); + private final Alternatives cAlternatives_1_0_0 = (Alternatives)cAlternatives_1_0.eContents().get(0); + private final Assignment cPrimitiveAssignment_1_0_0_0 = (Assignment)cAlternatives_1_0_0.eContents().get(0); + private final RuleCall cPrimitiveSUBTYPE_OFTerminalRuleCall_1_0_0_0_0 = (RuleCall)cPrimitiveAssignment_1_0_0_0.eContents().get(0); + private final RuleCall cEQUIVALENT_TOTerminalRuleCall_1_0_0_1 = (RuleCall)cAlternatives_1_0_0.eContents().get(1); + private final Assignment cSlotAssignment_1_0_1 = (Assignment)cAlternatives_1_0.eContents().get(1); + private final RuleCall cSlotTokenReplacementSlotParserRuleCall_1_0_1_0 = (RuleCall)cSlotAssignment_1_0_1.eContents().get(0); + private final Assignment cExpressionAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); + private final RuleCall cExpressionSubExpressionParserRuleCall_1_1_0 = (RuleCall)cExpressionAssignment_1_1.eContents().get(0); + + //ExpressionTemplate: + // {ExpressionTemplate} (((primitive?=SUBTYPE_OF | EQUIVALENT_TO) | slot=TokenReplacementSlot)? + // expression=SubExpression)?; + @Override public ParserRule getRule() { return rule; } + + //{ExpressionTemplate} (((primitive?=SUBTYPE_OF | EQUIVALENT_TO) | slot=TokenReplacementSlot)? expression=SubExpression)? + public Group getGroup() { return cGroup; } + + //{ExpressionTemplate} + public Action getExpressionTemplateAction_0() { return cExpressionTemplateAction_0; } + + //(((primitive?=SUBTYPE_OF | EQUIVALENT_TO) | slot=TokenReplacementSlot)? expression=SubExpression)? + public Group getGroup_1() { return cGroup_1; } + + //((primitive?=SUBTYPE_OF | EQUIVALENT_TO) | slot=TokenReplacementSlot)? + public Alternatives getAlternatives_1_0() { return cAlternatives_1_0; } + + //(primitive?=SUBTYPE_OF | EQUIVALENT_TO) + public Alternatives getAlternatives_1_0_0() { return cAlternatives_1_0_0; } + + //primitive?=SUBTYPE_OF + public Assignment getPrimitiveAssignment_1_0_0_0() { return cPrimitiveAssignment_1_0_0_0; } + + //SUBTYPE_OF + public RuleCall getPrimitiveSUBTYPE_OFTerminalRuleCall_1_0_0_0_0() { return cPrimitiveSUBTYPE_OFTerminalRuleCall_1_0_0_0_0; } + + //EQUIVALENT_TO + public RuleCall getEQUIVALENT_TOTerminalRuleCall_1_0_0_1() { return cEQUIVALENT_TOTerminalRuleCall_1_0_0_1; } + + //slot=TokenReplacementSlot + public Assignment getSlotAssignment_1_0_1() { return cSlotAssignment_1_0_1; } + + //TokenReplacementSlot + public RuleCall getSlotTokenReplacementSlotParserRuleCall_1_0_1_0() { return cSlotTokenReplacementSlotParserRuleCall_1_0_1_0; } + + //expression=SubExpression + public Assignment getExpressionAssignment_1_1() { return cExpressionAssignment_1_1; } + + //SubExpression + public RuleCall getExpressionSubExpressionParserRuleCall_1_1_0() { return cExpressionSubExpressionParserRuleCall_1_1_0; } + } + public class SubExpressionElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SubExpression"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cFocusConceptsAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cFocusConceptsFocusConceptParserRuleCall_0_0 = (RuleCall)cFocusConceptsAssignment_0.eContents().get(0); + private final Group cGroup_1 = (Group)cGroup.eContents().get(1); + private final RuleCall cPLUSTerminalRuleCall_1_0 = (RuleCall)cGroup_1.eContents().get(0); + private final Assignment cFocusConceptsAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); + private final RuleCall cFocusConceptsFocusConceptParserRuleCall_1_1_0 = (RuleCall)cFocusConceptsAssignment_1_1.eContents().get(0); + private final Group cGroup_2 = (Group)cGroup.eContents().get(2); + private final RuleCall cCOLONTerminalRuleCall_2_0 = (RuleCall)cGroup_2.eContents().get(0); + private final Assignment cRefinementAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1); + private final RuleCall cRefinementRefinementParserRuleCall_2_1_0 = (RuleCall)cRefinementAssignment_2_1.eContents().get(0); + + //SubExpression: + // focusConcepts+=FocusConcept (PLUS focusConcepts+=FocusConcept)* (COLON refinement=Refinement)?; + @Override public ParserRule getRule() { return rule; } + + //focusConcepts+=FocusConcept (PLUS focusConcepts+=FocusConcept)* (COLON refinement=Refinement)? + public Group getGroup() { return cGroup; } + + //focusConcepts+=FocusConcept + public Assignment getFocusConceptsAssignment_0() { return cFocusConceptsAssignment_0; } + + //FocusConcept + public RuleCall getFocusConceptsFocusConceptParserRuleCall_0_0() { return cFocusConceptsFocusConceptParserRuleCall_0_0; } + + //(PLUS focusConcepts+=FocusConcept)* + public Group getGroup_1() { return cGroup_1; } + + //PLUS + public RuleCall getPLUSTerminalRuleCall_1_0() { return cPLUSTerminalRuleCall_1_0; } + + //focusConcepts+=FocusConcept + public Assignment getFocusConceptsAssignment_1_1() { return cFocusConceptsAssignment_1_1; } + + //FocusConcept + public RuleCall getFocusConceptsFocusConceptParserRuleCall_1_1_0() { return cFocusConceptsFocusConceptParserRuleCall_1_1_0; } + + //(COLON refinement=Refinement)? + public Group getGroup_2() { return cGroup_2; } + + //COLON + public RuleCall getCOLONTerminalRuleCall_2_0() { return cCOLONTerminalRuleCall_2_0; } + + //refinement=Refinement + public Assignment getRefinementAssignment_2_1() { return cRefinementAssignment_2_1; } + + //Refinement + public RuleCall getRefinementRefinementParserRuleCall_2_1_0() { return cRefinementRefinementParserRuleCall_2_1_0; } + } + public class FocusConceptElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.FocusConcept"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cSlotAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cSlotTemplateInformationSlotParserRuleCall_0_0 = (RuleCall)cSlotAssignment_0.eContents().get(0); + private final Assignment cConceptAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cConceptConceptReferenceParserRuleCall_1_0 = (RuleCall)cConceptAssignment_1.eContents().get(0); + + //FocusConcept: + // slot=TemplateInformationSlot? concept=ConceptReference; + @Override public ParserRule getRule() { return rule; } + + //slot=TemplateInformationSlot? concept=ConceptReference + public Group getGroup() { return cGroup; } + + //slot=TemplateInformationSlot? + public Assignment getSlotAssignment_0() { return cSlotAssignment_0; } + + //TemplateInformationSlot + public RuleCall getSlotTemplateInformationSlotParserRuleCall_0_0() { return cSlotTemplateInformationSlotParserRuleCall_0_0; } + + //concept=ConceptReference + public Assignment getConceptAssignment_1() { return cConceptAssignment_1; } + + //ConceptReference + public RuleCall getConceptConceptReferenceParserRuleCall_1_0() { return cConceptConceptReferenceParserRuleCall_1_0; } + } + public class RefinementElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.Refinement"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0); + private final Group cGroup_0_0 = (Group)cAlternatives_0.eContents().get(0); + private final Assignment cAttributesAssignment_0_0_0 = (Assignment)cGroup_0_0.eContents().get(0); + private final RuleCall cAttributesAttributeParserRuleCall_0_0_0_0 = (RuleCall)cAttributesAssignment_0_0_0.eContents().get(0); + private final Group cGroup_0_0_1 = (Group)cGroup_0_0.eContents().get(1); + private final RuleCall cCOMMATerminalRuleCall_0_0_1_0 = (RuleCall)cGroup_0_0_1.eContents().get(0); + private final Assignment cAttributesAssignment_0_0_1_1 = (Assignment)cGroup_0_0_1.eContents().get(1); + private final RuleCall cAttributesAttributeParserRuleCall_0_0_1_1_0 = (RuleCall)cAttributesAssignment_0_0_1_1.eContents().get(0); + private final Assignment cGroupsAssignment_0_1 = (Assignment)cAlternatives_0.eContents().get(1); + private final RuleCall cGroupsAttributeGroupParserRuleCall_0_1_0 = (RuleCall)cGroupsAssignment_0_1.eContents().get(0); + private final Group cGroup_1 = (Group)cGroup.eContents().get(1); + private final RuleCall cCOMMATerminalRuleCall_1_0 = (RuleCall)cGroup_1.eContents().get(0); + private final Assignment cGroupsAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); + private final RuleCall cGroupsAttributeGroupParserRuleCall_1_1_0 = (RuleCall)cGroupsAssignment_1_1.eContents().get(0); + + //Refinement: + // (attributes+=Attribute (COMMA attributes+=Attribute)* | groups+=AttributeGroup) (COMMA? groups+=AttributeGroup)*; + @Override public ParserRule getRule() { return rule; } + + //(attributes+=Attribute (COMMA attributes+=Attribute)* | groups+=AttributeGroup) (COMMA? groups+=AttributeGroup)* + public Group getGroup() { return cGroup; } + + //attributes+=Attribute (COMMA attributes+=Attribute)* | groups+=AttributeGroup + public Alternatives getAlternatives_0() { return cAlternatives_0; } + + //attributes+=Attribute (COMMA attributes+=Attribute)* + public Group getGroup_0_0() { return cGroup_0_0; } + + //attributes+=Attribute + public Assignment getAttributesAssignment_0_0_0() { return cAttributesAssignment_0_0_0; } + + //Attribute + public RuleCall getAttributesAttributeParserRuleCall_0_0_0_0() { return cAttributesAttributeParserRuleCall_0_0_0_0; } + + //(COMMA attributes+=Attribute)* + public Group getGroup_0_0_1() { return cGroup_0_0_1; } + + //COMMA + public RuleCall getCOMMATerminalRuleCall_0_0_1_0() { return cCOMMATerminalRuleCall_0_0_1_0; } + + //attributes+=Attribute + public Assignment getAttributesAssignment_0_0_1_1() { return cAttributesAssignment_0_0_1_1; } + + //Attribute + public RuleCall getAttributesAttributeParserRuleCall_0_0_1_1_0() { return cAttributesAttributeParserRuleCall_0_0_1_1_0; } + + //groups+=AttributeGroup + public Assignment getGroupsAssignment_0_1() { return cGroupsAssignment_0_1; } + + //AttributeGroup + public RuleCall getGroupsAttributeGroupParserRuleCall_0_1_0() { return cGroupsAttributeGroupParserRuleCall_0_1_0; } + + //(COMMA? groups+=AttributeGroup)* + public Group getGroup_1() { return cGroup_1; } + + //COMMA? + public RuleCall getCOMMATerminalRuleCall_1_0() { return cCOMMATerminalRuleCall_1_0; } + + //groups+=AttributeGroup + public Assignment getGroupsAssignment_1_1() { return cGroupsAssignment_1_1; } + + //AttributeGroup + public RuleCall getGroupsAttributeGroupParserRuleCall_1_1_0() { return cGroupsAttributeGroupParserRuleCall_1_1_0; } + } + public class AttributeGroupElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.AttributeGroup"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cSlotAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cSlotTemplateInformationSlotParserRuleCall_0_0 = (RuleCall)cSlotAssignment_0.eContents().get(0); + private final RuleCall cCURLY_OPENTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final Assignment cAttributesAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cAttributesAttributeParserRuleCall_2_0 = (RuleCall)cAttributesAssignment_2.eContents().get(0); + private final Group cGroup_3 = (Group)cGroup.eContents().get(3); + private final RuleCall cCOMMATerminalRuleCall_3_0 = (RuleCall)cGroup_3.eContents().get(0); + private final Assignment cAttributesAssignment_3_1 = (Assignment)cGroup_3.eContents().get(1); + private final RuleCall cAttributesAttributeParserRuleCall_3_1_0 = (RuleCall)cAttributesAssignment_3_1.eContents().get(0); + private final RuleCall cCURLY_CLOSETerminalRuleCall_4 = (RuleCall)cGroup.eContents().get(4); + + //AttributeGroup: + // slot=TemplateInformationSlot? CURLY_OPEN attributes+=Attribute (COMMA attributes+=Attribute)* CURLY_CLOSE; + @Override public ParserRule getRule() { return rule; } + + //slot=TemplateInformationSlot? CURLY_OPEN attributes+=Attribute (COMMA attributes+=Attribute)* CURLY_CLOSE + public Group getGroup() { return cGroup; } + + //slot=TemplateInformationSlot? + public Assignment getSlotAssignment_0() { return cSlotAssignment_0; } + + //TemplateInformationSlot + public RuleCall getSlotTemplateInformationSlotParserRuleCall_0_0() { return cSlotTemplateInformationSlotParserRuleCall_0_0; } + + //CURLY_OPEN + public RuleCall getCURLY_OPENTerminalRuleCall_1() { return cCURLY_OPENTerminalRuleCall_1; } + + //attributes+=Attribute + public Assignment getAttributesAssignment_2() { return cAttributesAssignment_2; } + + //Attribute + public RuleCall getAttributesAttributeParserRuleCall_2_0() { return cAttributesAttributeParserRuleCall_2_0; } + + //(COMMA attributes+=Attribute)* + public Group getGroup_3() { return cGroup_3; } + + //COMMA + public RuleCall getCOMMATerminalRuleCall_3_0() { return cCOMMATerminalRuleCall_3_0; } + + //attributes+=Attribute + public Assignment getAttributesAssignment_3_1() { return cAttributesAssignment_3_1; } + + //Attribute + public RuleCall getAttributesAttributeParserRuleCall_3_1_0() { return cAttributesAttributeParserRuleCall_3_1_0; } + + //CURLY_CLOSE + public RuleCall getCURLY_CLOSETerminalRuleCall_4() { return cCURLY_CLOSETerminalRuleCall_4; } + } + public class AttributeElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.Attribute"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cSlotAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cSlotTemplateInformationSlotParserRuleCall_0_0 = (RuleCall)cSlotAssignment_0.eContents().get(0); + private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cNameConceptReferenceParserRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0); + private final RuleCall cEQUALTerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2); + private final Assignment cValueAssignment_3 = (Assignment)cGroup.eContents().get(3); + private final RuleCall cValueAttributeValueParserRuleCall_3_0 = (RuleCall)cValueAssignment_3.eContents().get(0); + + //Attribute: + // slot=TemplateInformationSlot? name=ConceptReference EQUAL value=AttributeValue; + @Override public ParserRule getRule() { return rule; } + + //slot=TemplateInformationSlot? name=ConceptReference EQUAL value=AttributeValue + public Group getGroup() { return cGroup; } + + //slot=TemplateInformationSlot? + public Assignment getSlotAssignment_0() { return cSlotAssignment_0; } + + //TemplateInformationSlot + public RuleCall getSlotTemplateInformationSlotParserRuleCall_0_0() { return cSlotTemplateInformationSlotParserRuleCall_0_0; } + + //name=ConceptReference + public Assignment getNameAssignment_1() { return cNameAssignment_1; } + + //ConceptReference + public RuleCall getNameConceptReferenceParserRuleCall_1_0() { return cNameConceptReferenceParserRuleCall_1_0; } + + //EQUAL + public RuleCall getEQUALTerminalRuleCall_2() { return cEQUALTerminalRuleCall_2; } + + //value=AttributeValue + public Assignment getValueAssignment_3() { return cValueAssignment_3; } + + //AttributeValue + public RuleCall getValueAttributeValueParserRuleCall_3_0() { return cValueAttributeValueParserRuleCall_3_0; } + } + public class AttributeValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.AttributeValue"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cConceptReferenceParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final Group cGroup_1 = (Group)cAlternatives.eContents().get(1); + private final RuleCall cROUND_OPENTerminalRuleCall_1_0 = (RuleCall)cGroup_1.eContents().get(0); + private final RuleCall cSubExpressionParserRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); + private final RuleCall cROUND_CLOSETerminalRuleCall_1_2 = (RuleCall)cGroup_1.eContents().get(2); + private final RuleCall cStringValueParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); + private final RuleCall cIntegerValueParserRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3); + private final RuleCall cDecimalValueParserRuleCall_4 = (RuleCall)cAlternatives.eContents().get(4); + private final RuleCall cConcreteValueReplacementSlotParserRuleCall_5 = (RuleCall)cAlternatives.eContents().get(5); + + //AttributeValue: + // ConceptReference | ROUND_OPEN SubExpression ROUND_CLOSE | StringValue | IntegerValue | DecimalValue | + // ConcreteValueReplacementSlot; + @Override public ParserRule getRule() { return rule; } + + //ConceptReference | ROUND_OPEN SubExpression ROUND_CLOSE | StringValue | IntegerValue | DecimalValue | + //ConcreteValueReplacementSlot + public Alternatives getAlternatives() { return cAlternatives; } + + //ConceptReference + public RuleCall getConceptReferenceParserRuleCall_0() { return cConceptReferenceParserRuleCall_0; } + + //ROUND_OPEN SubExpression ROUND_CLOSE + public Group getGroup_1() { return cGroup_1; } + + //ROUND_OPEN + public RuleCall getROUND_OPENTerminalRuleCall_1_0() { return cROUND_OPENTerminalRuleCall_1_0; } + + //SubExpression + public RuleCall getSubExpressionParserRuleCall_1_1() { return cSubExpressionParserRuleCall_1_1; } + + //ROUND_CLOSE + public RuleCall getROUND_CLOSETerminalRuleCall_1_2() { return cROUND_CLOSETerminalRuleCall_1_2; } + + //StringValue + public RuleCall getStringValueParserRuleCall_2() { return cStringValueParserRuleCall_2; } + + //IntegerValue + public RuleCall getIntegerValueParserRuleCall_3() { return cIntegerValueParserRuleCall_3; } + + //DecimalValue + public RuleCall getDecimalValueParserRuleCall_4() { return cDecimalValueParserRuleCall_4; } + + //ConcreteValueReplacementSlot + public RuleCall getConcreteValueReplacementSlotParserRuleCall_5() { return cConcreteValueReplacementSlotParserRuleCall_5; } + } + public class ConceptIdReplacementSlotElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.ConceptIdReplacementSlot"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Action cConceptIdReplacementSlotAction_0 = (Action)cGroup.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_OPENTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final RuleCall cPLUSTerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2); + private final RuleCall cIDTerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3); + private final Group cGroup_4 = (Group)cGroup.eContents().get(4); + private final RuleCall cROUND_OPENTerminalRuleCall_4_0 = (RuleCall)cGroup_4.eContents().get(0); + private final Assignment cConstraintAssignment_4_1 = (Assignment)cGroup_4.eContents().get(1); + private final RuleCall cConstraintExpressionConstraintParserRuleCall_4_1_0 = (RuleCall)cConstraintAssignment_4_1.eContents().get(0); + private final RuleCall cROUND_CLOSETerminalRuleCall_4_2 = (RuleCall)cGroup_4.eContents().get(2); + private final Assignment cNameAssignment_5 = (Assignment)cGroup.eContents().get(5); + private final RuleCall cNameSLOTNAME_STRINGTerminalRuleCall_5_0 = (RuleCall)cNameAssignment_5.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_CLOSETerminalRuleCall_6 = (RuleCall)cGroup.eContents().get(6); + + //ConceptIdReplacementSlot: + // {ConceptIdReplacementSlot} DOUBLE_SQUARE_OPEN PLUS ID (ROUND_OPEN constraint=ExpressionConstraint ROUND_CLOSE)? + // name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + @Override public ParserRule getRule() { return rule; } + + //{ConceptIdReplacementSlot} DOUBLE_SQUARE_OPEN PLUS ID (ROUND_OPEN constraint=ExpressionConstraint ROUND_CLOSE)? + //name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE + public Group getGroup() { return cGroup; } + + //{ConceptIdReplacementSlot} + public Action getConceptIdReplacementSlotAction_0() { return cConceptIdReplacementSlotAction_0; } + + //DOUBLE_SQUARE_OPEN + public RuleCall getDOUBLE_SQUARE_OPENTerminalRuleCall_1() { return cDOUBLE_SQUARE_OPENTerminalRuleCall_1; } + + //PLUS + public RuleCall getPLUSTerminalRuleCall_2() { return cPLUSTerminalRuleCall_2; } + + //ID + public RuleCall getIDTerminalRuleCall_3() { return cIDTerminalRuleCall_3; } + + //(ROUND_OPEN constraint=ExpressionConstraint ROUND_CLOSE)? + public Group getGroup_4() { return cGroup_4; } + + //ROUND_OPEN + public RuleCall getROUND_OPENTerminalRuleCall_4_0() { return cROUND_OPENTerminalRuleCall_4_0; } + + //constraint=ExpressionConstraint + public Assignment getConstraintAssignment_4_1() { return cConstraintAssignment_4_1; } + + //ExpressionConstraint + public RuleCall getConstraintExpressionConstraintParserRuleCall_4_1_0() { return cConstraintExpressionConstraintParserRuleCall_4_1_0; } + + //ROUND_CLOSE + public RuleCall getROUND_CLOSETerminalRuleCall_4_2() { return cROUND_CLOSETerminalRuleCall_4_2; } + + //name=SLOTNAME_STRING? + public Assignment getNameAssignment_5() { return cNameAssignment_5; } + + //SLOTNAME_STRING + public RuleCall getNameSLOTNAME_STRINGTerminalRuleCall_5_0() { return cNameSLOTNAME_STRINGTerminalRuleCall_5_0; } + + //DOUBLE_SQUARE_CLOSE + public RuleCall getDOUBLE_SQUARE_CLOSETerminalRuleCall_6() { return cDOUBLE_SQUARE_CLOSETerminalRuleCall_6; } + } + public class ExpressionReplacementSlotElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.ExpressionReplacementSlot"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Action cExpressionReplacementSlotAction_0 = (Action)cGroup.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_OPENTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final RuleCall cPLUSTerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2); + private final RuleCall cSCGTerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3); + private final Group cGroup_4 = (Group)cGroup.eContents().get(4); + private final RuleCall cROUND_OPENTerminalRuleCall_4_0 = (RuleCall)cGroup_4.eContents().get(0); + private final Assignment cConstraintAssignment_4_1 = (Assignment)cGroup_4.eContents().get(1); + private final RuleCall cConstraintExpressionConstraintParserRuleCall_4_1_0 = (RuleCall)cConstraintAssignment_4_1.eContents().get(0); + private final RuleCall cROUND_CLOSETerminalRuleCall_4_2 = (RuleCall)cGroup_4.eContents().get(2); + private final Assignment cNameAssignment_5 = (Assignment)cGroup.eContents().get(5); + private final RuleCall cNameSLOTNAME_STRINGTerminalRuleCall_5_0 = (RuleCall)cNameAssignment_5.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_CLOSETerminalRuleCall_6 = (RuleCall)cGroup.eContents().get(6); + + //ExpressionReplacementSlot: + // {ExpressionReplacementSlot} DOUBLE_SQUARE_OPEN PLUS SCG? (ROUND_OPEN constraint=ExpressionConstraint ROUND_CLOSE)? + // name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + @Override public ParserRule getRule() { return rule; } + + //{ExpressionReplacementSlot} DOUBLE_SQUARE_OPEN PLUS SCG? (ROUND_OPEN constraint=ExpressionConstraint ROUND_CLOSE)? + //name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE + public Group getGroup() { return cGroup; } + + //{ExpressionReplacementSlot} + public Action getExpressionReplacementSlotAction_0() { return cExpressionReplacementSlotAction_0; } + + //DOUBLE_SQUARE_OPEN + public RuleCall getDOUBLE_SQUARE_OPENTerminalRuleCall_1() { return cDOUBLE_SQUARE_OPENTerminalRuleCall_1; } + + //PLUS + public RuleCall getPLUSTerminalRuleCall_2() { return cPLUSTerminalRuleCall_2; } + + //SCG? + public RuleCall getSCGTerminalRuleCall_3() { return cSCGTerminalRuleCall_3; } + + //(ROUND_OPEN constraint=ExpressionConstraint ROUND_CLOSE)? + public Group getGroup_4() { return cGroup_4; } + + //ROUND_OPEN + public RuleCall getROUND_OPENTerminalRuleCall_4_0() { return cROUND_OPENTerminalRuleCall_4_0; } + + //constraint=ExpressionConstraint + public Assignment getConstraintAssignment_4_1() { return cConstraintAssignment_4_1; } + + //ExpressionConstraint + public RuleCall getConstraintExpressionConstraintParserRuleCall_4_1_0() { return cConstraintExpressionConstraintParserRuleCall_4_1_0; } + + //ROUND_CLOSE + public RuleCall getROUND_CLOSETerminalRuleCall_4_2() { return cROUND_CLOSETerminalRuleCall_4_2; } + + //name=SLOTNAME_STRING? + public Assignment getNameAssignment_5() { return cNameAssignment_5; } + + //SLOTNAME_STRING + public RuleCall getNameSLOTNAME_STRINGTerminalRuleCall_5_0() { return cNameSLOTNAME_STRINGTerminalRuleCall_5_0; } + + //DOUBLE_SQUARE_CLOSE + public RuleCall getDOUBLE_SQUARE_CLOSETerminalRuleCall_6() { return cDOUBLE_SQUARE_CLOSETerminalRuleCall_6; } + } + public class TokenReplacementSlotElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.TokenReplacementSlot"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Action cTokenReplacementSlotAction_0 = (Action)cGroup.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_OPENTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final RuleCall cPLUSTerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2); + private final RuleCall cTOKTerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3); + private final Group cGroup_4 = (Group)cGroup.eContents().get(4); + private final RuleCall cROUND_OPENTerminalRuleCall_4_0 = (RuleCall)cGroup_4.eContents().get(0); + private final Assignment cTokensAssignment_4_1 = (Assignment)cGroup_4.eContents().get(1); + private final RuleCall cTokensSlotTokenParserRuleCall_4_1_0 = (RuleCall)cTokensAssignment_4_1.eContents().get(0); + private final Assignment cTokensAssignment_4_2 = (Assignment)cGroup_4.eContents().get(2); + private final RuleCall cTokensSlotTokenParserRuleCall_4_2_0 = (RuleCall)cTokensAssignment_4_2.eContents().get(0); + private final RuleCall cROUND_CLOSETerminalRuleCall_4_3 = (RuleCall)cGroup_4.eContents().get(3); + private final Assignment cNameAssignment_5 = (Assignment)cGroup.eContents().get(5); + private final RuleCall cNameSLOTNAME_STRINGTerminalRuleCall_5_0 = (RuleCall)cNameAssignment_5.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_CLOSETerminalRuleCall_6 = (RuleCall)cGroup.eContents().get(6); + + //TokenReplacementSlot: + // {TokenReplacementSlot} DOUBLE_SQUARE_OPEN PLUS TOK (ROUND_OPEN tokens+=SlotToken tokens+=SlotToken* ROUND_CLOSE)? + // name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + @Override public ParserRule getRule() { return rule; } + + //{TokenReplacementSlot} DOUBLE_SQUARE_OPEN PLUS TOK (ROUND_OPEN tokens+=SlotToken tokens+=SlotToken* ROUND_CLOSE)? + //name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE + public Group getGroup() { return cGroup; } + + //{TokenReplacementSlot} + public Action getTokenReplacementSlotAction_0() { return cTokenReplacementSlotAction_0; } + + //DOUBLE_SQUARE_OPEN + public RuleCall getDOUBLE_SQUARE_OPENTerminalRuleCall_1() { return cDOUBLE_SQUARE_OPENTerminalRuleCall_1; } + + //PLUS + public RuleCall getPLUSTerminalRuleCall_2() { return cPLUSTerminalRuleCall_2; } + + //TOK + public RuleCall getTOKTerminalRuleCall_3() { return cTOKTerminalRuleCall_3; } + + //(ROUND_OPEN tokens+=SlotToken tokens+=SlotToken* ROUND_CLOSE)? + public Group getGroup_4() { return cGroup_4; } + + //ROUND_OPEN + public RuleCall getROUND_OPENTerminalRuleCall_4_0() { return cROUND_OPENTerminalRuleCall_4_0; } + + //tokens+=SlotToken + public Assignment getTokensAssignment_4_1() { return cTokensAssignment_4_1; } + + //SlotToken + public RuleCall getTokensSlotTokenParserRuleCall_4_1_0() { return cTokensSlotTokenParserRuleCall_4_1_0; } + + //tokens+=SlotToken* + public Assignment getTokensAssignment_4_2() { return cTokensAssignment_4_2; } + + //SlotToken + public RuleCall getTokensSlotTokenParserRuleCall_4_2_0() { return cTokensSlotTokenParserRuleCall_4_2_0; } + + //ROUND_CLOSE + public RuleCall getROUND_CLOSETerminalRuleCall_4_3() { return cROUND_CLOSETerminalRuleCall_4_3; } + + //name=SLOTNAME_STRING? + public Assignment getNameAssignment_5() { return cNameAssignment_5; } + + //SLOTNAME_STRING + public RuleCall getNameSLOTNAME_STRINGTerminalRuleCall_5_0() { return cNameSLOTNAME_STRINGTerminalRuleCall_5_0; } + + //DOUBLE_SQUARE_CLOSE + public RuleCall getDOUBLE_SQUARE_CLOSETerminalRuleCall_6() { return cDOUBLE_SQUARE_CLOSETerminalRuleCall_6; } + } + public class TemplateInformationSlotElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.TemplateInformationSlot"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Action cTemplateInformationSlotAction_0 = (Action)cGroup.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_OPENTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final Assignment cCardinalityAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cCardinalityEtlCardinalityParserRuleCall_2_0 = (RuleCall)cCardinalityAssignment_2.eContents().get(0); + private final Assignment cNameAssignment_3 = (Assignment)cGroup.eContents().get(3); + private final RuleCall cNameSLOTNAME_STRINGTerminalRuleCall_3_0 = (RuleCall)cNameAssignment_3.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_CLOSETerminalRuleCall_4 = (RuleCall)cGroup.eContents().get(4); + + //TemplateInformationSlot: + // {TemplateInformationSlot} DOUBLE_SQUARE_OPEN cardinality=EtlCardinality? name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + @Override public ParserRule getRule() { return rule; } + + //{TemplateInformationSlot} DOUBLE_SQUARE_OPEN cardinality=EtlCardinality? name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE + public Group getGroup() { return cGroup; } + + //{TemplateInformationSlot} + public Action getTemplateInformationSlotAction_0() { return cTemplateInformationSlotAction_0; } + + //DOUBLE_SQUARE_OPEN + public RuleCall getDOUBLE_SQUARE_OPENTerminalRuleCall_1() { return cDOUBLE_SQUARE_OPENTerminalRuleCall_1; } + + //cardinality=EtlCardinality? + public Assignment getCardinalityAssignment_2() { return cCardinalityAssignment_2; } + + //EtlCardinality + public RuleCall getCardinalityEtlCardinalityParserRuleCall_2_0() { return cCardinalityEtlCardinalityParserRuleCall_2_0; } + + //name=SLOTNAME_STRING? + public Assignment getNameAssignment_3() { return cNameAssignment_3; } + + //SLOTNAME_STRING + public RuleCall getNameSLOTNAME_STRINGTerminalRuleCall_3_0() { return cNameSLOTNAME_STRINGTerminalRuleCall_3_0; } + + //DOUBLE_SQUARE_CLOSE + public RuleCall getDOUBLE_SQUARE_CLOSETerminalRuleCall_4() { return cDOUBLE_SQUARE_CLOSETerminalRuleCall_4; } + } + public class ConcreteValueReplacementSlotElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.ConcreteValueReplacementSlot"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cStringReplacementSlotParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cIntegerReplacementSlotParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + private final RuleCall cDecimalReplacementSlotParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); + + //ConcreteValueReplacementSlot: + // StringReplacementSlot | IntegerReplacementSlot | DecimalReplacementSlot; + @Override public ParserRule getRule() { return rule; } + + //StringReplacementSlot | IntegerReplacementSlot | DecimalReplacementSlot + public Alternatives getAlternatives() { return cAlternatives; } + + //StringReplacementSlot + public RuleCall getStringReplacementSlotParserRuleCall_0() { return cStringReplacementSlotParserRuleCall_0; } + + //IntegerReplacementSlot + public RuleCall getIntegerReplacementSlotParserRuleCall_1() { return cIntegerReplacementSlotParserRuleCall_1; } + + //DecimalReplacementSlot + public RuleCall getDecimalReplacementSlotParserRuleCall_2() { return cDecimalReplacementSlotParserRuleCall_2; } + } + public class StringReplacementSlotElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.StringReplacementSlot"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Action cStringReplacementSlotAction_0 = (Action)cGroup.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_OPENTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final RuleCall cPLUSTerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2); + private final RuleCall cSTRTerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3); + private final Group cGroup_4 = (Group)cGroup.eContents().get(4); + private final RuleCall cROUND_OPENTerminalRuleCall_4_0 = (RuleCall)cGroup_4.eContents().get(0); + private final Assignment cValuesAssignment_4_1 = (Assignment)cGroup_4.eContents().get(1); + private final RuleCall cValuesSTRINGTerminalRuleCall_4_1_0 = (RuleCall)cValuesAssignment_4_1.eContents().get(0); + private final Assignment cValuesAssignment_4_2 = (Assignment)cGroup_4.eContents().get(2); + private final RuleCall cValuesSTRINGTerminalRuleCall_4_2_0 = (RuleCall)cValuesAssignment_4_2.eContents().get(0); + private final RuleCall cROUND_CLOSETerminalRuleCall_4_3 = (RuleCall)cGroup_4.eContents().get(3); + private final Assignment cNameAssignment_5 = (Assignment)cGroup.eContents().get(5); + private final RuleCall cNameSLOTNAME_STRINGTerminalRuleCall_5_0 = (RuleCall)cNameAssignment_5.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_CLOSETerminalRuleCall_6 = (RuleCall)cGroup.eContents().get(6); + + //StringReplacementSlot: + // {StringReplacementSlot} DOUBLE_SQUARE_OPEN PLUS STR (ROUND_OPEN values+=STRING values+=STRING* ROUND_CLOSE)? + // name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + @Override public ParserRule getRule() { return rule; } + + //{StringReplacementSlot} DOUBLE_SQUARE_OPEN PLUS STR (ROUND_OPEN values+=STRING values+=STRING* ROUND_CLOSE)? + //name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE + public Group getGroup() { return cGroup; } + + //{StringReplacementSlot} + public Action getStringReplacementSlotAction_0() { return cStringReplacementSlotAction_0; } + + //DOUBLE_SQUARE_OPEN + public RuleCall getDOUBLE_SQUARE_OPENTerminalRuleCall_1() { return cDOUBLE_SQUARE_OPENTerminalRuleCall_1; } + + //PLUS + public RuleCall getPLUSTerminalRuleCall_2() { return cPLUSTerminalRuleCall_2; } + + //STR + public RuleCall getSTRTerminalRuleCall_3() { return cSTRTerminalRuleCall_3; } + + //(ROUND_OPEN values+=STRING values+=STRING* ROUND_CLOSE)? + public Group getGroup_4() { return cGroup_4; } + + //ROUND_OPEN + public RuleCall getROUND_OPENTerminalRuleCall_4_0() { return cROUND_OPENTerminalRuleCall_4_0; } + + //values+=STRING + public Assignment getValuesAssignment_4_1() { return cValuesAssignment_4_1; } + + //STRING + public RuleCall getValuesSTRINGTerminalRuleCall_4_1_0() { return cValuesSTRINGTerminalRuleCall_4_1_0; } + + //values+=STRING* + public Assignment getValuesAssignment_4_2() { return cValuesAssignment_4_2; } + + //STRING + public RuleCall getValuesSTRINGTerminalRuleCall_4_2_0() { return cValuesSTRINGTerminalRuleCall_4_2_0; } + + //ROUND_CLOSE + public RuleCall getROUND_CLOSETerminalRuleCall_4_3() { return cROUND_CLOSETerminalRuleCall_4_3; } + + //name=SLOTNAME_STRING? + public Assignment getNameAssignment_5() { return cNameAssignment_5; } + + //SLOTNAME_STRING + public RuleCall getNameSLOTNAME_STRINGTerminalRuleCall_5_0() { return cNameSLOTNAME_STRINGTerminalRuleCall_5_0; } + + //DOUBLE_SQUARE_CLOSE + public RuleCall getDOUBLE_SQUARE_CLOSETerminalRuleCall_6() { return cDOUBLE_SQUARE_CLOSETerminalRuleCall_6; } + } + public class IntegerReplacementSlotElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.IntegerReplacementSlot"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Action cIntegerReplacementSlotAction_0 = (Action)cGroup.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_OPENTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final RuleCall cPLUSTerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2); + private final RuleCall cINTTerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3); + private final Group cGroup_4 = (Group)cGroup.eContents().get(4); + private final RuleCall cROUND_OPENTerminalRuleCall_4_0 = (RuleCall)cGroup_4.eContents().get(0); + private final Assignment cValuesAssignment_4_1 = (Assignment)cGroup_4.eContents().get(1); + private final RuleCall cValuesSlotIntegerParserRuleCall_4_1_0 = (RuleCall)cValuesAssignment_4_1.eContents().get(0); + private final Assignment cValuesAssignment_4_2 = (Assignment)cGroup_4.eContents().get(2); + private final RuleCall cValuesSlotIntegerParserRuleCall_4_2_0 = (RuleCall)cValuesAssignment_4_2.eContents().get(0); + private final RuleCall cROUND_CLOSETerminalRuleCall_4_3 = (RuleCall)cGroup_4.eContents().get(3); + private final Assignment cNameAssignment_5 = (Assignment)cGroup.eContents().get(5); + private final RuleCall cNameSLOTNAME_STRINGTerminalRuleCall_5_0 = (RuleCall)cNameAssignment_5.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_CLOSETerminalRuleCall_6 = (RuleCall)cGroup.eContents().get(6); + + //IntegerReplacementSlot: + // {IntegerReplacementSlot} DOUBLE_SQUARE_OPEN PLUS INT (ROUND_OPEN values+=SlotInteger values+=SlotInteger* + // ROUND_CLOSE)? name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + @Override public ParserRule getRule() { return rule; } + + //{IntegerReplacementSlot} DOUBLE_SQUARE_OPEN PLUS INT (ROUND_OPEN values+=SlotInteger values+=SlotInteger* ROUND_CLOSE)? + //name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE + public Group getGroup() { return cGroup; } + + //{IntegerReplacementSlot} + public Action getIntegerReplacementSlotAction_0() { return cIntegerReplacementSlotAction_0; } + + //DOUBLE_SQUARE_OPEN + public RuleCall getDOUBLE_SQUARE_OPENTerminalRuleCall_1() { return cDOUBLE_SQUARE_OPENTerminalRuleCall_1; } + + //PLUS + public RuleCall getPLUSTerminalRuleCall_2() { return cPLUSTerminalRuleCall_2; } + + //INT + public RuleCall getINTTerminalRuleCall_3() { return cINTTerminalRuleCall_3; } + + //(ROUND_OPEN values+=SlotInteger values+=SlotInteger* ROUND_CLOSE)? + public Group getGroup_4() { return cGroup_4; } + + //ROUND_OPEN + public RuleCall getROUND_OPENTerminalRuleCall_4_0() { return cROUND_OPENTerminalRuleCall_4_0; } + + //values+=SlotInteger + public Assignment getValuesAssignment_4_1() { return cValuesAssignment_4_1; } + + //SlotInteger + public RuleCall getValuesSlotIntegerParserRuleCall_4_1_0() { return cValuesSlotIntegerParserRuleCall_4_1_0; } + + //values+=SlotInteger* + public Assignment getValuesAssignment_4_2() { return cValuesAssignment_4_2; } + + //SlotInteger + public RuleCall getValuesSlotIntegerParserRuleCall_4_2_0() { return cValuesSlotIntegerParserRuleCall_4_2_0; } + + //ROUND_CLOSE + public RuleCall getROUND_CLOSETerminalRuleCall_4_3() { return cROUND_CLOSETerminalRuleCall_4_3; } + + //name=SLOTNAME_STRING? + public Assignment getNameAssignment_5() { return cNameAssignment_5; } + + //SLOTNAME_STRING + public RuleCall getNameSLOTNAME_STRINGTerminalRuleCall_5_0() { return cNameSLOTNAME_STRINGTerminalRuleCall_5_0; } + + //DOUBLE_SQUARE_CLOSE + public RuleCall getDOUBLE_SQUARE_CLOSETerminalRuleCall_6() { return cDOUBLE_SQUARE_CLOSETerminalRuleCall_6; } + } + public class DecimalReplacementSlotElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.DecimalReplacementSlot"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Action cDecimalReplacementSlotAction_0 = (Action)cGroup.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_OPENTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final RuleCall cPLUSTerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2); + private final RuleCall cDECTerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3); + private final Group cGroup_4 = (Group)cGroup.eContents().get(4); + private final RuleCall cROUND_OPENTerminalRuleCall_4_0 = (RuleCall)cGroup_4.eContents().get(0); + private final Assignment cValuesAssignment_4_1 = (Assignment)cGroup_4.eContents().get(1); + private final RuleCall cValuesSlotDecimalParserRuleCall_4_1_0 = (RuleCall)cValuesAssignment_4_1.eContents().get(0); + private final Assignment cValuesAssignment_4_2 = (Assignment)cGroup_4.eContents().get(2); + private final RuleCall cValuesSlotDecimalParserRuleCall_4_2_0 = (RuleCall)cValuesAssignment_4_2.eContents().get(0); + private final RuleCall cROUND_CLOSETerminalRuleCall_4_3 = (RuleCall)cGroup_4.eContents().get(3); + private final Assignment cNameAssignment_5 = (Assignment)cGroup.eContents().get(5); + private final RuleCall cNameSLOTNAME_STRINGTerminalRuleCall_5_0 = (RuleCall)cNameAssignment_5.eContents().get(0); + private final RuleCall cDOUBLE_SQUARE_CLOSETerminalRuleCall_6 = (RuleCall)cGroup.eContents().get(6); + + //DecimalReplacementSlot: + // {DecimalReplacementSlot} DOUBLE_SQUARE_OPEN PLUS DEC (ROUND_OPEN values+=SlotDecimal values+=SlotDecimal* + // ROUND_CLOSE)? name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + @Override public ParserRule getRule() { return rule; } + + //{DecimalReplacementSlot} DOUBLE_SQUARE_OPEN PLUS DEC (ROUND_OPEN values+=SlotDecimal values+=SlotDecimal* ROUND_CLOSE)? + //name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE + public Group getGroup() { return cGroup; } + + //{DecimalReplacementSlot} + public Action getDecimalReplacementSlotAction_0() { return cDecimalReplacementSlotAction_0; } + + //DOUBLE_SQUARE_OPEN + public RuleCall getDOUBLE_SQUARE_OPENTerminalRuleCall_1() { return cDOUBLE_SQUARE_OPENTerminalRuleCall_1; } + + //PLUS + public RuleCall getPLUSTerminalRuleCall_2() { return cPLUSTerminalRuleCall_2; } + + //DEC + public RuleCall getDECTerminalRuleCall_3() { return cDECTerminalRuleCall_3; } + + //(ROUND_OPEN values+=SlotDecimal values+=SlotDecimal* ROUND_CLOSE)? + public Group getGroup_4() { return cGroup_4; } + + //ROUND_OPEN + public RuleCall getROUND_OPENTerminalRuleCall_4_0() { return cROUND_OPENTerminalRuleCall_4_0; } + + //values+=SlotDecimal + public Assignment getValuesAssignment_4_1() { return cValuesAssignment_4_1; } + + //SlotDecimal + public RuleCall getValuesSlotDecimalParserRuleCall_4_1_0() { return cValuesSlotDecimalParserRuleCall_4_1_0; } + + //values+=SlotDecimal* + public Assignment getValuesAssignment_4_2() { return cValuesAssignment_4_2; } + + //SlotDecimal + public RuleCall getValuesSlotDecimalParserRuleCall_4_2_0() { return cValuesSlotDecimalParserRuleCall_4_2_0; } + + //ROUND_CLOSE + public RuleCall getROUND_CLOSETerminalRuleCall_4_3() { return cROUND_CLOSETerminalRuleCall_4_3; } + + //name=SLOTNAME_STRING? + public Assignment getNameAssignment_5() { return cNameAssignment_5; } + + //SLOTNAME_STRING + public RuleCall getNameSLOTNAME_STRINGTerminalRuleCall_5_0() { return cNameSLOTNAME_STRINGTerminalRuleCall_5_0; } + + //DOUBLE_SQUARE_CLOSE + public RuleCall getDOUBLE_SQUARE_CLOSETerminalRuleCall_6() { return cDOUBLE_SQUARE_CLOSETerminalRuleCall_6; } + } + public class EtlCardinalityElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.EtlCardinality"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final RuleCall cTILDETerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final Assignment cMinAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cMinNonNegativeIntegerParserRuleCall_1_0 = (RuleCall)cMinAssignment_1.eContents().get(0); + private final RuleCall cTOTerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2); + private final Assignment cMaxAssignment_3 = (Assignment)cGroup.eContents().get(3); + private final RuleCall cMaxMaxValueParserRuleCall_3_0 = (RuleCall)cMaxAssignment_3.eContents().get(0); + + //EtlCardinality: + // TILDE? min=NonNegativeInteger TO max=MaxValue; + @Override public ParserRule getRule() { return rule; } + + //// XXX this is different to Ecl.Cardinality -> needed to remove square brackets and to add optional tilde (-> IHTSDO has template syntax v0.2) + //TILDE? min=NonNegativeInteger TO max=MaxValue + public Group getGroup() { return cGroup; } + + //// XXX this is different to Ecl.Cardinality -> needed to remove square brackets and to add optional tilde (-> IHTSDO has template syntax v0.2) + //TILDE? + public RuleCall getTILDETerminalRuleCall_0() { return cTILDETerminalRuleCall_0; } + + //min=NonNegativeInteger + public Assignment getMinAssignment_1() { return cMinAssignment_1; } + + //NonNegativeInteger + public RuleCall getMinNonNegativeIntegerParserRuleCall_1_0() { return cMinNonNegativeIntegerParserRuleCall_1_0; } + + //TO + public RuleCall getTOTerminalRuleCall_2() { return cTOTerminalRuleCall_2; } + + //max=MaxValue + public Assignment getMaxAssignment_3() { return cMaxAssignment_3; } + + //MaxValue + public RuleCall getMaxMaxValueParserRuleCall_3_0() { return cMaxMaxValueParserRuleCall_3_0; } + } + public class ConceptReplacementSlotElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.ConceptReplacementSlot"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cConceptIdReplacementSlotParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cExpressionReplacementSlotParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + + //ConceptReplacementSlot: + // ConceptIdReplacementSlot | ExpressionReplacementSlot; + @Override public ParserRule getRule() { return rule; } + + //ConceptIdReplacementSlot | ExpressionReplacementSlot + public Alternatives getAlternatives() { return cAlternatives; } + + //ConceptIdReplacementSlot + public RuleCall getConceptIdReplacementSlotParserRuleCall_0() { return cConceptIdReplacementSlotParserRuleCall_0; } + + //ExpressionReplacementSlot + public RuleCall getExpressionReplacementSlotParserRuleCall_1() { return cExpressionReplacementSlotParserRuleCall_1; } + } + public class ConceptReferenceElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.ConceptReference"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final Assignment cSlotAssignment_0 = (Assignment)cAlternatives.eContents().get(0); + private final RuleCall cSlotConceptReplacementSlotParserRuleCall_0_0 = (RuleCall)cSlotAssignment_0.eContents().get(0); + private final Group cGroup_1 = (Group)cAlternatives.eContents().get(1); + private final Assignment cIdAssignment_1_0 = (Assignment)cGroup_1.eContents().get(0); + private final RuleCall cIdSnomedIdentifierParserRuleCall_1_0_0 = (RuleCall)cIdAssignment_1_0.eContents().get(0); + private final Assignment cTermAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); + private final RuleCall cTermTERM_STRINGTerminalRuleCall_1_1_0 = (RuleCall)cTermAssignment_1_1.eContents().get(0); + + //ConceptReference: + // slot=ConceptReplacementSlot | id=SnomedIdentifier term=TERM_STRING?; + @Override public ParserRule getRule() { return rule; } + + //slot=ConceptReplacementSlot | id=SnomedIdentifier term=TERM_STRING? + public Alternatives getAlternatives() { return cAlternatives; } + + //slot=ConceptReplacementSlot + public Assignment getSlotAssignment_0() { return cSlotAssignment_0; } + + //ConceptReplacementSlot + public RuleCall getSlotConceptReplacementSlotParserRuleCall_0_0() { return cSlotConceptReplacementSlotParserRuleCall_0_0; } + + //id=SnomedIdentifier term=TERM_STRING? + public Group getGroup_1() { return cGroup_1; } + + //id=SnomedIdentifier + public Assignment getIdAssignment_1_0() { return cIdAssignment_1_0; } + + //SnomedIdentifier + public RuleCall getIdSnomedIdentifierParserRuleCall_1_0_0() { return cIdSnomedIdentifierParserRuleCall_1_0_0; } + + //term=TERM_STRING? + public Assignment getTermAssignment_1_1() { return cTermAssignment_1_1; } + + //TERM_STRING + public RuleCall getTermTERM_STRINGTerminalRuleCall_1_1_0() { return cTermTERM_STRINGTerminalRuleCall_1_1_0; } + } + public class SlotTokenElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SlotToken"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cEQUIVALENT_TOTerminalRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cSUBTYPE_OFTerminalRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + private final RuleCall cCOMMATerminalRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); + private final RuleCall cCONJUNCTIONTerminalRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3); + private final RuleCall cDISJUNCTIONTerminalRuleCall_4 = (RuleCall)cAlternatives.eContents().get(4); + private final RuleCall cEXCLUSIONTerminalRuleCall_5 = (RuleCall)cAlternatives.eContents().get(5); + private final RuleCall cREVERSEDTerminalRuleCall_6 = (RuleCall)cAlternatives.eContents().get(6); + private final RuleCall cCARETTerminalRuleCall_7 = (RuleCall)cAlternatives.eContents().get(7); + private final RuleCall cLTTerminalRuleCall_8 = (RuleCall)cAlternatives.eContents().get(8); + private final RuleCall cLTETerminalRuleCall_9 = (RuleCall)cAlternatives.eContents().get(9); + private final RuleCall cDBL_LTTerminalRuleCall_10 = (RuleCall)cAlternatives.eContents().get(10); + private final RuleCall cLT_EMTerminalRuleCall_11 = (RuleCall)cAlternatives.eContents().get(11); + private final RuleCall cGTTerminalRuleCall_12 = (RuleCall)cAlternatives.eContents().get(12); + private final RuleCall cGTETerminalRuleCall_13 = (RuleCall)cAlternatives.eContents().get(13); + private final RuleCall cDBL_GTTerminalRuleCall_14 = (RuleCall)cAlternatives.eContents().get(14); + private final RuleCall cGT_EMTerminalRuleCall_15 = (RuleCall)cAlternatives.eContents().get(15); + private final RuleCall cEQUALTerminalRuleCall_16 = (RuleCall)cAlternatives.eContents().get(16); + private final RuleCall cNOT_EQUALTerminalRuleCall_17 = (RuleCall)cAlternatives.eContents().get(17); + + //SlotToken: + // EQUIVALENT_TO | SUBTYPE_OF | COMMA | CONJUNCTION | DISJUNCTION | EXCLUSION | REVERSED | CARET | LT | LTE | DBL_LT | + // LT_EM | GT | GTE | DBL_GT | GT_EM | EQUAL | NOT_EQUAL; + @Override public ParserRule getRule() { return rule; } + + //EQUIVALENT_TO | SUBTYPE_OF | COMMA | CONJUNCTION | DISJUNCTION | EXCLUSION | REVERSED | CARET | LT | LTE | DBL_LT | + //LT_EM | GT | GTE | DBL_GT | GT_EM | EQUAL | NOT_EQUAL + public Alternatives getAlternatives() { return cAlternatives; } + + //EQUIVALENT_TO + public RuleCall getEQUIVALENT_TOTerminalRuleCall_0() { return cEQUIVALENT_TOTerminalRuleCall_0; } + + //SUBTYPE_OF + public RuleCall getSUBTYPE_OFTerminalRuleCall_1() { return cSUBTYPE_OFTerminalRuleCall_1; } + + //COMMA + public RuleCall getCOMMATerminalRuleCall_2() { return cCOMMATerminalRuleCall_2; } + + //CONJUNCTION + public RuleCall getCONJUNCTIONTerminalRuleCall_3() { return cCONJUNCTIONTerminalRuleCall_3; } + + //DISJUNCTION + public RuleCall getDISJUNCTIONTerminalRuleCall_4() { return cDISJUNCTIONTerminalRuleCall_4; } + + //EXCLUSION + public RuleCall getEXCLUSIONTerminalRuleCall_5() { return cEXCLUSIONTerminalRuleCall_5; } + + //REVERSED + public RuleCall getREVERSEDTerminalRuleCall_6() { return cREVERSEDTerminalRuleCall_6; } + + //CARET + public RuleCall getCARETTerminalRuleCall_7() { return cCARETTerminalRuleCall_7; } + + //LT + public RuleCall getLTTerminalRuleCall_8() { return cLTTerminalRuleCall_8; } + + //LTE + public RuleCall getLTETerminalRuleCall_9() { return cLTETerminalRuleCall_9; } + + //DBL_LT + public RuleCall getDBL_LTTerminalRuleCall_10() { return cDBL_LTTerminalRuleCall_10; } + + //LT_EM + public RuleCall getLT_EMTerminalRuleCall_11() { return cLT_EMTerminalRuleCall_11; } + + //GT + public RuleCall getGTTerminalRuleCall_12() { return cGTTerminalRuleCall_12; } + + //GTE + public RuleCall getGTETerminalRuleCall_13() { return cGTETerminalRuleCall_13; } + + //DBL_GT + public RuleCall getDBL_GTTerminalRuleCall_14() { return cDBL_GTTerminalRuleCall_14; } + + //GT_EM + public RuleCall getGT_EMTerminalRuleCall_15() { return cGT_EMTerminalRuleCall_15; } + + //EQUAL + public RuleCall getEQUALTerminalRuleCall_16() { return cEQUALTerminalRuleCall_16; } + + //NOT_EQUAL + public RuleCall getNOT_EQUALTerminalRuleCall_17() { return cNOT_EQUALTerminalRuleCall_17; } + } + public class StringValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.StringValue"); + private final Assignment cValueAssignment = (Assignment)rule.eContents().get(1); + private final RuleCall cValueSTRINGTerminalRuleCall_0 = (RuleCall)cValueAssignment.eContents().get(0); + + //StringValue: + // value=STRING; + @Override public ParserRule getRule() { return rule; } + + //value=STRING + public Assignment getValueAssignment() { return cValueAssignment; } + + //STRING + public RuleCall getValueSTRINGTerminalRuleCall_0() { return cValueSTRINGTerminalRuleCall_0; } + } + public class IntegerValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.IntegerValue"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final RuleCall cHASHTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cValueIntegerParserRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0); + + //IntegerValue: + // HASH value=Integer; + @Override public ParserRule getRule() { return rule; } + + //// this is used by SCG (and ECL) and can be negative or positive + //HASH value=Integer + public Group getGroup() { return cGroup; } + + //// this is used by SCG (and ECL) and can be negative or positive + //HASH + public RuleCall getHASHTerminalRuleCall_0() { return cHASHTerminalRuleCall_0; } + + //value=Integer + public Assignment getValueAssignment_1() { return cValueAssignment_1; } + + //Integer + public RuleCall getValueIntegerParserRuleCall_1_0() { return cValueIntegerParserRuleCall_1_0; } + } + public class DecimalValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.DecimalValue"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final RuleCall cHASHTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cValueDecimalParserRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0); + + //DecimalValue: + // HASH value=Decimal; + @Override public ParserRule getRule() { return rule; } + + //// this is used by SCG (and ECL) and can be negative or positive + //HASH value=Decimal + public Group getGroup() { return cGroup; } + + //// this is used by SCG (and ECL) and can be negative or positive + //HASH + public RuleCall getHASHTerminalRuleCall_0() { return cHASHTerminalRuleCall_0; } + + //value=Decimal + public Assignment getValueAssignment_1() { return cValueAssignment_1; } + + //Decimal + public RuleCall getValueDecimalParserRuleCall_1_0() { return cValueDecimalParserRuleCall_1_0; } + } + public class SlotIntegerElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SlotInteger"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cSlotIntegerRangeParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cSlotIntegerValueParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + + //SlotInteger: + // SlotIntegerRange | SlotIntegerValue; + @Override public ParserRule getRule() { return rule; } + + //// this is a slot integer value which cannot be negative, the range must preceed the simple value in this definition + //SlotIntegerRange | SlotIntegerValue + public Alternatives getAlternatives() { return cAlternatives; } + + //// this is a slot integer value which cannot be negative, the range must preceed the simple value in this definition + //SlotIntegerRange + public RuleCall getSlotIntegerRangeParserRuleCall_0() { return cSlotIntegerRangeParserRuleCall_0; } + + //SlotIntegerValue + public RuleCall getSlotIntegerValueParserRuleCall_1() { return cSlotIntegerValueParserRuleCall_1; } + } + public class SlotIntegerValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SlotIntegerValue"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final RuleCall cHASHTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cValueNonNegativeIntegerParserRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0); + + //SlotIntegerValue: + // HASH value=NonNegativeInteger; + @Override public ParserRule getRule() { return rule; } + + //HASH value=NonNegativeInteger + public Group getGroup() { return cGroup; } + + //HASH + public RuleCall getHASHTerminalRuleCall_0() { return cHASHTerminalRuleCall_0; } + + //value=NonNegativeInteger + public Assignment getValueAssignment_1() { return cValueAssignment_1; } + + //NonNegativeInteger + public RuleCall getValueNonNegativeIntegerParserRuleCall_1_0() { return cValueNonNegativeIntegerParserRuleCall_1_0; } + } + public class SlotIntegerRangeElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SlotIntegerRange"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final Group cGroup_0 = (Group)cAlternatives.eContents().get(0); + private final Assignment cMinimumAssignment_0_0 = (Assignment)cGroup_0.eContents().get(0); + private final RuleCall cMinimumSlotIntegerMinimumValueParserRuleCall_0_0_0 = (RuleCall)cMinimumAssignment_0_0.eContents().get(0); + private final RuleCall cTOTerminalRuleCall_0_1 = (RuleCall)cGroup_0.eContents().get(1); + private final Assignment cMaximumAssignment_0_2 = (Assignment)cGroup_0.eContents().get(2); + private final RuleCall cMaximumSlotIntegerMaximumValueParserRuleCall_0_2_0 = (RuleCall)cMaximumAssignment_0_2.eContents().get(0); + private final Group cGroup_1 = (Group)cAlternatives.eContents().get(1); + private final RuleCall cTOTerminalRuleCall_1_0 = (RuleCall)cGroup_1.eContents().get(0); + private final Assignment cMaximumAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); + private final RuleCall cMaximumSlotIntegerMaximumValueParserRuleCall_1_1_0 = (RuleCall)cMaximumAssignment_1_1.eContents().get(0); + + //SlotIntegerRange: + // minimum=SlotIntegerMinimumValue TO maximum=SlotIntegerMaximumValue? | TO maximum=SlotIntegerMaximumValue; + @Override public ParserRule getRule() { return rule; } + + //minimum=SlotIntegerMinimumValue TO maximum=SlotIntegerMaximumValue? | TO maximum=SlotIntegerMaximumValue + public Alternatives getAlternatives() { return cAlternatives; } + + //minimum=SlotIntegerMinimumValue TO maximum=SlotIntegerMaximumValue? + public Group getGroup_0() { return cGroup_0; } + + //minimum=SlotIntegerMinimumValue + public Assignment getMinimumAssignment_0_0() { return cMinimumAssignment_0_0; } + + //SlotIntegerMinimumValue + public RuleCall getMinimumSlotIntegerMinimumValueParserRuleCall_0_0_0() { return cMinimumSlotIntegerMinimumValueParserRuleCall_0_0_0; } + + //TO + public RuleCall getTOTerminalRuleCall_0_1() { return cTOTerminalRuleCall_0_1; } + + //maximum=SlotIntegerMaximumValue? + public Assignment getMaximumAssignment_0_2() { return cMaximumAssignment_0_2; } + + //SlotIntegerMaximumValue + public RuleCall getMaximumSlotIntegerMaximumValueParserRuleCall_0_2_0() { return cMaximumSlotIntegerMaximumValueParserRuleCall_0_2_0; } + + //TO maximum=SlotIntegerMaximumValue + public Group getGroup_1() { return cGroup_1; } + + //TO + public RuleCall getTOTerminalRuleCall_1_0() { return cTOTerminalRuleCall_1_0; } + + //maximum=SlotIntegerMaximumValue + public Assignment getMaximumAssignment_1_1() { return cMaximumAssignment_1_1; } + + //SlotIntegerMaximumValue + public RuleCall getMaximumSlotIntegerMaximumValueParserRuleCall_1_1_0() { return cMaximumSlotIntegerMaximumValueParserRuleCall_1_1_0; } + } + public class SlotIntegerMinimumValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SlotIntegerMinimumValue"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cExclusiveAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cExclusiveGTTerminalRuleCall_0_0 = (RuleCall)cExclusiveAssignment_0.eContents().get(0); + private final RuleCall cHASHTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final Assignment cValueAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cValueNonNegativeIntegerParserRuleCall_2_0 = (RuleCall)cValueAssignment_2.eContents().get(0); + + //SlotIntegerMinimumValue: + // exclusive?=GT? HASH value=NonNegativeInteger; + @Override public ParserRule getRule() { return rule; } + + //exclusive?=GT? HASH value=NonNegativeInteger + public Group getGroup() { return cGroup; } + + //exclusive?=GT? + public Assignment getExclusiveAssignment_0() { return cExclusiveAssignment_0; } + + //GT + public RuleCall getExclusiveGTTerminalRuleCall_0_0() { return cExclusiveGTTerminalRuleCall_0_0; } + + //HASH + public RuleCall getHASHTerminalRuleCall_1() { return cHASHTerminalRuleCall_1; } + + //value=NonNegativeInteger + public Assignment getValueAssignment_2() { return cValueAssignment_2; } + + //NonNegativeInteger + public RuleCall getValueNonNegativeIntegerParserRuleCall_2_0() { return cValueNonNegativeIntegerParserRuleCall_2_0; } + } + public class SlotIntegerMaximumValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SlotIntegerMaximumValue"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cExclusiveAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cExclusiveLTTerminalRuleCall_0_0 = (RuleCall)cExclusiveAssignment_0.eContents().get(0); + private final RuleCall cHASHTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final Assignment cValueAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cValueNonNegativeIntegerParserRuleCall_2_0 = (RuleCall)cValueAssignment_2.eContents().get(0); + + //SlotIntegerMaximumValue: + // exclusive?=LT? HASH value=NonNegativeInteger; + @Override public ParserRule getRule() { return rule; } + + //exclusive?=LT? HASH value=NonNegativeInteger + public Group getGroup() { return cGroup; } + + //exclusive?=LT? + public Assignment getExclusiveAssignment_0() { return cExclusiveAssignment_0; } + + //LT + public RuleCall getExclusiveLTTerminalRuleCall_0_0() { return cExclusiveLTTerminalRuleCall_0_0; } + + //HASH + public RuleCall getHASHTerminalRuleCall_1() { return cHASHTerminalRuleCall_1; } + + //value=NonNegativeInteger + public Assignment getValueAssignment_2() { return cValueAssignment_2; } + + //NonNegativeInteger + public RuleCall getValueNonNegativeIntegerParserRuleCall_2_0() { return cValueNonNegativeIntegerParserRuleCall_2_0; } + } + public class SlotDecimalElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SlotDecimal"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cSlotDecimalRangeParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final RuleCall cSlotDecimalValueParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); + + //SlotDecimal: + // SlotDecimalRange | SlotDecimalValue; + @Override public ParserRule getRule() { return rule; } + + //// this is a slot decimal value which cannot be negative, the range must preceed the simple value in this definition + //SlotDecimalRange | SlotDecimalValue + public Alternatives getAlternatives() { return cAlternatives; } + + //// this is a slot decimal value which cannot be negative, the range must preceed the simple value in this definition + //SlotDecimalRange + public RuleCall getSlotDecimalRangeParserRuleCall_0() { return cSlotDecimalRangeParserRuleCall_0; } + + //SlotDecimalValue + public RuleCall getSlotDecimalValueParserRuleCall_1() { return cSlotDecimalValueParserRuleCall_1; } + } + public class SlotDecimalValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SlotDecimalValue"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final RuleCall cHASHTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cValueNonNegativeDecimalParserRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0); + + //SlotDecimalValue: + // HASH value=NonNegativeDecimal; + @Override public ParserRule getRule() { return rule; } + + //HASH value=NonNegativeDecimal + public Group getGroup() { return cGroup; } + + //HASH + public RuleCall getHASHTerminalRuleCall_0() { return cHASHTerminalRuleCall_0; } + + //value=NonNegativeDecimal + public Assignment getValueAssignment_1() { return cValueAssignment_1; } + + //NonNegativeDecimal + public RuleCall getValueNonNegativeDecimalParserRuleCall_1_0() { return cValueNonNegativeDecimalParserRuleCall_1_0; } + } + public class SlotDecimalRangeElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SlotDecimalRange"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final Group cGroup_0 = (Group)cAlternatives.eContents().get(0); + private final Assignment cMinimumAssignment_0_0 = (Assignment)cGroup_0.eContents().get(0); + private final RuleCall cMinimumSlotDecimalMinimumValueParserRuleCall_0_0_0 = (RuleCall)cMinimumAssignment_0_0.eContents().get(0); + private final RuleCall cTOTerminalRuleCall_0_1 = (RuleCall)cGroup_0.eContents().get(1); + private final Assignment cMaximumAssignment_0_2 = (Assignment)cGroup_0.eContents().get(2); + private final RuleCall cMaximumSlotDecimalMaximumValueParserRuleCall_0_2_0 = (RuleCall)cMaximumAssignment_0_2.eContents().get(0); + private final Group cGroup_1 = (Group)cAlternatives.eContents().get(1); + private final RuleCall cTOTerminalRuleCall_1_0 = (RuleCall)cGroup_1.eContents().get(0); + private final Assignment cMaximumAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); + private final RuleCall cMaximumSlotDecimalMaximumValueParserRuleCall_1_1_0 = (RuleCall)cMaximumAssignment_1_1.eContents().get(0); + + //SlotDecimalRange: + // minimum=SlotDecimalMinimumValue TO maximum=SlotDecimalMaximumValue? | TO maximum=SlotDecimalMaximumValue; + @Override public ParserRule getRule() { return rule; } + + //minimum=SlotDecimalMinimumValue TO maximum=SlotDecimalMaximumValue? | TO maximum=SlotDecimalMaximumValue + public Alternatives getAlternatives() { return cAlternatives; } + + //minimum=SlotDecimalMinimumValue TO maximum=SlotDecimalMaximumValue? + public Group getGroup_0() { return cGroup_0; } + + //minimum=SlotDecimalMinimumValue + public Assignment getMinimumAssignment_0_0() { return cMinimumAssignment_0_0; } + + //SlotDecimalMinimumValue + public RuleCall getMinimumSlotDecimalMinimumValueParserRuleCall_0_0_0() { return cMinimumSlotDecimalMinimumValueParserRuleCall_0_0_0; } + + //TO + public RuleCall getTOTerminalRuleCall_0_1() { return cTOTerminalRuleCall_0_1; } + + //maximum=SlotDecimalMaximumValue? + public Assignment getMaximumAssignment_0_2() { return cMaximumAssignment_0_2; } + + //SlotDecimalMaximumValue + public RuleCall getMaximumSlotDecimalMaximumValueParserRuleCall_0_2_0() { return cMaximumSlotDecimalMaximumValueParserRuleCall_0_2_0; } + + //TO maximum=SlotDecimalMaximumValue + public Group getGroup_1() { return cGroup_1; } + + //TO + public RuleCall getTOTerminalRuleCall_1_0() { return cTOTerminalRuleCall_1_0; } + + //maximum=SlotDecimalMaximumValue + public Assignment getMaximumAssignment_1_1() { return cMaximumAssignment_1_1; } + + //SlotDecimalMaximumValue + public RuleCall getMaximumSlotDecimalMaximumValueParserRuleCall_1_1_0() { return cMaximumSlotDecimalMaximumValueParserRuleCall_1_1_0; } + } + public class SlotDecimalMinimumValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SlotDecimalMinimumValue"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cExclusiveAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cExclusiveGTTerminalRuleCall_0_0 = (RuleCall)cExclusiveAssignment_0.eContents().get(0); + private final RuleCall cHASHTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final Assignment cValueAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cValueNonNegativeDecimalParserRuleCall_2_0 = (RuleCall)cValueAssignment_2.eContents().get(0); + + //SlotDecimalMinimumValue: + // exclusive?=GT? HASH value=NonNegativeDecimal; + @Override public ParserRule getRule() { return rule; } + + //exclusive?=GT? HASH value=NonNegativeDecimal + public Group getGroup() { return cGroup; } + + //exclusive?=GT? + public Assignment getExclusiveAssignment_0() { return cExclusiveAssignment_0; } + + //GT + public RuleCall getExclusiveGTTerminalRuleCall_0_0() { return cExclusiveGTTerminalRuleCall_0_0; } + + //HASH + public RuleCall getHASHTerminalRuleCall_1() { return cHASHTerminalRuleCall_1; } + + //value=NonNegativeDecimal + public Assignment getValueAssignment_2() { return cValueAssignment_2; } + + //NonNegativeDecimal + public RuleCall getValueNonNegativeDecimalParserRuleCall_2_0() { return cValueNonNegativeDecimalParserRuleCall_2_0; } + } + public class SlotDecimalMaximumValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SlotDecimalMaximumValue"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cExclusiveAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cExclusiveLTTerminalRuleCall_0_0 = (RuleCall)cExclusiveAssignment_0.eContents().get(0); + private final RuleCall cHASHTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final Assignment cValueAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cValueNonNegativeDecimalParserRuleCall_2_0 = (RuleCall)cValueAssignment_2.eContents().get(0); + + //SlotDecimalMaximumValue: + // exclusive?=LT? HASH value=NonNegativeDecimal; + @Override public ParserRule getRule() { return rule; } + + //exclusive?=LT? HASH value=NonNegativeDecimal + public Group getGroup() { return cGroup; } + + //exclusive?=LT? + public Assignment getExclusiveAssignment_0() { return cExclusiveAssignment_0; } + + //LT + public RuleCall getExclusiveLTTerminalRuleCall_0_0() { return cExclusiveLTTerminalRuleCall_0_0; } + + //HASH + public RuleCall getHASHTerminalRuleCall_1() { return cHASHTerminalRuleCall_1; } + + //value=NonNegativeDecimal + public Assignment getValueAssignment_2() { return cValueAssignment_2; } + + //NonNegativeDecimal + public RuleCall getValueNonNegativeDecimalParserRuleCall_2_0() { return cValueNonNegativeDecimalParserRuleCall_2_0; } + } + + + private final ExpressionTemplateElements pExpressionTemplate; + private final SubExpressionElements pSubExpression; + private final FocusConceptElements pFocusConcept; + private final RefinementElements pRefinement; + private final AttributeGroupElements pAttributeGroup; + private final AttributeElements pAttribute; + private final AttributeValueElements pAttributeValue; + private final ConceptIdReplacementSlotElements pConceptIdReplacementSlot; + private final ExpressionReplacementSlotElements pExpressionReplacementSlot; + private final TokenReplacementSlotElements pTokenReplacementSlot; + private final TemplateInformationSlotElements pTemplateInformationSlot; + private final ConcreteValueReplacementSlotElements pConcreteValueReplacementSlot; + private final StringReplacementSlotElements pStringReplacementSlot; + private final IntegerReplacementSlotElements pIntegerReplacementSlot; + private final DecimalReplacementSlotElements pDecimalReplacementSlot; + private final EtlCardinalityElements pEtlCardinality; + private final ConceptReplacementSlotElements pConceptReplacementSlot; + private final ConceptReferenceElements pConceptReference; + private final SlotTokenElements pSlotToken; + private final StringValueElements pStringValue; + private final IntegerValueElements pIntegerValue; + private final DecimalValueElements pDecimalValue; + private final SlotIntegerElements pSlotInteger; + private final SlotIntegerValueElements pSlotIntegerValue; + private final SlotIntegerRangeElements pSlotIntegerRange; + private final SlotIntegerMinimumValueElements pSlotIntegerMinimumValue; + private final SlotIntegerMaximumValueElements pSlotIntegerMaximumValue; + private final SlotDecimalElements pSlotDecimal; + private final SlotDecimalValueElements pSlotDecimalValue; + private final SlotDecimalRangeElements pSlotDecimalRange; + private final SlotDecimalMinimumValueElements pSlotDecimalMinimumValue; + private final SlotDecimalMaximumValueElements pSlotDecimalMaximumValue; + private final TerminalRule tDOUBLE_SQUARE_OPEN; + private final TerminalRule tDOUBLE_SQUARE_CLOSE; + private final TerminalRule tTILDE; + private final TerminalRule tAT; + private final TerminalRule tID; + private final TerminalRule tSCG; + private final TerminalRule tTOK; + private final TerminalRule tSTR; + private final TerminalRule tINT; + private final TerminalRule tDEC; + private final TerminalRule tEQUIVALENT_TO; + private final TerminalRule tSUBTYPE_OF; + private final TerminalRule tSLOTNAME_STRING; + + private final Grammar grammar; + + private final EclGrammarAccess gaEcl; + + @Inject + public EtlGrammarAccess(GrammarProvider grammarProvider, + EclGrammarAccess gaEcl) { + this.grammar = internalFindGrammar(grammarProvider); + this.gaEcl = gaEcl; + this.pExpressionTemplate = new ExpressionTemplateElements(); + this.pSubExpression = new SubExpressionElements(); + this.pFocusConcept = new FocusConceptElements(); + this.pRefinement = new RefinementElements(); + this.pAttributeGroup = new AttributeGroupElements(); + this.pAttribute = new AttributeElements(); + this.pAttributeValue = new AttributeValueElements(); + this.pConceptIdReplacementSlot = new ConceptIdReplacementSlotElements(); + this.pExpressionReplacementSlot = new ExpressionReplacementSlotElements(); + this.pTokenReplacementSlot = new TokenReplacementSlotElements(); + this.pTemplateInformationSlot = new TemplateInformationSlotElements(); + this.pConcreteValueReplacementSlot = new ConcreteValueReplacementSlotElements(); + this.pStringReplacementSlot = new StringReplacementSlotElements(); + this.pIntegerReplacementSlot = new IntegerReplacementSlotElements(); + this.pDecimalReplacementSlot = new DecimalReplacementSlotElements(); + this.pEtlCardinality = new EtlCardinalityElements(); + this.pConceptReplacementSlot = new ConceptReplacementSlotElements(); + this.pConceptReference = new ConceptReferenceElements(); + this.pSlotToken = new SlotTokenElements(); + this.pStringValue = new StringValueElements(); + this.pIntegerValue = new IntegerValueElements(); + this.pDecimalValue = new DecimalValueElements(); + this.pSlotInteger = new SlotIntegerElements(); + this.pSlotIntegerValue = new SlotIntegerValueElements(); + this.pSlotIntegerRange = new SlotIntegerRangeElements(); + this.pSlotIntegerMinimumValue = new SlotIntegerMinimumValueElements(); + this.pSlotIntegerMaximumValue = new SlotIntegerMaximumValueElements(); + this.pSlotDecimal = new SlotDecimalElements(); + this.pSlotDecimalValue = new SlotDecimalValueElements(); + this.pSlotDecimalRange = new SlotDecimalRangeElements(); + this.pSlotDecimalMinimumValue = new SlotDecimalMinimumValueElements(); + this.pSlotDecimalMaximumValue = new SlotDecimalMaximumValueElements(); + this.tDOUBLE_SQUARE_OPEN = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.DOUBLE_SQUARE_OPEN"); + this.tDOUBLE_SQUARE_CLOSE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.DOUBLE_SQUARE_CLOSE"); + this.tTILDE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.TILDE"); + this.tAT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.AT"); + this.tID = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.ID"); + this.tSCG = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SCG"); + this.tTOK = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.TOK"); + this.tSTR = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.STR"); + this.tINT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.INT"); + this.tDEC = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.DEC"); + this.tEQUIVALENT_TO = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.EQUIVALENT_TO"); + this.tSUBTYPE_OF = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SUBTYPE_OF"); + this.tSLOTNAME_STRING = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.etl.Etl.SLOTNAME_STRING"); + } + + protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { + Grammar grammar = grammarProvider.getGrammar(this); + while (grammar != null) { + if ("com.b2international.snowowl.snomed.etl.Etl".equals(grammar.getName())) { + return grammar; + } + List grammars = grammar.getUsedGrammars(); + if (!grammars.isEmpty()) { + grammar = grammars.iterator().next(); + } else { + return null; + } + } + return grammar; + } + + @Override + public Grammar getGrammar() { + return grammar; + } + + + public EclGrammarAccess getEclGrammarAccess() { + return gaEcl; + } + + + //ExpressionTemplate: + // {ExpressionTemplate} (((primitive?=SUBTYPE_OF | EQUIVALENT_TO) | slot=TokenReplacementSlot)? + // expression=SubExpression)?; + public ExpressionTemplateElements getExpressionTemplateAccess() { + return pExpressionTemplate; + } + + public ParserRule getExpressionTemplateRule() { + return getExpressionTemplateAccess().getRule(); + } + + //SubExpression: + // focusConcepts+=FocusConcept (PLUS focusConcepts+=FocusConcept)* (COLON refinement=Refinement)?; + public SubExpressionElements getSubExpressionAccess() { + return pSubExpression; + } + + public ParserRule getSubExpressionRule() { + return getSubExpressionAccess().getRule(); + } + + //FocusConcept: + // slot=TemplateInformationSlot? concept=ConceptReference; + public FocusConceptElements getFocusConceptAccess() { + return pFocusConcept; + } + + public ParserRule getFocusConceptRule() { + return getFocusConceptAccess().getRule(); + } + + //Refinement: + // (attributes+=Attribute (COMMA attributes+=Attribute)* | groups+=AttributeGroup) (COMMA? groups+=AttributeGroup)*; + public RefinementElements getRefinementAccess() { + return pRefinement; + } + + public ParserRule getRefinementRule() { + return getRefinementAccess().getRule(); + } + + //AttributeGroup: + // slot=TemplateInformationSlot? CURLY_OPEN attributes+=Attribute (COMMA attributes+=Attribute)* CURLY_CLOSE; + public AttributeGroupElements getAttributeGroupAccess() { + return pAttributeGroup; + } + + public ParserRule getAttributeGroupRule() { + return getAttributeGroupAccess().getRule(); + } + + //Attribute: + // slot=TemplateInformationSlot? name=ConceptReference EQUAL value=AttributeValue; + public AttributeElements getAttributeAccess() { + return pAttribute; + } + + public ParserRule getAttributeRule() { + return getAttributeAccess().getRule(); + } + + //AttributeValue: + // ConceptReference | ROUND_OPEN SubExpression ROUND_CLOSE | StringValue | IntegerValue | DecimalValue | + // ConcreteValueReplacementSlot; + public AttributeValueElements getAttributeValueAccess() { + return pAttributeValue; + } + + public ParserRule getAttributeValueRule() { + return getAttributeValueAccess().getRule(); + } + + //ConceptIdReplacementSlot: + // {ConceptIdReplacementSlot} DOUBLE_SQUARE_OPEN PLUS ID (ROUND_OPEN constraint=ExpressionConstraint ROUND_CLOSE)? + // name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + public ConceptIdReplacementSlotElements getConceptIdReplacementSlotAccess() { + return pConceptIdReplacementSlot; + } + + public ParserRule getConceptIdReplacementSlotRule() { + return getConceptIdReplacementSlotAccess().getRule(); + } + + //ExpressionReplacementSlot: + // {ExpressionReplacementSlot} DOUBLE_SQUARE_OPEN PLUS SCG? (ROUND_OPEN constraint=ExpressionConstraint ROUND_CLOSE)? + // name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + public ExpressionReplacementSlotElements getExpressionReplacementSlotAccess() { + return pExpressionReplacementSlot; + } + + public ParserRule getExpressionReplacementSlotRule() { + return getExpressionReplacementSlotAccess().getRule(); + } + + //TokenReplacementSlot: + // {TokenReplacementSlot} DOUBLE_SQUARE_OPEN PLUS TOK (ROUND_OPEN tokens+=SlotToken tokens+=SlotToken* ROUND_CLOSE)? + // name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + public TokenReplacementSlotElements getTokenReplacementSlotAccess() { + return pTokenReplacementSlot; + } + + public ParserRule getTokenReplacementSlotRule() { + return getTokenReplacementSlotAccess().getRule(); + } + + //TemplateInformationSlot: + // {TemplateInformationSlot} DOUBLE_SQUARE_OPEN cardinality=EtlCardinality? name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + public TemplateInformationSlotElements getTemplateInformationSlotAccess() { + return pTemplateInformationSlot; + } + + public ParserRule getTemplateInformationSlotRule() { + return getTemplateInformationSlotAccess().getRule(); + } + + //ConcreteValueReplacementSlot: + // StringReplacementSlot | IntegerReplacementSlot | DecimalReplacementSlot; + public ConcreteValueReplacementSlotElements getConcreteValueReplacementSlotAccess() { + return pConcreteValueReplacementSlot; + } + + public ParserRule getConcreteValueReplacementSlotRule() { + return getConcreteValueReplacementSlotAccess().getRule(); + } + + //StringReplacementSlot: + // {StringReplacementSlot} DOUBLE_SQUARE_OPEN PLUS STR (ROUND_OPEN values+=STRING values+=STRING* ROUND_CLOSE)? + // name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + public StringReplacementSlotElements getStringReplacementSlotAccess() { + return pStringReplacementSlot; + } + + public ParserRule getStringReplacementSlotRule() { + return getStringReplacementSlotAccess().getRule(); + } + + //IntegerReplacementSlot: + // {IntegerReplacementSlot} DOUBLE_SQUARE_OPEN PLUS INT (ROUND_OPEN values+=SlotInteger values+=SlotInteger* + // ROUND_CLOSE)? name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + public IntegerReplacementSlotElements getIntegerReplacementSlotAccess() { + return pIntegerReplacementSlot; + } + + public ParserRule getIntegerReplacementSlotRule() { + return getIntegerReplacementSlotAccess().getRule(); + } + + //DecimalReplacementSlot: + // {DecimalReplacementSlot} DOUBLE_SQUARE_OPEN PLUS DEC (ROUND_OPEN values+=SlotDecimal values+=SlotDecimal* + // ROUND_CLOSE)? name=SLOTNAME_STRING? DOUBLE_SQUARE_CLOSE; + public DecimalReplacementSlotElements getDecimalReplacementSlotAccess() { + return pDecimalReplacementSlot; + } + + public ParserRule getDecimalReplacementSlotRule() { + return getDecimalReplacementSlotAccess().getRule(); + } + + //EtlCardinality: + // TILDE? min=NonNegativeInteger TO max=MaxValue; + public EtlCardinalityElements getEtlCardinalityAccess() { + return pEtlCardinality; + } + + public ParserRule getEtlCardinalityRule() { + return getEtlCardinalityAccess().getRule(); + } + + //ConceptReplacementSlot: + // ConceptIdReplacementSlot | ExpressionReplacementSlot; + public ConceptReplacementSlotElements getConceptReplacementSlotAccess() { + return pConceptReplacementSlot; + } + + public ParserRule getConceptReplacementSlotRule() { + return getConceptReplacementSlotAccess().getRule(); + } + + //ConceptReference: + // slot=ConceptReplacementSlot | id=SnomedIdentifier term=TERM_STRING?; + public ConceptReferenceElements getConceptReferenceAccess() { + return pConceptReference; + } + + public ParserRule getConceptReferenceRule() { + return getConceptReferenceAccess().getRule(); + } + + //SlotToken: + // EQUIVALENT_TO | SUBTYPE_OF | COMMA | CONJUNCTION | DISJUNCTION | EXCLUSION | REVERSED | CARET | LT | LTE | DBL_LT | + // LT_EM | GT | GTE | DBL_GT | GT_EM | EQUAL | NOT_EQUAL; + public SlotTokenElements getSlotTokenAccess() { + return pSlotToken; + } + + public ParserRule getSlotTokenRule() { + return getSlotTokenAccess().getRule(); + } + + //StringValue: + // value=STRING; + public StringValueElements getStringValueAccess() { + return pStringValue; + } + + public ParserRule getStringValueRule() { + return getStringValueAccess().getRule(); + } + + //IntegerValue: + // HASH value=Integer; + public IntegerValueElements getIntegerValueAccess() { + return pIntegerValue; + } + + public ParserRule getIntegerValueRule() { + return getIntegerValueAccess().getRule(); + } + + //DecimalValue: + // HASH value=Decimal; + public DecimalValueElements getDecimalValueAccess() { + return pDecimalValue; + } + + public ParserRule getDecimalValueRule() { + return getDecimalValueAccess().getRule(); + } + + //SlotInteger: + // SlotIntegerRange | SlotIntegerValue; + public SlotIntegerElements getSlotIntegerAccess() { + return pSlotInteger; + } + + public ParserRule getSlotIntegerRule() { + return getSlotIntegerAccess().getRule(); + } + + //SlotIntegerValue: + // HASH value=NonNegativeInteger; + public SlotIntegerValueElements getSlotIntegerValueAccess() { + return pSlotIntegerValue; + } + + public ParserRule getSlotIntegerValueRule() { + return getSlotIntegerValueAccess().getRule(); + } + + //SlotIntegerRange: + // minimum=SlotIntegerMinimumValue TO maximum=SlotIntegerMaximumValue? | TO maximum=SlotIntegerMaximumValue; + public SlotIntegerRangeElements getSlotIntegerRangeAccess() { + return pSlotIntegerRange; + } + + public ParserRule getSlotIntegerRangeRule() { + return getSlotIntegerRangeAccess().getRule(); + } + + //SlotIntegerMinimumValue: + // exclusive?=GT? HASH value=NonNegativeInteger; + public SlotIntegerMinimumValueElements getSlotIntegerMinimumValueAccess() { + return pSlotIntegerMinimumValue; + } + + public ParserRule getSlotIntegerMinimumValueRule() { + return getSlotIntegerMinimumValueAccess().getRule(); + } + + //SlotIntegerMaximumValue: + // exclusive?=LT? HASH value=NonNegativeInteger; + public SlotIntegerMaximumValueElements getSlotIntegerMaximumValueAccess() { + return pSlotIntegerMaximumValue; + } + + public ParserRule getSlotIntegerMaximumValueRule() { + return getSlotIntegerMaximumValueAccess().getRule(); + } + + //SlotDecimal: + // SlotDecimalRange | SlotDecimalValue; + public SlotDecimalElements getSlotDecimalAccess() { + return pSlotDecimal; + } + + public ParserRule getSlotDecimalRule() { + return getSlotDecimalAccess().getRule(); + } + + //SlotDecimalValue: + // HASH value=NonNegativeDecimal; + public SlotDecimalValueElements getSlotDecimalValueAccess() { + return pSlotDecimalValue; + } + + public ParserRule getSlotDecimalValueRule() { + return getSlotDecimalValueAccess().getRule(); + } + + //SlotDecimalRange: + // minimum=SlotDecimalMinimumValue TO maximum=SlotDecimalMaximumValue? | TO maximum=SlotDecimalMaximumValue; + public SlotDecimalRangeElements getSlotDecimalRangeAccess() { + return pSlotDecimalRange; + } + + public ParserRule getSlotDecimalRangeRule() { + return getSlotDecimalRangeAccess().getRule(); + } + + //SlotDecimalMinimumValue: + // exclusive?=GT? HASH value=NonNegativeDecimal; + public SlotDecimalMinimumValueElements getSlotDecimalMinimumValueAccess() { + return pSlotDecimalMinimumValue; + } + + public ParserRule getSlotDecimalMinimumValueRule() { + return getSlotDecimalMinimumValueAccess().getRule(); + } + + //SlotDecimalMaximumValue: + // exclusive?=LT? HASH value=NonNegativeDecimal; + public SlotDecimalMaximumValueElements getSlotDecimalMaximumValueAccess() { + return pSlotDecimalMaximumValue; + } + + public ParserRule getSlotDecimalMaximumValueRule() { + return getSlotDecimalMaximumValueAccess().getRule(); + } + + //terminal DOUBLE_SQUARE_OPEN: + // '[['; + public TerminalRule getDOUBLE_SQUARE_OPENRule() { + return tDOUBLE_SQUARE_OPEN; + } + + //terminal DOUBLE_SQUARE_CLOSE: + // ']]'; + public TerminalRule getDOUBLE_SQUARE_CLOSERule() { + return tDOUBLE_SQUARE_CLOSE; + } + + //terminal TILDE: + // '~'; + public TerminalRule getTILDERule() { + return tTILDE; + } + + //terminal AT: + // '@'; + public TerminalRule getATRule() { + return tAT; + } + + //terminal ID: + // 'id'; + public TerminalRule getIDRule() { + return tID; + } + + //terminal SCG: + // 'scg'; + public TerminalRule getSCGRule() { + return tSCG; + } + + //terminal TOK: + // 'tok'; + public TerminalRule getTOKRule() { + return tTOK; + } + + //terminal STR: + // 'str'; + public TerminalRule getSTRRule() { + return tSTR; + } + + //terminal INT: + // 'int'; + public TerminalRule getINTRule() { + return tINT; + } + + //terminal DEC: + // 'dec'; + public TerminalRule getDECRule() { + return tDEC; + } + + //terminal EQUIVALENT_TO: + // '==='; + public TerminalRule getEQUIVALENT_TORule() { + return tEQUIVALENT_TO; + } + + //terminal SUBTYPE_OF: + // '<<<'; + public TerminalRule getSUBTYPE_OFRule() { + return tSUBTYPE_OF; + } + + //terminal SLOTNAME_STRING: + // AT (STRING | !('\\' | '"' | "'" | WS | AT | SQUARE_OPEN | SQUARE_CLOSE)*); + public TerminalRule getSLOTNAME_STRINGRule() { + return tSLOTNAME_STRING; + } + + //Script: + // {Script} constraint=ExpressionConstraint?; + public EclGrammarAccess.ScriptElements getScriptAccess() { + return gaEcl.getScriptAccess(); + } + + public ParserRule getScriptRule() { + return getScriptAccess().getRule(); + } + + //ExpressionConstraint: + // OrExpressionConstraint; + public EclGrammarAccess.ExpressionConstraintElements getExpressionConstraintAccess() { + return gaEcl.getExpressionConstraintAccess(); + } + + public ParserRule getExpressionConstraintRule() { + return getExpressionConstraintAccess().getRule(); + } + + //OrExpressionConstraint ExpressionConstraint: + // AndExpressionConstraint ({OrExpressionConstraint.left=current} DISJUNCTION right=AndExpressionConstraint)*; + public EclGrammarAccess.OrExpressionConstraintElements getOrExpressionConstraintAccess() { + return gaEcl.getOrExpressionConstraintAccess(); + } + + public ParserRule getOrExpressionConstraintRule() { + return getOrExpressionConstraintAccess().getRule(); + } + + //AndExpressionConstraint ExpressionConstraint: + // ExclusionExpressionConstraint ({AndExpressionConstraint.left=current} (CONJUNCTION | COMMA) + // right=ExclusionExpressionConstraint)*; + public EclGrammarAccess.AndExpressionConstraintElements getAndExpressionConstraintAccess() { + return gaEcl.getAndExpressionConstraintAccess(); + } + + public ParserRule getAndExpressionConstraintRule() { + return getAndExpressionConstraintAccess().getRule(); + } + + //ExclusionExpressionConstraint ExpressionConstraint: + // RefinedExpressionConstraint ({ExclusionExpressionConstraint.left=current} EXCLUSION + // right=RefinedExpressionConstraint)?; + public EclGrammarAccess.ExclusionExpressionConstraintElements getExclusionExpressionConstraintAccess() { + return gaEcl.getExclusionExpressionConstraintAccess(); + } + + public ParserRule getExclusionExpressionConstraintRule() { + return getExclusionExpressionConstraintAccess().getRule(); + } + + //RefinedExpressionConstraint ExpressionConstraint: + // DottedExpressionConstraint ({RefinedExpressionConstraint.constraint=current} COLON refinement=EclRefinement)?; + public EclGrammarAccess.RefinedExpressionConstraintElements getRefinedExpressionConstraintAccess() { + return gaEcl.getRefinedExpressionConstraintAccess(); + } + + public ParserRule getRefinedExpressionConstraintRule() { + return getRefinedExpressionConstraintAccess().getRule(); + } + + //DottedExpressionConstraint ExpressionConstraint: + // SubExpressionConstraint ({DottedExpressionConstraint.constraint=current} DOT attribute=SubExpressionConstraint)*; + public EclGrammarAccess.DottedExpressionConstraintElements getDottedExpressionConstraintAccess() { + return gaEcl.getDottedExpressionConstraintAccess(); + } + + public ParserRule getDottedExpressionConstraintRule() { + return getDottedExpressionConstraintAccess().getRule(); + } + + //SubExpressionConstraint ExpressionConstraint: + // ChildOf | DescendantOf | DescendantOrSelfOf | ParentOf | AncestorOf | AncestorOrSelfOf | EclFocusConcept; + public EclGrammarAccess.SubExpressionConstraintElements getSubExpressionConstraintAccess() { + return gaEcl.getSubExpressionConstraintAccess(); + } + + public ParserRule getSubExpressionConstraintRule() { + return getSubExpressionConstraintAccess().getRule(); + } + + //EclFocusConcept ExpressionConstraint: + // MemberOf | EclConceptReference | Any | NestedExpression; + public EclGrammarAccess.EclFocusConceptElements getEclFocusConceptAccess() { + return gaEcl.getEclFocusConceptAccess(); + } + + public ParserRule getEclFocusConceptRule() { + return getEclFocusConceptAccess().getRule(); + } + + //ChildOf: + // LT_EM constraint=EclFocusConcept; + public EclGrammarAccess.ChildOfElements getChildOfAccess() { + return gaEcl.getChildOfAccess(); + } + + public ParserRule getChildOfRule() { + return getChildOfAccess().getRule(); + } + + //DescendantOf: + // LT constraint=EclFocusConcept; + public EclGrammarAccess.DescendantOfElements getDescendantOfAccess() { + return gaEcl.getDescendantOfAccess(); + } + + public ParserRule getDescendantOfRule() { + return getDescendantOfAccess().getRule(); + } + + //DescendantOrSelfOf: + // DBL_LT constraint=EclFocusConcept; + public EclGrammarAccess.DescendantOrSelfOfElements getDescendantOrSelfOfAccess() { + return gaEcl.getDescendantOrSelfOfAccess(); + } + + public ParserRule getDescendantOrSelfOfRule() { + return getDescendantOrSelfOfAccess().getRule(); + } + + //ParentOf: + // GT_EM constraint=EclFocusConcept; + public EclGrammarAccess.ParentOfElements getParentOfAccess() { + return gaEcl.getParentOfAccess(); + } + + public ParserRule getParentOfRule() { + return getParentOfAccess().getRule(); + } + + //AncestorOf: + // GT constraint=EclFocusConcept; + public EclGrammarAccess.AncestorOfElements getAncestorOfAccess() { + return gaEcl.getAncestorOfAccess(); + } + + public ParserRule getAncestorOfRule() { + return getAncestorOfAccess().getRule(); + } + + //AncestorOrSelfOf: + // DBL_GT constraint=EclFocusConcept; + public EclGrammarAccess.AncestorOrSelfOfElements getAncestorOrSelfOfAccess() { + return gaEcl.getAncestorOrSelfOfAccess(); + } + + public ParserRule getAncestorOrSelfOfRule() { + return getAncestorOrSelfOfAccess().getRule(); + } + + //MemberOf: + // CARET constraint=(EclConceptReference | Any | NestedExpression); + public EclGrammarAccess.MemberOfElements getMemberOfAccess() { + return gaEcl.getMemberOfAccess(); + } + + public ParserRule getMemberOfRule() { + return getMemberOfAccess().getRule(); + } + + //EclConceptReference: + // id=SnomedIdentifier term=TERM_STRING?; + public EclGrammarAccess.EclConceptReferenceElements getEclConceptReferenceAccess() { + return gaEcl.getEclConceptReferenceAccess(); + } + + public ParserRule getEclConceptReferenceRule() { + return getEclConceptReferenceAccess().getRule(); + } + + //Any: + // WILDCARD {Any}; + public EclGrammarAccess.AnyElements getAnyAccess() { + return gaEcl.getAnyAccess(); + } + + public ParserRule getAnyRule() { + return getAnyAccess().getRule(); + } + + //EclRefinement: + // OrRefinement; + public EclGrammarAccess.EclRefinementElements getEclRefinementAccess() { + return gaEcl.getEclRefinementAccess(); + } + + public ParserRule getEclRefinementRule() { + return getEclRefinementAccess().getRule(); + } + + //OrRefinement EclRefinement: + // AndRefinement -> ({OrRefinement.left=current} DISJUNCTION right=AndRefinement)*; + public EclGrammarAccess.OrRefinementElements getOrRefinementAccess() { + return gaEcl.getOrRefinementAccess(); + } + + public ParserRule getOrRefinementRule() { + return getOrRefinementAccess().getRule(); + } + + //AndRefinement EclRefinement: + // SubRefinement -> ({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubRefinement)*; + public EclGrammarAccess.AndRefinementElements getAndRefinementAccess() { + return gaEcl.getAndRefinementAccess(); + } + + public ParserRule getAndRefinementRule() { + return getAndRefinementAccess().getRule(); + } + + //SubRefinement EclRefinement: + // AttributeConstraint | EclAttributeGroup | NestedRefinement; + public EclGrammarAccess.SubRefinementElements getSubRefinementAccess() { + return gaEcl.getSubRefinementAccess(); + } + + public ParserRule getSubRefinementRule() { + return getSubRefinementAccess().getRule(); + } + + //NestedRefinement: + // ROUND_OPEN nested=EclRefinement ROUND_CLOSE; + public EclGrammarAccess.NestedRefinementElements getNestedRefinementAccess() { + return gaEcl.getNestedRefinementAccess(); + } + + public ParserRule getNestedRefinementRule() { + return getNestedRefinementAccess().getRule(); + } + + //EclAttributeGroup: + // cardinality=Cardinality? CURLY_OPEN refinement=EclAttributeSet CURLY_CLOSE; + public EclGrammarAccess.EclAttributeGroupElements getEclAttributeGroupAccess() { + return gaEcl.getEclAttributeGroupAccess(); + } + + public ParserRule getEclAttributeGroupRule() { + return getEclAttributeGroupAccess().getRule(); + } + + //EclAttributeSet EclRefinement: + // OrAttributeSet; + public EclGrammarAccess.EclAttributeSetElements getEclAttributeSetAccess() { + return gaEcl.getEclAttributeSetAccess(); + } + + public ParserRule getEclAttributeSetRule() { + return getEclAttributeSetAccess().getRule(); + } + + //OrAttributeSet EclRefinement: + // AndAttributeSet ({OrRefinement.left=current} DISJUNCTION right=AndAttributeSet)*; + public EclGrammarAccess.OrAttributeSetElements getOrAttributeSetAccess() { + return gaEcl.getOrAttributeSetAccess(); + } + + public ParserRule getOrAttributeSetRule() { + return getOrAttributeSetAccess().getRule(); + } + + //AndAttributeSet EclRefinement: + // SubAttributeSet ({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubAttributeSet)*; + public EclGrammarAccess.AndAttributeSetElements getAndAttributeSetAccess() { + return gaEcl.getAndAttributeSetAccess(); + } + + public ParserRule getAndAttributeSetRule() { + return getAndAttributeSetAccess().getRule(); + } + + //SubAttributeSet EclRefinement: + // AttributeConstraint | NestedAttributeSet; + public EclGrammarAccess.SubAttributeSetElements getSubAttributeSetAccess() { + return gaEcl.getSubAttributeSetAccess(); + } + + public ParserRule getSubAttributeSetRule() { + return getSubAttributeSetAccess().getRule(); + } + + //NestedAttributeSet NestedRefinement: + // ROUND_OPEN nested=EclAttributeSet ROUND_CLOSE; + public EclGrammarAccess.NestedAttributeSetElements getNestedAttributeSetAccess() { + return gaEcl.getNestedAttributeSetAccess(); + } + + public ParserRule getNestedAttributeSetRule() { + return getNestedAttributeSetAccess().getRule(); + } + + //AttributeConstraint: + // cardinality=Cardinality? reversed?=REVERSED? attribute=SubExpressionConstraint comparison=Comparison; + public EclGrammarAccess.AttributeConstraintElements getAttributeConstraintAccess() { + return gaEcl.getAttributeConstraintAccess(); + } + + public ParserRule getAttributeConstraintRule() { + return getAttributeConstraintAccess().getRule(); + } + + //Cardinality: + // SQUARE_OPEN min=NonNegativeInteger TO max=MaxValue SQUARE_CLOSE; + public EclGrammarAccess.CardinalityElements getCardinalityAccess() { + return gaEcl.getCardinalityAccess(); + } + + public ParserRule getCardinalityRule() { + return getCardinalityAccess().getRule(); + } + + //Comparison: + // AttributeComparison | DataTypeComparison; + public EclGrammarAccess.ComparisonElements getComparisonAccess() { + return gaEcl.getComparisonAccess(); + } + + public ParserRule getComparisonRule() { + return getComparisonAccess().getRule(); + } + + //AttributeComparison: + // AttributeValueEquals | AttributeValueNotEquals; + public EclGrammarAccess.AttributeComparisonElements getAttributeComparisonAccess() { + return gaEcl.getAttributeComparisonAccess(); + } + + public ParserRule getAttributeComparisonRule() { + return getAttributeComparisonAccess().getRule(); + } + + //DataTypeComparison: + // BooleanValueEquals + // | BooleanValueNotEquals + // | StringValueEquals + // | StringValueNotEquals + // | IntegerValueEquals + // | IntegerValueNotEquals + // | IntegerValueGreaterThan + // | IntegerValueGreaterThanEquals + // | IntegerValueLessThan + // | IntegerValueLessThanEquals + // | DecimalValueEquals + // | DecimalValueNotEquals + // | DecimalValueGreaterThan + // | DecimalValueGreaterThanEquals + // | DecimalValueLessThan + // | DecimalValueLessThanEquals; + public EclGrammarAccess.DataTypeComparisonElements getDataTypeComparisonAccess() { + return gaEcl.getDataTypeComparisonAccess(); + } + + public ParserRule getDataTypeComparisonRule() { + return getDataTypeComparisonAccess().getRule(); + } + + //AttributeValueEquals: + // EQUAL constraint=SubExpressionConstraint; + public EclGrammarAccess.AttributeValueEqualsElements getAttributeValueEqualsAccess() { + return gaEcl.getAttributeValueEqualsAccess(); + } + + public ParserRule getAttributeValueEqualsRule() { + return getAttributeValueEqualsAccess().getRule(); + } + + //AttributeValueNotEquals: + // NOT_EQUAL constraint=SubExpressionConstraint; + public EclGrammarAccess.AttributeValueNotEqualsElements getAttributeValueNotEqualsAccess() { + return gaEcl.getAttributeValueNotEqualsAccess(); + } + + public ParserRule getAttributeValueNotEqualsRule() { + return getAttributeValueNotEqualsAccess().getRule(); + } + + //BooleanValueEquals: + // EQUAL value=Boolean; + public EclGrammarAccess.BooleanValueEqualsElements getBooleanValueEqualsAccess() { + return gaEcl.getBooleanValueEqualsAccess(); + } + + public ParserRule getBooleanValueEqualsRule() { + return getBooleanValueEqualsAccess().getRule(); + } + + //BooleanValueNotEquals: + // NOT_EQUAL value=Boolean; + public EclGrammarAccess.BooleanValueNotEqualsElements getBooleanValueNotEqualsAccess() { + return gaEcl.getBooleanValueNotEqualsAccess(); + } + + public ParserRule getBooleanValueNotEqualsRule() { + return getBooleanValueNotEqualsAccess().getRule(); + } + + //StringValueEquals: + // EQUAL value=STRING; + public EclGrammarAccess.StringValueEqualsElements getStringValueEqualsAccess() { + return gaEcl.getStringValueEqualsAccess(); + } + + public ParserRule getStringValueEqualsRule() { + return getStringValueEqualsAccess().getRule(); + } + + //StringValueNotEquals: + // NOT_EQUAL value=STRING; + public EclGrammarAccess.StringValueNotEqualsElements getStringValueNotEqualsAccess() { + return gaEcl.getStringValueNotEqualsAccess(); + } + + public ParserRule getStringValueNotEqualsRule() { + return getStringValueNotEqualsAccess().getRule(); + } + + //IntegerValueEquals: + // EQUAL HASH value=Integer; + public EclGrammarAccess.IntegerValueEqualsElements getIntegerValueEqualsAccess() { + return gaEcl.getIntegerValueEqualsAccess(); + } + + public ParserRule getIntegerValueEqualsRule() { + return getIntegerValueEqualsAccess().getRule(); + } + + //IntegerValueNotEquals: + // NOT_EQUAL HASH value=Integer; + public EclGrammarAccess.IntegerValueNotEqualsElements getIntegerValueNotEqualsAccess() { + return gaEcl.getIntegerValueNotEqualsAccess(); + } + + public ParserRule getIntegerValueNotEqualsRule() { + return getIntegerValueNotEqualsAccess().getRule(); + } + + //IntegerValueGreaterThan: + // GT HASH value=Integer; + public EclGrammarAccess.IntegerValueGreaterThanElements getIntegerValueGreaterThanAccess() { + return gaEcl.getIntegerValueGreaterThanAccess(); + } + + public ParserRule getIntegerValueGreaterThanRule() { + return getIntegerValueGreaterThanAccess().getRule(); + } + + //IntegerValueLessThan: + // LT HASH value=Integer; + public EclGrammarAccess.IntegerValueLessThanElements getIntegerValueLessThanAccess() { + return gaEcl.getIntegerValueLessThanAccess(); + } + + public ParserRule getIntegerValueLessThanRule() { + return getIntegerValueLessThanAccess().getRule(); + } + + //IntegerValueGreaterThanEquals: + // GTE HASH value=Integer; + public EclGrammarAccess.IntegerValueGreaterThanEqualsElements getIntegerValueGreaterThanEqualsAccess() { + return gaEcl.getIntegerValueGreaterThanEqualsAccess(); + } + + public ParserRule getIntegerValueGreaterThanEqualsRule() { + return getIntegerValueGreaterThanEqualsAccess().getRule(); + } + + //IntegerValueLessThanEquals: + // LTE HASH value=Integer; + public EclGrammarAccess.IntegerValueLessThanEqualsElements getIntegerValueLessThanEqualsAccess() { + return gaEcl.getIntegerValueLessThanEqualsAccess(); + } + + public ParserRule getIntegerValueLessThanEqualsRule() { + return getIntegerValueLessThanEqualsAccess().getRule(); + } + + //DecimalValueEquals: + // EQUAL HASH value=Decimal; + public EclGrammarAccess.DecimalValueEqualsElements getDecimalValueEqualsAccess() { + return gaEcl.getDecimalValueEqualsAccess(); + } + + public ParserRule getDecimalValueEqualsRule() { + return getDecimalValueEqualsAccess().getRule(); + } + + //DecimalValueNotEquals: + // NOT_EQUAL HASH value=Decimal; + public EclGrammarAccess.DecimalValueNotEqualsElements getDecimalValueNotEqualsAccess() { + return gaEcl.getDecimalValueNotEqualsAccess(); + } + + public ParserRule getDecimalValueNotEqualsRule() { + return getDecimalValueNotEqualsAccess().getRule(); + } + + //DecimalValueGreaterThan: + // GT HASH value=Decimal; + public EclGrammarAccess.DecimalValueGreaterThanElements getDecimalValueGreaterThanAccess() { + return gaEcl.getDecimalValueGreaterThanAccess(); + } + + public ParserRule getDecimalValueGreaterThanRule() { + return getDecimalValueGreaterThanAccess().getRule(); + } + + //DecimalValueLessThan: + // LT HASH value=Decimal; + public EclGrammarAccess.DecimalValueLessThanElements getDecimalValueLessThanAccess() { + return gaEcl.getDecimalValueLessThanAccess(); + } + + public ParserRule getDecimalValueLessThanRule() { + return getDecimalValueLessThanAccess().getRule(); + } + + //DecimalValueGreaterThanEquals: + // GTE HASH value=Decimal; + public EclGrammarAccess.DecimalValueGreaterThanEqualsElements getDecimalValueGreaterThanEqualsAccess() { + return gaEcl.getDecimalValueGreaterThanEqualsAccess(); + } + + public ParserRule getDecimalValueGreaterThanEqualsRule() { + return getDecimalValueGreaterThanEqualsAccess().getRule(); + } + + //DecimalValueLessThanEquals: + // LTE HASH value=Decimal; + public EclGrammarAccess.DecimalValueLessThanEqualsElements getDecimalValueLessThanEqualsAccess() { + return gaEcl.getDecimalValueLessThanEqualsAccess(); + } + + public ParserRule getDecimalValueLessThanEqualsRule() { + return getDecimalValueLessThanEqualsAccess().getRule(); + } + + //NestedExpression: + // ROUND_OPEN nested=ExpressionConstraint ROUND_CLOSE; + public EclGrammarAccess.NestedExpressionElements getNestedExpressionAccess() { + return gaEcl.getNestedExpressionAccess(); + } + + public ParserRule getNestedExpressionRule() { + return getNestedExpressionAccess().getRule(); + } + + //// hidden grammar rules + //SnomedIdentifier hidden(): + // DIGIT_NONZERO (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) + // (DIGIT_NONZERO | ZERO)+; + public EclGrammarAccess.SnomedIdentifierElements getSnomedIdentifierAccess() { + return gaEcl.getSnomedIdentifierAccess(); + } + + public ParserRule getSnomedIdentifierRule() { + return getSnomedIdentifierAccess().getRule(); + } + + //NonNegativeInteger ecore::EInt hidden(): + // ZERO | DIGIT_NONZERO (DIGIT_NONZERO | ZERO)*; + public EclGrammarAccess.NonNegativeIntegerElements getNonNegativeIntegerAccess() { + return gaEcl.getNonNegativeIntegerAccess(); + } + + public ParserRule getNonNegativeIntegerRule() { + return getNonNegativeIntegerAccess().getRule(); + } + + //MaxValue ecore::EInt hidden(): + // NonNegativeInteger | WILDCARD; + public EclGrammarAccess.MaxValueElements getMaxValueAccess() { + return gaEcl.getMaxValueAccess(); + } + + public ParserRule getMaxValueRule() { + return getMaxValueAccess().getRule(); + } + + //Integer ecore::EInt hidden(): + // (PLUS | DASH)? NonNegativeInteger; + public EclGrammarAccess.IntegerElements getIntegerAccess() { + return gaEcl.getIntegerAccess(); + } + + public ParserRule getIntegerRule() { + return getIntegerAccess().getRule(); + } + + //Decimal ecore::EBigDecimal hidden(): + // (PLUS | DASH)? NonNegativeDecimal; + public EclGrammarAccess.DecimalElements getDecimalAccess() { + return gaEcl.getDecimalAccess(); + } + + public ParserRule getDecimalRule() { + return getDecimalAccess().getRule(); + } + + //NonNegativeDecimal ecore::EBigDecimal hidden(): + // NonNegativeInteger DOT (DIGIT_NONZERO | ZERO)*; + public EclGrammarAccess.NonNegativeDecimalElements getNonNegativeDecimalAccess() { + return gaEcl.getNonNegativeDecimalAccess(); + } + + public ParserRule getNonNegativeDecimalRule() { + return getNonNegativeDecimalAccess().getRule(); + } + + //Boolean ecore::EBoolean hidden(): + // 'true' | 'false'; + public EclGrammarAccess.BooleanElements getBooleanAccess() { + return gaEcl.getBooleanAccess(); + } + + public ParserRule getBooleanRule() { + return getBooleanAccess().getRule(); + } + + //terminal TERM_STRING: + // "|" !"|"* "|"; + public TerminalRule getTERM_STRINGRule() { + return gaEcl.getTERM_STRINGRule(); + } + + //terminal REVERSED: + // 'R'; + public TerminalRule getREVERSEDRule() { + return gaEcl.getREVERSEDRule(); + } + + //terminal TO: + // '..'; + public TerminalRule getTORule() { + return gaEcl.getTORule(); + } + + //terminal COMMA: + // ','; + public TerminalRule getCOMMARule() { + return gaEcl.getCOMMARule(); + } + + //terminal CONJUNCTION: + // ('a' | 'A') ('n' | 'N') ('d' | 'D'); + public TerminalRule getCONJUNCTIONRule() { + return gaEcl.getCONJUNCTIONRule(); + } + + //terminal DISJUNCTION: + // ('o' | 'O') ('r' | 'R'); + public TerminalRule getDISJUNCTIONRule() { + return gaEcl.getDISJUNCTIONRule(); + } + + //terminal EXCLUSION: + // ('m' | 'M') ('i' | 'I') ('n' | 'N') ('u' | 'U') ('s' | 'S'); + public TerminalRule getEXCLUSIONRule() { + return gaEcl.getEXCLUSIONRule(); + } + + //terminal ZERO: + // '0'; + public TerminalRule getZERORule() { + return gaEcl.getZERORule(); + } + + //terminal DIGIT_NONZERO: + // '1'..'9'; + public TerminalRule getDIGIT_NONZERORule() { + return gaEcl.getDIGIT_NONZERORule(); + } + + //terminal COLON: + // ':'; + public TerminalRule getCOLONRule() { + return gaEcl.getCOLONRule(); + } + + //terminal CURLY_OPEN: + // '{'; + public TerminalRule getCURLY_OPENRule() { + return gaEcl.getCURLY_OPENRule(); + } + + //terminal CURLY_CLOSE: + // '}'; + public TerminalRule getCURLY_CLOSERule() { + return gaEcl.getCURLY_CLOSERule(); + } + + //terminal ROUND_OPEN: + // '('; + public TerminalRule getROUND_OPENRule() { + return gaEcl.getROUND_OPENRule(); + } + + //terminal ROUND_CLOSE: + // ')'; + public TerminalRule getROUND_CLOSERule() { + return gaEcl.getROUND_CLOSERule(); + } + + //terminal SQUARE_OPEN: + // '['; + public TerminalRule getSQUARE_OPENRule() { + return gaEcl.getSQUARE_OPENRule(); + } + + //terminal SQUARE_CLOSE: + // ']'; + public TerminalRule getSQUARE_CLOSERule() { + return gaEcl.getSQUARE_CLOSERule(); + } + + //terminal PLUS: + // '+'; + public TerminalRule getPLUSRule() { + return gaEcl.getPLUSRule(); + } + + //terminal DASH: + // '-'; + public TerminalRule getDASHRule() { + return gaEcl.getDASHRule(); + } + + //terminal CARET: + // '^'; + public TerminalRule getCARETRule() { + return gaEcl.getCARETRule(); + } + + //terminal DOT: + // '.'; + public TerminalRule getDOTRule() { + return gaEcl.getDOTRule(); + } + + //terminal WILDCARD: + // '*'; + public TerminalRule getWILDCARDRule() { + return gaEcl.getWILDCARDRule(); + } + + //terminal EQUAL: + // '='; + public TerminalRule getEQUALRule() { + return gaEcl.getEQUALRule(); + } + + //terminal NOT_EQUAL: + // '!='; + public TerminalRule getNOT_EQUALRule() { + return gaEcl.getNOT_EQUALRule(); + } + + //terminal LT: + // '<'; + public TerminalRule getLTRule() { + return gaEcl.getLTRule(); + } + + //terminal GT: + // '>'; + public TerminalRule getGTRule() { + return gaEcl.getGTRule(); + } + + //terminal DBL_LT: + // '<<'; + public TerminalRule getDBL_LTRule() { + return gaEcl.getDBL_LTRule(); + } + + //terminal DBL_GT: + // '>>'; + public TerminalRule getDBL_GTRule() { + return gaEcl.getDBL_GTRule(); + } + + //terminal LT_EM: + // '!'; + public TerminalRule getGT_EMRule() { + return gaEcl.getGT_EMRule(); + } + + //terminal GTE: + // '>='; + public TerminalRule getGTERule() { + return gaEcl.getGTERule(); + } + + //terminal LTE: + // '<='; + public TerminalRule getLTERule() { + return gaEcl.getLTERule(); + } + + //terminal HASH: + // '#'; + public TerminalRule getHASHRule() { + return gaEcl.getHASHRule(); + } + + //terminal WS: + // ' ' | '\t' | '\n' | '\r'; + public TerminalRule getWSRule() { + return gaEcl.getWSRule(); + } + + //terminal ML_COMMENT: + // '/*'->'*/'; + public TerminalRule getML_COMMENTRule() { + return gaEcl.getML_COMMENTRule(); + } + + //terminal SL_COMMENT: + // '//' !('\n' | '\r')* ('\r'? '\n')?; + public TerminalRule getSL_COMMENTRule() { + return gaEcl.getSL_COMMENTRule(); + } + + //terminal STRING: + // '"' ('\\' . | !('\\' | '"'))* '"' | + // "'" ('\\' . | !('\\' | "'"))* "'"; + public TerminalRule getSTRINGRule() { + return gaEcl.getSTRINGRule(); + } +} diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/validation/AbstractSCGJavaValidator.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/validation/AbstractEtlValidator.java similarity index 57% rename from snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/validation/AbstractSCGJavaValidator.java rename to snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/validation/AbstractEtlValidator.java index 7ed153884e7..d8d9fc2e154 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/validation/AbstractSCGJavaValidator.java +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/validation/AbstractEtlValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,22 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl.validation; - +package com.b2international.snowowl.snomed.etl.validation; + +import com.b2international.snowowl.snomed.ecl.validation.EclValidator; import java.util.ArrayList; import java.util.List; - import org.eclipse.emf.ecore.EPackage; -import org.eclipse.xtext.validation.ComposedChecks; - -@ComposedChecks(validators= {org.eclipse.xtext.validation.ImportUriValidator.class, org.eclipse.xtext.validation.NamesAreUniqueValidator.class}) -public class AbstractSCGJavaValidator extends org.eclipse.xtext.validation.AbstractDeclarativeValidator { +public abstract class AbstractEtlValidator extends EclValidator { + @Override protected List getEPackages() { - List result = new ArrayList(); - result.add(com.b2international.snowowl.dsl.scg.ScgPackage.eINSTANCE); + List result = new ArrayList(super.getEPackages()); + result.add(com.b2international.snowowl.snomed.etl.etl.EtlPackage.eINSTANCE); return result; } - -} \ No newline at end of file +} diff --git a/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/Etl.xtext b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/Etl.xtext new file mode 100644 index 00000000000..a33efe5fc55 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/Etl.xtext @@ -0,0 +1,158 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +grammar com.b2international.snowowl.snomed.etl.Etl with com.b2international.snowowl.snomed.ecl.Ecl + +generate etl "http://www.b2international.com/snowowl/snomed/etl/Etl" +import 'http://www.eclipse.org/emf/2002/Ecore' as ecore + +ExpressionTemplate: + {ExpressionTemplate} (((primitive?=SUBTYPE_OF | EQUIVALENT_TO) | slot=TokenReplacementSlot)? expression=SubExpression)?; + +SubExpression: + focusConcepts+=FocusConcept (PLUS focusConcepts+=FocusConcept)* (COLON refinement=Refinement)?; + +FocusConcept: + (slot=TemplateInformationSlot)? concept=ConceptReference; + +Refinement: + (attributes+=Attribute (COMMA attributes+=Attribute)* | groups+=AttributeGroup) (COMMA? groups+=AttributeGroup)*; + +AttributeGroup: + (slot=TemplateInformationSlot)? CURLY_OPEN attributes+=Attribute (COMMA attributes+=Attribute)* CURLY_CLOSE; + +Attribute: + (slot=TemplateInformationSlot)? name=ConceptReference EQUAL value=AttributeValue; + +AttributeValue: + ConceptReference | ROUND_OPEN SubExpression ROUND_CLOSE | StringValue | IntegerValue | DecimalValue | ConcreteValueReplacementSlot; + +ConceptIdReplacementSlot: + {ConceptIdReplacementSlot} DOUBLE_SQUARE_OPEN PLUS ID (ROUND_OPEN constraint=ExpressionConstraint ROUND_CLOSE)? (name=SLOTNAME_STRING)? DOUBLE_SQUARE_CLOSE; + +ExpressionReplacementSlot: + {ExpressionReplacementSlot} DOUBLE_SQUARE_OPEN PLUS SCG? (ROUND_OPEN constraint=ExpressionConstraint ROUND_CLOSE)? (name=SLOTNAME_STRING)? DOUBLE_SQUARE_CLOSE; + +TokenReplacementSlot: + {TokenReplacementSlot} DOUBLE_SQUARE_OPEN PLUS TOK (ROUND_OPEN tokens+=SlotToken (tokens+=SlotToken)* ROUND_CLOSE)? (name=SLOTNAME_STRING)? DOUBLE_SQUARE_CLOSE; + +TemplateInformationSlot: + {TemplateInformationSlot} DOUBLE_SQUARE_OPEN (cardinality=EtlCardinality)? (name=SLOTNAME_STRING)? DOUBLE_SQUARE_CLOSE; + +ConcreteValueReplacementSlot: + StringReplacementSlot | IntegerReplacementSlot | DecimalReplacementSlot; + +StringReplacementSlot: + {StringReplacementSlot} DOUBLE_SQUARE_OPEN PLUS STR (ROUND_OPEN values+=STRING (values+=STRING)* ROUND_CLOSE)? (name=SLOTNAME_STRING)? DOUBLE_SQUARE_CLOSE; + +IntegerReplacementSlot: + {IntegerReplacementSlot} DOUBLE_SQUARE_OPEN PLUS INT (ROUND_OPEN values+=SlotInteger (values+=SlotInteger)* ROUND_CLOSE)? (name=SLOTNAME_STRING)? DOUBLE_SQUARE_CLOSE; + +DecimalReplacementSlot: + {DecimalReplacementSlot} DOUBLE_SQUARE_OPEN PLUS DEC (ROUND_OPEN values+=SlotDecimal (values+=SlotDecimal)* ROUND_CLOSE)? (name=SLOTNAME_STRING)? DOUBLE_SQUARE_CLOSE; + +EtlCardinality: // XXX this is different to Ecl.Cardinality -> needed to remove square brackets and to add optional tilde (-> IHTSDO has template syntax v0.2) + TILDE? min=NonNegativeInteger TO max=MaxValue; + +ConceptReplacementSlot: + ConceptIdReplacementSlot | ExpressionReplacementSlot; + +ConceptReference: + (slot=ConceptReplacementSlot) | (id=SnomedIdentifier (term=TERM_STRING)?); + +SlotToken: + EQUIVALENT_TO | SUBTYPE_OF | + COMMA | CONJUNCTION | DISJUNCTION | EXCLUSION | REVERSED | CARET | + LT | LTE | DBL_LT | LT_EM | + GT | GTE | DBL_GT | GT_EM | + EQUAL | NOT_EQUAL; + +StringValue: + value=STRING; + +IntegerValue: // this is used by SCG (and ECL) and can be negative or positive + HASH value=Integer; + +DecimalValue: // this is used by SCG (and ECL) and can be negative or positive + HASH value=Decimal; + +SlotInteger: // this is a slot integer value which cannot be negative, the range must preceed the simple value in this definition + SlotIntegerRange | SlotIntegerValue; + +SlotIntegerValue: + HASH value=NonNegativeInteger; + +SlotIntegerRange: + (minimum=SlotIntegerMinimumValue TO (maximum=SlotIntegerMaximumValue)?) | (TO maximum=SlotIntegerMaximumValue); + +SlotIntegerMinimumValue: + (exclusive?=GT)? HASH value=NonNegativeInteger; + +SlotIntegerMaximumValue: + (exclusive?=LT)? HASH value=NonNegativeInteger; + +SlotDecimal: // this is a slot decimal value which cannot be negative, the range must preceed the simple value in this definition + SlotDecimalRange | SlotDecimalValue; + +SlotDecimalValue: + HASH value=NonNegativeDecimal; + +SlotDecimalRange: + (minimum=SlotDecimalMinimumValue TO (maximum=SlotDecimalMaximumValue)?) | (TO maximum=SlotDecimalMaximumValue); + +SlotDecimalMinimumValue: + (exclusive?=GT)? HASH value=NonNegativeDecimal; + +SlotDecimalMaximumValue: + (exclusive?=LT)? HASH value=NonNegativeDecimal; + +terminal DOUBLE_SQUARE_OPEN: + '[['; + +terminal DOUBLE_SQUARE_CLOSE: + ']]'; + +terminal TILDE: + '~'; + +terminal AT: + '@'; + +terminal ID: + 'id'; + +terminal SCG: + 'scg'; + +terminal TOK: + 'tok'; + +terminal STR: + 'str'; + +terminal INT: + 'int'; + +terminal DEC: + 'dec'; + +terminal EQUIVALENT_TO: + '==='; + +terminal SUBTYPE_OF: + '<<<'; + +terminal SLOTNAME_STRING: + AT (STRING | (!('\\' | '"' | "'" | WS | AT | SQUARE_OPEN | SQUARE_CLOSE))*); diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGRuntimeModule.java b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/EtlRuntimeModule.java similarity index 55% rename from snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGRuntimeModule.java rename to snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/EtlRuntimeModule.java index a8850f3074c..a90cf561141 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGRuntimeModule.java +++ b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/EtlRuntimeModule.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,24 +13,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl; +package com.b2international.snowowl.snomed.etl; -import com.b2international.snowowl.core.ApplicationContext; -import com.b2international.snowowl.eventbus.IEventBus; -import com.google.inject.Provider; +import org.eclipse.xtext.conversion.IValueConverterService; + +import com.b2international.snowowl.snomed.etl.converter.EtlValueConverterService; /** * Use this class to register components to be used at runtime / without the Equinox extension registry. */ -public class SCGRuntimeModule extends com.b2international.snowowl.dsl.AbstractSCGRuntimeModule { - - public Provider provideIEventBus() { - return new Provider() { - @Override - public IEventBus get() { - return ApplicationContext.getServiceForClass(IEventBus.class); - } - }; +public class EtlRuntimeModule extends AbstractEtlRuntimeModule { + + @Override + public Class bindIValueConverterService() { + return EtlValueConverterService.class; } -} \ No newline at end of file +} diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/QueryRewriter.java b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/EtlStandaloneSetup.java similarity index 60% rename from snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/QueryRewriter.java rename to snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/EtlStandaloneSetup.java index 9dd63257d40..435d9bf7d24 100644 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/QueryRewriter.java +++ b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/EtlStandaloneSetup.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,17 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.dsl.query; - +package com.b2international.snowowl.snomed.etl; /** - * A QueryRewriter is something that can rewrite an input to an RValue (root of the - * Quert AST). Input can be a "foreign" AST (for example ESCG), or even an RValue - * (for query optimization) - * + * Initialization support for running Xtext languages without Equinox extension registry. */ -public interface QueryRewriter { +public class EtlStandaloneSetup extends EtlStandaloneSetupGenerated { - RValue rewrite(T input); -} \ No newline at end of file + public static void doSetup() { + new EtlStandaloneSetup().createInjectorAndDoEMFRegistration(); + } +} diff --git a/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/GenerateEtl.mwe2 b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/GenerateEtl.mwe2 new file mode 100644 index 00000000000..4808c8fc05a --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/GenerateEtl.mwe2 @@ -0,0 +1,99 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +module com.b2international.snowowl.snomed.etl.GenerateEtl + +import org.eclipse.xtext.xtext.generator.* +import org.eclipse.xtext.xtext.generator.model.project.* + +var rootPath = ".." +var header = "/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the \"License\"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an \"AS IS\" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */" + +Workflow { + + component = XtextGenerator { + configuration = { + project = StandardProjectConfig { + baseName = "com.b2international.snowowl.snomed.etl" + rootPath = rootPath + genericIde = { + enabled = true + root = "../../../snow-owl-ext/snomed-ui/com.b2international.snowowl.snomed.etl.ui" + name = "com.b2international.snowowl.snomed.etl.ui" + } + runtimeTest = { + enabled = true + } + eclipsePlugin = { + enabled = true + root = "../../../snow-owl-ext/snomed-ui/com.b2international.snowowl.snomed.etl.ui" + } + eclipsePluginTest = { + enabled = false + } + createEclipseMetaData = false + } + code = { + encoding = "UTF-8" + lineDelimiter = "\n" + fileHeader = header + preferXtendStubs = false + } + } + language = StandardLanguage { + name = "com.b2international.snowowl.snomed.etl.Etl" + fileExtensions = "etl" + + serializer = { + generateStub = false + } + + parserGenerator = org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 auto-inject { + options = { + backtrack = true + ignoreCase = true + classSplitting = true + } + } + + validator = { + // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" + // Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage + // generateDeprecationValidation = true + } + } + } + + bean = org.eclipse.emf.mwe.utils.StandaloneSetup { + scanClassPath = true + platformUri = "${rootPath}/.." + registerGeneratedEPackage = "com.b2international.snowowl.snomed.ecl.ecl.EclPackage" + registerGenModelFile = "platform:/resource/com.b2international.snowowl.snomed.ecl/model/generated/Ecl.genmodel" + } +} diff --git a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/QueryParser.java b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/converter/EtlValueConverterService.java similarity index 65% rename from snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/QueryParser.java rename to snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/converter/EtlValueConverterService.java index a109f8722f6..c27d09beaba 100644 --- a/snomed/com.b2international.snowowl.snomed.dsl/src/com/b2international/snowowl/snomed/dsl/query/QueryParser.java +++ b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/converter/EtlValueConverterService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,13 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.dsl.query; +package com.b2international.snowowl.snomed.etl.converter; -import java.io.Reader; +import com.b2international.snowowl.snomed.ecl.converter.EclValueConverterService; -import org.eclipse.emf.ecore.EObject; +public final class EtlValueConverterService extends EclValueConverterService { -public interface QueryParser extends QueryRewriter { - RValue parse(Reader reader) throws SyntaxErrorException ; -} \ No newline at end of file +} diff --git a/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/generator/EtlGenerator.java b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/generator/EtlGenerator.java new file mode 100644 index 00000000000..8c109cf4e42 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/generator/EtlGenerator.java @@ -0,0 +1,42 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.generator; + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.xtext.generator.AbstractGenerator; +import org.eclipse.xtext.generator.IFileSystemAccess2; +import org.eclipse.xtext.generator.IGeneratorContext; + +/** + * Generates code from your model files on save. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation + */ +public class EtlGenerator extends AbstractGenerator { + + @Override + public void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { +// Iterator filtered = Iterators.filter(resource.getAllContents(), Greeting.class); +// Iterator names = Iterators.transform(filtered, new Function() { +// +// @Override +// public String apply(Greeting greeting) { +// return greeting.getName(); +// } +// }); +// fsa.generateFile("greetings.txt", "People to greet: " + IteratorExtensions.join(names, ", ")); + } +} diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/scoping/SCGScopeProvider.java b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/scoping/EtlScopeProvider.java similarity index 63% rename from snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/scoping/SCGScopeProvider.java rename to snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/scoping/EtlScopeProvider.java index 4a5ca023235..ab52b933cf1 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/scoping/SCGScopeProvider.java +++ b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/scoping/EtlScopeProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,17 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl.scoping; +package com.b2international.snowowl.snomed.etl.scoping; -import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; /** * This class contains custom scoping description. * - * see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#scoping - * on how and when to use it - * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping + * on how and when to use it. */ -public class SCGScopeProvider extends AbstractDeclarativeScopeProvider { +public class EtlScopeProvider extends AbstractEtlScopeProvider { -} \ No newline at end of file +} diff --git a/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/validation/EtlValidator.java b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/validation/EtlValidator.java new file mode 100644 index 00000000000..416fada9ac6 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.etl/src/com/b2international/snowowl/snomed/etl/validation/EtlValidator.java @@ -0,0 +1,37 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.etl.validation; + + +/** + * This class contains custom validation rules. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation + */ +public class EtlValidator extends AbstractEtlValidator { + +// public static final INVALID_NAME = 'invalidName' +// +// @Check +// public void checkGreetingStartsWithCapital(Greeting greeting) { +// if (!Character.isUpperCase(greeting.getName().charAt(0))) { +// warning("Name should start with a capital", +// EtlPackage.Literals.GREETING__NAME, +// INVALID_NAME); +// } +// } + +} diff --git a/snomed/com.b2international.snowowl.snomed.fhir/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.fhir/META-INF/MANIFEST.MF index c23a7e9f27b..c7831f59400 100644 --- a/snomed/com.b2international.snowowl.snomed.fhir/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.fhir/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT FHIR support Bundle-SymbolicName: com.b2international.snowowl.snomed.fhir;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: com.b2international.snowowl.fhir.core, diff --git a/snomed/com.b2international.snowowl.snomed.fhir/pom.xml b/snomed/com.b2international.snowowl.snomed.fhir/pom.xml index 7e4fdaa3e1b..d68c585d775 100644 --- a/snomed/com.b2international.snowowl.snomed.fhir/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.fhir/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl snomed-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.snomed.fhir diff --git a/snomed/com.b2international.snowowl.snomed.fhir/src/com/b2international/snowowl/snomed/fhir/SnomedCodeSystemApiProvider.java b/snomed/com.b2international.snowowl.snomed.fhir/src/com/b2international/snowowl/snomed/fhir/SnomedCodeSystemApiProvider.java index d634754ddd7..1b23621f0f0 100644 --- a/snomed/com.b2international.snowowl.snomed.fhir/src/com/b2international/snowowl/snomed/fhir/SnomedCodeSystemApiProvider.java +++ b/snomed/com.b2international.snowowl.snomed.fhir/src/com/b2international/snowowl/snomed/fhir/SnomedCodeSystemApiProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,8 +46,6 @@ import com.b2international.snowowl.fhir.core.provider.ICodeSystemApiProvider; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; @@ -271,7 +269,7 @@ private LookupResult mapToLookupResult(SnomedConcept concept, LookupRequest look } if (lookupRequest.isPropertyRequested(CoreSnomedConceptProperties.SUFFICIENTLY_DEFINED)) { - resultBuilder.addProperty(CoreSnomedConceptProperties.SUFFICIENTLY_DEFINED.propertyOf(concept.getDefinitionStatus() == DefinitionStatus.FULLY_DEFINED)); + resultBuilder.addProperty(CoreSnomedConceptProperties.SUFFICIENTLY_DEFINED.propertyOf(!concept.isPrimitive())); } if (lookupRequest.isPropertyRequested(CoreSnomedConceptProperties.EFFECTIVE_TIME)) { @@ -308,7 +306,7 @@ private LookupResult mapToLookupResult(SnomedConcept concept, LookupRequest look SnomedRequests.prepareSearchRelationship() .all() .filterByActive(true) - .filterByCharacteristicType(CharacteristicType.INFERRED_RELATIONSHIP.getConceptId()) + .filterByCharacteristicType(Concepts.INFERRED_RELATIONSHIP) .filterBySource(concept.getId()) .filterByType(relationshipTypeIds) .build(getRepositoryId(), branchPath) diff --git a/snomed/com.b2international.snowowl.snomed.fhir/src/com/b2international/snowowl/snomed/fhir/SnomedConceptMapApiProvider.java b/snomed/com.b2international.snowowl.snomed.fhir/src/com/b2international/snowowl/snomed/fhir/SnomedConceptMapApiProvider.java index bc2b1bcf7a5..7ff97dfe2d9 100644 --- a/snomed/com.b2international.snowowl.snomed.fhir/src/com/b2international/snowowl/snomed/fhir/SnomedConceptMapApiProvider.java +++ b/snomed/com.b2international.snowowl.snomed.fhir/src/com/b2international/snowowl/snomed/fhir/SnomedConceptMapApiProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,6 +76,11 @@ */ public final class SnomedConceptMapApiProvider extends SnomedFhirApiProvider implements IConceptMapApiProvider { + private static final List CONCEPT_MAP_TYPES = ImmutableList.of(SnomedRefSetType.SIMPLE_MAP, + SnomedRefSetType.COMPLEX_MAP, + SnomedRefSetType.COMPLEX_BLOCK_MAP, + SnomedRefSetType.EXTENDED_MAP); + @Component public static final class Factory implements IConceptMapApiProvider.Factory { @Override @@ -99,7 +104,7 @@ public Collection getConceptMaps() { .map(csve -> { return SnomedRequests.prepareSearchRefSet() .all() - .filterByTypes(ImmutableList.of(SnomedRefSetType.SIMPLE_MAP, SnomedRefSetType.COMPLEX_MAP, SnomedRefSetType.EXTENDED_MAP)) + .filterByTypes(CONCEPT_MAP_TYPES) // TODO figure out how to expand members on a ConceptMap in a pageable fashion (there is no official API for it right now) // .setExpand("members(expand(referencedComponent(expand(pt()))), limit:"+ Integer.MAX_VALUE +")") .setLocales(getLocales()) @@ -126,7 +131,7 @@ public ConceptMap getConceptMap(LogicalId logicalId) { SnomedReferenceSet snomedReferenceSet = SnomedRequests.prepareSearchRefSet() .all() .filterById(logicalId.getComponentId()) - .filterByTypes(ImmutableList.of(SnomedRefSetType.SIMPLE_MAP, SnomedRefSetType.COMPLEX_MAP, SnomedRefSetType.EXTENDED_MAP)) + .filterByTypes(CONCEPT_MAP_TYPES) // TODO figure out how to expand members on a ConceptMap in a pageable fashion (there is no official API for it right now) // .setExpand("members(expand(referencedComponent(expand(pt()))), limit:" + Integer.MAX_VALUE +")") .setLocales(getLocales()) @@ -171,7 +176,7 @@ public TranslateResult translate(LogicalId logicalId, TranslateRequest translate .one() .filterByActive(true) .filterById(logicalId.getComponentId()) - .filterByTypes(ImmutableList.of(SnomedRefSetType.SIMPLE_MAP, SnomedRefSetType.COMPLEX_MAP, SnomedRefSetType.EXTENDED_MAP)) + .filterByTypes(CONCEPT_MAP_TYPES) .build(repositoryId, codeSystemVersion.getPath()) .execute(getBus()) .getSync() @@ -208,7 +213,7 @@ public TranslateResult translate(LogicalId logicalId, TranslateRequest translate .filterByActive(true) .setExpand("referencedComponent(expand(pt()))") .filterByRefSet(logicalId.getComponentId()) - .filterByRefSetType(ImmutableList.of(SnomedRefSetType.SIMPLE_MAP, SnomedRefSetType.COMPLEX_MAP, SnomedRefSetType.EXTENDED_MAP)) + .filterByRefSetType(CONCEPT_MAP_TYPES) .setLocales(getLocales()) .filterByReferencedComponentType(SnomedTerminologyComponentConstants.CONCEPT); @@ -268,7 +273,7 @@ public Collection translate(TranslateRequest translateRequest) { Set refsetIds = SnomedRequests.prepareSearchRefSet() .all() .filterByActive(true) - .filterByTypes(ImmutableList.of(SnomedRefSetType.SIMPLE_MAP, SnomedRefSetType.COMPLEX_MAP, SnomedRefSetType.EXTENDED_MAP)) + .filterByTypes(CONCEPT_MAP_TYPES) .filterByMapTargetComponentType(terminologyComponentIdAsInt) .filterByReferencedComponentType(SnomedTerminologyComponentConstants.CONCEPT) .build(repositoryId, codeSystemVersion.getPath()) @@ -283,7 +288,7 @@ public Collection translate(TranslateRequest translateRequest) { .filterByActive(true) .setExpand("referencedComponent(expand(pt()))") .filterByRefSet(refsetIds) - .filterByRefSetType(ImmutableList.of(SnomedRefSetType.SIMPLE_MAP, SnomedRefSetType.COMPLEX_MAP, SnomedRefSetType.EXTENDED_MAP)) + .filterByRefSetType(CONCEPT_MAP_TYPES) .setLocales(getLocales()) .filterByReferencedComponentType(SnomedTerminologyComponentConstants.CONCEPT); diff --git a/snomed/com.b2international.snowowl.snomed.fhir/src/com/b2international/snowowl/snomed/fhir/SnomedValueSetApiProvider.java b/snomed/com.b2international.snowowl.snomed.fhir/src/com/b2international/snowowl/snomed/fhir/SnomedValueSetApiProvider.java index 89c3d5aad70..5a6b7df49af 100644 --- a/snomed/com.b2international.snowowl.snomed.fhir/src/com/b2international/snowowl/snomed/fhir/SnomedValueSetApiProvider.java +++ b/snomed/com.b2international.snowowl.snomed.fhir/src/com/b2international/snowowl/snomed/fhir/SnomedValueSetApiProvider.java @@ -248,7 +248,6 @@ public ValueSet expandValueSet(String uriString) { @Override public ValueSet expandValueSet(ExpandValueSetRequest request) { - //same as the GET url parameter if (request.getValueSet() == null) { return expandValueSet(request.getUrl().getUriValue()); @@ -256,20 +255,19 @@ public ValueSet expandValueSet(ExpandValueSetRequest request) { //valueset is sent for expansion ValueSet valueSet = request.getValueSet(); - Collection composeParts = valueSet.getComposeParts(); - if (composeParts == null || composeParts.isEmpty()) { + Compose compose = valueSet.getCompose(); + if (compose == null) { throw new BadRequestException("Compose is null or empty. Nothing to expand", "$expand.valueSet.compose[]"); } - for (Compose compose : composeParts) { - Collection includes = compose.getIncludes(); - for (Include include : includes) { - Collection filters = include.getFilters(); - for (ValueSetFilter valueSetFilter : filters) { - //TODO: - } + Collection includes = compose.getIncludes(); + for (Include include : includes) { + Collection filters = include.getFilters(); + for (ValueSetFilter valueSetFilter : filters) { + //TODO: } } + throw new NotImplementedException(); } @@ -745,7 +743,7 @@ private ValueSet.Builder buildSimpleTypeValueSet(final SnomedComponent snomedCom .addInclude(include) .build(); - return builder.addCompose(compose); + return builder.compose(compose); } private ValueSet.Builder buildExpandedSimpleTypeValueSet(SnomedReferenceSet referenceSet, CodeSystemVersionEntry codeSystemVersion, final List locales) { @@ -936,7 +934,7 @@ private ValueSet.Builder buildQueryTypeValueSet(final SnomedReferenceSetMember r return builder .name(pt) .title(pt) - .addCompose(compose); + .compose(compose); } diff --git a/snomed/com.b2international.snowowl.snomed.icons/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.icons/META-INF/MANIFEST.MF index fc2bd2902d4..1aa67c319fa 100644 --- a/snomed/com.b2international.snowowl.snomed.icons/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.icons/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Icons Bundle-SymbolicName: com.b2international.snowowl.snomed.icons;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: com.b2international.commons, diff --git a/snomed/com.b2international.snowowl.snomed.icons/pom.xml b/snomed/com.b2international.snowowl.snomed.icons/pom.xml index f3417d8078c..a771e8a3c43 100644 --- a/snomed/com.b2international.snowowl.snomed.icons/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.icons/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl snomed-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.mrcm.model/src/com/b2international/snowowl/snomed/mrcm/SingletonConceptSetDefinition.java b/snomed/com.b2international.snowowl.snomed.mrcm.model/src/com/b2international/snowowl/snomed/mrcm/SingletonConceptSetDefinition.java deleted file mode 100644 index 3b1957f1a63..00000000000 --- a/snomed/com.b2international.snowowl.snomed.mrcm.model/src/com/b2international/snowowl/snomed/mrcm/SingletonConceptSetDefinition.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.mrcm; - - -/** - * - * A representation of the model object 'Singleton Concept Set Definition'. - * - * - * - * Concept set definition for a single concept. - * - * - *

      - * The following features are supported: - *

      - *
        - *
      • {@link com.b2international.snowowl.snomed.mrcm.SingletonConceptSetDefinition#getConceptId Concept Id}
      • - *
      - * - * @see com.b2international.snowowl.snomed.mrcm.MrcmPackage#getSingletonConceptSetDefinition() - * @model - * @generated - */ -public interface SingletonConceptSetDefinition extends ConceptSetDefinition { - /** - * Returns the value of the 'Concept Id' attribute. - * - * - * @return the value of the 'Concept Id' attribute. - * @see #setConceptId(String) - * @see com.b2international.snowowl.snomed.mrcm.MrcmPackage#getSingletonConceptSetDefinition_ConceptId() - * @model required="true" - * @generated - */ - String getConceptId(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.mrcm.SingletonConceptSetDefinition#getConceptId Concept Id}' attribute. - * - * - * @param value the new value of the 'Concept Id' attribute. - * @see #getConceptId() - * @generated - */ - void setConceptId(String value); - -} // SingletonConceptSetDefinition diff --git a/snomed/com.b2international.snowowl.snomed.mrcm.model/src/com/b2international/snowowl/snomed/mrcm/impl/SingletonConceptSetDefinitionImpl.java b/snomed/com.b2international.snowowl.snomed.mrcm.model/src/com/b2international/snowowl/snomed/mrcm/impl/SingletonConceptSetDefinitionImpl.java deleted file mode 100644 index 6d8c760dcad..00000000000 --- a/snomed/com.b2international.snowowl.snomed.mrcm.model/src/com/b2international/snowowl/snomed/mrcm/impl/SingletonConceptSetDefinitionImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.mrcm.impl; - -import com.b2international.snowowl.snomed.mrcm.MrcmPackage; -import com.b2international.snowowl.snomed.mrcm.SingletonConceptSetDefinition; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Singleton Concept Set Definition'. - * - *

      - * The following features are implemented: - *

      - *
        - *
      • {@link com.b2international.snowowl.snomed.mrcm.impl.SingletonConceptSetDefinitionImpl#getConceptId Concept Id}
      • - *
      - * - * @generated - */ -public class SingletonConceptSetDefinitionImpl extends ConceptSetDefinitionImpl implements SingletonConceptSetDefinition { - /** - * - * - * @generated - */ - protected SingletonConceptSetDefinitionImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return MrcmPackage.Literals.SINGLETON_CONCEPT_SET_DEFINITION; - } - - /** - * - * - * @generated - */ - @Override - public String getConceptId() { - return (String)eGet(MrcmPackage.Literals.SINGLETON_CONCEPT_SET_DEFINITION__CONCEPT_ID, true); - } - - /** - * - * - * @generated - */ - @Override - public void setConceptId(String newConceptId) { - eSet(MrcmPackage.Literals.SINGLETON_CONCEPT_SET_DEFINITION__CONCEPT_ID, newConceptId); - } - -} //SingletonConceptSetDefinitionImpl diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/.classpath b/snomed/com.b2international.snowowl.snomed.ql.tests/.classpath similarity index 67% rename from snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/.classpath rename to snomed/com.b2international.snowowl.snomed.ql.tests/.classpath index eabeb3aca3d..48522a76f44 100644 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/.classpath +++ b/snomed/com.b2international.snowowl.snomed.ql.tests/.classpath @@ -11,5 +11,15 @@
      + + + + + + + + + + diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/.project b/snomed/com.b2international.snowowl.snomed.ql.tests/.project similarity index 76% rename from snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/.project rename to snomed/com.b2international.snowowl.snomed.ql.tests/.project index 9be73d9afd8..0d0152b8f91 100644 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/.project +++ b/snomed/com.b2international.snowowl.snomed.ql.tests/.project @@ -1,10 +1,15 @@ - com.b2international.snowowl.snomed.semanticengine.simpleast + com.b2international.snowowl.snomed.ql.tests + + org.eclipse.xtext.ui.shared.xtextBuilder + + + org.eclipse.jdt.core.javabuilder @@ -28,7 +33,8 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.pde.PluginNature diff --git a/snomed/com.b2international.snowowl.snomed.ql.tests/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.ql.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..cee82406056 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.ql.tests/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: SNOMED CT Query Language Tests +Bundle-SymbolicName: com.b2international.snowowl.snomed.ql.tests +Bundle-Version: 7.4.0.qualifier +Bundle-Vendor: B2i Healthcare +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-11 +Require-Bundle: com.b2international.snowowl.snomed.ql, + org.junit;bundle-version="4.12.0", + org.eclipse.xtend.lib;bundle-version="[2.18.0,2.19.0)", + org.eclipse.xtext.testing;bundle-version="[2.18.0,2.19.0)" diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/build.properties b/snomed/com.b2international.snowowl.snomed.ql.tests/build.properties similarity index 53% rename from snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/build.properties rename to snomed/com.b2international.snowowl.snomed.ql.tests/build.properties index 56d77655550..b6d6b8fb3fe 100644 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/build.properties +++ b/snomed/com.b2international.snowowl.snomed.ql.tests/build.properties @@ -1,4 +1,6 @@ -source.. = src/ +source.. = src/,\ + src-gen/,\ + xtend-gen/ output.. = target/classes/ bin.includes = META-INF/,\ . diff --git a/snomed/com.b2international.snowowl.snomed.ql.tests/pom.xml b/snomed/com.b2international.snowowl.snomed.ql.tests/pom.xml new file mode 100644 index 00000000000..b2507974c36 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.ql.tests/pom.xml @@ -0,0 +1,71 @@ + + + 4.0.0 + + com.b2international.snowowl + snomed-parent + 7.4.0-SNAPSHOT + + com.b2international.snowowl.snomed.ql.tests + eclipse-test-plugin + + + + src + + + xtend-gen + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + .gitignore + + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.compiler.version} + + ${basedir}/xtend-gen + + + + + compile + + + + + + org.eclipse.tycho + target-platform-configuration + ${tycho.version} + + + org.eclipse.tycho + tycho-surefire-plugin + ${tycho.version} + + + **/*Test.java + + + + + + diff --git a/snomed/com.b2international.snowowl.snomed.ql.tests/src-gen/com/b2international/snowowl/snomed/ql/tests/QLInjectorProvider.java b/snomed/com.b2international.snowowl.snomed.ql.tests/src-gen/com/b2international/snowowl/snomed/ql/tests/QLInjectorProvider.java new file mode 100644 index 00000000000..946c04b5172 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.ql.tests/src-gen/com/b2international/snowowl/snomed/ql/tests/QLInjectorProvider.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.ql.tests; + +import com.b2international.snowowl.snomed.ql.QLRuntimeModule; +import com.b2international.snowowl.snomed.ql.QLStandaloneSetup; +import com.google.inject.Guice; +import com.google.inject.Injector; +import org.eclipse.xtext.testing.GlobalRegistries; +import org.eclipse.xtext.testing.GlobalRegistries.GlobalStateMemento; +import org.eclipse.xtext.testing.IInjectorProvider; +import org.eclipse.xtext.testing.IRegistryConfigurator; + +public class QLInjectorProvider implements IInjectorProvider, IRegistryConfigurator { + + protected GlobalStateMemento stateBeforeInjectorCreation; + protected GlobalStateMemento stateAfterInjectorCreation; + protected Injector injector; + + static { + GlobalRegistries.initializeDefaults(); + } + + @Override + public Injector getInjector() { + if (injector == null) { + this.injector = internalCreateInjector(); + stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + } + return injector; + } + + protected Injector internalCreateInjector() { + return new QLStandaloneSetup() { + @Override + public Injector createInjector() { + return Guice.createInjector(createRuntimeModule()); + } + }.createInjectorAndDoEMFRegistration(); + } + + protected QLRuntimeModule createRuntimeModule() { + // make it work also with Maven/Tycho and OSGI + // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=493672 + return new QLRuntimeModule() { + @Override + public ClassLoader bindClassLoaderToInstance() { + return QLInjectorProvider.class + .getClassLoader(); + } + }; + } + + @Override + public void restoreRegistry() { + stateBeforeInjectorCreation.restoreGlobalState(); + stateBeforeInjectorCreation = null; + } + + @Override + public void setupRegistry() { + stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + if (injector == null) { + getInjector(); + } + stateAfterInjectorCreation.restoreGlobalState(); + } +} diff --git a/snomed/com.b2international.snowowl.snomed.ql.tests/src/com/b2international/snowowl/snomed/ql/tests/QLParsingTest.xtend b/snomed/com.b2international.snowowl.snomed.ql.tests/src/com/b2international/snowowl/snomed/ql/tests/QLParsingTest.xtend new file mode 100644 index 00000000000..d7169cd5c1e --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.ql.tests/src/com/b2international/snowowl/snomed/ql/tests/QLParsingTest.xtend @@ -0,0 +1,157 @@ +/* + * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.ql.tests + +import com.b2international.snowowl.snomed.ql.ql.Query +import com.google.inject.Inject +import org.eclipse.xtext.testing.InjectWith +import org.eclipse.xtext.testing.XtextRunner +import org.eclipse.xtext.testing.util.ParseHelper +import org.eclipse.xtext.testing.validation.ValidationTestHelper +import org.junit.runner.RunWith + +import static org.junit.Assert.assertNotNull +import org.junit.Test + +@RunWith(XtextRunner) +@InjectWith(QLInjectorProvider) +class QLParsingTest { + + @Inject extension ParseHelper + @Inject extension ValidationTestHelper + + @Test + def void test_empty() { + ''.assertNoErrors; + } + + @Test + def void test_whitespaces() { + ' \n \t'.assertNoErrors; + } + + @Test + def void test_any() { + '*'.assertNoErrors; + } + + @Test + def void test_concept_reference() { + '138875005|SNOMED CT Root|'.assertNoErrors; + } + + @Test + def void test_active_only() { + '* {{ active=true }}'.assertNoErrors; + } + + @Test + def void test_inactive_only() { + '* {{ active=false }}'.assertNoErrors; + } + + @Test + def void test_module() { + '* {{ moduleId= 900000000000207008 }}'.assertNoErrors; + } + + @Test + def void test_term_filter() { + '* {{ term = "Clin find" }}'.assertNoErrors; + } + + @Test + def void test_active_and_module() { + '* {{ active=true, moduleId = 900000000000207008 }}'.assertNoErrors; + } + + @Test + def void test_active_or_module() { + '* {{ active=true OR moduleId = 900000000000207008 }}'.assertNoErrors; + } + + @Test + def void test_active_minus_module() { + '* {{ active=true MINUS moduleId = 900000000000207008 }}'.assertNoErrors; + } + + @Test + def void test_type_filter() { + '* {{ typeId = 900000000000550004 }}'.assertNoErrors; + } + + @Test + def void test_multi_domain_query_and() { + '* {{ active=false }} AND * {{ term="clin find" }}'.assertNoErrors; + } + + @Test + def void test_multi_domain_query_or() { + '* {{ active=false }} OR * {{ term="clin find" }}'.assertNoErrors; + } + + @Test + def void test_multi_domain_query_minus() { + '* {{ active=false }} MINUS * {{ term="clin find" }}'.assertNoErrors; + } + + @Test + def void test_query_conjuction() { + '* {{ active = false }} AND * {{ Description.active = true }}'.assertNoErrors; + } + + @Test + def void test_query_disjunction() { + '* {{ active = false }} OR * {{ Description.active = true }}'.assertNoErrors; + } + + @Test + def void test_query_disjunction_w_parenthesis() { + '* {{ active = false }} OR (* {{ Description.active = true }})'.assertNoErrors; + } + + @Test + def void test_preferredIn_filter() { + '* {{ preferredIn = 900000000000550004 }}'.assertNoErrors; + } + + @Test + def void test_acceptableIn_filter() { + '* {{ acceptableIn = 900000000000550004 }}'.assertNoErrors; + } + + @Test + def void test_languageRefset_filter() { + '* {{ languageRefSetId = 900000000000550004 }}'.assertNoErrors; + } + + @Test + def void test_languageCode_filter() { + '* {{ languageCode = "en" }}'.assertNoErrors; + } + + @Test + def void test_caseSignificance_filter() { + '* {{ caseSignificanceId = 900000000000448009 }}'.assertNoErrors; + } + + private def void assertNoErrors(CharSequence it) throws Exception { + val query = parse; + assertNotNull('''Cannot parse expression: «it».''', query); + query.assertNoErrors; + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.ql.tests/xtend-gen/.gitignore b/snomed/com.b2international.snowowl.snomed.ql.tests/xtend-gen/.gitignore new file mode 100644 index 00000000000..02b6653cb30 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.ql.tests/xtend-gen/.gitignore @@ -0,0 +1,5 @@ +#This file is needed to prevent git from omitting this folder that would cause build issues/compile errors. +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/snomed/com.b2international.snowowl.snomed.ql/.gitignore b/snomed/com.b2international.snowowl.snomed.ql/.gitignore deleted file mode 100644 index 161e2efd9fa..00000000000 --- a/snomed/com.b2international.snowowl.snomed.ql/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/bin/ -.antlr-generator-3.2.0-patch.jar -plugin.xml_gen \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.ql/.launch/Generate QL (ql) Language Infrastructure.launch b/snomed/com.b2international.snowowl.snomed.ql/.launch/Generate QL (ql) Language Infrastructure.launch deleted file mode 100644 index 74123b03bd5..00000000000 --- a/snomed/com.b2international.snowowl.snomed.ql/.launch/Generate QL (ql) Language Infrastructure.launch +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/snomed/com.b2international.snowowl.snomed.ql/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.ql/META-INF/MANIFEST.MF index 721aa3402ff..14644e9b704 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.ql/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: SNOMED CT Query Language Module Bundle-Vendor: B2i Healthcare -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-SymbolicName: com.b2international.snowowl.snomed.ql;singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0", diff --git a/snomed/com.b2international.snowowl.snomed.ql/build.properties b/snomed/com.b2international.snowowl.snomed.ql/build.properties index 4f3cd9984fb..e5274a64f85 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/build.properties +++ b/snomed/com.b2international.snowowl.snomed.ql/build.properties @@ -5,8 +5,7 @@ bin.includes = META-INF/,\ .,\ plugin.xml,\ model/ -bin.excludes = **/*.mwe2,\ - **/*.xtend +bin.excludes = **/*.mwe2 additional.bundles = org.eclipse.xtext.xbase,\ org.eclipse.xtext.common.types,\ org.eclipse.xtext.xtext.generator,\ diff --git a/snomed/com.b2international.snowowl.snomed.ql/model/generated/QL.ecore b/snomed/com.b2international.snowowl.snomed.ql/model/generated/QL.ecore index 971d7043cd6..f424494c536 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/model/generated/QL.ecore +++ b/snomed/com.b2international.snowowl.snomed.ql/model/generated/QL.ecore @@ -87,19 +87,19 @@ - + - + - + + complianceLevel="6.0" copyrightFields="false" runtimeVersion="2.17" usedGenPackages="platform:/resource/com.b2international.snowowl.snomed.ecl/model/generated/Ecl.genmodel#//ecl"> @@ -74,17 +74,17 @@ - - - + + + - - - + + + - - - + + + diff --git a/snomed/com.b2international.snowowl.snomed.ql/pom.xml b/snomed/com.b2international.snowowl.snomed.ql/pom.xml index 1ea4b7b4529..cbb84b0dd85 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.ql/pom.xml @@ -11,7 +11,7 @@ com.b2international.snowowl snomed-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/AbstractQLRuntimeModule.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/AbstractQLRuntimeModule.java index 657e8b657f7..670555a039b 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/AbstractQLRuntimeModule.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/AbstractQLRuntimeModule.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/QL.xtextbin b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/QL.xtextbin index a0118db604d081b9842df41972c1c834839fe3bb..df38f8359098488e0145e60411ea1c5f56a3ccda 100644 GIT binary patch delta 4046 zcmZ`+dwg3}9q+mKCRx|_bFZ#lTj}~34a^}p981ox9n0uzNy|1~U7Fms8EMj{$!HlP zJbdzSlxt;dV`Bpb3p!E?mcw`8MulijoVR9cy|zpxe{gp>iKu*;EJ9csFy{G~UB(HkDt_>^8;E_&QqM zjPdnCyn(h6#;>5Y1I1Sg@l~`9GJZ9!EsXy7H4N!`k1_tAHWrc$W$ZDlPU_8hiiqeQa=`7dA`_a5of#%v0|O`zXS=y#at1L^2@G8Y1d82@}G-ZsKJDe)}Wy9jnA zR&#>j?l$2JP(+WRzgW=6ji&0x)dvOM6BHNb{YhFW?}swMzJ&5+66`4pY>L3X zY=V8o*i+pw_h~Z6;GW5}{;F}TdKnux%4@n7@m}ubAwKDfx&~awxsxYc+g-ceIqo|5 ze)j>_I%8)|ZO*f7w!*)ruq^F-;|jGoxwcJlYU)Us@#mPP*j2k8h{km0sNm0I&)U}} z^w_w{zmBf(XI1_Jepj?vPNxuK*M0-5qVjK&w=Y^M7~;2B9+lZXLe`>zzfJB>BVwU2 zg=l0n9`lDHO>vcfM_PWDz>6h#N+XUm-y`dnjJ>txbH8sXqxc7c{fBgT*m$|NJo%%v z!yk*om+9~b@)ii**0Df1F&c_SRQ{7R-Jc5GpONlS)XnxK`h>d5e=fCNA>VSGPU{5O ze<8~IOEP*DjdEL}$svqL8vaTe{+bN)oz9kM>JV*zgM=D?jq>(eOOY}Dx|ugk4}?Y5 zeuv=oC_iSsHoqsfH}EAX>FjFl=xyoj;ccy0b~m*8RG$0;VLc~4ON&P)kFH9B20{>^4^1p=gze)KdDi?Ic zqQiPDK5ps$N9wZw8b{8VyZC=tm>m8-sh>jiJU4p1S+|r=OXUxYg1WLg$UAH##ibWo26^NfS_ zj^zz>rjKEY%2Xg`z+ZqG__pF7e2ma9#IlsQ z1Jn!tzOe4GUL3ec5`LV@gPoDC(__{U6SZ78axprR=T8G+@CoV3iVyYVk{M4{k|!?X zRKxsix1{C9qQ=T32>2F+KPwsrt&(EZhf-WRL$R7DJfa7&OROGTBiSyqdN6f{v9&QD zWw{;M9dSJH1Q~Ql&Q4J?tKYh2c-9h+m)_|1XfP2@G12sj-xcUK3Y*HW?Gf#Lxz)<+ z5H082f5bqq#vDrfck=(cvOiI3a-cd4Yo*%8;AmL_cOlq7?m}s!dAkYWN;($%={im z0u8k#&cV7# zcN@{&F6r)&bZ6a)>2!AzP>4b1U<}(xjI+G_gS&7K6UHUY^On;k1^3)mfS8HpO@d!7zIxB1EaI@@&k5&a>J6^K^PgVjYm5f57J6afYGml$a!WaZuf!mXe3=O9|T9X%g*bFx`Gx>pD=GC-% zw+pUfemAVOS=Wij7cAJY9{u&sZU$H9`d>r-m)idL4IAk9My6?g-rL>2zK^$e23vKY zOx?PdxuA~%nNWh82^|vKDrcGfw%Tfhgqas(7(iQK4+9GYy>V+aWev!P2kHD3lp3Ok zeM%aJ#j(l?e?+=&q42kgbCt!JD091Yh@q%mhqzORL~b4cAw|?0OnJ2?25I~u>#{wU?^@zJ&uSH;%6E)-n=!d@;=9h~+aVsUTH16y5_#6N zb@T=qOyqLifLyB-L&j;*jl^)1&2Y1LxVk=gi%j)a1L;;Mx}6T) zokVw+O}C5YsLU`rlcLC7B8(b;+1*Z>AIRnUpa|BiU?H)yrfX#&5f}=b1p_t)_5}8s z`Q}3NG4qMQTDS+t!PU{(qr<%@V2{Cl6kHW!;(SewXE&R!fe=--P2u~QOY`U+E1XDL z%v%l*uzbyPW!g%P>+m7;hTS@R7~^y08HPN@dD(+4(%~bN!GjKjG59DepkjNrk+&S3 zk74GpR~)S^_3cx@hs2AuWuAx0uwT4cJ1g^uV?g4MOX5e#cmU%ll7jdeZ%N0)sYoKO z!(&8LVJ{HuWCh|1yON0!E14R1qWysa|4=k9n$!Oy z>_R^LnBb=nU0~uYY_}ZjPZaj2lv$x+WLq)zpP`l;er{J+hhI>o24ov$rG81Qr^Pdi z=1+%TDW(_2nMKuk@N3!pGa|okp$5MZm((>Zhu>n&^VGe<82paSbi+%Udz!1%>A%s^ z8syz=T|I4`9Ul0-xVNq}1Ajo3z!`M-Bl>$oGJXbs!c)^^@Mnt2K9n(?rSnbl4+H)} z@x6>$=l592n3MBgRiuBTobj5PvSG%r$c)dSk{jnC#vt>m68gJSg@2&p%&0XM35TLV zE0hcm_l%ENQv9DJ_!=wHX0~5w*Wq7E_q^ts<|;9aw?I(--&i&m{D&&@U#iSpL!4S% zJa>)R!!P&1>ll_N7D|POu^Mj>=uPp$;sqt}KQbh(A#02=J`D|=p`pxdU1#zh57)?S zjbW8!T^QFf&cIp3x-b`+D2316l&X#49(?9rv9W%(FV7B~`@}^3yv%g0kc;OdrGF$z z+dbCv8o zaZkhiOu3}5K>D|2!}xq9vEXebDyJl>NTOPfAr6X@WQ|g*b;fYghPhqLf>h;&sP0Xn zp>2TiMM|?y_Dqc&Up%E#PdW|slCMb&q@$BcOO#Th$Sj$)^&K?f+)&fZmm*u%JI$9N z37p0jEyo9X?f4}agfAu;DU20(PJLd9j+4i7eBOx`)!%pFBVV<v!^|W?drcV+lnn(L&_Q6f!?_I@lLAa)Z)jx z@EmUu#;+uRv-t6DbyM*mUT(ZcN%WG0-!LZs@-ZK0Y2#Pn54CIYwWu<+5A$_&0m4aq zqwvGm6E`lz{A%L9MsaT-ZoFZ$?wxG*jr2#&H{p@o!?@gdarNe#bEQJ0bV4chJ4&Tt zk{VD_mXZ?Yve}tIq@-Pw59JaK6VY*-h@y_*Z@vYu>=LHxr3oI1)pdc=C|e& z-bRE672)j;;T=S{QxV=NRxYdAd>569ioYwD;BF!~Fj;)YU@z>418@)y!BadAN8x!m h4k!2(a1u`O26&l!`9-{pSMycegxBCS9HCyZ{{x;v73%;1 diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/QLStandaloneSetupGenerated.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/QLStandaloneSetupGenerated.java index 164f0bd5f0e..36f7e29cfbd 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/QLStandaloneSetupGenerated.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/QLStandaloneSetupGenerated.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/QLAntlrTokenFileProvider.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/QLAntlrTokenFileProvider.java index 7068c2a4378..b5a08b5bf9a 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/QLAntlrTokenFileProvider.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/QLAntlrTokenFileProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/QLParser.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/QLParser.java index 5a2507f69b0..afedf1bb13b 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/QLParser.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/QLParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/internal/InternalQLParser.g b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/internal/InternalQLParser.g index 993eb64008c..4c6ec95cb14 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/internal/InternalQLParser.g +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/internal/InternalQLParser.g @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -186,9 +186,9 @@ ruleQueryDisjunction returns [EObject current=null] $current); } ) - otherlv_2=OR + this_DISJUNCTION_2=RULE_DISJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getQueryDisjunctionAccess().getORKeyword_1_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getQueryDisjunctionAccess().getDISJUNCTIONTerminalRuleCall_1_1()); } ( ( @@ -252,14 +252,14 @@ ruleQueryConjunction returns [EObject current=null] } ) ( - otherlv_2=AND + this_CONJUNCTION_2=RULE_CONJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getQueryConjunctionAccess().getANDKeyword_1_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getQueryConjunctionAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); } | - otherlv_3=Comma + this_COMMA_3=RULE_COMMA { - newLeafNode(otherlv_3, grammarAccess.getQueryConjunctionAccess().getCommaKeyword_1_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getQueryConjunctionAccess().getCOMMATerminalRuleCall_1_1_1()); } ) ( @@ -323,9 +323,9 @@ ruleQueryExclusion returns [EObject current=null] $current); } ) - otherlv_2=MINUS + this_EXCLUSION_2=RULE_EXCLUSION { - newLeafNode(otherlv_2, grammarAccess.getQueryExclusionAccess().getMINUSKeyword_1_1()); + newLeafNode(this_EXCLUSION_2, grammarAccess.getQueryExclusionAccess().getEXCLUSIONTerminalRuleCall_1_1()); } ( ( @@ -534,24 +534,24 @@ ruleFilter returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getFilterAccess().getDisjunctionParserRuleCall()); + newCompositeNode(grammarAccess.getFilterAccess().getDisjunctionFilterParserRuleCall()); } - this_Disjunction_0=ruleDisjunction + this_DisjunctionFilter_0=ruleDisjunctionFilter { - $current = $this_Disjunction_0.current; + $current = $this_DisjunctionFilter_0.current; afterParserOrEnumRuleCall(); } ; -// Entry rule entryRuleDisjunction -entryRuleDisjunction returns [EObject current=null]: - { newCompositeNode(grammarAccess.getDisjunctionRule()); } - iv_ruleDisjunction=ruleDisjunction - { $current=$iv_ruleDisjunction.current; } +// Entry rule entryRuleDisjunctionFilter +entryRuleDisjunctionFilter returns [EObject current=null]: + { newCompositeNode(grammarAccess.getDisjunctionFilterRule()); } + iv_ruleDisjunctionFilter=ruleDisjunctionFilter + { $current=$iv_ruleDisjunctionFilter.current; } EOF; -// Rule Disjunction -ruleDisjunction returns [EObject current=null] +// Rule DisjunctionFilter +ruleDisjunctionFilter returns [EObject current=null] @init { enterRule(); } @@ -563,11 +563,11 @@ ruleDisjunction returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getDisjunctionAccess().getConjunctionParserRuleCall_0()); + newCompositeNode(grammarAccess.getDisjunctionFilterAccess().getConjunctionFilterParserRuleCall_0()); } - this_Conjunction_0=ruleConjunction + this_ConjunctionFilter_0=ruleConjunctionFilter { - $current = $this_Conjunction_0.current; + $current = $this_ConjunctionFilter_0.current; afterParserOrEnumRuleCall(); } ( @@ -577,29 +577,29 @@ ruleDisjunction returns [EObject current=null] } { $current = forceCreateModelElementAndSet( - grammarAccess.getDisjunctionAccess().getDisjunctionLeftAction_1_0(), + grammarAccess.getDisjunctionFilterAccess().getDisjunctionFilterLeftAction_1_0(), $current); } ) - otherlv_2=OR + this_DISJUNCTION_2=RULE_DISJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getDisjunctionAccess().getORKeyword_1_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getDisjunctionFilterAccess().getDISJUNCTIONTerminalRuleCall_1_1()); } ( ( { - newCompositeNode(grammarAccess.getDisjunctionAccess().getRightConjunctionParserRuleCall_1_2_0()); + newCompositeNode(grammarAccess.getDisjunctionFilterAccess().getRightConjunctionFilterParserRuleCall_1_2_0()); } - lv_right_3_0=ruleConjunction + lv_right_3_0=ruleConjunctionFilter { if ($current==null) { - $current = createModelElementForParent(grammarAccess.getDisjunctionRule()); + $current = createModelElementForParent(grammarAccess.getDisjunctionFilterRule()); } set( $current, "right", lv_right_3_0, - "com.b2international.snowowl.snomed.ql.QL.Conjunction"); + "com.b2international.snowowl.snomed.ql.QL.ConjunctionFilter"); afterParserOrEnumRuleCall(); } ) @@ -608,15 +608,15 @@ ruleDisjunction returns [EObject current=null] ) ; -// Entry rule entryRuleConjunction -entryRuleConjunction returns [EObject current=null]: - { newCompositeNode(grammarAccess.getConjunctionRule()); } - iv_ruleConjunction=ruleConjunction - { $current=$iv_ruleConjunction.current; } +// Entry rule entryRuleConjunctionFilter +entryRuleConjunctionFilter returns [EObject current=null]: + { newCompositeNode(grammarAccess.getConjunctionFilterRule()); } + iv_ruleConjunctionFilter=ruleConjunctionFilter + { $current=$iv_ruleConjunctionFilter.current; } EOF; -// Rule Conjunction -ruleConjunction returns [EObject current=null] +// Rule ConjunctionFilter +ruleConjunctionFilter returns [EObject current=null] @init { enterRule(); } @@ -628,11 +628,11 @@ ruleConjunction returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getConjunctionAccess().getExclusionParserRuleCall_0()); + newCompositeNode(grammarAccess.getConjunctionFilterAccess().getExclusionFilterParserRuleCall_0()); } - this_Exclusion_0=ruleExclusion + this_ExclusionFilter_0=ruleExclusionFilter { - $current = $this_Exclusion_0.current; + $current = $this_ExclusionFilter_0.current; afterParserOrEnumRuleCall(); } ( @@ -642,36 +642,36 @@ ruleConjunction returns [EObject current=null] } { $current = forceCreateModelElementAndSet( - grammarAccess.getConjunctionAccess().getConjunctionLeftAction_1_0(), + grammarAccess.getConjunctionFilterAccess().getConjunctionFilterLeftAction_1_0(), $current); } ) ( - otherlv_2=AND + this_CONJUNCTION_2=RULE_CONJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getConjunctionAccess().getANDKeyword_1_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getConjunctionFilterAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); } | - otherlv_3=Comma + this_COMMA_3=RULE_COMMA { - newLeafNode(otherlv_3, grammarAccess.getConjunctionAccess().getCommaKeyword_1_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getConjunctionFilterAccess().getCOMMATerminalRuleCall_1_1_1()); } ) ( ( { - newCompositeNode(grammarAccess.getConjunctionAccess().getRightExclusionParserRuleCall_1_2_0()); + newCompositeNode(grammarAccess.getConjunctionFilterAccess().getRightExclusionFilterParserRuleCall_1_2_0()); } - lv_right_4_0=ruleExclusion + lv_right_4_0=ruleExclusionFilter { if ($current==null) { - $current = createModelElementForParent(grammarAccess.getConjunctionRule()); + $current = createModelElementForParent(grammarAccess.getConjunctionFilterRule()); } set( $current, "right", lv_right_4_0, - "com.b2international.snowowl.snomed.ql.QL.Exclusion"); + "com.b2international.snowowl.snomed.ql.QL.ExclusionFilter"); afterParserOrEnumRuleCall(); } ) @@ -680,15 +680,15 @@ ruleConjunction returns [EObject current=null] ) ; -// Entry rule entryRuleExclusion -entryRuleExclusion returns [EObject current=null]: - { newCompositeNode(grammarAccess.getExclusionRule()); } - iv_ruleExclusion=ruleExclusion - { $current=$iv_ruleExclusion.current; } +// Entry rule entryRuleExclusionFilter +entryRuleExclusionFilter returns [EObject current=null]: + { newCompositeNode(grammarAccess.getExclusionFilterRule()); } + iv_ruleExclusionFilter=ruleExclusionFilter + { $current=$iv_ruleExclusionFilter.current; } EOF; -// Rule Exclusion -ruleExclusion returns [EObject current=null] +// Rule ExclusionFilter +ruleExclusionFilter returns [EObject current=null] @init { enterRule(); } @@ -700,7 +700,7 @@ ruleExclusion returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getExclusionAccess().getPropertyFilterParserRuleCall_0()); + newCompositeNode(grammarAccess.getExclusionFilterAccess().getPropertyFilterParserRuleCall_0()); } this_PropertyFilter_0=rulePropertyFilter { @@ -714,23 +714,23 @@ ruleExclusion returns [EObject current=null] } { $current = forceCreateModelElementAndSet( - grammarAccess.getExclusionAccess().getExclusionLeftAction_1_0(), + grammarAccess.getExclusionFilterAccess().getExclusionFilterLeftAction_1_0(), $current); } ) - otherlv_2=MINUS + this_EXCLUSION_2=RULE_EXCLUSION { - newLeafNode(otherlv_2, grammarAccess.getExclusionAccess().getMINUSKeyword_1_1()); + newLeafNode(this_EXCLUSION_2, grammarAccess.getExclusionFilterAccess().getEXCLUSIONTerminalRuleCall_1_1()); } ( ( { - newCompositeNode(grammarAccess.getExclusionAccess().getRightPropertyFilterParserRuleCall_1_2_0()); + newCompositeNode(grammarAccess.getExclusionFilterAccess().getRightPropertyFilterParserRuleCall_1_2_0()); } lv_right_3_0=rulePropertyFilter { if ($current==null) { - $current = createModelElementForParent(grammarAccess.getExclusionRule()); + $current = createModelElementForParent(grammarAccess.getExclusionFilterRule()); } set( $current, @@ -1482,9 +1482,9 @@ ruleOrExpressionConstraint returns [EObject current=null] $current); } ) - otherlv_2=OR + this_DISJUNCTION_2=RULE_DISJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getOrExpressionConstraintAccess().getORKeyword_1_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrExpressionConstraintAccess().getDISJUNCTIONTerminalRuleCall_1_1()); } ( ( @@ -1548,14 +1548,14 @@ ruleAndExpressionConstraint returns [EObject current=null] } ) ( - otherlv_2=AND + this_CONJUNCTION_2=RULE_CONJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getAndExpressionConstraintAccess().getANDKeyword_1_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndExpressionConstraintAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); } | - otherlv_3=Comma + this_COMMA_3=RULE_COMMA { - newLeafNode(otherlv_3, grammarAccess.getAndExpressionConstraintAccess().getCommaKeyword_1_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getAndExpressionConstraintAccess().getCOMMATerminalRuleCall_1_1_1()); } ) ( @@ -1619,9 +1619,9 @@ ruleExclusionExpressionConstraint returns [EObject current=null] $current); } ) - otherlv_2=MINUS + this_EXCLUSION_2=RULE_EXCLUSION { - newLeafNode(otherlv_2, grammarAccess.getExclusionExpressionConstraintAccess().getMINUSKeyword_1_1()); + newLeafNode(this_EXCLUSION_2, grammarAccess.getExclusionExpressionConstraintAccess().getEXCLUSIONTerminalRuleCall_1_1()); } ( ( @@ -1691,9 +1691,9 @@ ruleRefinedExpressionConstraint returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getRefinedExpressionConstraintAccess().getRefinementRefinementParserRuleCall_1_2_0()); + newCompositeNode(grammarAccess.getRefinedExpressionConstraintAccess().getRefinementEclRefinementParserRuleCall_1_2_0()); } - lv_refinement_3_0=ruleRefinement + lv_refinement_3_0=ruleEclRefinement { if ($current==null) { $current = createModelElementForParent(grammarAccess.getRefinedExpressionConstraintRule()); @@ -1702,7 +1702,7 @@ ruleRefinedExpressionConstraint returns [EObject current=null] $current, "refinement", lv_refinement_3_0, - "com.b2international.snowowl.snomed.ecl.Ecl.Refinement"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclRefinement"); afterParserOrEnumRuleCall(); } ) @@ -1868,25 +1868,25 @@ ruleSubExpressionConstraint returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getFocusConceptParserRuleCall_6()); + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getEclFocusConceptParserRuleCall_6()); } - this_FocusConcept_6=ruleFocusConcept + this_EclFocusConcept_6=ruleEclFocusConcept { - $current = $this_FocusConcept_6.current; + $current = $this_EclFocusConcept_6.current; afterParserOrEnumRuleCall(); } ) ; -// Entry rule entryRuleFocusConcept -entryRuleFocusConcept returns [EObject current=null]: - { newCompositeNode(grammarAccess.getFocusConceptRule()); } - iv_ruleFocusConcept=ruleFocusConcept - { $current=$iv_ruleFocusConcept.current; } +// Entry rule entryRuleEclFocusConcept +entryRuleEclFocusConcept returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclFocusConceptRule()); } + iv_ruleEclFocusConcept=ruleEclFocusConcept + { $current=$iv_ruleEclFocusConcept.current; } EOF; -// Rule FocusConcept -ruleFocusConcept returns [EObject current=null] +// Rule EclFocusConcept +ruleEclFocusConcept returns [EObject current=null] @init { enterRule(); } @@ -1898,7 +1898,7 @@ ruleFocusConcept returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getFocusConceptAccess().getMemberOfParserRuleCall_0()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getMemberOfParserRuleCall_0()); } this_MemberOf_0=ruleMemberOf { @@ -1910,11 +1910,11 @@ ruleFocusConcept returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getFocusConceptAccess().getConceptReferenceParserRuleCall_1()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getEclConceptReferenceParserRuleCall_1()); } - this_ConceptReference_1=ruleConceptReference + this_EclConceptReference_1=ruleEclConceptReference { - $current = $this_ConceptReference_1.current; + $current = $this_EclConceptReference_1.current; afterParserOrEnumRuleCall(); } | @@ -1922,7 +1922,7 @@ ruleFocusConcept returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getFocusConceptAccess().getAnyParserRuleCall_2()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getAnyParserRuleCall_2()); } this_Any_2=ruleAny { @@ -1934,7 +1934,7 @@ ruleFocusConcept returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getFocusConceptAccess().getNestedExpressionParserRuleCall_3()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getNestedExpressionParserRuleCall_3()); } this_NestedExpression_3=ruleNestedExpression { @@ -1967,9 +1967,9 @@ ruleChildOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getChildOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getChildOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } - lv_constraint_1_0=ruleFocusConcept + lv_constraint_1_0=ruleEclFocusConcept { if ($current==null) { $current = createModelElementForParent(grammarAccess.getChildOfRule()); @@ -1978,7 +1978,7 @@ ruleChildOf returns [EObject current=null] $current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } ) @@ -2009,9 +2009,9 @@ ruleDescendantOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getDescendantOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getDescendantOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } - lv_constraint_1_0=ruleFocusConcept + lv_constraint_1_0=ruleEclFocusConcept { if ($current==null) { $current = createModelElementForParent(grammarAccess.getDescendantOfRule()); @@ -2020,7 +2020,7 @@ ruleDescendantOf returns [EObject current=null] $current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } ) @@ -2051,9 +2051,9 @@ ruleDescendantOrSelfOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getDescendantOrSelfOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getDescendantOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } - lv_constraint_1_0=ruleFocusConcept + lv_constraint_1_0=ruleEclFocusConcept { if ($current==null) { $current = createModelElementForParent(grammarAccess.getDescendantOrSelfOfRule()); @@ -2062,7 +2062,7 @@ ruleDescendantOrSelfOf returns [EObject current=null] $current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } ) @@ -2093,9 +2093,9 @@ ruleParentOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getParentOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getParentOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } - lv_constraint_1_0=ruleFocusConcept + lv_constraint_1_0=ruleEclFocusConcept { if ($current==null) { $current = createModelElementForParent(grammarAccess.getParentOfRule()); @@ -2104,7 +2104,7 @@ ruleParentOf returns [EObject current=null] $current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } ) @@ -2135,9 +2135,9 @@ ruleAncestorOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getAncestorOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getAncestorOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } - lv_constraint_1_0=ruleFocusConcept + lv_constraint_1_0=ruleEclFocusConcept { if ($current==null) { $current = createModelElementForParent(grammarAccess.getAncestorOfRule()); @@ -2146,7 +2146,7 @@ ruleAncestorOf returns [EObject current=null] $current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } ) @@ -2177,9 +2177,9 @@ ruleAncestorOrSelfOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getAncestorOrSelfOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getAncestorOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } - lv_constraint_1_0=ruleFocusConcept + lv_constraint_1_0=ruleEclFocusConcept { if ($current==null) { $current = createModelElementForParent(grammarAccess.getAncestorOrSelfOfRule()); @@ -2188,7 +2188,7 @@ ruleAncestorOrSelfOf returns [EObject current=null] $current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } ) @@ -2220,9 +2220,9 @@ ruleMemberOf returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintConceptReferenceParserRuleCall_1_0_0()); + newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintEclConceptReferenceParserRuleCall_1_0_0()); } - lv_constraint_1_1=ruleConceptReference + lv_constraint_1_1=ruleEclConceptReference { if ($current==null) { $current = createModelElementForParent(grammarAccess.getMemberOfRule()); @@ -2231,7 +2231,7 @@ ruleMemberOf returns [EObject current=null] $current, "constraint", lv_constraint_1_1, - "com.b2international.snowowl.snomed.ecl.Ecl.ConceptReference"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclConceptReference"); afterParserOrEnumRuleCall(); } | @@ -2272,15 +2272,15 @@ ruleMemberOf returns [EObject current=null] ) ; -// Entry rule entryRuleConceptReference -entryRuleConceptReference returns [EObject current=null]: - { newCompositeNode(grammarAccess.getConceptReferenceRule()); } - iv_ruleConceptReference=ruleConceptReference - { $current=$iv_ruleConceptReference.current; } +// Entry rule entryRuleEclConceptReference +entryRuleEclConceptReference returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclConceptReferenceRule()); } + iv_ruleEclConceptReference=ruleEclConceptReference + { $current=$iv_ruleEclConceptReference.current; } EOF; -// Rule ConceptReference -ruleConceptReference returns [EObject current=null] +// Rule EclConceptReference +ruleEclConceptReference returns [EObject current=null] @init { enterRule(); } @@ -2291,12 +2291,12 @@ ruleConceptReference returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getConceptReferenceAccess().getIdSnomedIdentifierParserRuleCall_0_0()); + newCompositeNode(grammarAccess.getEclConceptReferenceAccess().getIdSnomedIdentifierParserRuleCall_0_0()); } lv_id_0_0=ruleSnomedIdentifier { if ($current==null) { - $current = createModelElementForParent(grammarAccess.getConceptReferenceRule()); + $current = createModelElementForParent(grammarAccess.getEclConceptReferenceRule()); } set( $current, @@ -2311,11 +2311,11 @@ ruleConceptReference returns [EObject current=null] ( lv_term_1_0=RULE_TERM_STRING { - newLeafNode(lv_term_1_0, grammarAccess.getConceptReferenceAccess().getTermTERM_STRINGTerminalRuleCall_1_0()); + newLeafNode(lv_term_1_0, grammarAccess.getEclConceptReferenceAccess().getTermTERM_STRINGTerminalRuleCall_1_0()); } { if ($current==null) { - $current = createModelElement(grammarAccess.getConceptReferenceRule()); + $current = createModelElement(grammarAccess.getEclConceptReferenceRule()); } setWithLastConsumed( $current, @@ -2361,15 +2361,15 @@ ruleAny returns [EObject current=null] ) ; -// Entry rule entryRuleRefinement -entryRuleRefinement returns [EObject current=null]: - { newCompositeNode(grammarAccess.getRefinementRule()); } - iv_ruleRefinement=ruleRefinement - { $current=$iv_ruleRefinement.current; } +// Entry rule entryRuleEclRefinement +entryRuleEclRefinement returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclRefinementRule()); } + iv_ruleEclRefinement=ruleEclRefinement + { $current=$iv_ruleEclRefinement.current; } EOF; -// Rule Refinement -ruleRefinement returns [EObject current=null] +// Rule EclRefinement +ruleEclRefinement returns [EObject current=null] @init { enterRule(); } @@ -2380,7 +2380,7 @@ ruleRefinement returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getRefinementAccess().getOrRefinementParserRuleCall()); + newCompositeNode(grammarAccess.getEclRefinementAccess().getOrRefinementParserRuleCall()); } this_OrRefinement_0=ruleOrRefinement { @@ -2417,7 +2417,7 @@ ruleOrRefinement returns [EObject current=null] afterParserOrEnumRuleCall(); } ( - (OR)=> + (RULE_DISJUNCTION)=> ( ( { @@ -2429,9 +2429,9 @@ ruleOrRefinement returns [EObject current=null] $current); } ) - otherlv_2=OR + this_DISJUNCTION_2=RULE_DISJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getOrRefinementAccess().getORKeyword_1_0_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrRefinementAccess().getDISJUNCTIONTerminalRuleCall_1_0_1()); } ( ( @@ -2485,7 +2485,7 @@ ruleAndRefinement returns [EObject current=null] afterParserOrEnumRuleCall(); } ( - (AND | Comma)=> + (RULE_CONJUNCTION | RULE_COMMA)=> ( ( { @@ -2498,14 +2498,14 @@ ruleAndRefinement returns [EObject current=null] } ) ( - otherlv_2=AND + this_CONJUNCTION_2=RULE_CONJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getAndRefinementAccess().getANDKeyword_1_0_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndRefinementAccess().getCONJUNCTIONTerminalRuleCall_1_0_1_0()); } | - otherlv_3=Comma + this_COMMA_3=RULE_COMMA { - newLeafNode(otherlv_3, grammarAccess.getAndRefinementAccess().getCommaKeyword_1_0_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getAndRefinementAccess().getCOMMATerminalRuleCall_1_0_1_1()); } ) ( @@ -2564,11 +2564,11 @@ ruleSubRefinement returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getSubRefinementAccess().getAttributeGroupParserRuleCall_1()); + newCompositeNode(grammarAccess.getSubRefinementAccess().getEclAttributeGroupParserRuleCall_1()); } - this_AttributeGroup_1=ruleAttributeGroup + this_EclAttributeGroup_1=ruleEclAttributeGroup { - $current = $this_AttributeGroup_1.current; + $current = $this_EclAttributeGroup_1.current; afterParserOrEnumRuleCall(); } | @@ -2609,9 +2609,9 @@ ruleNestedRefinement returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getNestedRefinementAccess().getNestedRefinementParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getNestedRefinementAccess().getNestedEclRefinementParserRuleCall_1_0()); } - lv_nested_1_0=ruleRefinement + lv_nested_1_0=ruleEclRefinement { if ($current==null) { $current = createModelElementForParent(grammarAccess.getNestedRefinementRule()); @@ -2620,7 +2620,7 @@ ruleNestedRefinement returns [EObject current=null] $current, "nested", lv_nested_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.Refinement"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclRefinement"); afterParserOrEnumRuleCall(); } ) @@ -2632,15 +2632,15 @@ ruleNestedRefinement returns [EObject current=null] ) ; -// Entry rule entryRuleAttributeGroup -entryRuleAttributeGroup returns [EObject current=null]: - { newCompositeNode(grammarAccess.getAttributeGroupRule()); } - iv_ruleAttributeGroup=ruleAttributeGroup - { $current=$iv_ruleAttributeGroup.current; } +// Entry rule entryRuleEclAttributeGroup +entryRuleEclAttributeGroup returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclAttributeGroupRule()); } + iv_ruleEclAttributeGroup=ruleEclAttributeGroup + { $current=$iv_ruleEclAttributeGroup.current; } EOF; -// Rule AttributeGroup -ruleAttributeGroup returns [EObject current=null] +// Rule EclAttributeGroup +ruleEclAttributeGroup returns [EObject current=null] @init { enterRule(); } @@ -2651,12 +2651,12 @@ ruleAttributeGroup returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getAttributeGroupAccess().getCardinalityCardinalityParserRuleCall_0_0()); + newCompositeNode(grammarAccess.getEclAttributeGroupAccess().getCardinalityCardinalityParserRuleCall_0_0()); } lv_cardinality_0_0=ruleCardinality { if ($current==null) { - $current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + $current = createModelElementForParent(grammarAccess.getEclAttributeGroupRule()); } set( $current, @@ -2669,43 +2669,43 @@ ruleAttributeGroup returns [EObject current=null] )? this_CURLY_OPEN_1=RULE_CURLY_OPEN { - newLeafNode(this_CURLY_OPEN_1, grammarAccess.getAttributeGroupAccess().getCURLY_OPENTerminalRuleCall_1()); + newLeafNode(this_CURLY_OPEN_1, grammarAccess.getEclAttributeGroupAccess().getCURLY_OPENTerminalRuleCall_1()); } ( ( { - newCompositeNode(grammarAccess.getAttributeGroupAccess().getRefinementAttributeSetParserRuleCall_2_0()); + newCompositeNode(grammarAccess.getEclAttributeGroupAccess().getRefinementEclAttributeSetParserRuleCall_2_0()); } - lv_refinement_2_0=ruleAttributeSet + lv_refinement_2_0=ruleEclAttributeSet { if ($current==null) { - $current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + $current = createModelElementForParent(grammarAccess.getEclAttributeGroupRule()); } set( $current, "refinement", lv_refinement_2_0, - "com.b2international.snowowl.snomed.ecl.Ecl.AttributeSet"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeSet"); afterParserOrEnumRuleCall(); } ) ) this_CURLY_CLOSE_3=RULE_CURLY_CLOSE { - newLeafNode(this_CURLY_CLOSE_3, grammarAccess.getAttributeGroupAccess().getCURLY_CLOSETerminalRuleCall_3()); + newLeafNode(this_CURLY_CLOSE_3, grammarAccess.getEclAttributeGroupAccess().getCURLY_CLOSETerminalRuleCall_3()); } ) ; -// Entry rule entryRuleAttributeSet -entryRuleAttributeSet returns [EObject current=null]: - { newCompositeNode(grammarAccess.getAttributeSetRule()); } - iv_ruleAttributeSet=ruleAttributeSet - { $current=$iv_ruleAttributeSet.current; } +// Entry rule entryRuleEclAttributeSet +entryRuleEclAttributeSet returns [EObject current=null]: + { newCompositeNode(grammarAccess.getEclAttributeSetRule()); } + iv_ruleEclAttributeSet=ruleEclAttributeSet + { $current=$iv_ruleEclAttributeSet.current; } EOF; -// Rule AttributeSet -ruleAttributeSet returns [EObject current=null] +// Rule EclAttributeSet +ruleEclAttributeSet returns [EObject current=null] @init { enterRule(); } @@ -2716,7 +2716,7 @@ ruleAttributeSet returns [EObject current=null] /* */ } { - newCompositeNode(grammarAccess.getAttributeSetAccess().getOrAttributeSetParserRuleCall()); + newCompositeNode(grammarAccess.getEclAttributeSetAccess().getOrAttributeSetParserRuleCall()); } this_OrAttributeSet_0=ruleOrAttributeSet { @@ -2763,9 +2763,9 @@ ruleOrAttributeSet returns [EObject current=null] $current); } ) - otherlv_2=OR + this_DISJUNCTION_2=RULE_DISJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getOrAttributeSetAccess().getORKeyword_1_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrAttributeSetAccess().getDISJUNCTIONTerminalRuleCall_1_1()); } ( ( @@ -2829,14 +2829,14 @@ ruleAndAttributeSet returns [EObject current=null] } ) ( - otherlv_2=AND + this_CONJUNCTION_2=RULE_CONJUNCTION { - newLeafNode(otherlv_2, grammarAccess.getAndAttributeSetAccess().getANDKeyword_1_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndAttributeSetAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); } | - otherlv_3=Comma + this_COMMA_3=RULE_COMMA { - newLeafNode(otherlv_3, grammarAccess.getAndAttributeSetAccess().getCommaKeyword_1_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getAndAttributeSetAccess().getCOMMATerminalRuleCall_1_1_1()); } ) ( @@ -2927,9 +2927,9 @@ ruleNestedAttributeSet returns [EObject current=null] ( ( { - newCompositeNode(grammarAccess.getNestedAttributeSetAccess().getNestedAttributeSetParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getNestedAttributeSetAccess().getNestedEclAttributeSetParserRuleCall_1_0()); } - lv_nested_1_0=ruleAttributeSet + lv_nested_1_0=ruleEclAttributeSet { if ($current==null) { $current = createModelElementForParent(grammarAccess.getNestedAttributeSetRule()); @@ -2938,7 +2938,7 @@ ruleNestedAttributeSet returns [EObject current=null] $current, "nested", lv_nested_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.AttributeSet"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeSet"); afterParserOrEnumRuleCall(); } ) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/internal/InternalQLParser.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/internal/InternalQLParser.java index 2576eeab07a..4bcc526ebdb 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/internal/InternalQLParser.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/internal/InternalQLParser.java @@ -23,63 +23,62 @@ @SuppressWarnings("all") public class InternalQLParser extends AbstractInternalAntlrParser { public static final String[] tokenNames = new String[] { - "", "", "", "", "CaseSignificanceId", "LanguageRefSetId", "AcceptableIn", "LanguageCode", "Description", "PreferredIn", "ModuleId", "Concept", "Active", "TypeId", "MINUS", "Exact", "False", "Match", "Regex", "Term", "True", "AND", "OR", "Comma", "RULE_OPEN_DOUBLE_BRACES", "RULE_CLOSE_DOUBLE_BRACES", "RULE_TERM_STRING", "RULE_REVERSED", "RULE_TO", "RULE_ZERO", "RULE_DIGIT_NONZERO", "RULE_COLON", "RULE_CURLY_OPEN", "RULE_CURLY_CLOSE", "RULE_ROUND_OPEN", "RULE_ROUND_CLOSE", "RULE_SQUARE_OPEN", "RULE_SQUARE_CLOSE", "RULE_PLUS", "RULE_DASH", "RULE_CARET", "RULE_NOT", "RULE_DOT", "RULE_WILDCARD", "RULE_EQUAL", "RULE_NOT_EQUAL", "RULE_LT", "RULE_GT", "RULE_DBL_LT", "RULE_DBL_GT", "RULE_LT_EM", "RULE_GT_EM", "RULE_GTE", "RULE_LTE", "RULE_HASH", "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_STRING" + "", "", "", "", "CaseSignificanceId", "LanguageRefSetId", "AcceptableIn", "LanguageCode", "Description", "PreferredIn", "ModuleId", "Concept", "Active", "TypeId", "Exact", "False", "Match", "Regex", "Term", "True", "RULE_OPEN_DOUBLE_BRACES", "RULE_CLOSE_DOUBLE_BRACES", "RULE_TERM_STRING", "RULE_REVERSED", "RULE_TO", "RULE_COMMA", "RULE_CONJUNCTION", "RULE_DISJUNCTION", "RULE_EXCLUSION", "RULE_ZERO", "RULE_DIGIT_NONZERO", "RULE_COLON", "RULE_CURLY_OPEN", "RULE_CURLY_CLOSE", "RULE_ROUND_OPEN", "RULE_ROUND_CLOSE", "RULE_SQUARE_OPEN", "RULE_SQUARE_CLOSE", "RULE_PLUS", "RULE_DASH", "RULE_CARET", "RULE_DOT", "RULE_WILDCARD", "RULE_EQUAL", "RULE_NOT_EQUAL", "RULE_LT", "RULE_GT", "RULE_DBL_LT", "RULE_DBL_GT", "RULE_LT_EM", "RULE_GT_EM", "RULE_GTE", "RULE_LTE", "RULE_HASH", "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_STRING" }; public static final int RULE_DIGIT_NONZERO=30; public static final int RULE_CURLY_OPEN=32; - public static final int RULE_TO=28; + public static final int RULE_TO=24; public static final int RULE_ROUND_CLOSE=35; - public static final int RULE_DBL_GT=49; - public static final int True=20; - public static final int RULE_GT=47; - public static final int False=16; - public static final int MINUS=14; - public static final int RULE_GTE=52; + public static final int RULE_DBL_GT=48; + public static final int True=19; + public static final int RULE_GT=46; + public static final int False=15; + public static final int RULE_GTE=51; public static final int LanguageCode=7; public static final int ModuleId=10; - public static final int Regex=18; + public static final int Regex=17; public static final int RULE_ROUND_OPEN=34; - public static final int RULE_DBL_LT=48; - public static final int RULE_NOT_EQUAL=45; + public static final int RULE_DBL_LT=47; + public static final int RULE_NOT_EQUAL=44; public static final int Concept=11; public static final int AcceptableIn=6; public static final int TypeId=13; public static final int RULE_SQUARE_CLOSE=37; public static final int RULE_SQUARE_OPEN=36; - public static final int RULE_EQUAL=44; - public static final int RULE_LT_EM=50; + public static final int RULE_EQUAL=43; + public static final int RULE_COMMA=25; + public static final int RULE_LT_EM=49; public static final int RULE_CURLY_CLOSE=33; public static final int RULE_ZERO=29; - public static final int Term=19; + public static final int Term=18; public static final int RULE_COLON=31; - public static final int RULE_LT=46; + public static final int RULE_LT=45; public static final int Active=12; - public static final int AND=21; - public static final int RULE_ML_COMMENT=56; - public static final int RULE_LTE=53; + public static final int RULE_ML_COMMENT=55; + public static final int RULE_LTE=52; public static final int Description=8; - public static final int RULE_STRING=58; - public static final int RULE_NOT=41; - public static final int RULE_REVERSED=27; - public static final int Match=17; - public static final int RULE_SL_COMMENT=57; - public static final int RULE_CLOSE_DOUBLE_BRACES=25; + public static final int RULE_STRING=57; + public static final int RULE_REVERSED=23; + public static final int Match=16; + public static final int RULE_SL_COMMENT=56; + public static final int RULE_CLOSE_DOUBLE_BRACES=21; public static final int PreferredIn=9; - public static final int Comma=23; - public static final int RULE_HASH=54; + public static final int RULE_HASH=53; public static final int RULE_DASH=39; public static final int RULE_PLUS=38; - public static final int Exact=15; - public static final int RULE_DOT=42; + public static final int Exact=14; + public static final int RULE_DOT=41; public static final int EOF=-1; - public static final int OR=22; - public static final int RULE_GT_EM=51; - public static final int RULE_WS=55; - public static final int RULE_OPEN_DOUBLE_BRACES=24; + public static final int RULE_GT_EM=50; + public static final int RULE_WS=54; + public static final int RULE_EXCLUSION=28; + public static final int RULE_OPEN_DOUBLE_BRACES=20; public static final int RULE_CARET=40; - public static final int RULE_WILDCARD=43; + public static final int RULE_CONJUNCTION=26; + public static final int RULE_WILDCARD=42; + public static final int RULE_DISJUNCTION=27; public static final int LanguageRefSetId=5; - public static final int RULE_TERM_STRING=26; + public static final int RULE_TERM_STRING=22; public static final int CaseSignificanceId=4; // delegates @@ -206,7 +205,7 @@ public final EObject ruleQuery() throws RecognitionException { int alt1=2; int LA1_0 = input.LA(1); - if ( (LA1_0==MINUS||(LA1_0>=AND && LA1_0<=RULE_OPEN_DOUBLE_BRACES)||LA1_0==RULE_DIGIT_NONZERO||LA1_0==RULE_ROUND_OPEN||LA1_0==RULE_CARET||LA1_0==RULE_WILDCARD||(LA1_0>=RULE_LT && LA1_0<=RULE_GT_EM)) ) { + if ( (LA1_0==RULE_OPEN_DOUBLE_BRACES||(LA1_0>=RULE_COMMA && LA1_0<=RULE_EXCLUSION)||LA1_0==RULE_DIGIT_NONZERO||LA1_0==RULE_ROUND_OPEN||LA1_0==RULE_CARET||LA1_0==RULE_WILDCARD||(LA1_0>=RULE_LT && LA1_0<=RULE_GT_EM)) ) { alt1=1; } else if ( (LA1_0==EOF) ) { @@ -417,11 +416,11 @@ public final EObject entryRuleQueryDisjunction() throws RecognitionException { // $ANTLR start "ruleQueryDisjunction" - // InternalQLParser.g:159:1: ruleQueryDisjunction returns [EObject current=null] : (this_QueryConjunction_0= ruleQueryConjunction ( () otherlv_2= OR ( (lv_right_3_0= ruleQueryConjunction ) ) )* ) ; + // InternalQLParser.g:159:1: ruleQueryDisjunction returns [EObject current=null] : (this_QueryConjunction_0= ruleQueryConjunction ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleQueryConjunction ) ) )* ) ; public final EObject ruleQueryDisjunction() throws RecognitionException { EObject current = null; - Token otherlv_2=null; + Token this_DISJUNCTION_2=null; EObject this_QueryConjunction_0 = null; EObject lv_right_3_0 = null; @@ -431,11 +430,11 @@ public final EObject ruleQueryDisjunction() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:165:2: ( (this_QueryConjunction_0= ruleQueryConjunction ( () otherlv_2= OR ( (lv_right_3_0= ruleQueryConjunction ) ) )* ) ) - // InternalQLParser.g:166:2: (this_QueryConjunction_0= ruleQueryConjunction ( () otherlv_2= OR ( (lv_right_3_0= ruleQueryConjunction ) ) )* ) + // InternalQLParser.g:165:2: ( (this_QueryConjunction_0= ruleQueryConjunction ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleQueryConjunction ) ) )* ) ) + // InternalQLParser.g:166:2: (this_QueryConjunction_0= ruleQueryConjunction ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleQueryConjunction ) ) )* ) { - // InternalQLParser.g:166:2: (this_QueryConjunction_0= ruleQueryConjunction ( () otherlv_2= OR ( (lv_right_3_0= ruleQueryConjunction ) ) )* ) - // InternalQLParser.g:167:3: this_QueryConjunction_0= ruleQueryConjunction ( () otherlv_2= OR ( (lv_right_3_0= ruleQueryConjunction ) ) )* + // InternalQLParser.g:166:2: (this_QueryConjunction_0= ruleQueryConjunction ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleQueryConjunction ) ) )* ) + // InternalQLParser.g:167:3: this_QueryConjunction_0= ruleQueryConjunction ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleQueryConjunction ) ) )* { if ( state.backtracking==0 ) { @@ -458,20 +457,20 @@ public final EObject ruleQueryDisjunction() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalQLParser.g:178:3: ( () otherlv_2= OR ( (lv_right_3_0= ruleQueryConjunction ) ) )* + // InternalQLParser.g:178:3: ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleQueryConjunction ) ) )* loop2: do { int alt2=2; int LA2_0 = input.LA(1); - if ( (LA2_0==OR) ) { + if ( (LA2_0==RULE_DISJUNCTION) ) { alt2=1; } switch (alt2) { case 1 : - // InternalQLParser.g:179:4: () otherlv_2= OR ( (lv_right_3_0= ruleQueryConjunction ) ) + // InternalQLParser.g:179:4: () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleQueryConjunction ) ) { // InternalQLParser.g:179:4: () // InternalQLParser.g:180:5: @@ -491,10 +490,10 @@ public final EObject ruleQueryDisjunction() throws RecognitionException { } - otherlv_2=(Token)match(input,OR,FollowSets000.FOLLOW_4); if (state.failed) return current; + this_DISJUNCTION_2=(Token)match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getQueryDisjunctionAccess().getORKeyword_1_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getQueryDisjunctionAccess().getDISJUNCTIONTerminalRuleCall_1_1()); } // InternalQLParser.g:193:4: ( (lv_right_3_0= ruleQueryConjunction ) ) @@ -606,12 +605,12 @@ public final EObject entryRuleQueryConjunction() throws RecognitionException { // $ANTLR start "ruleQueryConjunction" - // InternalQLParser.g:224:1: ruleQueryConjunction returns [EObject current=null] : (this_QueryExclusion_0= ruleQueryExclusion ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleQueryExclusion ) ) )* ) ; + // InternalQLParser.g:224:1: ruleQueryConjunction returns [EObject current=null] : (this_QueryExclusion_0= ruleQueryExclusion ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleQueryExclusion ) ) )* ) ; public final EObject ruleQueryConjunction() throws RecognitionException { EObject current = null; - Token otherlv_2=null; - Token otherlv_3=null; + Token this_CONJUNCTION_2=null; + Token this_COMMA_3=null; EObject this_QueryExclusion_0 = null; EObject lv_right_4_0 = null; @@ -621,11 +620,11 @@ public final EObject ruleQueryConjunction() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:230:2: ( (this_QueryExclusion_0= ruleQueryExclusion ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleQueryExclusion ) ) )* ) ) - // InternalQLParser.g:231:2: (this_QueryExclusion_0= ruleQueryExclusion ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleQueryExclusion ) ) )* ) + // InternalQLParser.g:230:2: ( (this_QueryExclusion_0= ruleQueryExclusion ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleQueryExclusion ) ) )* ) ) + // InternalQLParser.g:231:2: (this_QueryExclusion_0= ruleQueryExclusion ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleQueryExclusion ) ) )* ) { - // InternalQLParser.g:231:2: (this_QueryExclusion_0= ruleQueryExclusion ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleQueryExclusion ) ) )* ) - // InternalQLParser.g:232:3: this_QueryExclusion_0= ruleQueryExclusion ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleQueryExclusion ) ) )* + // InternalQLParser.g:231:2: (this_QueryExclusion_0= ruleQueryExclusion ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleQueryExclusion ) ) )* ) + // InternalQLParser.g:232:3: this_QueryExclusion_0= ruleQueryExclusion ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleQueryExclusion ) ) )* { if ( state.backtracking==0 ) { @@ -648,20 +647,20 @@ public final EObject ruleQueryConjunction() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalQLParser.g:243:3: ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleQueryExclusion ) ) )* + // InternalQLParser.g:243:3: ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleQueryExclusion ) ) )* loop4: do { int alt4=2; int LA4_0 = input.LA(1); - if ( (LA4_0==AND||LA4_0==Comma) ) { + if ( ((LA4_0>=RULE_COMMA && LA4_0<=RULE_CONJUNCTION)) ) { alt4=1; } switch (alt4) { case 1 : - // InternalQLParser.g:244:4: () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleQueryExclusion ) ) + // InternalQLParser.g:244:4: () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleQueryExclusion ) ) { // InternalQLParser.g:244:4: () // InternalQLParser.g:245:5: @@ -681,14 +680,14 @@ public final EObject ruleQueryConjunction() throws RecognitionException { } - // InternalQLParser.g:254:4: (otherlv_2= AND | otherlv_3= Comma ) + // InternalQLParser.g:254:4: (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) int alt3=2; int LA3_0 = input.LA(1); - if ( (LA3_0==AND) ) { + if ( (LA3_0==RULE_CONJUNCTION) ) { alt3=1; } - else if ( (LA3_0==Comma) ) { + else if ( (LA3_0==RULE_COMMA) ) { alt3=2; } else { @@ -700,24 +699,24 @@ else if ( (LA3_0==Comma) ) { } switch (alt3) { case 1 : - // InternalQLParser.g:255:5: otherlv_2= AND + // InternalQLParser.g:255:5: this_CONJUNCTION_2= RULE_CONJUNCTION { - otherlv_2=(Token)match(input,AND,FollowSets000.FOLLOW_4); if (state.failed) return current; + this_CONJUNCTION_2=(Token)match(input,RULE_CONJUNCTION,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getQueryConjunctionAccess().getANDKeyword_1_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getQueryConjunctionAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); } } break; case 2 : - // InternalQLParser.g:260:5: otherlv_3= Comma + // InternalQLParser.g:260:5: this_COMMA_3= RULE_COMMA { - otherlv_3=(Token)match(input,Comma,FollowSets000.FOLLOW_4); if (state.failed) return current; + this_COMMA_3=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_3, grammarAccess.getQueryConjunctionAccess().getCommaKeyword_1_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getQueryConjunctionAccess().getCOMMATerminalRuleCall_1_1_1()); } @@ -835,11 +834,11 @@ public final EObject entryRuleQueryExclusion() throws RecognitionException { // $ANTLR start "ruleQueryExclusion" - // InternalQLParser.g:296:1: ruleQueryExclusion returns [EObject current=null] : (this_SubQuery_0= ruleSubQuery ( () otherlv_2= MINUS ( (lv_right_3_0= ruleSubQuery ) ) )? ) ; + // InternalQLParser.g:296:1: ruleQueryExclusion returns [EObject current=null] : (this_SubQuery_0= ruleSubQuery ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleSubQuery ) ) )? ) ; public final EObject ruleQueryExclusion() throws RecognitionException { EObject current = null; - Token otherlv_2=null; + Token this_EXCLUSION_2=null; EObject this_SubQuery_0 = null; EObject lv_right_3_0 = null; @@ -849,11 +848,11 @@ public final EObject ruleQueryExclusion() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:302:2: ( (this_SubQuery_0= ruleSubQuery ( () otherlv_2= MINUS ( (lv_right_3_0= ruleSubQuery ) ) )? ) ) - // InternalQLParser.g:303:2: (this_SubQuery_0= ruleSubQuery ( () otherlv_2= MINUS ( (lv_right_3_0= ruleSubQuery ) ) )? ) + // InternalQLParser.g:302:2: ( (this_SubQuery_0= ruleSubQuery ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleSubQuery ) ) )? ) ) + // InternalQLParser.g:303:2: (this_SubQuery_0= ruleSubQuery ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleSubQuery ) ) )? ) { - // InternalQLParser.g:303:2: (this_SubQuery_0= ruleSubQuery ( () otherlv_2= MINUS ( (lv_right_3_0= ruleSubQuery ) ) )? ) - // InternalQLParser.g:304:3: this_SubQuery_0= ruleSubQuery ( () otherlv_2= MINUS ( (lv_right_3_0= ruleSubQuery ) ) )? + // InternalQLParser.g:303:2: (this_SubQuery_0= ruleSubQuery ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleSubQuery ) ) )? ) + // InternalQLParser.g:304:3: this_SubQuery_0= ruleSubQuery ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleSubQuery ) ) )? { if ( state.backtracking==0 ) { @@ -876,16 +875,16 @@ public final EObject ruleQueryExclusion() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalQLParser.g:315:3: ( () otherlv_2= MINUS ( (lv_right_3_0= ruleSubQuery ) ) )? + // InternalQLParser.g:315:3: ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleSubQuery ) ) )? int alt5=2; int LA5_0 = input.LA(1); - if ( (LA5_0==MINUS) ) { + if ( (LA5_0==RULE_EXCLUSION) ) { alt5=1; } switch (alt5) { case 1 : - // InternalQLParser.g:316:4: () otherlv_2= MINUS ( (lv_right_3_0= ruleSubQuery ) ) + // InternalQLParser.g:316:4: () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleSubQuery ) ) { // InternalQLParser.g:316:4: () // InternalQLParser.g:317:5: @@ -905,10 +904,10 @@ public final EObject ruleQueryExclusion() throws RecognitionException { } - otherlv_2=(Token)match(input,MINUS,FollowSets000.FOLLOW_4); if (state.failed) return current; + this_EXCLUSION_2=(Token)match(input,RULE_EXCLUSION,FollowSets000.FOLLOW_4); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getQueryExclusionAccess().getMINUSKeyword_1_1()); + newLeafNode(this_EXCLUSION_2, grammarAccess.getQueryExclusionAccess().getEXCLUSIONTerminalRuleCall_1_1()); } // InternalQLParser.g:330:4: ( (lv_right_3_0= ruleSubQuery ) ) @@ -1501,19 +1500,19 @@ public final EObject entryRuleFilter() throws RecognitionException { // $ANTLR start "ruleFilter" - // InternalQLParser.g:526:1: ruleFilter returns [EObject current=null] : this_Disjunction_0= ruleDisjunction ; + // InternalQLParser.g:526:1: ruleFilter returns [EObject current=null] : this_DisjunctionFilter_0= ruleDisjunctionFilter ; public final EObject ruleFilter() throws RecognitionException { EObject current = null; - EObject this_Disjunction_0 = null; + EObject this_DisjunctionFilter_0 = null; enterRule(); try { - // InternalQLParser.g:532:2: (this_Disjunction_0= ruleDisjunction ) - // InternalQLParser.g:533:2: this_Disjunction_0= ruleDisjunction + // InternalQLParser.g:532:2: (this_DisjunctionFilter_0= ruleDisjunctionFilter ) + // InternalQLParser.g:533:2: this_DisjunctionFilter_0= ruleDisjunctionFilter { if ( state.backtracking==0 ) { @@ -1522,17 +1521,17 @@ public final EObject ruleFilter() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getFilterAccess().getDisjunctionParserRuleCall()); + newCompositeNode(grammarAccess.getFilterAccess().getDisjunctionFilterParserRuleCall()); } pushFollow(FollowSets000.FOLLOW_2); - this_Disjunction_0=ruleDisjunction(); + this_DisjunctionFilter_0=ruleDisjunctionFilter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current = this_Disjunction_0; + current = this_DisjunctionFilter_0; afterParserOrEnumRuleCall(); } @@ -1557,28 +1556,28 @@ public final EObject ruleFilter() throws RecognitionException { // $ANTLR end "ruleFilter" - // $ANTLR start "entryRuleDisjunction" - // InternalQLParser.g:547:1: entryRuleDisjunction returns [EObject current=null] : iv_ruleDisjunction= ruleDisjunction EOF ; - public final EObject entryRuleDisjunction() throws RecognitionException { + // $ANTLR start "entryRuleDisjunctionFilter" + // InternalQLParser.g:547:1: entryRuleDisjunctionFilter returns [EObject current=null] : iv_ruleDisjunctionFilter= ruleDisjunctionFilter EOF ; + public final EObject entryRuleDisjunctionFilter() throws RecognitionException { EObject current = null; - EObject iv_ruleDisjunction = null; + EObject iv_ruleDisjunctionFilter = null; try { - // InternalQLParser.g:547:52: (iv_ruleDisjunction= ruleDisjunction EOF ) - // InternalQLParser.g:548:2: iv_ruleDisjunction= ruleDisjunction EOF + // InternalQLParser.g:547:58: (iv_ruleDisjunctionFilter= ruleDisjunctionFilter EOF ) + // InternalQLParser.g:548:2: iv_ruleDisjunctionFilter= ruleDisjunctionFilter EOF { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getDisjunctionRule()); + newCompositeNode(grammarAccess.getDisjunctionFilterRule()); } pushFollow(FollowSets000.FOLLOW_1); - iv_ruleDisjunction=ruleDisjunction(); + iv_ruleDisjunctionFilter=ruleDisjunctionFilter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current =iv_ruleDisjunction; + current =iv_ruleDisjunctionFilter; } match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; @@ -1594,16 +1593,16 @@ public final EObject entryRuleDisjunction() throws RecognitionException { } return current; } - // $ANTLR end "entryRuleDisjunction" + // $ANTLR end "entryRuleDisjunctionFilter" - // $ANTLR start "ruleDisjunction" - // InternalQLParser.g:554:1: ruleDisjunction returns [EObject current=null] : (this_Conjunction_0= ruleConjunction ( () otherlv_2= OR ( (lv_right_3_0= ruleConjunction ) ) )* ) ; - public final EObject ruleDisjunction() throws RecognitionException { + // $ANTLR start "ruleDisjunctionFilter" + // InternalQLParser.g:554:1: ruleDisjunctionFilter returns [EObject current=null] : (this_ConjunctionFilter_0= ruleConjunctionFilter ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleConjunctionFilter ) ) )* ) ; + public final EObject ruleDisjunctionFilter() throws RecognitionException { EObject current = null; - Token otherlv_2=null; - EObject this_Conjunction_0 = null; + Token this_DISJUNCTION_2=null; + EObject this_ConjunctionFilter_0 = null; EObject lv_right_3_0 = null; @@ -1612,11 +1611,11 @@ public final EObject ruleDisjunction() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:560:2: ( (this_Conjunction_0= ruleConjunction ( () otherlv_2= OR ( (lv_right_3_0= ruleConjunction ) ) )* ) ) - // InternalQLParser.g:561:2: (this_Conjunction_0= ruleConjunction ( () otherlv_2= OR ( (lv_right_3_0= ruleConjunction ) ) )* ) + // InternalQLParser.g:560:2: ( (this_ConjunctionFilter_0= ruleConjunctionFilter ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleConjunctionFilter ) ) )* ) ) + // InternalQLParser.g:561:2: (this_ConjunctionFilter_0= ruleConjunctionFilter ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleConjunctionFilter ) ) )* ) { - // InternalQLParser.g:561:2: (this_Conjunction_0= ruleConjunction ( () otherlv_2= OR ( (lv_right_3_0= ruleConjunction ) ) )* ) - // InternalQLParser.g:562:3: this_Conjunction_0= ruleConjunction ( () otherlv_2= OR ( (lv_right_3_0= ruleConjunction ) ) )* + // InternalQLParser.g:561:2: (this_ConjunctionFilter_0= ruleConjunctionFilter ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleConjunctionFilter ) ) )* ) + // InternalQLParser.g:562:3: this_ConjunctionFilter_0= ruleConjunctionFilter ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleConjunctionFilter ) ) )* { if ( state.backtracking==0 ) { @@ -1625,34 +1624,34 @@ public final EObject ruleDisjunction() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getDisjunctionAccess().getConjunctionParserRuleCall_0()); + newCompositeNode(grammarAccess.getDisjunctionFilterAccess().getConjunctionFilterParserRuleCall_0()); } pushFollow(FollowSets000.FOLLOW_3); - this_Conjunction_0=ruleConjunction(); + this_ConjunctionFilter_0=ruleConjunctionFilter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current = this_Conjunction_0; + current = this_ConjunctionFilter_0; afterParserOrEnumRuleCall(); } - // InternalQLParser.g:573:3: ( () otherlv_2= OR ( (lv_right_3_0= ruleConjunction ) ) )* + // InternalQLParser.g:573:3: ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleConjunctionFilter ) ) )* loop9: do { int alt9=2; int LA9_0 = input.LA(1); - if ( (LA9_0==OR) ) { + if ( (LA9_0==RULE_DISJUNCTION) ) { alt9=1; } switch (alt9) { case 1 : - // InternalQLParser.g:574:4: () otherlv_2= OR ( (lv_right_3_0= ruleConjunction ) ) + // InternalQLParser.g:574:4: () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleConjunctionFilter ) ) { // InternalQLParser.g:574:4: () // InternalQLParser.g:575:5: @@ -1665,45 +1664,45 @@ public final EObject ruleDisjunction() throws RecognitionException { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( - grammarAccess.getDisjunctionAccess().getDisjunctionLeftAction_1_0(), + grammarAccess.getDisjunctionFilterAccess().getDisjunctionFilterLeftAction_1_0(), current); } } - otherlv_2=(Token)match(input,OR,FollowSets000.FOLLOW_8); if (state.failed) return current; + this_DISJUNCTION_2=(Token)match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_8); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getDisjunctionAccess().getORKeyword_1_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getDisjunctionFilterAccess().getDISJUNCTIONTerminalRuleCall_1_1()); } - // InternalQLParser.g:588:4: ( (lv_right_3_0= ruleConjunction ) ) - // InternalQLParser.g:589:5: (lv_right_3_0= ruleConjunction ) + // InternalQLParser.g:588:4: ( (lv_right_3_0= ruleConjunctionFilter ) ) + // InternalQLParser.g:589:5: (lv_right_3_0= ruleConjunctionFilter ) { - // InternalQLParser.g:589:5: (lv_right_3_0= ruleConjunction ) - // InternalQLParser.g:590:6: lv_right_3_0= ruleConjunction + // InternalQLParser.g:589:5: (lv_right_3_0= ruleConjunctionFilter ) + // InternalQLParser.g:590:6: lv_right_3_0= ruleConjunctionFilter { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getDisjunctionAccess().getRightConjunctionParserRuleCall_1_2_0()); + newCompositeNode(grammarAccess.getDisjunctionFilterAccess().getRightConjunctionFilterParserRuleCall_1_2_0()); } pushFollow(FollowSets000.FOLLOW_3); - lv_right_3_0=ruleConjunction(); + lv_right_3_0=ruleConjunctionFilter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { - current = createModelElementForParent(grammarAccess.getDisjunctionRule()); + current = createModelElementForParent(grammarAccess.getDisjunctionFilterRule()); } set( current, "right", lv_right_3_0, - "com.b2international.snowowl.snomed.ql.QL.Conjunction"); + "com.b2international.snowowl.snomed.ql.QL.ConjunctionFilter"); afterParserOrEnumRuleCall(); } @@ -1743,31 +1742,31 @@ public final EObject ruleDisjunction() throws RecognitionException { } return current; } - // $ANTLR end "ruleDisjunction" + // $ANTLR end "ruleDisjunctionFilter" - // $ANTLR start "entryRuleConjunction" - // InternalQLParser.g:612:1: entryRuleConjunction returns [EObject current=null] : iv_ruleConjunction= ruleConjunction EOF ; - public final EObject entryRuleConjunction() throws RecognitionException { + // $ANTLR start "entryRuleConjunctionFilter" + // InternalQLParser.g:612:1: entryRuleConjunctionFilter returns [EObject current=null] : iv_ruleConjunctionFilter= ruleConjunctionFilter EOF ; + public final EObject entryRuleConjunctionFilter() throws RecognitionException { EObject current = null; - EObject iv_ruleConjunction = null; + EObject iv_ruleConjunctionFilter = null; try { - // InternalQLParser.g:612:52: (iv_ruleConjunction= ruleConjunction EOF ) - // InternalQLParser.g:613:2: iv_ruleConjunction= ruleConjunction EOF + // InternalQLParser.g:612:58: (iv_ruleConjunctionFilter= ruleConjunctionFilter EOF ) + // InternalQLParser.g:613:2: iv_ruleConjunctionFilter= ruleConjunctionFilter EOF { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getConjunctionRule()); + newCompositeNode(grammarAccess.getConjunctionFilterRule()); } pushFollow(FollowSets000.FOLLOW_1); - iv_ruleConjunction=ruleConjunction(); + iv_ruleConjunctionFilter=ruleConjunctionFilter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current =iv_ruleConjunction; + current =iv_ruleConjunctionFilter; } match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; @@ -1783,17 +1782,17 @@ public final EObject entryRuleConjunction() throws RecognitionException { } return current; } - // $ANTLR end "entryRuleConjunction" + // $ANTLR end "entryRuleConjunctionFilter" - // $ANTLR start "ruleConjunction" - // InternalQLParser.g:619:1: ruleConjunction returns [EObject current=null] : (this_Exclusion_0= ruleExclusion ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusion ) ) )* ) ; - public final EObject ruleConjunction() throws RecognitionException { + // $ANTLR start "ruleConjunctionFilter" + // InternalQLParser.g:619:1: ruleConjunctionFilter returns [EObject current=null] : (this_ExclusionFilter_0= ruleExclusionFilter ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionFilter ) ) )* ) ; + public final EObject ruleConjunctionFilter() throws RecognitionException { EObject current = null; - Token otherlv_2=null; - Token otherlv_3=null; - EObject this_Exclusion_0 = null; + Token this_CONJUNCTION_2=null; + Token this_COMMA_3=null; + EObject this_ExclusionFilter_0 = null; EObject lv_right_4_0 = null; @@ -1802,11 +1801,11 @@ public final EObject ruleConjunction() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:625:2: ( (this_Exclusion_0= ruleExclusion ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusion ) ) )* ) ) - // InternalQLParser.g:626:2: (this_Exclusion_0= ruleExclusion ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusion ) ) )* ) + // InternalQLParser.g:625:2: ( (this_ExclusionFilter_0= ruleExclusionFilter ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionFilter ) ) )* ) ) + // InternalQLParser.g:626:2: (this_ExclusionFilter_0= ruleExclusionFilter ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionFilter ) ) )* ) { - // InternalQLParser.g:626:2: (this_Exclusion_0= ruleExclusion ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusion ) ) )* ) - // InternalQLParser.g:627:3: this_Exclusion_0= ruleExclusion ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusion ) ) )* + // InternalQLParser.g:626:2: (this_ExclusionFilter_0= ruleExclusionFilter ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionFilter ) ) )* ) + // InternalQLParser.g:627:3: this_ExclusionFilter_0= ruleExclusionFilter ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionFilter ) ) )* { if ( state.backtracking==0 ) { @@ -1815,34 +1814,34 @@ public final EObject ruleConjunction() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getConjunctionAccess().getExclusionParserRuleCall_0()); + newCompositeNode(grammarAccess.getConjunctionFilterAccess().getExclusionFilterParserRuleCall_0()); } pushFollow(FollowSets000.FOLLOW_5); - this_Exclusion_0=ruleExclusion(); + this_ExclusionFilter_0=ruleExclusionFilter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current = this_Exclusion_0; + current = this_ExclusionFilter_0; afterParserOrEnumRuleCall(); } - // InternalQLParser.g:638:3: ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusion ) ) )* + // InternalQLParser.g:638:3: ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionFilter ) ) )* loop11: do { int alt11=2; int LA11_0 = input.LA(1); - if ( (LA11_0==AND||LA11_0==Comma) ) { + if ( ((LA11_0>=RULE_COMMA && LA11_0<=RULE_CONJUNCTION)) ) { alt11=1; } switch (alt11) { case 1 : - // InternalQLParser.g:639:4: () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusion ) ) + // InternalQLParser.g:639:4: () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionFilter ) ) { // InternalQLParser.g:639:4: () // InternalQLParser.g:640:5: @@ -1855,21 +1854,21 @@ public final EObject ruleConjunction() throws RecognitionException { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( - grammarAccess.getConjunctionAccess().getConjunctionLeftAction_1_0(), + grammarAccess.getConjunctionFilterAccess().getConjunctionFilterLeftAction_1_0(), current); } } - // InternalQLParser.g:649:4: (otherlv_2= AND | otherlv_3= Comma ) + // InternalQLParser.g:649:4: (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) int alt10=2; int LA10_0 = input.LA(1); - if ( (LA10_0==AND) ) { + if ( (LA10_0==RULE_CONJUNCTION) ) { alt10=1; } - else if ( (LA10_0==Comma) ) { + else if ( (LA10_0==RULE_COMMA) ) { alt10=2; } else { @@ -1881,24 +1880,24 @@ else if ( (LA10_0==Comma) ) { } switch (alt10) { case 1 : - // InternalQLParser.g:650:5: otherlv_2= AND + // InternalQLParser.g:650:5: this_CONJUNCTION_2= RULE_CONJUNCTION { - otherlv_2=(Token)match(input,AND,FollowSets000.FOLLOW_8); if (state.failed) return current; + this_CONJUNCTION_2=(Token)match(input,RULE_CONJUNCTION,FollowSets000.FOLLOW_8); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getConjunctionAccess().getANDKeyword_1_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getConjunctionFilterAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); } } break; case 2 : - // InternalQLParser.g:655:5: otherlv_3= Comma + // InternalQLParser.g:655:5: this_COMMA_3= RULE_COMMA { - otherlv_3=(Token)match(input,Comma,FollowSets000.FOLLOW_8); if (state.failed) return current; + this_COMMA_3=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_8); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_3, grammarAccess.getConjunctionAccess().getCommaKeyword_1_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getConjunctionFilterAccess().getCOMMATerminalRuleCall_1_1_1()); } @@ -1907,32 +1906,32 @@ else if ( (LA10_0==Comma) ) { } - // InternalQLParser.g:660:4: ( (lv_right_4_0= ruleExclusion ) ) - // InternalQLParser.g:661:5: (lv_right_4_0= ruleExclusion ) + // InternalQLParser.g:660:4: ( (lv_right_4_0= ruleExclusionFilter ) ) + // InternalQLParser.g:661:5: (lv_right_4_0= ruleExclusionFilter ) { - // InternalQLParser.g:661:5: (lv_right_4_0= ruleExclusion ) - // InternalQLParser.g:662:6: lv_right_4_0= ruleExclusion + // InternalQLParser.g:661:5: (lv_right_4_0= ruleExclusionFilter ) + // InternalQLParser.g:662:6: lv_right_4_0= ruleExclusionFilter { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getConjunctionAccess().getRightExclusionParserRuleCall_1_2_0()); + newCompositeNode(grammarAccess.getConjunctionFilterAccess().getRightExclusionFilterParserRuleCall_1_2_0()); } pushFollow(FollowSets000.FOLLOW_5); - lv_right_4_0=ruleExclusion(); + lv_right_4_0=ruleExclusionFilter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { - current = createModelElementForParent(grammarAccess.getConjunctionRule()); + current = createModelElementForParent(grammarAccess.getConjunctionFilterRule()); } set( current, "right", lv_right_4_0, - "com.b2international.snowowl.snomed.ql.QL.Exclusion"); + "com.b2international.snowowl.snomed.ql.QL.ExclusionFilter"); afterParserOrEnumRuleCall(); } @@ -1972,31 +1971,31 @@ else if ( (LA10_0==Comma) ) { } return current; } - // $ANTLR end "ruleConjunction" + // $ANTLR end "ruleConjunctionFilter" - // $ANTLR start "entryRuleExclusion" - // InternalQLParser.g:684:1: entryRuleExclusion returns [EObject current=null] : iv_ruleExclusion= ruleExclusion EOF ; - public final EObject entryRuleExclusion() throws RecognitionException { + // $ANTLR start "entryRuleExclusionFilter" + // InternalQLParser.g:684:1: entryRuleExclusionFilter returns [EObject current=null] : iv_ruleExclusionFilter= ruleExclusionFilter EOF ; + public final EObject entryRuleExclusionFilter() throws RecognitionException { EObject current = null; - EObject iv_ruleExclusion = null; + EObject iv_ruleExclusionFilter = null; try { - // InternalQLParser.g:684:50: (iv_ruleExclusion= ruleExclusion EOF ) - // InternalQLParser.g:685:2: iv_ruleExclusion= ruleExclusion EOF + // InternalQLParser.g:684:56: (iv_ruleExclusionFilter= ruleExclusionFilter EOF ) + // InternalQLParser.g:685:2: iv_ruleExclusionFilter= ruleExclusionFilter EOF { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getExclusionRule()); + newCompositeNode(grammarAccess.getExclusionFilterRule()); } pushFollow(FollowSets000.FOLLOW_1); - iv_ruleExclusion=ruleExclusion(); + iv_ruleExclusionFilter=ruleExclusionFilter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current =iv_ruleExclusion; + current =iv_ruleExclusionFilter; } match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; @@ -2012,15 +2011,15 @@ public final EObject entryRuleExclusion() throws RecognitionException { } return current; } - // $ANTLR end "entryRuleExclusion" + // $ANTLR end "entryRuleExclusionFilter" - // $ANTLR start "ruleExclusion" - // InternalQLParser.g:691:1: ruleExclusion returns [EObject current=null] : (this_PropertyFilter_0= rulePropertyFilter ( () otherlv_2= MINUS ( (lv_right_3_0= rulePropertyFilter ) ) )? ) ; - public final EObject ruleExclusion() throws RecognitionException { + // $ANTLR start "ruleExclusionFilter" + // InternalQLParser.g:691:1: ruleExclusionFilter returns [EObject current=null] : (this_PropertyFilter_0= rulePropertyFilter ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= rulePropertyFilter ) ) )? ) ; + public final EObject ruleExclusionFilter() throws RecognitionException { EObject current = null; - Token otherlv_2=null; + Token this_EXCLUSION_2=null; EObject this_PropertyFilter_0 = null; EObject lv_right_3_0 = null; @@ -2030,11 +2029,11 @@ public final EObject ruleExclusion() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:697:2: ( (this_PropertyFilter_0= rulePropertyFilter ( () otherlv_2= MINUS ( (lv_right_3_0= rulePropertyFilter ) ) )? ) ) - // InternalQLParser.g:698:2: (this_PropertyFilter_0= rulePropertyFilter ( () otherlv_2= MINUS ( (lv_right_3_0= rulePropertyFilter ) ) )? ) + // InternalQLParser.g:697:2: ( (this_PropertyFilter_0= rulePropertyFilter ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= rulePropertyFilter ) ) )? ) ) + // InternalQLParser.g:698:2: (this_PropertyFilter_0= rulePropertyFilter ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= rulePropertyFilter ) ) )? ) { - // InternalQLParser.g:698:2: (this_PropertyFilter_0= rulePropertyFilter ( () otherlv_2= MINUS ( (lv_right_3_0= rulePropertyFilter ) ) )? ) - // InternalQLParser.g:699:3: this_PropertyFilter_0= rulePropertyFilter ( () otherlv_2= MINUS ( (lv_right_3_0= rulePropertyFilter ) ) )? + // InternalQLParser.g:698:2: (this_PropertyFilter_0= rulePropertyFilter ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= rulePropertyFilter ) ) )? ) + // InternalQLParser.g:699:3: this_PropertyFilter_0= rulePropertyFilter ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= rulePropertyFilter ) ) )? { if ( state.backtracking==0 ) { @@ -2043,7 +2042,7 @@ public final EObject ruleExclusion() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getExclusionAccess().getPropertyFilterParserRuleCall_0()); + newCompositeNode(grammarAccess.getExclusionFilterAccess().getPropertyFilterParserRuleCall_0()); } pushFollow(FollowSets000.FOLLOW_6); @@ -2057,16 +2056,16 @@ public final EObject ruleExclusion() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalQLParser.g:710:3: ( () otherlv_2= MINUS ( (lv_right_3_0= rulePropertyFilter ) ) )? + // InternalQLParser.g:710:3: ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= rulePropertyFilter ) ) )? int alt12=2; int LA12_0 = input.LA(1); - if ( (LA12_0==MINUS) ) { + if ( (LA12_0==RULE_EXCLUSION) ) { alt12=1; } switch (alt12) { case 1 : - // InternalQLParser.g:711:4: () otherlv_2= MINUS ( (lv_right_3_0= rulePropertyFilter ) ) + // InternalQLParser.g:711:4: () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= rulePropertyFilter ) ) { // InternalQLParser.g:711:4: () // InternalQLParser.g:712:5: @@ -2079,17 +2078,17 @@ public final EObject ruleExclusion() throws RecognitionException { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( - grammarAccess.getExclusionAccess().getExclusionLeftAction_1_0(), + grammarAccess.getExclusionFilterAccess().getExclusionFilterLeftAction_1_0(), current); } } - otherlv_2=(Token)match(input,MINUS,FollowSets000.FOLLOW_8); if (state.failed) return current; + this_EXCLUSION_2=(Token)match(input,RULE_EXCLUSION,FollowSets000.FOLLOW_8); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getExclusionAccess().getMINUSKeyword_1_1()); + newLeafNode(this_EXCLUSION_2, grammarAccess.getExclusionFilterAccess().getEXCLUSIONTerminalRuleCall_1_1()); } // InternalQLParser.g:725:4: ( (lv_right_3_0= rulePropertyFilter ) ) @@ -2100,7 +2099,7 @@ public final EObject ruleExclusion() throws RecognitionException { { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getExclusionAccess().getRightPropertyFilterParserRuleCall_1_2_0()); + newCompositeNode(grammarAccess.getExclusionFilterAccess().getRightPropertyFilterParserRuleCall_1_2_0()); } pushFollow(FollowSets000.FOLLOW_2); @@ -2111,7 +2110,7 @@ public final EObject ruleExclusion() throws RecognitionException { if ( state.backtracking==0 ) { if (current==null) { - current = createModelElementForParent(grammarAccess.getExclusionRule()); + current = createModelElementForParent(grammarAccess.getExclusionFilterRule()); } set( current, @@ -2154,7 +2153,7 @@ public final EObject ruleExclusion() throws RecognitionException { } return current; } - // $ANTLR end "ruleExclusion" + // $ANTLR end "ruleExclusionFilter" // $ANTLR start "entryRuleNestedFilter" @@ -4147,11 +4146,11 @@ public final EObject entryRuleOrExpressionConstraint() throws RecognitionExcepti // $ANTLR start "ruleOrExpressionConstraint" - // InternalQLParser.g:1455:1: ruleOrExpressionConstraint returns [EObject current=null] : (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) ; + // InternalQLParser.g:1455:1: ruleOrExpressionConstraint returns [EObject current=null] : (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) ; public final EObject ruleOrExpressionConstraint() throws RecognitionException { EObject current = null; - Token otherlv_2=null; + Token this_DISJUNCTION_2=null; EObject this_AndExpressionConstraint_0 = null; EObject lv_right_3_0 = null; @@ -4161,11 +4160,11 @@ public final EObject ruleOrExpressionConstraint() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:1461:2: ( (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) ) - // InternalQLParser.g:1462:2: (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) + // InternalQLParser.g:1461:2: ( (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) ) + // InternalQLParser.g:1462:2: (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) { - // InternalQLParser.g:1462:2: (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) - // InternalQLParser.g:1463:3: this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* + // InternalQLParser.g:1462:2: (this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* ) + // InternalQLParser.g:1463:3: this_AndExpressionConstraint_0= ruleAndExpressionConstraint ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* { if ( state.backtracking==0 ) { @@ -4188,14 +4187,14 @@ public final EObject ruleOrExpressionConstraint() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalQLParser.g:1474:3: ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* + // InternalQLParser.g:1474:3: ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )* loop17: do { int alt17=2; alt17 = dfa17.predict(input); switch (alt17) { case 1 : - // InternalQLParser.g:1475:4: () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) + // InternalQLParser.g:1475:4: () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) { // InternalQLParser.g:1475:4: () // InternalQLParser.g:1476:5: @@ -4215,10 +4214,10 @@ public final EObject ruleOrExpressionConstraint() throws RecognitionException { } - otherlv_2=(Token)match(input,OR,FollowSets000.FOLLOW_16); if (state.failed) return current; + this_DISJUNCTION_2=(Token)match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_16); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getOrExpressionConstraintAccess().getORKeyword_1_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrExpressionConstraintAccess().getDISJUNCTIONTerminalRuleCall_1_1()); } // InternalQLParser.g:1489:4: ( (lv_right_3_0= ruleAndExpressionConstraint ) ) @@ -4330,12 +4329,12 @@ public final EObject entryRuleAndExpressionConstraint() throws RecognitionExcept // $ANTLR start "ruleAndExpressionConstraint" - // InternalQLParser.g:1520:1: ruleAndExpressionConstraint returns [EObject current=null] : (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) ; + // InternalQLParser.g:1520:1: ruleAndExpressionConstraint returns [EObject current=null] : (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) ; public final EObject ruleAndExpressionConstraint() throws RecognitionException { EObject current = null; - Token otherlv_2=null; - Token otherlv_3=null; + Token this_CONJUNCTION_2=null; + Token this_COMMA_3=null; EObject this_ExclusionExpressionConstraint_0 = null; EObject lv_right_4_0 = null; @@ -4345,11 +4344,11 @@ public final EObject ruleAndExpressionConstraint() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:1526:2: ( (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) ) - // InternalQLParser.g:1527:2: (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) + // InternalQLParser.g:1526:2: ( (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) ) + // InternalQLParser.g:1527:2: (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) { - // InternalQLParser.g:1527:2: (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) - // InternalQLParser.g:1528:3: this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* + // InternalQLParser.g:1527:2: (this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* ) + // InternalQLParser.g:1528:3: this_ExclusionExpressionConstraint_0= ruleExclusionExpressionConstraint ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* { if ( state.backtracking==0 ) { @@ -4372,14 +4371,14 @@ public final EObject ruleAndExpressionConstraint() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalQLParser.g:1539:3: ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* + // InternalQLParser.g:1539:3: ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )* loop19: do { int alt19=2; alt19 = dfa19.predict(input); switch (alt19) { case 1 : - // InternalQLParser.g:1540:4: () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) + // InternalQLParser.g:1540:4: () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) { // InternalQLParser.g:1540:4: () // InternalQLParser.g:1541:5: @@ -4399,14 +4398,14 @@ public final EObject ruleAndExpressionConstraint() throws RecognitionException { } - // InternalQLParser.g:1550:4: (otherlv_2= AND | otherlv_3= Comma ) + // InternalQLParser.g:1550:4: (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) int alt18=2; int LA18_0 = input.LA(1); - if ( (LA18_0==AND) ) { + if ( (LA18_0==RULE_CONJUNCTION) ) { alt18=1; } - else if ( (LA18_0==Comma) ) { + else if ( (LA18_0==RULE_COMMA) ) { alt18=2; } else { @@ -4418,24 +4417,24 @@ else if ( (LA18_0==Comma) ) { } switch (alt18) { case 1 : - // InternalQLParser.g:1551:5: otherlv_2= AND + // InternalQLParser.g:1551:5: this_CONJUNCTION_2= RULE_CONJUNCTION { - otherlv_2=(Token)match(input,AND,FollowSets000.FOLLOW_16); if (state.failed) return current; + this_CONJUNCTION_2=(Token)match(input,RULE_CONJUNCTION,FollowSets000.FOLLOW_16); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getAndExpressionConstraintAccess().getANDKeyword_1_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndExpressionConstraintAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); } } break; case 2 : - // InternalQLParser.g:1556:5: otherlv_3= Comma + // InternalQLParser.g:1556:5: this_COMMA_3= RULE_COMMA { - otherlv_3=(Token)match(input,Comma,FollowSets000.FOLLOW_16); if (state.failed) return current; + this_COMMA_3=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_16); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_3, grammarAccess.getAndExpressionConstraintAccess().getCommaKeyword_1_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getAndExpressionConstraintAccess().getCOMMATerminalRuleCall_1_1_1()); } @@ -4553,11 +4552,11 @@ public final EObject entryRuleExclusionExpressionConstraint() throws Recognition // $ANTLR start "ruleExclusionExpressionConstraint" - // InternalQLParser.g:1592:1: ruleExclusionExpressionConstraint returns [EObject current=null] : (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) ; + // InternalQLParser.g:1592:1: ruleExclusionExpressionConstraint returns [EObject current=null] : (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) ; public final EObject ruleExclusionExpressionConstraint() throws RecognitionException { EObject current = null; - Token otherlv_2=null; + Token this_EXCLUSION_2=null; EObject this_RefinedExpressionConstraint_0 = null; EObject lv_right_3_0 = null; @@ -4567,11 +4566,11 @@ public final EObject ruleExclusionExpressionConstraint() throws RecognitionExcep enterRule(); try { - // InternalQLParser.g:1598:2: ( (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) ) - // InternalQLParser.g:1599:2: (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) + // InternalQLParser.g:1598:2: ( (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) ) + // InternalQLParser.g:1599:2: (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) { - // InternalQLParser.g:1599:2: (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) - // InternalQLParser.g:1600:3: this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? + // InternalQLParser.g:1599:2: (this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? ) + // InternalQLParser.g:1600:3: this_RefinedExpressionConstraint_0= ruleRefinedExpressionConstraint ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? { if ( state.backtracking==0 ) { @@ -4594,12 +4593,12 @@ public final EObject ruleExclusionExpressionConstraint() throws RecognitionExcep afterParserOrEnumRuleCall(); } - // InternalQLParser.g:1611:3: ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? + // InternalQLParser.g:1611:3: ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )? int alt20=2; alt20 = dfa20.predict(input); switch (alt20) { case 1 : - // InternalQLParser.g:1612:4: () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) + // InternalQLParser.g:1612:4: () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) { // InternalQLParser.g:1612:4: () // InternalQLParser.g:1613:5: @@ -4619,10 +4618,10 @@ public final EObject ruleExclusionExpressionConstraint() throws RecognitionExcep } - otherlv_2=(Token)match(input,MINUS,FollowSets000.FOLLOW_16); if (state.failed) return current; + this_EXCLUSION_2=(Token)match(input,RULE_EXCLUSION,FollowSets000.FOLLOW_16); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getExclusionExpressionConstraintAccess().getMINUSKeyword_1_1()); + newLeafNode(this_EXCLUSION_2, grammarAccess.getExclusionExpressionConstraintAccess().getEXCLUSIONTerminalRuleCall_1_1()); } // InternalQLParser.g:1626:4: ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) @@ -4731,7 +4730,7 @@ public final EObject entryRuleRefinedExpressionConstraint() throws RecognitionEx // $ANTLR start "ruleRefinedExpressionConstraint" - // InternalQLParser.g:1657:1: ruleRefinedExpressionConstraint returns [EObject current=null] : (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) )? ) ; + // InternalQLParser.g:1657:1: ruleRefinedExpressionConstraint returns [EObject current=null] : (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? ) ; public final EObject ruleRefinedExpressionConstraint() throws RecognitionException { EObject current = null; @@ -4745,11 +4744,11 @@ public final EObject ruleRefinedExpressionConstraint() throws RecognitionExcepti enterRule(); try { - // InternalQLParser.g:1663:2: ( (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) )? ) ) - // InternalQLParser.g:1664:2: (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) )? ) + // InternalQLParser.g:1663:2: ( (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? ) ) + // InternalQLParser.g:1664:2: (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? ) { - // InternalQLParser.g:1664:2: (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) )? ) - // InternalQLParser.g:1665:3: this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) )? + // InternalQLParser.g:1664:2: (this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? ) + // InternalQLParser.g:1665:3: this_DottedExpressionConstraint_0= ruleDottedExpressionConstraint ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? { if ( state.backtracking==0 ) { @@ -4772,7 +4771,7 @@ public final EObject ruleRefinedExpressionConstraint() throws RecognitionExcepti afterParserOrEnumRuleCall(); } - // InternalQLParser.g:1676:3: ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) )? + // InternalQLParser.g:1676:3: ( () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) )? int alt21=2; int LA21_0 = input.LA(1); @@ -4781,7 +4780,7 @@ public final EObject ruleRefinedExpressionConstraint() throws RecognitionExcepti } switch (alt21) { case 1 : - // InternalQLParser.g:1677:4: () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleRefinement ) ) + // InternalQLParser.g:1677:4: () this_COLON_2= RULE_COLON ( (lv_refinement_3_0= ruleEclRefinement ) ) { // InternalQLParser.g:1677:4: () // InternalQLParser.g:1678:5: @@ -4807,19 +4806,19 @@ public final EObject ruleRefinedExpressionConstraint() throws RecognitionExcepti newLeafNode(this_COLON_2, grammarAccess.getRefinedExpressionConstraintAccess().getCOLONTerminalRuleCall_1_1()); } - // InternalQLParser.g:1691:4: ( (lv_refinement_3_0= ruleRefinement ) ) - // InternalQLParser.g:1692:5: (lv_refinement_3_0= ruleRefinement ) + // InternalQLParser.g:1691:4: ( (lv_refinement_3_0= ruleEclRefinement ) ) + // InternalQLParser.g:1692:5: (lv_refinement_3_0= ruleEclRefinement ) { - // InternalQLParser.g:1692:5: (lv_refinement_3_0= ruleRefinement ) - // InternalQLParser.g:1693:6: lv_refinement_3_0= ruleRefinement + // InternalQLParser.g:1692:5: (lv_refinement_3_0= ruleEclRefinement ) + // InternalQLParser.g:1693:6: lv_refinement_3_0= ruleEclRefinement { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getRefinedExpressionConstraintAccess().getRefinementRefinementParserRuleCall_1_2_0()); + newCompositeNode(grammarAccess.getRefinedExpressionConstraintAccess().getRefinementEclRefinementParserRuleCall_1_2_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_refinement_3_0=ruleRefinement(); + lv_refinement_3_0=ruleEclRefinement(); state._fsp--; if (state.failed) return current; @@ -4832,7 +4831,7 @@ public final EObject ruleRefinedExpressionConstraint() throws RecognitionExcepti current, "refinement", lv_refinement_3_0, - "com.b2international.snowowl.snomed.ecl.Ecl.Refinement"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclRefinement"); afterParserOrEnumRuleCall(); } @@ -5102,7 +5101,7 @@ public final EObject entryRuleSubExpressionConstraint() throws RecognitionExcept // $ANTLR start "ruleSubExpressionConstraint" - // InternalQLParser.g:1787:1: ruleSubExpressionConstraint returns [EObject current=null] : (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_FocusConcept_6= ruleFocusConcept ) ; + // InternalQLParser.g:1787:1: ruleSubExpressionConstraint returns [EObject current=null] : (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_EclFocusConcept_6= ruleEclFocusConcept ) ; public final EObject ruleSubExpressionConstraint() throws RecognitionException { EObject current = null; @@ -5118,17 +5117,17 @@ public final EObject ruleSubExpressionConstraint() throws RecognitionException { EObject this_AncestorOrSelfOf_5 = null; - EObject this_FocusConcept_6 = null; + EObject this_EclFocusConcept_6 = null; enterRule(); try { - // InternalQLParser.g:1793:2: ( (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_FocusConcept_6= ruleFocusConcept ) ) - // InternalQLParser.g:1794:2: (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_FocusConcept_6= ruleFocusConcept ) + // InternalQLParser.g:1793:2: ( (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_EclFocusConcept_6= ruleEclFocusConcept ) ) + // InternalQLParser.g:1794:2: (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_EclFocusConcept_6= ruleEclFocusConcept ) { - // InternalQLParser.g:1794:2: (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_FocusConcept_6= ruleFocusConcept ) + // InternalQLParser.g:1794:2: (this_ChildOf_0= ruleChildOf | this_DescendantOf_1= ruleDescendantOf | this_DescendantOrSelfOf_2= ruleDescendantOrSelfOf | this_ParentOf_3= ruleParentOf | this_AncestorOf_4= ruleAncestorOf | this_AncestorOrSelfOf_5= ruleAncestorOrSelfOf | this_EclFocusConcept_6= ruleEclFocusConcept ) int alt23=7; switch ( input.LA(1) ) { case RULE_LT_EM: @@ -5341,7 +5340,7 @@ public final EObject ruleSubExpressionConstraint() throws RecognitionException { } break; case 7 : - // InternalQLParser.g:1867:3: this_FocusConcept_6= ruleFocusConcept + // InternalQLParser.g:1867:3: this_EclFocusConcept_6= ruleEclFocusConcept { if ( state.backtracking==0 ) { @@ -5350,17 +5349,17 @@ public final EObject ruleSubExpressionConstraint() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getFocusConceptParserRuleCall_6()); + newCompositeNode(grammarAccess.getSubExpressionConstraintAccess().getEclFocusConceptParserRuleCall_6()); } pushFollow(FollowSets000.FOLLOW_2); - this_FocusConcept_6=ruleFocusConcept(); + this_EclFocusConcept_6=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current = this_FocusConcept_6; + current = this_EclFocusConcept_6; afterParserOrEnumRuleCall(); } @@ -5391,28 +5390,28 @@ public final EObject ruleSubExpressionConstraint() throws RecognitionException { // $ANTLR end "ruleSubExpressionConstraint" - // $ANTLR start "entryRuleFocusConcept" - // InternalQLParser.g:1882:1: entryRuleFocusConcept returns [EObject current=null] : iv_ruleFocusConcept= ruleFocusConcept EOF ; - public final EObject entryRuleFocusConcept() throws RecognitionException { + // $ANTLR start "entryRuleEclFocusConcept" + // InternalQLParser.g:1882:1: entryRuleEclFocusConcept returns [EObject current=null] : iv_ruleEclFocusConcept= ruleEclFocusConcept EOF ; + public final EObject entryRuleEclFocusConcept() throws RecognitionException { EObject current = null; - EObject iv_ruleFocusConcept = null; + EObject iv_ruleEclFocusConcept = null; try { - // InternalQLParser.g:1882:53: (iv_ruleFocusConcept= ruleFocusConcept EOF ) - // InternalQLParser.g:1883:2: iv_ruleFocusConcept= ruleFocusConcept EOF + // InternalQLParser.g:1882:56: (iv_ruleEclFocusConcept= ruleEclFocusConcept EOF ) + // InternalQLParser.g:1883:2: iv_ruleEclFocusConcept= ruleEclFocusConcept EOF { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getFocusConceptRule()); + newCompositeNode(grammarAccess.getEclFocusConceptRule()); } pushFollow(FollowSets000.FOLLOW_1); - iv_ruleFocusConcept=ruleFocusConcept(); + iv_ruleEclFocusConcept=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current =iv_ruleFocusConcept; + current =iv_ruleEclFocusConcept; } match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; @@ -5428,17 +5427,17 @@ public final EObject entryRuleFocusConcept() throws RecognitionException { } return current; } - // $ANTLR end "entryRuleFocusConcept" + // $ANTLR end "entryRuleEclFocusConcept" - // $ANTLR start "ruleFocusConcept" - // InternalQLParser.g:1889:1: ruleFocusConcept returns [EObject current=null] : (this_MemberOf_0= ruleMemberOf | this_ConceptReference_1= ruleConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) ; - public final EObject ruleFocusConcept() throws RecognitionException { + // $ANTLR start "ruleEclFocusConcept" + // InternalQLParser.g:1889:1: ruleEclFocusConcept returns [EObject current=null] : (this_MemberOf_0= ruleMemberOf | this_EclConceptReference_1= ruleEclConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) ; + public final EObject ruleEclFocusConcept() throws RecognitionException { EObject current = null; EObject this_MemberOf_0 = null; - EObject this_ConceptReference_1 = null; + EObject this_EclConceptReference_1 = null; EObject this_Any_2 = null; @@ -5449,10 +5448,10 @@ public final EObject ruleFocusConcept() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:1895:2: ( (this_MemberOf_0= ruleMemberOf | this_ConceptReference_1= ruleConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) ) - // InternalQLParser.g:1896:2: (this_MemberOf_0= ruleMemberOf | this_ConceptReference_1= ruleConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) + // InternalQLParser.g:1895:2: ( (this_MemberOf_0= ruleMemberOf | this_EclConceptReference_1= ruleEclConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) ) + // InternalQLParser.g:1896:2: (this_MemberOf_0= ruleMemberOf | this_EclConceptReference_1= ruleEclConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) { - // InternalQLParser.g:1896:2: (this_MemberOf_0= ruleMemberOf | this_ConceptReference_1= ruleConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) + // InternalQLParser.g:1896:2: (this_MemberOf_0= ruleMemberOf | this_EclConceptReference_1= ruleEclConceptReference | this_Any_2= ruleAny | this_NestedExpression_3= ruleNestedExpression ) int alt24=4; switch ( input.LA(1) ) { case RULE_CARET: @@ -5494,7 +5493,7 @@ public final EObject ruleFocusConcept() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getFocusConceptAccess().getMemberOfParserRuleCall_0()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getMemberOfParserRuleCall_0()); } pushFollow(FollowSets000.FOLLOW_2); @@ -5512,7 +5511,7 @@ public final EObject ruleFocusConcept() throws RecognitionException { } break; case 2 : - // InternalQLParser.g:1909:3: this_ConceptReference_1= ruleConceptReference + // InternalQLParser.g:1909:3: this_EclConceptReference_1= ruleEclConceptReference { if ( state.backtracking==0 ) { @@ -5521,17 +5520,17 @@ public final EObject ruleFocusConcept() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getFocusConceptAccess().getConceptReferenceParserRuleCall_1()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getEclConceptReferenceParserRuleCall_1()); } pushFollow(FollowSets000.FOLLOW_2); - this_ConceptReference_1=ruleConceptReference(); + this_EclConceptReference_1=ruleEclConceptReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current = this_ConceptReference_1; + current = this_EclConceptReference_1; afterParserOrEnumRuleCall(); } @@ -5548,7 +5547,7 @@ public final EObject ruleFocusConcept() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getFocusConceptAccess().getAnyParserRuleCall_2()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getAnyParserRuleCall_2()); } pushFollow(FollowSets000.FOLLOW_2); @@ -5575,7 +5574,7 @@ public final EObject ruleFocusConcept() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getFocusConceptAccess().getNestedExpressionParserRuleCall_3()); + newCompositeNode(grammarAccess.getEclFocusConceptAccess().getNestedExpressionParserRuleCall_3()); } pushFollow(FollowSets000.FOLLOW_2); @@ -5613,7 +5612,7 @@ public final EObject ruleFocusConcept() throws RecognitionException { } return current; } - // $ANTLR end "ruleFocusConcept" + // $ANTLR end "ruleEclFocusConcept" // $ANTLR start "entryRuleChildOf" @@ -5657,7 +5656,7 @@ public final EObject entryRuleChildOf() throws RecognitionException { // $ANTLR start "ruleChildOf" - // InternalQLParser.g:1955:1: ruleChildOf returns [EObject current=null] : (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ; + // InternalQLParser.g:1955:1: ruleChildOf returns [EObject current=null] : (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; public final EObject ruleChildOf() throws RecognitionException { EObject current = null; @@ -5669,11 +5668,11 @@ public final EObject ruleChildOf() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:1961:2: ( (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ) - // InternalQLParser.g:1962:2: (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) + // InternalQLParser.g:1961:2: ( (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalQLParser.g:1962:2: (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) { - // InternalQLParser.g:1962:2: (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) - // InternalQLParser.g:1963:3: this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) + // InternalQLParser.g:1962:2: (this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalQLParser.g:1963:3: this_LT_EM_0= RULE_LT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) { this_LT_EM_0=(Token)match(input,RULE_LT_EM,FollowSets000.FOLLOW_16); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -5681,19 +5680,19 @@ public final EObject ruleChildOf() throws RecognitionException { newLeafNode(this_LT_EM_0, grammarAccess.getChildOfAccess().getLT_EMTerminalRuleCall_0()); } - // InternalQLParser.g:1967:3: ( (lv_constraint_1_0= ruleFocusConcept ) ) - // InternalQLParser.g:1968:4: (lv_constraint_1_0= ruleFocusConcept ) + // InternalQLParser.g:1967:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalQLParser.g:1968:4: (lv_constraint_1_0= ruleEclFocusConcept ) { - // InternalQLParser.g:1968:4: (lv_constraint_1_0= ruleFocusConcept ) - // InternalQLParser.g:1969:5: lv_constraint_1_0= ruleFocusConcept + // InternalQLParser.g:1968:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalQLParser.g:1969:5: lv_constraint_1_0= ruleEclFocusConcept { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getChildOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getChildOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_0=ruleFocusConcept(); + lv_constraint_1_0=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; @@ -5706,7 +5705,7 @@ public final EObject ruleChildOf() throws RecognitionException { current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } @@ -5781,7 +5780,7 @@ public final EObject entryRuleDescendantOf() throws RecognitionException { // $ANTLR start "ruleDescendantOf" - // InternalQLParser.g:1997:1: ruleDescendantOf returns [EObject current=null] : (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ; + // InternalQLParser.g:1997:1: ruleDescendantOf returns [EObject current=null] : (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; public final EObject ruleDescendantOf() throws RecognitionException { EObject current = null; @@ -5793,11 +5792,11 @@ public final EObject ruleDescendantOf() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2003:2: ( (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ) - // InternalQLParser.g:2004:2: (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) + // InternalQLParser.g:2003:2: ( (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalQLParser.g:2004:2: (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) { - // InternalQLParser.g:2004:2: (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) - // InternalQLParser.g:2005:3: this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) + // InternalQLParser.g:2004:2: (this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalQLParser.g:2005:3: this_LT_0= RULE_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) { this_LT_0=(Token)match(input,RULE_LT,FollowSets000.FOLLOW_16); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -5805,19 +5804,19 @@ public final EObject ruleDescendantOf() throws RecognitionException { newLeafNode(this_LT_0, grammarAccess.getDescendantOfAccess().getLTTerminalRuleCall_0()); } - // InternalQLParser.g:2009:3: ( (lv_constraint_1_0= ruleFocusConcept ) ) - // InternalQLParser.g:2010:4: (lv_constraint_1_0= ruleFocusConcept ) + // InternalQLParser.g:2009:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalQLParser.g:2010:4: (lv_constraint_1_0= ruleEclFocusConcept ) { - // InternalQLParser.g:2010:4: (lv_constraint_1_0= ruleFocusConcept ) - // InternalQLParser.g:2011:5: lv_constraint_1_0= ruleFocusConcept + // InternalQLParser.g:2010:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalQLParser.g:2011:5: lv_constraint_1_0= ruleEclFocusConcept { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getDescendantOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getDescendantOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_0=ruleFocusConcept(); + lv_constraint_1_0=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; @@ -5830,7 +5829,7 @@ public final EObject ruleDescendantOf() throws RecognitionException { current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } @@ -5905,7 +5904,7 @@ public final EObject entryRuleDescendantOrSelfOf() throws RecognitionException { // $ANTLR start "ruleDescendantOrSelfOf" - // InternalQLParser.g:2039:1: ruleDescendantOrSelfOf returns [EObject current=null] : (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ; + // InternalQLParser.g:2039:1: ruleDescendantOrSelfOf returns [EObject current=null] : (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; public final EObject ruleDescendantOrSelfOf() throws RecognitionException { EObject current = null; @@ -5917,11 +5916,11 @@ public final EObject ruleDescendantOrSelfOf() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2045:2: ( (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ) - // InternalQLParser.g:2046:2: (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) + // InternalQLParser.g:2045:2: ( (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalQLParser.g:2046:2: (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) { - // InternalQLParser.g:2046:2: (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) - // InternalQLParser.g:2047:3: this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleFocusConcept ) ) + // InternalQLParser.g:2046:2: (this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalQLParser.g:2047:3: this_DBL_LT_0= RULE_DBL_LT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) { this_DBL_LT_0=(Token)match(input,RULE_DBL_LT,FollowSets000.FOLLOW_16); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -5929,19 +5928,19 @@ public final EObject ruleDescendantOrSelfOf() throws RecognitionException { newLeafNode(this_DBL_LT_0, grammarAccess.getDescendantOrSelfOfAccess().getDBL_LTTerminalRuleCall_0()); } - // InternalQLParser.g:2051:3: ( (lv_constraint_1_0= ruleFocusConcept ) ) - // InternalQLParser.g:2052:4: (lv_constraint_1_0= ruleFocusConcept ) + // InternalQLParser.g:2051:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalQLParser.g:2052:4: (lv_constraint_1_0= ruleEclFocusConcept ) { - // InternalQLParser.g:2052:4: (lv_constraint_1_0= ruleFocusConcept ) - // InternalQLParser.g:2053:5: lv_constraint_1_0= ruleFocusConcept + // InternalQLParser.g:2052:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalQLParser.g:2053:5: lv_constraint_1_0= ruleEclFocusConcept { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getDescendantOrSelfOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getDescendantOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_0=ruleFocusConcept(); + lv_constraint_1_0=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; @@ -5954,7 +5953,7 @@ public final EObject ruleDescendantOrSelfOf() throws RecognitionException { current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } @@ -6029,7 +6028,7 @@ public final EObject entryRuleParentOf() throws RecognitionException { // $ANTLR start "ruleParentOf" - // InternalQLParser.g:2081:1: ruleParentOf returns [EObject current=null] : (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ; + // InternalQLParser.g:2081:1: ruleParentOf returns [EObject current=null] : (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; public final EObject ruleParentOf() throws RecognitionException { EObject current = null; @@ -6041,11 +6040,11 @@ public final EObject ruleParentOf() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2087:2: ( (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ) - // InternalQLParser.g:2088:2: (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) + // InternalQLParser.g:2087:2: ( (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalQLParser.g:2088:2: (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) { - // InternalQLParser.g:2088:2: (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) ) - // InternalQLParser.g:2089:3: this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleFocusConcept ) ) + // InternalQLParser.g:2088:2: (this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalQLParser.g:2089:3: this_GT_EM_0= RULE_GT_EM ( (lv_constraint_1_0= ruleEclFocusConcept ) ) { this_GT_EM_0=(Token)match(input,RULE_GT_EM,FollowSets000.FOLLOW_16); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -6053,19 +6052,19 @@ public final EObject ruleParentOf() throws RecognitionException { newLeafNode(this_GT_EM_0, grammarAccess.getParentOfAccess().getGT_EMTerminalRuleCall_0()); } - // InternalQLParser.g:2093:3: ( (lv_constraint_1_0= ruleFocusConcept ) ) - // InternalQLParser.g:2094:4: (lv_constraint_1_0= ruleFocusConcept ) + // InternalQLParser.g:2093:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalQLParser.g:2094:4: (lv_constraint_1_0= ruleEclFocusConcept ) { - // InternalQLParser.g:2094:4: (lv_constraint_1_0= ruleFocusConcept ) - // InternalQLParser.g:2095:5: lv_constraint_1_0= ruleFocusConcept + // InternalQLParser.g:2094:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalQLParser.g:2095:5: lv_constraint_1_0= ruleEclFocusConcept { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getParentOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getParentOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_0=ruleFocusConcept(); + lv_constraint_1_0=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; @@ -6078,7 +6077,7 @@ public final EObject ruleParentOf() throws RecognitionException { current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } @@ -6153,7 +6152,7 @@ public final EObject entryRuleAncestorOf() throws RecognitionException { // $ANTLR start "ruleAncestorOf" - // InternalQLParser.g:2123:1: ruleAncestorOf returns [EObject current=null] : (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ; + // InternalQLParser.g:2123:1: ruleAncestorOf returns [EObject current=null] : (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; public final EObject ruleAncestorOf() throws RecognitionException { EObject current = null; @@ -6165,11 +6164,11 @@ public final EObject ruleAncestorOf() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2129:2: ( (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ) - // InternalQLParser.g:2130:2: (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) + // InternalQLParser.g:2129:2: ( (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalQLParser.g:2130:2: (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) { - // InternalQLParser.g:2130:2: (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) - // InternalQLParser.g:2131:3: this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) + // InternalQLParser.g:2130:2: (this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalQLParser.g:2131:3: this_GT_0= RULE_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) { this_GT_0=(Token)match(input,RULE_GT,FollowSets000.FOLLOW_16); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -6177,19 +6176,19 @@ public final EObject ruleAncestorOf() throws RecognitionException { newLeafNode(this_GT_0, grammarAccess.getAncestorOfAccess().getGTTerminalRuleCall_0()); } - // InternalQLParser.g:2135:3: ( (lv_constraint_1_0= ruleFocusConcept ) ) - // InternalQLParser.g:2136:4: (lv_constraint_1_0= ruleFocusConcept ) + // InternalQLParser.g:2135:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalQLParser.g:2136:4: (lv_constraint_1_0= ruleEclFocusConcept ) { - // InternalQLParser.g:2136:4: (lv_constraint_1_0= ruleFocusConcept ) - // InternalQLParser.g:2137:5: lv_constraint_1_0= ruleFocusConcept + // InternalQLParser.g:2136:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalQLParser.g:2137:5: lv_constraint_1_0= ruleEclFocusConcept { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAncestorOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getAncestorOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_0=ruleFocusConcept(); + lv_constraint_1_0=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; @@ -6202,7 +6201,7 @@ public final EObject ruleAncestorOf() throws RecognitionException { current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } @@ -6277,7 +6276,7 @@ public final EObject entryRuleAncestorOrSelfOf() throws RecognitionException { // $ANTLR start "ruleAncestorOrSelfOf" - // InternalQLParser.g:2165:1: ruleAncestorOrSelfOf returns [EObject current=null] : (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ; + // InternalQLParser.g:2165:1: ruleAncestorOrSelfOf returns [EObject current=null] : (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ; public final EObject ruleAncestorOrSelfOf() throws RecognitionException { EObject current = null; @@ -6289,11 +6288,11 @@ public final EObject ruleAncestorOrSelfOf() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2171:2: ( (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) ) - // InternalQLParser.g:2172:2: (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) + // InternalQLParser.g:2171:2: ( (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) ) + // InternalQLParser.g:2172:2: (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) { - // InternalQLParser.g:2172:2: (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) ) - // InternalQLParser.g:2173:3: this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleFocusConcept ) ) + // InternalQLParser.g:2172:2: (this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) ) + // InternalQLParser.g:2173:3: this_DBL_GT_0= RULE_DBL_GT ( (lv_constraint_1_0= ruleEclFocusConcept ) ) { this_DBL_GT_0=(Token)match(input,RULE_DBL_GT,FollowSets000.FOLLOW_16); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -6301,19 +6300,19 @@ public final EObject ruleAncestorOrSelfOf() throws RecognitionException { newLeafNode(this_DBL_GT_0, grammarAccess.getAncestorOrSelfOfAccess().getDBL_GTTerminalRuleCall_0()); } - // InternalQLParser.g:2177:3: ( (lv_constraint_1_0= ruleFocusConcept ) ) - // InternalQLParser.g:2178:4: (lv_constraint_1_0= ruleFocusConcept ) + // InternalQLParser.g:2177:3: ( (lv_constraint_1_0= ruleEclFocusConcept ) ) + // InternalQLParser.g:2178:4: (lv_constraint_1_0= ruleEclFocusConcept ) { - // InternalQLParser.g:2178:4: (lv_constraint_1_0= ruleFocusConcept ) - // InternalQLParser.g:2179:5: lv_constraint_1_0= ruleFocusConcept + // InternalQLParser.g:2178:4: (lv_constraint_1_0= ruleEclFocusConcept ) + // InternalQLParser.g:2179:5: lv_constraint_1_0= ruleEclFocusConcept { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAncestorOrSelfOfAccess().getConstraintFocusConceptParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getAncestorOrSelfOfAccess().getConstraintEclFocusConceptParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_0=ruleFocusConcept(); + lv_constraint_1_0=ruleEclFocusConcept(); state._fsp--; if (state.failed) return current; @@ -6326,7 +6325,7 @@ public final EObject ruleAncestorOrSelfOf() throws RecognitionException { current, "constraint", lv_constraint_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.FocusConcept"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclFocusConcept"); afterParserOrEnumRuleCall(); } @@ -6401,7 +6400,7 @@ public final EObject entryRuleMemberOf() throws RecognitionException { // $ANTLR start "ruleMemberOf" - // InternalQLParser.g:2207:1: ruleMemberOf returns [EObject current=null] : (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) ; + // InternalQLParser.g:2207:1: ruleMemberOf returns [EObject current=null] : (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) ; public final EObject ruleMemberOf() throws RecognitionException { EObject current = null; @@ -6417,11 +6416,11 @@ public final EObject ruleMemberOf() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2213:2: ( (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) ) - // InternalQLParser.g:2214:2: (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) + // InternalQLParser.g:2213:2: ( (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) ) + // InternalQLParser.g:2214:2: (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) { - // InternalQLParser.g:2214:2: (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) - // InternalQLParser.g:2215:3: this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) + // InternalQLParser.g:2214:2: (this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) ) + // InternalQLParser.g:2215:3: this_CARET_0= RULE_CARET ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) { this_CARET_0=(Token)match(input,RULE_CARET,FollowSets000.FOLLOW_16); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -6429,13 +6428,13 @@ public final EObject ruleMemberOf() throws RecognitionException { newLeafNode(this_CARET_0, grammarAccess.getMemberOfAccess().getCARETTerminalRuleCall_0()); } - // InternalQLParser.g:2219:3: ( ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) - // InternalQLParser.g:2220:4: ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) + // InternalQLParser.g:2219:3: ( ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) ) + // InternalQLParser.g:2220:4: ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) { - // InternalQLParser.g:2220:4: ( (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) - // InternalQLParser.g:2221:5: (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) + // InternalQLParser.g:2220:4: ( (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) ) + // InternalQLParser.g:2221:5: (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) { - // InternalQLParser.g:2221:5: (lv_constraint_1_1= ruleConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) + // InternalQLParser.g:2221:5: (lv_constraint_1_1= ruleEclConceptReference | lv_constraint_1_2= ruleAny | lv_constraint_1_3= ruleNestedExpression ) int alt25=3; switch ( input.LA(1) ) { case RULE_DIGIT_NONZERO: @@ -6463,15 +6462,15 @@ public final EObject ruleMemberOf() throws RecognitionException { switch (alt25) { case 1 : - // InternalQLParser.g:2222:6: lv_constraint_1_1= ruleConceptReference + // InternalQLParser.g:2222:6: lv_constraint_1_1= ruleEclConceptReference { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintConceptReferenceParserRuleCall_1_0_0()); + newCompositeNode(grammarAccess.getMemberOfAccess().getConstraintEclConceptReferenceParserRuleCall_1_0_0()); } pushFollow(FollowSets000.FOLLOW_2); - lv_constraint_1_1=ruleConceptReference(); + lv_constraint_1_1=ruleEclConceptReference(); state._fsp--; if (state.failed) return current; @@ -6484,7 +6483,7 @@ public final EObject ruleMemberOf() throws RecognitionException { current, "constraint", lv_constraint_1_1, - "com.b2international.snowowl.snomed.ecl.Ecl.ConceptReference"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclConceptReference"); afterParserOrEnumRuleCall(); } @@ -6582,28 +6581,28 @@ public final EObject ruleMemberOf() throws RecognitionException { // $ANTLR end "ruleMemberOf" - // $ANTLR start "entryRuleConceptReference" - // InternalQLParser.g:2276:1: entryRuleConceptReference returns [EObject current=null] : iv_ruleConceptReference= ruleConceptReference EOF ; - public final EObject entryRuleConceptReference() throws RecognitionException { + // $ANTLR start "entryRuleEclConceptReference" + // InternalQLParser.g:2276:1: entryRuleEclConceptReference returns [EObject current=null] : iv_ruleEclConceptReference= ruleEclConceptReference EOF ; + public final EObject entryRuleEclConceptReference() throws RecognitionException { EObject current = null; - EObject iv_ruleConceptReference = null; + EObject iv_ruleEclConceptReference = null; try { - // InternalQLParser.g:2276:57: (iv_ruleConceptReference= ruleConceptReference EOF ) - // InternalQLParser.g:2277:2: iv_ruleConceptReference= ruleConceptReference EOF + // InternalQLParser.g:2276:60: (iv_ruleEclConceptReference= ruleEclConceptReference EOF ) + // InternalQLParser.g:2277:2: iv_ruleEclConceptReference= ruleEclConceptReference EOF { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getConceptReferenceRule()); + newCompositeNode(grammarAccess.getEclConceptReferenceRule()); } pushFollow(FollowSets000.FOLLOW_1); - iv_ruleConceptReference=ruleConceptReference(); + iv_ruleEclConceptReference=ruleEclConceptReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current =iv_ruleConceptReference; + current =iv_ruleEclConceptReference; } match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; @@ -6619,12 +6618,12 @@ public final EObject entryRuleConceptReference() throws RecognitionException { } return current; } - // $ANTLR end "entryRuleConceptReference" + // $ANTLR end "entryRuleEclConceptReference" - // $ANTLR start "ruleConceptReference" - // InternalQLParser.g:2283:1: ruleConceptReference returns [EObject current=null] : ( ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? ) ; - public final EObject ruleConceptReference() throws RecognitionException { + // $ANTLR start "ruleEclConceptReference" + // InternalQLParser.g:2283:1: ruleEclConceptReference returns [EObject current=null] : ( ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? ) ; + public final EObject ruleEclConceptReference() throws RecognitionException { EObject current = null; Token lv_term_1_0=null; @@ -6649,7 +6648,7 @@ public final EObject ruleConceptReference() throws RecognitionException { { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getConceptReferenceAccess().getIdSnomedIdentifierParserRuleCall_0_0()); + newCompositeNode(grammarAccess.getEclConceptReferenceAccess().getIdSnomedIdentifierParserRuleCall_0_0()); } pushFollow(FollowSets000.FOLLOW_23); @@ -6660,7 +6659,7 @@ public final EObject ruleConceptReference() throws RecognitionException { if ( state.backtracking==0 ) { if (current==null) { - current = createModelElementForParent(grammarAccess.getConceptReferenceRule()); + current = createModelElementForParent(grammarAccess.getEclConceptReferenceRule()); } set( current, @@ -6693,13 +6692,13 @@ public final EObject ruleConceptReference() throws RecognitionException { lv_term_1_0=(Token)match(input,RULE_TERM_STRING,FollowSets000.FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(lv_term_1_0, grammarAccess.getConceptReferenceAccess().getTermTERM_STRINGTerminalRuleCall_1_0()); + newLeafNode(lv_term_1_0, grammarAccess.getEclConceptReferenceAccess().getTermTERM_STRINGTerminalRuleCall_1_0()); } if ( state.backtracking==0 ) { if (current==null) { - current = createModelElement(grammarAccess.getConceptReferenceRule()); + current = createModelElement(grammarAccess.getEclConceptReferenceRule()); } setWithLastConsumed( current, @@ -6738,7 +6737,7 @@ public final EObject ruleConceptReference() throws RecognitionException { } return current; } - // $ANTLR end "ruleConceptReference" + // $ANTLR end "ruleEclConceptReference" // $ANTLR start "entryRuleAny" @@ -6846,28 +6845,28 @@ public final EObject ruleAny() throws RecognitionException { // $ANTLR end "ruleAny" - // $ANTLR start "entryRuleRefinement" - // InternalQLParser.g:2365:1: entryRuleRefinement returns [EObject current=null] : iv_ruleRefinement= ruleRefinement EOF ; - public final EObject entryRuleRefinement() throws RecognitionException { + // $ANTLR start "entryRuleEclRefinement" + // InternalQLParser.g:2365:1: entryRuleEclRefinement returns [EObject current=null] : iv_ruleEclRefinement= ruleEclRefinement EOF ; + public final EObject entryRuleEclRefinement() throws RecognitionException { EObject current = null; - EObject iv_ruleRefinement = null; + EObject iv_ruleEclRefinement = null; try { - // InternalQLParser.g:2365:51: (iv_ruleRefinement= ruleRefinement EOF ) - // InternalQLParser.g:2366:2: iv_ruleRefinement= ruleRefinement EOF + // InternalQLParser.g:2365:54: (iv_ruleEclRefinement= ruleEclRefinement EOF ) + // InternalQLParser.g:2366:2: iv_ruleEclRefinement= ruleEclRefinement EOF { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getRefinementRule()); + newCompositeNode(grammarAccess.getEclRefinementRule()); } pushFollow(FollowSets000.FOLLOW_1); - iv_ruleRefinement=ruleRefinement(); + iv_ruleEclRefinement=ruleEclRefinement(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current =iv_ruleRefinement; + current =iv_ruleEclRefinement; } match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; @@ -6883,12 +6882,12 @@ public final EObject entryRuleRefinement() throws RecognitionException { } return current; } - // $ANTLR end "entryRuleRefinement" + // $ANTLR end "entryRuleEclRefinement" - // $ANTLR start "ruleRefinement" - // InternalQLParser.g:2372:1: ruleRefinement returns [EObject current=null] : this_OrRefinement_0= ruleOrRefinement ; - public final EObject ruleRefinement() throws RecognitionException { + // $ANTLR start "ruleEclRefinement" + // InternalQLParser.g:2372:1: ruleEclRefinement returns [EObject current=null] : this_OrRefinement_0= ruleOrRefinement ; + public final EObject ruleEclRefinement() throws RecognitionException { EObject current = null; EObject this_OrRefinement_0 = null; @@ -6908,7 +6907,7 @@ public final EObject ruleRefinement() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getRefinementAccess().getOrRefinementParserRuleCall()); + newCompositeNode(grammarAccess.getEclRefinementAccess().getOrRefinementParserRuleCall()); } pushFollow(FollowSets000.FOLLOW_2); @@ -6940,7 +6939,7 @@ public final EObject ruleRefinement() throws RecognitionException { } return current; } - // $ANTLR end "ruleRefinement" + // $ANTLR end "ruleEclRefinement" // $ANTLR start "entryRuleOrRefinement" @@ -6984,11 +6983,11 @@ public final EObject entryRuleOrRefinement() throws RecognitionException { // $ANTLR start "ruleOrRefinement" - // InternalQLParser.g:2400:1: ruleOrRefinement returns [EObject current=null] : (this_AndRefinement_0= ruleAndRefinement ( ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) ; + // InternalQLParser.g:2400:1: ruleOrRefinement returns [EObject current=null] : (this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) ; public final EObject ruleOrRefinement() throws RecognitionException { EObject current = null; - Token otherlv_2=null; + Token this_DISJUNCTION_2=null; EObject this_AndRefinement_0 = null; EObject lv_right_3_0 = null; @@ -6998,11 +6997,11 @@ public final EObject ruleOrRefinement() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2406:2: ( (this_AndRefinement_0= ruleAndRefinement ( ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) ) - // InternalQLParser.g:2407:2: (this_AndRefinement_0= ruleAndRefinement ( ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) + // InternalQLParser.g:2406:2: ( (this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) ) + // InternalQLParser.g:2407:2: (this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) { - // InternalQLParser.g:2407:2: (this_AndRefinement_0= ruleAndRefinement ( ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) - // InternalQLParser.g:2408:3: this_AndRefinement_0= ruleAndRefinement ( ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) )* + // InternalQLParser.g:2407:2: (this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* ) + // InternalQLParser.g:2408:3: this_AndRefinement_0= ruleAndRefinement ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* { if ( state.backtracking==0 ) { @@ -7025,17 +7024,17 @@ public final EObject ruleOrRefinement() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalQLParser.g:2419:3: ( ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) )* + // InternalQLParser.g:2419:3: ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )* loop27: do { int alt27=2; alt27 = dfa27.predict(input); switch (alt27) { case 1 : - // InternalQLParser.g:2420:4: ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) + // InternalQLParser.g:2420:4: ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) { - // InternalQLParser.g:2421:4: ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) - // InternalQLParser.g:2422:5: () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) + // InternalQLParser.g:2421:4: ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) + // InternalQLParser.g:2422:5: () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) { // InternalQLParser.g:2422:5: () // InternalQLParser.g:2423:6: @@ -7055,10 +7054,10 @@ public final EObject ruleOrRefinement() throws RecognitionException { } - otherlv_2=(Token)match(input,OR,FollowSets000.FOLLOW_21); if (state.failed) return current; + this_DISJUNCTION_2=(Token)match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_21); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getOrRefinementAccess().getORKeyword_1_0_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrRefinementAccess().getDISJUNCTIONTerminalRuleCall_1_0_1()); } // InternalQLParser.g:2436:5: ( (lv_right_3_0= ruleAndRefinement ) ) @@ -7173,12 +7172,12 @@ public final EObject entryRuleAndRefinement() throws RecognitionException { // $ANTLR start "ruleAndRefinement" - // InternalQLParser.g:2468:1: ruleAndRefinement returns [EObject current=null] : (this_SubRefinement_0= ruleSubRefinement ( ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) ; + // InternalQLParser.g:2468:1: ruleAndRefinement returns [EObject current=null] : (this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) ; public final EObject ruleAndRefinement() throws RecognitionException { EObject current = null; - Token otherlv_2=null; - Token otherlv_3=null; + Token this_CONJUNCTION_2=null; + Token this_COMMA_3=null; EObject this_SubRefinement_0 = null; EObject lv_right_4_0 = null; @@ -7188,11 +7187,11 @@ public final EObject ruleAndRefinement() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2474:2: ( (this_SubRefinement_0= ruleSubRefinement ( ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) ) - // InternalQLParser.g:2475:2: (this_SubRefinement_0= ruleSubRefinement ( ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) + // InternalQLParser.g:2474:2: ( (this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) ) + // InternalQLParser.g:2475:2: (this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) { - // InternalQLParser.g:2475:2: (this_SubRefinement_0= ruleSubRefinement ( ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) - // InternalQLParser.g:2476:3: this_SubRefinement_0= ruleSubRefinement ( ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* + // InternalQLParser.g:2475:2: (this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* ) + // InternalQLParser.g:2476:3: this_SubRefinement_0= ruleSubRefinement ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* { if ( state.backtracking==0 ) { @@ -7215,17 +7214,17 @@ public final EObject ruleAndRefinement() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalQLParser.g:2487:3: ( ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* + // InternalQLParser.g:2487:3: ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )* loop29: do { int alt29=2; alt29 = dfa29.predict(input); switch (alt29) { case 1 : - // InternalQLParser.g:2488:4: ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) + // InternalQLParser.g:2488:4: ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) { - // InternalQLParser.g:2489:4: ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) - // InternalQLParser.g:2490:5: () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) + // InternalQLParser.g:2489:4: ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) + // InternalQLParser.g:2490:5: () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) { // InternalQLParser.g:2490:5: () // InternalQLParser.g:2491:6: @@ -7245,14 +7244,14 @@ public final EObject ruleAndRefinement() throws RecognitionException { } - // InternalQLParser.g:2500:5: (otherlv_2= AND | otherlv_3= Comma ) + // InternalQLParser.g:2500:5: (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) int alt28=2; int LA28_0 = input.LA(1); - if ( (LA28_0==AND) ) { + if ( (LA28_0==RULE_CONJUNCTION) ) { alt28=1; } - else if ( (LA28_0==Comma) ) { + else if ( (LA28_0==RULE_COMMA) ) { alt28=2; } else { @@ -7264,24 +7263,24 @@ else if ( (LA28_0==Comma) ) { } switch (alt28) { case 1 : - // InternalQLParser.g:2501:6: otherlv_2= AND + // InternalQLParser.g:2501:6: this_CONJUNCTION_2= RULE_CONJUNCTION { - otherlv_2=(Token)match(input,AND,FollowSets000.FOLLOW_21); if (state.failed) return current; + this_CONJUNCTION_2=(Token)match(input,RULE_CONJUNCTION,FollowSets000.FOLLOW_21); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getAndRefinementAccess().getANDKeyword_1_0_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndRefinementAccess().getCONJUNCTIONTerminalRuleCall_1_0_1_0()); } } break; case 2 : - // InternalQLParser.g:2506:6: otherlv_3= Comma + // InternalQLParser.g:2506:6: this_COMMA_3= RULE_COMMA { - otherlv_3=(Token)match(input,Comma,FollowSets000.FOLLOW_21); if (state.failed) return current; + this_COMMA_3=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_21); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_3, grammarAccess.getAndRefinementAccess().getCommaKeyword_1_0_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getAndRefinementAccess().getCOMMATerminalRuleCall_1_0_1_1()); } @@ -7402,13 +7401,13 @@ public final EObject entryRuleSubRefinement() throws RecognitionException { // $ANTLR start "ruleSubRefinement" - // InternalQLParser.g:2543:1: ruleSubRefinement returns [EObject current=null] : (this_AttributeConstraint_0= ruleAttributeConstraint | this_AttributeGroup_1= ruleAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) ; + // InternalQLParser.g:2543:1: ruleSubRefinement returns [EObject current=null] : (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) ; public final EObject ruleSubRefinement() throws RecognitionException { EObject current = null; EObject this_AttributeConstraint_0 = null; - EObject this_AttributeGroup_1 = null; + EObject this_EclAttributeGroup_1 = null; EObject this_NestedRefinement_2 = null; @@ -7417,10 +7416,10 @@ public final EObject ruleSubRefinement() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2549:2: ( (this_AttributeConstraint_0= ruleAttributeConstraint | this_AttributeGroup_1= ruleAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) ) - // InternalQLParser.g:2550:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_AttributeGroup_1= ruleAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) + // InternalQLParser.g:2549:2: ( (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) ) + // InternalQLParser.g:2550:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) { - // InternalQLParser.g:2550:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_AttributeGroup_1= ruleAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) + // InternalQLParser.g:2550:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement ) int alt30=3; alt30 = dfa30.predict(input); switch (alt30) { @@ -7452,7 +7451,7 @@ public final EObject ruleSubRefinement() throws RecognitionException { } break; case 2 : - // InternalQLParser.g:2563:3: this_AttributeGroup_1= ruleAttributeGroup + // InternalQLParser.g:2563:3: this_EclAttributeGroup_1= ruleEclAttributeGroup { if ( state.backtracking==0 ) { @@ -7461,17 +7460,17 @@ public final EObject ruleSubRefinement() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getSubRefinementAccess().getAttributeGroupParserRuleCall_1()); + newCompositeNode(grammarAccess.getSubRefinementAccess().getEclAttributeGroupParserRuleCall_1()); } pushFollow(FollowSets000.FOLLOW_2); - this_AttributeGroup_1=ruleAttributeGroup(); + this_EclAttributeGroup_1=ruleEclAttributeGroup(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current = this_AttributeGroup_1; + current = this_EclAttributeGroup_1; afterParserOrEnumRuleCall(); } @@ -7570,7 +7569,7 @@ public final EObject entryRuleNestedRefinement() throws RecognitionException { // $ANTLR start "ruleNestedRefinement" - // InternalQLParser.g:2597:1: ruleNestedRefinement returns [EObject current=null] : (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ; + // InternalQLParser.g:2597:1: ruleNestedRefinement returns [EObject current=null] : (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ; public final EObject ruleNestedRefinement() throws RecognitionException { EObject current = null; @@ -7583,11 +7582,11 @@ public final EObject ruleNestedRefinement() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2603:2: ( (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ) - // InternalQLParser.g:2604:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + // InternalQLParser.g:2603:2: ( (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ) + // InternalQLParser.g:2604:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) { - // InternalQLParser.g:2604:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) - // InternalQLParser.g:2605:3: this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE + // InternalQLParser.g:2604:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + // InternalQLParser.g:2605:3: this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclRefinement ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE { this_ROUND_OPEN_0=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_21); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -7595,19 +7594,19 @@ public final EObject ruleNestedRefinement() throws RecognitionException { newLeafNode(this_ROUND_OPEN_0, grammarAccess.getNestedRefinementAccess().getROUND_OPENTerminalRuleCall_0()); } - // InternalQLParser.g:2609:3: ( (lv_nested_1_0= ruleRefinement ) ) - // InternalQLParser.g:2610:4: (lv_nested_1_0= ruleRefinement ) + // InternalQLParser.g:2609:3: ( (lv_nested_1_0= ruleEclRefinement ) ) + // InternalQLParser.g:2610:4: (lv_nested_1_0= ruleEclRefinement ) { - // InternalQLParser.g:2610:4: (lv_nested_1_0= ruleRefinement ) - // InternalQLParser.g:2611:5: lv_nested_1_0= ruleRefinement + // InternalQLParser.g:2610:4: (lv_nested_1_0= ruleEclRefinement ) + // InternalQLParser.g:2611:5: lv_nested_1_0= ruleEclRefinement { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getNestedRefinementAccess().getNestedRefinementParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getNestedRefinementAccess().getNestedEclRefinementParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_10); - lv_nested_1_0=ruleRefinement(); + lv_nested_1_0=ruleEclRefinement(); state._fsp--; if (state.failed) return current; @@ -7620,7 +7619,7 @@ public final EObject ruleNestedRefinement() throws RecognitionException { current, "nested", lv_nested_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.Refinement"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclRefinement"); afterParserOrEnumRuleCall(); } @@ -7660,28 +7659,28 @@ public final EObject ruleNestedRefinement() throws RecognitionException { // $ANTLR end "ruleNestedRefinement" - // $ANTLR start "entryRuleAttributeGroup" - // InternalQLParser.g:2636:1: entryRuleAttributeGroup returns [EObject current=null] : iv_ruleAttributeGroup= ruleAttributeGroup EOF ; - public final EObject entryRuleAttributeGroup() throws RecognitionException { + // $ANTLR start "entryRuleEclAttributeGroup" + // InternalQLParser.g:2636:1: entryRuleEclAttributeGroup returns [EObject current=null] : iv_ruleEclAttributeGroup= ruleEclAttributeGroup EOF ; + public final EObject entryRuleEclAttributeGroup() throws RecognitionException { EObject current = null; - EObject iv_ruleAttributeGroup = null; + EObject iv_ruleEclAttributeGroup = null; try { - // InternalQLParser.g:2636:55: (iv_ruleAttributeGroup= ruleAttributeGroup EOF ) - // InternalQLParser.g:2637:2: iv_ruleAttributeGroup= ruleAttributeGroup EOF + // InternalQLParser.g:2636:58: (iv_ruleEclAttributeGroup= ruleEclAttributeGroup EOF ) + // InternalQLParser.g:2637:2: iv_ruleEclAttributeGroup= ruleEclAttributeGroup EOF { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAttributeGroupRule()); + newCompositeNode(grammarAccess.getEclAttributeGroupRule()); } pushFollow(FollowSets000.FOLLOW_1); - iv_ruleAttributeGroup=ruleAttributeGroup(); + iv_ruleEclAttributeGroup=ruleEclAttributeGroup(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current =iv_ruleAttributeGroup; + current =iv_ruleEclAttributeGroup; } match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; @@ -7697,12 +7696,12 @@ public final EObject entryRuleAttributeGroup() throws RecognitionException { } return current; } - // $ANTLR end "entryRuleAttributeGroup" + // $ANTLR end "entryRuleEclAttributeGroup" - // $ANTLR start "ruleAttributeGroup" - // InternalQLParser.g:2643:1: ruleAttributeGroup returns [EObject current=null] : ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) ; - public final EObject ruleAttributeGroup() throws RecognitionException { + // $ANTLR start "ruleEclAttributeGroup" + // InternalQLParser.g:2643:1: ruleEclAttributeGroup returns [EObject current=null] : ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) ; + public final EObject ruleEclAttributeGroup() throws RecognitionException { EObject current = null; Token this_CURLY_OPEN_1=null; @@ -7716,11 +7715,11 @@ public final EObject ruleAttributeGroup() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2649:2: ( ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) ) - // InternalQLParser.g:2650:2: ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) + // InternalQLParser.g:2649:2: ( ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) ) + // InternalQLParser.g:2650:2: ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) { - // InternalQLParser.g:2650:2: ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) - // InternalQLParser.g:2651:3: ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE + // InternalQLParser.g:2650:2: ( ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE ) + // InternalQLParser.g:2651:3: ( (lv_cardinality_0_0= ruleCardinality ) )? this_CURLY_OPEN_1= RULE_CURLY_OPEN ( (lv_refinement_2_0= ruleEclAttributeSet ) ) this_CURLY_CLOSE_3= RULE_CURLY_CLOSE { // InternalQLParser.g:2651:3: ( (lv_cardinality_0_0= ruleCardinality ) )? int alt31=2; @@ -7738,7 +7737,7 @@ public final EObject ruleAttributeGroup() throws RecognitionException { { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAttributeGroupAccess().getCardinalityCardinalityParserRuleCall_0_0()); + newCompositeNode(grammarAccess.getEclAttributeGroupAccess().getCardinalityCardinalityParserRuleCall_0_0()); } pushFollow(FollowSets000.FOLLOW_24); @@ -7749,7 +7748,7 @@ public final EObject ruleAttributeGroup() throws RecognitionException { if ( state.backtracking==0 ) { if (current==null) { - current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + current = createModelElementForParent(grammarAccess.getEclAttributeGroupRule()); } set( current, @@ -7771,35 +7770,35 @@ public final EObject ruleAttributeGroup() throws RecognitionException { this_CURLY_OPEN_1=(Token)match(input,RULE_CURLY_OPEN,FollowSets000.FOLLOW_25); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(this_CURLY_OPEN_1, grammarAccess.getAttributeGroupAccess().getCURLY_OPENTerminalRuleCall_1()); + newLeafNode(this_CURLY_OPEN_1, grammarAccess.getEclAttributeGroupAccess().getCURLY_OPENTerminalRuleCall_1()); } - // InternalQLParser.g:2674:3: ( (lv_refinement_2_0= ruleAttributeSet ) ) - // InternalQLParser.g:2675:4: (lv_refinement_2_0= ruleAttributeSet ) + // InternalQLParser.g:2674:3: ( (lv_refinement_2_0= ruleEclAttributeSet ) ) + // InternalQLParser.g:2675:4: (lv_refinement_2_0= ruleEclAttributeSet ) { - // InternalQLParser.g:2675:4: (lv_refinement_2_0= ruleAttributeSet ) - // InternalQLParser.g:2676:5: lv_refinement_2_0= ruleAttributeSet + // InternalQLParser.g:2675:4: (lv_refinement_2_0= ruleEclAttributeSet ) + // InternalQLParser.g:2676:5: lv_refinement_2_0= ruleEclAttributeSet { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAttributeGroupAccess().getRefinementAttributeSetParserRuleCall_2_0()); + newCompositeNode(grammarAccess.getEclAttributeGroupAccess().getRefinementEclAttributeSetParserRuleCall_2_0()); } pushFollow(FollowSets000.FOLLOW_26); - lv_refinement_2_0=ruleAttributeSet(); + lv_refinement_2_0=ruleEclAttributeSet(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { - current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + current = createModelElementForParent(grammarAccess.getEclAttributeGroupRule()); } set( current, "refinement", lv_refinement_2_0, - "com.b2international.snowowl.snomed.ecl.Ecl.AttributeSet"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeSet"); afterParserOrEnumRuleCall(); } @@ -7812,7 +7811,7 @@ public final EObject ruleAttributeGroup() throws RecognitionException { this_CURLY_CLOSE_3=(Token)match(input,RULE_CURLY_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(this_CURLY_CLOSE_3, grammarAccess.getAttributeGroupAccess().getCURLY_CLOSETerminalRuleCall_3()); + newLeafNode(this_CURLY_CLOSE_3, grammarAccess.getEclAttributeGroupAccess().getCURLY_CLOSETerminalRuleCall_3()); } @@ -7836,31 +7835,31 @@ public final EObject ruleAttributeGroup() throws RecognitionException { } return current; } - // $ANTLR end "ruleAttributeGroup" + // $ANTLR end "ruleEclAttributeGroup" - // $ANTLR start "entryRuleAttributeSet" - // InternalQLParser.g:2701:1: entryRuleAttributeSet returns [EObject current=null] : iv_ruleAttributeSet= ruleAttributeSet EOF ; - public final EObject entryRuleAttributeSet() throws RecognitionException { + // $ANTLR start "entryRuleEclAttributeSet" + // InternalQLParser.g:2701:1: entryRuleEclAttributeSet returns [EObject current=null] : iv_ruleEclAttributeSet= ruleEclAttributeSet EOF ; + public final EObject entryRuleEclAttributeSet() throws RecognitionException { EObject current = null; - EObject iv_ruleAttributeSet = null; + EObject iv_ruleEclAttributeSet = null; try { - // InternalQLParser.g:2701:53: (iv_ruleAttributeSet= ruleAttributeSet EOF ) - // InternalQLParser.g:2702:2: iv_ruleAttributeSet= ruleAttributeSet EOF + // InternalQLParser.g:2701:56: (iv_ruleEclAttributeSet= ruleEclAttributeSet EOF ) + // InternalQLParser.g:2702:2: iv_ruleEclAttributeSet= ruleEclAttributeSet EOF { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAttributeSetRule()); + newCompositeNode(grammarAccess.getEclAttributeSetRule()); } pushFollow(FollowSets000.FOLLOW_1); - iv_ruleAttributeSet=ruleAttributeSet(); + iv_ruleEclAttributeSet=ruleEclAttributeSet(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { - current =iv_ruleAttributeSet; + current =iv_ruleEclAttributeSet; } match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; @@ -7876,12 +7875,12 @@ public final EObject entryRuleAttributeSet() throws RecognitionException { } return current; } - // $ANTLR end "entryRuleAttributeSet" + // $ANTLR end "entryRuleEclAttributeSet" - // $ANTLR start "ruleAttributeSet" - // InternalQLParser.g:2708:1: ruleAttributeSet returns [EObject current=null] : this_OrAttributeSet_0= ruleOrAttributeSet ; - public final EObject ruleAttributeSet() throws RecognitionException { + // $ANTLR start "ruleEclAttributeSet" + // InternalQLParser.g:2708:1: ruleEclAttributeSet returns [EObject current=null] : this_OrAttributeSet_0= ruleOrAttributeSet ; + public final EObject ruleEclAttributeSet() throws RecognitionException { EObject current = null; EObject this_OrAttributeSet_0 = null; @@ -7901,7 +7900,7 @@ public final EObject ruleAttributeSet() throws RecognitionException { } if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAttributeSetAccess().getOrAttributeSetParserRuleCall()); + newCompositeNode(grammarAccess.getEclAttributeSetAccess().getOrAttributeSetParserRuleCall()); } pushFollow(FollowSets000.FOLLOW_2); @@ -7933,7 +7932,7 @@ public final EObject ruleAttributeSet() throws RecognitionException { } return current; } - // $ANTLR end "ruleAttributeSet" + // $ANTLR end "ruleEclAttributeSet" // $ANTLR start "entryRuleOrAttributeSet" @@ -7977,11 +7976,11 @@ public final EObject entryRuleOrAttributeSet() throws RecognitionException { // $ANTLR start "ruleOrAttributeSet" - // InternalQLParser.g:2736:1: ruleOrAttributeSet returns [EObject current=null] : (this_AndAttributeSet_0= ruleAndAttributeSet ( () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) ; + // InternalQLParser.g:2736:1: ruleOrAttributeSet returns [EObject current=null] : (this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) ; public final EObject ruleOrAttributeSet() throws RecognitionException { EObject current = null; - Token otherlv_2=null; + Token this_DISJUNCTION_2=null; EObject this_AndAttributeSet_0 = null; EObject lv_right_3_0 = null; @@ -7991,11 +7990,11 @@ public final EObject ruleOrAttributeSet() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2742:2: ( (this_AndAttributeSet_0= ruleAndAttributeSet ( () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) ) - // InternalQLParser.g:2743:2: (this_AndAttributeSet_0= ruleAndAttributeSet ( () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) + // InternalQLParser.g:2742:2: ( (this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) ) + // InternalQLParser.g:2743:2: (this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) { - // InternalQLParser.g:2743:2: (this_AndAttributeSet_0= ruleAndAttributeSet ( () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) - // InternalQLParser.g:2744:3: this_AndAttributeSet_0= ruleAndAttributeSet ( () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) )* + // InternalQLParser.g:2743:2: (this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* ) + // InternalQLParser.g:2744:3: this_AndAttributeSet_0= ruleAndAttributeSet ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* { if ( state.backtracking==0 ) { @@ -8018,20 +8017,20 @@ public final EObject ruleOrAttributeSet() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalQLParser.g:2755:3: ( () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) )* + // InternalQLParser.g:2755:3: ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) )* loop32: do { int alt32=2; int LA32_0 = input.LA(1); - if ( (LA32_0==OR) ) { + if ( (LA32_0==RULE_DISJUNCTION) ) { alt32=1; } switch (alt32) { case 1 : - // InternalQLParser.g:2756:4: () otherlv_2= OR ( (lv_right_3_0= ruleAndAttributeSet ) ) + // InternalQLParser.g:2756:4: () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndAttributeSet ) ) { // InternalQLParser.g:2756:4: () // InternalQLParser.g:2757:5: @@ -8051,10 +8050,10 @@ public final EObject ruleOrAttributeSet() throws RecognitionException { } - otherlv_2=(Token)match(input,OR,FollowSets000.FOLLOW_25); if (state.failed) return current; + this_DISJUNCTION_2=(Token)match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_25); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getOrAttributeSetAccess().getORKeyword_1_1()); + newLeafNode(this_DISJUNCTION_2, grammarAccess.getOrAttributeSetAccess().getDISJUNCTIONTerminalRuleCall_1_1()); } // InternalQLParser.g:2770:4: ( (lv_right_3_0= ruleAndAttributeSet ) ) @@ -8166,12 +8165,12 @@ public final EObject entryRuleAndAttributeSet() throws RecognitionException { // $ANTLR start "ruleAndAttributeSet" - // InternalQLParser.g:2801:1: ruleAndAttributeSet returns [EObject current=null] : (this_SubAttributeSet_0= ruleSubAttributeSet ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) ; + // InternalQLParser.g:2801:1: ruleAndAttributeSet returns [EObject current=null] : (this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) ; public final EObject ruleAndAttributeSet() throws RecognitionException { EObject current = null; - Token otherlv_2=null; - Token otherlv_3=null; + Token this_CONJUNCTION_2=null; + Token this_COMMA_3=null; EObject this_SubAttributeSet_0 = null; EObject lv_right_4_0 = null; @@ -8181,11 +8180,11 @@ public final EObject ruleAndAttributeSet() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2807:2: ( (this_SubAttributeSet_0= ruleSubAttributeSet ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) ) - // InternalQLParser.g:2808:2: (this_SubAttributeSet_0= ruleSubAttributeSet ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) + // InternalQLParser.g:2807:2: ( (this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) ) + // InternalQLParser.g:2808:2: (this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) { - // InternalQLParser.g:2808:2: (this_SubAttributeSet_0= ruleSubAttributeSet ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) - // InternalQLParser.g:2809:3: this_SubAttributeSet_0= ruleSubAttributeSet ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* + // InternalQLParser.g:2808:2: (this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* ) + // InternalQLParser.g:2809:3: this_SubAttributeSet_0= ruleSubAttributeSet ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* { if ( state.backtracking==0 ) { @@ -8208,20 +8207,20 @@ public final EObject ruleAndAttributeSet() throws RecognitionException { afterParserOrEnumRuleCall(); } - // InternalQLParser.g:2820:3: ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* + // InternalQLParser.g:2820:3: ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) )* loop34: do { int alt34=2; int LA34_0 = input.LA(1); - if ( (LA34_0==AND||LA34_0==Comma) ) { + if ( ((LA34_0>=RULE_COMMA && LA34_0<=RULE_CONJUNCTION)) ) { alt34=1; } switch (alt34) { case 1 : - // InternalQLParser.g:2821:4: () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubAttributeSet ) ) + // InternalQLParser.g:2821:4: () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubAttributeSet ) ) { // InternalQLParser.g:2821:4: () // InternalQLParser.g:2822:5: @@ -8241,14 +8240,14 @@ public final EObject ruleAndAttributeSet() throws RecognitionException { } - // InternalQLParser.g:2831:4: (otherlv_2= AND | otherlv_3= Comma ) + // InternalQLParser.g:2831:4: (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) int alt33=2; int LA33_0 = input.LA(1); - if ( (LA33_0==AND) ) { + if ( (LA33_0==RULE_CONJUNCTION) ) { alt33=1; } - else if ( (LA33_0==Comma) ) { + else if ( (LA33_0==RULE_COMMA) ) { alt33=2; } else { @@ -8260,24 +8259,24 @@ else if ( (LA33_0==Comma) ) { } switch (alt33) { case 1 : - // InternalQLParser.g:2832:5: otherlv_2= AND + // InternalQLParser.g:2832:5: this_CONJUNCTION_2= RULE_CONJUNCTION { - otherlv_2=(Token)match(input,AND,FollowSets000.FOLLOW_25); if (state.failed) return current; + this_CONJUNCTION_2=(Token)match(input,RULE_CONJUNCTION,FollowSets000.FOLLOW_25); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_2, grammarAccess.getAndAttributeSetAccess().getANDKeyword_1_1_0()); + newLeafNode(this_CONJUNCTION_2, grammarAccess.getAndAttributeSetAccess().getCONJUNCTIONTerminalRuleCall_1_1_0()); } } break; case 2 : - // InternalQLParser.g:2837:5: otherlv_3= Comma + // InternalQLParser.g:2837:5: this_COMMA_3= RULE_COMMA { - otherlv_3=(Token)match(input,Comma,FollowSets000.FOLLOW_25); if (state.failed) return current; + this_COMMA_3=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_25); if (state.failed) return current; if ( state.backtracking==0 ) { - newLeafNode(otherlv_3, grammarAccess.getAndAttributeSetAccess().getCommaKeyword_1_1_1()); + newLeafNode(this_COMMA_3, grammarAccess.getAndAttributeSetAccess().getCOMMATerminalRuleCall_1_1_1()); } @@ -8534,7 +8533,7 @@ public final EObject entryRuleNestedAttributeSet() throws RecognitionException { // $ANTLR start "ruleNestedAttributeSet" - // InternalQLParser.g:2915:1: ruleNestedAttributeSet returns [EObject current=null] : (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ; + // InternalQLParser.g:2915:1: ruleNestedAttributeSet returns [EObject current=null] : (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ; public final EObject ruleNestedAttributeSet() throws RecognitionException { EObject current = null; @@ -8547,11 +8546,11 @@ public final EObject ruleNestedAttributeSet() throws RecognitionException { enterRule(); try { - // InternalQLParser.g:2921:2: ( (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ) - // InternalQLParser.g:2922:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + // InternalQLParser.g:2921:2: ( (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) ) + // InternalQLParser.g:2922:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) { - // InternalQLParser.g:2922:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) - // InternalQLParser.g:2923:3: this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE + // InternalQLParser.g:2922:2: (this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE ) + // InternalQLParser.g:2923:3: this_ROUND_OPEN_0= RULE_ROUND_OPEN ( (lv_nested_1_0= ruleEclAttributeSet ) ) this_ROUND_CLOSE_2= RULE_ROUND_CLOSE { this_ROUND_OPEN_0=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_25); if (state.failed) return current; if ( state.backtracking==0 ) { @@ -8559,19 +8558,19 @@ public final EObject ruleNestedAttributeSet() throws RecognitionException { newLeafNode(this_ROUND_OPEN_0, grammarAccess.getNestedAttributeSetAccess().getROUND_OPENTerminalRuleCall_0()); } - // InternalQLParser.g:2927:3: ( (lv_nested_1_0= ruleAttributeSet ) ) - // InternalQLParser.g:2928:4: (lv_nested_1_0= ruleAttributeSet ) + // InternalQLParser.g:2927:3: ( (lv_nested_1_0= ruleEclAttributeSet ) ) + // InternalQLParser.g:2928:4: (lv_nested_1_0= ruleEclAttributeSet ) { - // InternalQLParser.g:2928:4: (lv_nested_1_0= ruleAttributeSet ) - // InternalQLParser.g:2929:5: lv_nested_1_0= ruleAttributeSet + // InternalQLParser.g:2928:4: (lv_nested_1_0= ruleEclAttributeSet ) + // InternalQLParser.g:2929:5: lv_nested_1_0= ruleEclAttributeSet { if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getNestedAttributeSetAccess().getNestedAttributeSetParserRuleCall_1_0()); + newCompositeNode(grammarAccess.getNestedAttributeSetAccess().getNestedEclAttributeSetParserRuleCall_1_0()); } pushFollow(FollowSets000.FOLLOW_10); - lv_nested_1_0=ruleAttributeSet(); + lv_nested_1_0=ruleEclAttributeSet(); state._fsp--; if (state.failed) return current; @@ -8584,7 +8583,7 @@ public final EObject ruleNestedAttributeSet() throws RecognitionException { current, "nested", lv_nested_1_0, - "com.b2international.snowowl.snomed.ecl.Ecl.AttributeSet"); + "com.b2international.snowowl.snomed.ecl.Ecl.EclAttributeSet"); afterParserOrEnumRuleCall(); } @@ -14026,12 +14025,12 @@ public final void synpred6_InternalQLParser_fragment() throws RecognitionExcepti // $ANTLR start synpred25_InternalQLParser public final void synpred25_InternalQLParser_fragment() throws RecognitionException { - Token otherlv_2=null; + Token this_DISJUNCTION_2=null; EObject lv_right_3_0 = null; - // InternalQLParser.g:1475:4: ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) ) - // InternalQLParser.g:1475:4: () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) + // InternalQLParser.g:1475:4: ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) ) + // InternalQLParser.g:1475:4: () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) { // InternalQLParser.g:1475:4: () // InternalQLParser.g:1476:5: @@ -14044,7 +14043,7 @@ public final void synpred25_InternalQLParser_fragment() throws RecognitionExcept } - otherlv_2=(Token)match(input,OR,FollowSets000.FOLLOW_16); if (state.failed) return ; + this_DISJUNCTION_2=(Token)match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_16); if (state.failed) return ; // InternalQLParser.g:1489:4: ( (lv_right_3_0= ruleAndExpressionConstraint ) ) // InternalQLParser.g:1490:5: (lv_right_3_0= ruleAndExpressionConstraint ) { @@ -14074,13 +14073,13 @@ public final void synpred25_InternalQLParser_fragment() throws RecognitionExcept // $ANTLR start synpred27_InternalQLParser public final void synpred27_InternalQLParser_fragment() throws RecognitionException { - Token otherlv_2=null; - Token otherlv_3=null; + Token this_CONJUNCTION_2=null; + Token this_COMMA_3=null; EObject lv_right_4_0 = null; - // InternalQLParser.g:1540:4: ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) ) - // InternalQLParser.g:1540:4: () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) + // InternalQLParser.g:1540:4: ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) ) + // InternalQLParser.g:1540:4: () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) { // InternalQLParser.g:1540:4: () // InternalQLParser.g:1541:5: @@ -14093,14 +14092,14 @@ public final void synpred27_InternalQLParser_fragment() throws RecognitionExcept } - // InternalQLParser.g:1550:4: (otherlv_2= AND | otherlv_3= Comma ) + // InternalQLParser.g:1550:4: (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) int alt57=2; int LA57_0 = input.LA(1); - if ( (LA57_0==AND) ) { + if ( (LA57_0==RULE_CONJUNCTION) ) { alt57=1; } - else if ( (LA57_0==Comma) ) { + else if ( (LA57_0==RULE_COMMA) ) { alt57=2; } else { @@ -14112,16 +14111,16 @@ else if ( (LA57_0==Comma) ) { } switch (alt57) { case 1 : - // InternalQLParser.g:1551:5: otherlv_2= AND + // InternalQLParser.g:1551:5: this_CONJUNCTION_2= RULE_CONJUNCTION { - otherlv_2=(Token)match(input,AND,FollowSets000.FOLLOW_16); if (state.failed) return ; + this_CONJUNCTION_2=(Token)match(input,RULE_CONJUNCTION,FollowSets000.FOLLOW_16); if (state.failed) return ; } break; case 2 : - // InternalQLParser.g:1556:5: otherlv_3= Comma + // InternalQLParser.g:1556:5: this_COMMA_3= RULE_COMMA { - otherlv_3=(Token)match(input,Comma,FollowSets000.FOLLOW_16); if (state.failed) return ; + this_COMMA_3=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_16); if (state.failed) return ; } break; @@ -14157,12 +14156,12 @@ else if ( (LA57_0==Comma) ) { // $ANTLR start synpred28_InternalQLParser public final void synpred28_InternalQLParser_fragment() throws RecognitionException { - Token otherlv_2=null; + Token this_EXCLUSION_2=null; EObject lv_right_3_0 = null; - // InternalQLParser.g:1612:4: ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) ) - // InternalQLParser.g:1612:4: () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) + // InternalQLParser.g:1612:4: ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) ) + // InternalQLParser.g:1612:4: () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) { // InternalQLParser.g:1612:4: () // InternalQLParser.g:1613:5: @@ -14175,7 +14174,7 @@ public final void synpred28_InternalQLParser_fragment() throws RecognitionExcept } - otherlv_2=(Token)match(input,MINUS,FollowSets000.FOLLOW_16); if (state.failed) return ; + this_EXCLUSION_2=(Token)match(input,RULE_EXCLUSION,FollowSets000.FOLLOW_16); if (state.failed) return ; // InternalQLParser.g:1626:4: ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) // InternalQLParser.g:1627:5: (lv_right_3_0= ruleRefinedExpressionConstraint ) { @@ -14205,10 +14204,10 @@ public final void synpred28_InternalQLParser_fragment() throws RecognitionExcept // $ANTLR start synpred43_InternalQLParser public final void synpred43_InternalQLParser_fragment() throws RecognitionException { - // InternalQLParser.g:2420:4: ( OR ) - // InternalQLParser.g:2420:5: OR + // InternalQLParser.g:2420:4: ( RULE_DISJUNCTION ) + // InternalQLParser.g:2420:5: RULE_DISJUNCTION { - match(input,OR,FollowSets000.FOLLOW_2); if (state.failed) return ; + match(input,RULE_DISJUNCTION,FollowSets000.FOLLOW_2); if (state.failed) return ; } } @@ -14216,10 +14215,10 @@ public final void synpred43_InternalQLParser_fragment() throws RecognitionExcept // $ANTLR start synpred45_InternalQLParser public final void synpred45_InternalQLParser_fragment() throws RecognitionException { - // InternalQLParser.g:2488:4: ( AND | Comma ) + // InternalQLParser.g:2488:4: ( RULE_CONJUNCTION | RULE_COMMA ) // InternalQLParser.g: { - if ( input.LA(1)==AND||input.LA(1)==Comma ) { + if ( (input.LA(1)>=RULE_COMMA && input.LA(1)<=RULE_CONJUNCTION) ) { input.consume(); state.errorRecovery=false;state.failed=false; } @@ -14259,11 +14258,11 @@ public final void synpred47_InternalQLParser_fragment() throws RecognitionExcept // $ANTLR start synpred48_InternalQLParser public final void synpred48_InternalQLParser_fragment() throws RecognitionException { - EObject this_AttributeGroup_1 = null; + EObject this_EclAttributeGroup_1 = null; - // InternalQLParser.g:2563:3: (this_AttributeGroup_1= ruleAttributeGroup ) - // InternalQLParser.g:2563:3: this_AttributeGroup_1= ruleAttributeGroup + // InternalQLParser.g:2563:3: (this_EclAttributeGroup_1= ruleEclAttributeGroup ) + // InternalQLParser.g:2563:3: this_EclAttributeGroup_1= ruleEclAttributeGroup { if ( state.backtracking==0 ) { @@ -14271,7 +14270,7 @@ public final void synpred48_InternalQLParser_fragment() throws RecognitionExcept } pushFollow(FollowSets000.FOLLOW_2); - this_AttributeGroup_1=ruleAttributeGroup(); + this_EclAttributeGroup_1=ruleEclAttributeGroup(); state._fsp--; if (state.failed) return ; @@ -14459,12 +14458,12 @@ public final boolean synpred43_InternalQLParser() { protected DFA40 dfa40 = new DFA40(this); static final String dfa_1s = "\23\uffff"; static final String dfa_2s = "\1\1\22\uffff"; - static final String dfa_3s = "\1\16\11\uffff\1\0\10\uffff"; - static final String dfa_4s = "\1\63\11\uffff\1\0\10\uffff"; + static final String dfa_3s = "\1\24\11\uffff\1\0\10\uffff"; + static final String dfa_4s = "\1\62\11\uffff\1\0\10\uffff"; static final String dfa_5s = "\1\uffff\1\1\20\uffff\1\2"; static final String dfa_6s = "\12\uffff\1\0\10\uffff}>"; static final String[] dfa_7s = { - "\1\1\6\uffff\4\1\5\uffff\1\1\3\uffff\1\12\1\1\4\uffff\1\1\2\uffff\1\1\2\uffff\6\1", + "\1\1\4\uffff\4\1\1\uffff\1\1\3\uffff\1\12\1\1\4\uffff\1\1\1\uffff\1\1\2\uffff\6\1", "", "", "", @@ -14537,12 +14536,12 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc } } static final String dfa_8s = "\16\uffff"; - static final String dfa_9s = "\1\4\2\52\12\uffff\1\12"; - static final String dfa_10s = "\1\42\2\52\12\uffff\1\14"; + static final String dfa_9s = "\1\4\2\51\12\uffff\1\12"; + static final String dfa_10s = "\1\42\2\51\12\uffff\1\14"; static final String dfa_11s = "\3\uffff\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11\1\12\1\uffff"; static final String dfa_12s = "\16\uffff}>"; static final String[] dfa_13s = { - "\1\12\1\7\1\6\1\13\1\2\1\5\1\11\1\1\1\3\1\10\5\uffff\1\4\16\uffff\1\14", + "\1\12\1\7\1\6\1\13\1\2\1\5\1\11\1\1\1\3\1\10\4\uffff\1\4\17\uffff\1\14", "\1\15", "\1\15", "", @@ -14584,12 +14583,12 @@ public String getDescription() { } static final String dfa_14s = "\12\uffff"; static final String dfa_15s = "\1\1\11\uffff"; - static final String dfa_16s = "\1\16\4\uffff\1\0\4\uffff"; + static final String dfa_16s = "\1\24\4\uffff\1\0\4\uffff"; static final String dfa_17s = "\1\43\4\uffff\1\0\4\uffff"; static final String dfa_18s = "\1\uffff\1\2\7\uffff\1\1"; static final String dfa_19s = "\5\uffff\1\0\4\uffff}>"; static final String[] dfa_20s = { - "\1\1\6\uffff\1\1\1\5\3\1\11\uffff\1\1", + "\2\1\3\uffff\2\1\1\5\1\1\6\uffff\1\1", "", "", "", @@ -14623,7 +14622,7 @@ public DFA17(BaseRecognizer recognizer) { this.transition = dfa_20; } public String getDescription() { - return "()* loopback of 1474:3: ( () otherlv_2= OR ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )*"; + return "()* loopback of 1474:3: ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndExpressionConstraint ) ) )*"; } public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { TokenStream input = (TokenStream)_input; @@ -14652,11 +14651,11 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc throw nvae; } } - static final String dfa_21s = "\1\16\3\uffff\2\0\4\uffff"; + static final String dfa_21s = "\1\24\3\uffff\2\0\4\uffff"; static final String dfa_22s = "\1\43\3\uffff\2\0\4\uffff"; static final String dfa_23s = "\4\uffff\1\0\1\1\4\uffff}>"; static final String[] dfa_24s = { - "\1\1\6\uffff\1\4\1\1\1\5\2\1\11\uffff\1\1", + "\2\1\3\uffff\1\5\1\4\2\1\6\uffff\1\1", "", "", "", @@ -14686,7 +14685,7 @@ public DFA19(BaseRecognizer recognizer) { this.transition = dfa_24; } public String getDescription() { - return "()* loopback of 1539:3: ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )*"; + return "()* loopback of 1539:3: ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleExclusionExpressionConstraint ) ) )*"; } public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { TokenStream input = (TokenStream)_input; @@ -14731,12 +14730,12 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc } } static final String dfa_25s = "\1\2\11\uffff"; - static final String dfa_26s = "\1\16\1\0\10\uffff"; + static final String dfa_26s = "\1\24\1\0\10\uffff"; static final String dfa_27s = "\1\43\1\0\10\uffff"; static final String dfa_28s = "\2\uffff\1\2\6\uffff\1\1"; static final String dfa_29s = "\1\uffff\1\0\10\uffff}>"; static final String[] dfa_30s = { - "\1\1\6\uffff\5\2\11\uffff\1\2", + "\2\2\3\uffff\3\2\1\1\6\uffff\1\2", "\1\uffff", "", "", @@ -14768,7 +14767,7 @@ public DFA20(BaseRecognizer recognizer) { this.transition = dfa_30; } public String getDescription() { - return "1611:3: ( () otherlv_2= MINUS ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )?"; + return "1611:3: ( () this_EXCLUSION_2= RULE_EXCLUSION ( (lv_right_3_0= ruleRefinedExpressionConstraint ) ) )?"; } public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { TokenStream input = (TokenStream)_input; @@ -14797,11 +14796,11 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc throw nvae; } } - static final String dfa_31s = "\1\16\3\uffff\1\0\5\uffff"; + static final String dfa_31s = "\1\24\3\uffff\1\0\5\uffff"; static final String dfa_32s = "\1\43\3\uffff\1\0\5\uffff"; static final String dfa_33s = "\4\uffff\1\0\5\uffff}>"; static final String[] dfa_34s = { - "\1\1\6\uffff\1\1\1\4\3\1\11\uffff\1\1", + "\2\1\3\uffff\2\1\1\4\1\1\6\uffff\1\1", "", "", "", @@ -14831,7 +14830,7 @@ public DFA27(BaseRecognizer recognizer) { this.transition = dfa_34; } public String getDescription() { - return "()* loopback of 2419:3: ( ( OR )=> ( () otherlv_2= OR ( (lv_right_3_0= ruleAndRefinement ) ) ) )*"; + return "()* loopback of 2419:3: ( ( RULE_DISJUNCTION )=> ( () this_DISJUNCTION_2= RULE_DISJUNCTION ( (lv_right_3_0= ruleAndRefinement ) ) ) )*"; } public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { TokenStream input = (TokenStream)_input; @@ -14860,11 +14859,11 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc throw nvae; } } - static final String dfa_35s = "\1\16\2\uffff\2\0\5\uffff"; + static final String dfa_35s = "\1\24\2\uffff\2\0\5\uffff"; static final String dfa_36s = "\1\43\2\uffff\2\0\5\uffff"; static final String dfa_37s = "\3\uffff\1\0\1\1\5\uffff}>"; static final String[] dfa_38s = { - "\1\1\6\uffff\1\3\1\1\1\4\2\1\11\uffff\1\1", + "\2\1\3\uffff\1\4\1\3\2\1\6\uffff\1\1", "", "", "\1\uffff", @@ -14894,7 +14893,7 @@ public DFA29(BaseRecognizer recognizer) { this.transition = dfa_38; } public String getDescription() { - return "()* loopback of 2487:3: ( ( AND | Comma )=> ( () (otherlv_2= AND | otherlv_3= Comma ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )*"; + return "()* loopback of 2487:3: ( ( RULE_CONJUNCTION | RULE_COMMA )=> ( () (this_CONJUNCTION_2= RULE_CONJUNCTION | this_COMMA_3= RULE_COMMA ) ( (lv_right_4_0= ruleSubRefinement ) ) ) )*"; } public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { TokenStream input = (TokenStream)_input; @@ -14939,12 +14938,12 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc } } static final String dfa_39s = "\17\uffff"; - static final String dfa_40s = "\1\33\1\0\12\uffff\1\0\2\uffff"; - static final String dfa_41s = "\1\63\1\0\12\uffff\1\0\2\uffff"; + static final String dfa_40s = "\1\27\1\0\12\uffff\1\0\2\uffff"; + static final String dfa_41s = "\1\62\1\0\12\uffff\1\0\2\uffff"; static final String dfa_42s = "\2\uffff\1\1\12\uffff\1\2\1\3"; static final String dfa_43s = "\1\uffff\1\0\12\uffff\1\1\2\uffff}>"; static final String[] dfa_44s = { - "\1\2\2\uffff\1\2\1\uffff\1\15\1\uffff\1\14\1\uffff\1\1\3\uffff\1\2\2\uffff\1\2\2\uffff\6\2", + "\1\2\6\uffff\1\2\1\uffff\1\15\1\uffff\1\14\1\uffff\1\1\3\uffff\1\2\1\uffff\1\2\2\uffff\6\2", "\1\uffff", "", "", @@ -14982,7 +14981,7 @@ public DFA30(BaseRecognizer recognizer) { this.transition = dfa_44; } public String getDescription() { - return "2550:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_AttributeGroup_1= ruleAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement )"; + return "2550:2: (this_AttributeConstraint_0= ruleAttributeConstraint | this_EclAttributeGroup_1= ruleEclAttributeGroup | this_NestedRefinement_2= ruleNestedRefinement )"; } public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { TokenStream input = (TokenStream)_input; @@ -15026,12 +15025,12 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc throw nvae; } } - static final String dfa_45s = "\1\33\13\uffff\1\0\1\uffff"; - static final String dfa_46s = "\1\63\13\uffff\1\0\1\uffff"; + static final String dfa_45s = "\1\27\13\uffff\1\0\1\uffff"; + static final String dfa_46s = "\1\62\13\uffff\1\0\1\uffff"; static final String dfa_47s = "\1\uffff\1\1\13\uffff\1\2"; static final String dfa_48s = "\14\uffff\1\0\1\uffff}>"; static final String[] dfa_49s = { - "\1\1\2\uffff\1\1\3\uffff\1\14\1\uffff\1\1\3\uffff\1\1\2\uffff\1\1\2\uffff\6\1", + "\1\1\6\uffff\1\1\3\uffff\1\14\1\uffff\1\1\3\uffff\1\1\1\uffff\1\1\2\uffff\6\1", "", "", "", @@ -15097,8 +15096,8 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc } static final String dfa_50s = "\101\uffff"; static final String dfa_51s = "\23\uffff\2\52\2\uffff\2\56\2\uffff\2\62\2\uffff\2\66\2\uffff\2\72\2\uffff\2\76\2\uffff\2\52\2\uffff\2\56\2\uffff\2\62\2\uffff\2\66\2\uffff\2\72\2\uffff\2\76"; - static final String dfa_52s = "\1\54\2\20\4\66\1\uffff\1\35\1\uffff\1\35\2\uffff\6\35\2\16\2\35\2\16\2\35\2\16\2\35\2\16\2\35\2\16\2\35\2\16\2\uffff\2\16\2\uffff\2\16\2\uffff\2\16\2\uffff\2\16\2\uffff\2\16\2\uffff\2\16"; - static final String dfa_53s = "\1\65\2\72\4\66\1\uffff\1\47\1\uffff\1\47\2\uffff\4\47\2\36\2\52\2\36\2\52\2\36\2\52\2\36\2\52\2\36\2\52\2\36\2\52\2\uffff\2\52\2\uffff\2\52\2\uffff\2\52\2\uffff\2\52\2\uffff\2\52\2\uffff\2\52"; + static final String dfa_52s = "\1\53\2\17\4\65\1\uffff\1\35\1\uffff\1\35\2\uffff\6\35\2\24\2\35\2\24\2\35\2\24\2\35\2\24\2\35\2\24\2\35\2\24\2\uffff\2\24\2\uffff\2\24\2\uffff\2\24\2\uffff\2\24\2\uffff\2\24\2\uffff\2\24"; + static final String dfa_53s = "\1\64\2\71\4\65\1\uffff\1\47\1\uffff\1\47\2\uffff\4\47\2\36\2\51\2\36\2\51\2\36\2\51\2\36\2\51\2\36\2\51\2\36\2\51\2\uffff\2\51\2\uffff\2\51\2\uffff\2\51\2\uffff\2\51\2\uffff\2\51\2\uffff\2\51"; static final String dfa_54s = "\7\uffff\1\3\1\uffff\1\1\1\uffff\1\4\1\2\34\uffff\1\13\1\5\2\uffff\1\14\1\6\2\uffff\1\15\1\7\2\uffff\1\16\1\10\2\uffff\1\17\1\11\2\uffff\1\20\1\12\2\uffff"; static final String dfa_55s = "\101\uffff}>"; static final String[] dfa_56s = { @@ -15121,52 +15120,52 @@ public int specialStateTransition(int s, IntStream _input) throws NoViableAltExc "\1\47\1\50\7\uffff\1\45\1\46", "\1\23\1\24", "\1\23\1\24", - "\1\52\6\uffff\5\52\7\uffff\1\52\1\uffff\1\52\6\uffff\1\51", - "\1\52\6\uffff\5\52\3\uffff\1\54\1\53\2\uffff\1\52\1\uffff\1\52\6\uffff\1\51", + "\2\52\3\uffff\4\52\4\uffff\1\52\1\uffff\1\52\5\uffff\1\51", + "\2\52\3\uffff\4\52\1\54\1\53\2\uffff\1\52\1\uffff\1\52\5\uffff\1\51", "\1\27\1\30", "\1\27\1\30", - "\1\56\6\uffff\5\56\7\uffff\1\56\1\uffff\1\56\6\uffff\1\55", - "\1\56\6\uffff\5\56\3\uffff\1\60\1\57\2\uffff\1\56\1\uffff\1\56\6\uffff\1\55", + "\2\56\3\uffff\4\56\4\uffff\1\56\1\uffff\1\56\5\uffff\1\55", + "\2\56\3\uffff\4\56\1\60\1\57\2\uffff\1\56\1\uffff\1\56\5\uffff\1\55", "\1\33\1\34", "\1\33\1\34", - "\1\62\6\uffff\5\62\7\uffff\1\62\1\uffff\1\62\6\uffff\1\61", - "\1\62\6\uffff\5\62\3\uffff\1\64\1\63\2\uffff\1\62\1\uffff\1\62\6\uffff\1\61", + "\2\62\3\uffff\4\62\4\uffff\1\62\1\uffff\1\62\5\uffff\1\61", + "\2\62\3\uffff\4\62\1\64\1\63\2\uffff\1\62\1\uffff\1\62\5\uffff\1\61", "\1\37\1\40", "\1\37\1\40", - "\1\66\6\uffff\5\66\7\uffff\1\66\1\uffff\1\66\6\uffff\1\65", - "\1\66\6\uffff\5\66\3\uffff\1\70\1\67\2\uffff\1\66\1\uffff\1\66\6\uffff\1\65", + "\2\66\3\uffff\4\66\4\uffff\1\66\1\uffff\1\66\5\uffff\1\65", + "\2\66\3\uffff\4\66\1\70\1\67\2\uffff\1\66\1\uffff\1\66\5\uffff\1\65", "\1\43\1\44", "\1\43\1\44", - "\1\72\6\uffff\5\72\7\uffff\1\72\1\uffff\1\72\6\uffff\1\71", - "\1\72\6\uffff\5\72\3\uffff\1\74\1\73\2\uffff\1\72\1\uffff\1\72\6\uffff\1\71", + "\2\72\3\uffff\4\72\4\uffff\1\72\1\uffff\1\72\5\uffff\1\71", + "\2\72\3\uffff\4\72\1\74\1\73\2\uffff\1\72\1\uffff\1\72\5\uffff\1\71", "\1\47\1\50", "\1\47\1\50", - "\1\76\6\uffff\5\76\7\uffff\1\76\1\uffff\1\76\6\uffff\1\75", - "\1\76\6\uffff\5\76\3\uffff\1\100\1\77\2\uffff\1\76\1\uffff\1\76\6\uffff\1\75", + "\2\76\3\uffff\4\76\4\uffff\1\76\1\uffff\1\76\5\uffff\1\75", + "\2\76\3\uffff\4\76\1\100\1\77\2\uffff\1\76\1\uffff\1\76\5\uffff\1\75", "", "", - "\1\52\6\uffff\5\52\3\uffff\1\54\1\53\2\uffff\1\52\1\uffff\1\52\6\uffff\1\51", - "\1\52\6\uffff\5\52\3\uffff\1\54\1\53\2\uffff\1\52\1\uffff\1\52\6\uffff\1\51", + "\2\52\3\uffff\4\52\1\54\1\53\2\uffff\1\52\1\uffff\1\52\5\uffff\1\51", + "\2\52\3\uffff\4\52\1\54\1\53\2\uffff\1\52\1\uffff\1\52\5\uffff\1\51", "", "", - "\1\56\6\uffff\5\56\3\uffff\1\60\1\57\2\uffff\1\56\1\uffff\1\56\6\uffff\1\55", - "\1\56\6\uffff\5\56\3\uffff\1\60\1\57\2\uffff\1\56\1\uffff\1\56\6\uffff\1\55", + "\2\56\3\uffff\4\56\1\60\1\57\2\uffff\1\56\1\uffff\1\56\5\uffff\1\55", + "\2\56\3\uffff\4\56\1\60\1\57\2\uffff\1\56\1\uffff\1\56\5\uffff\1\55", "", "", - "\1\62\6\uffff\5\62\3\uffff\1\64\1\63\2\uffff\1\62\1\uffff\1\62\6\uffff\1\61", - "\1\62\6\uffff\5\62\3\uffff\1\64\1\63\2\uffff\1\62\1\uffff\1\62\6\uffff\1\61", + "\2\62\3\uffff\4\62\1\64\1\63\2\uffff\1\62\1\uffff\1\62\5\uffff\1\61", + "\2\62\3\uffff\4\62\1\64\1\63\2\uffff\1\62\1\uffff\1\62\5\uffff\1\61", "", "", - "\1\66\6\uffff\5\66\3\uffff\1\70\1\67\2\uffff\1\66\1\uffff\1\66\6\uffff\1\65", - "\1\66\6\uffff\5\66\3\uffff\1\70\1\67\2\uffff\1\66\1\uffff\1\66\6\uffff\1\65", + "\2\66\3\uffff\4\66\1\70\1\67\2\uffff\1\66\1\uffff\1\66\5\uffff\1\65", + "\2\66\3\uffff\4\66\1\70\1\67\2\uffff\1\66\1\uffff\1\66\5\uffff\1\65", "", "", - "\1\72\6\uffff\5\72\3\uffff\1\74\1\73\2\uffff\1\72\1\uffff\1\72\6\uffff\1\71", - "\1\72\6\uffff\5\72\3\uffff\1\74\1\73\2\uffff\1\72\1\uffff\1\72\6\uffff\1\71", + "\2\72\3\uffff\4\72\1\74\1\73\2\uffff\1\72\1\uffff\1\72\5\uffff\1\71", + "\2\72\3\uffff\4\72\1\74\1\73\2\uffff\1\72\1\uffff\1\72\5\uffff\1\71", "", "", - "\1\76\6\uffff\5\76\3\uffff\1\100\1\77\2\uffff\1\76\1\uffff\1\76\6\uffff\1\75", - "\1\76\6\uffff\5\76\3\uffff\1\100\1\77\2\uffff\1\76\1\uffff\1\76\6\uffff\1\75" + "\2\76\3\uffff\4\76\1\100\1\77\2\uffff\1\76\1\uffff\1\76\5\uffff\1\75", + "\2\76\3\uffff\4\76\1\100\1\77\2\uffff\1\76\1\uffff\1\76\5\uffff\1\75" }; static final short[] dfa_50 = DFA.unpackEncodedString(dfa_50s); @@ -15200,37 +15199,37 @@ public String getDescription() { private static class FollowSets000 { public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L}); - public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000000000400002L}); - public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x000FC90441000000L}); - public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000A00002L}); - public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000004002L}); - public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000001000002L}); - public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000400083FF0L}); - public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000002000000L}); + public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000000008000002L}); + public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0007E50440100000L}); + public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000006000002L}); + public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000010000002L}); + public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000100002L}); + public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000400043FF0L}); + public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000000200000L}); public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000800000000L}); - public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0000040000000000L}); + public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0000020000000000L}); public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000000000001000L}); - public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000100000000000L}); - public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000000110000L}); + public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000080000000000L}); + public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000000088000L}); public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0000000000000400L}); - public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x000FC90440000000L}); - public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x0400000000068000L}); + public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x0007E50440000000L}); + public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x0200000000034000L}); public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000080000000L}); - public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0400000000000000L}); + public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0200000000000000L}); public static final BitSet FOLLOW_20 = new BitSet(new long[]{0x0000000080000002L}); - public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x000FC91548000000L}); - public static final BitSet FOLLOW_22 = new BitSet(new long[]{0x0000040000000002L}); - public static final BitSet FOLLOW_23 = new BitSet(new long[]{0x0000000004000002L}); + public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x0007E51540800000L}); + public static final BitSet FOLLOW_22 = new BitSet(new long[]{0x0000020000000002L}); + public static final BitSet FOLLOW_23 = new BitSet(new long[]{0x0000000000400002L}); public static final BitSet FOLLOW_24 = new BitSet(new long[]{0x0000000100000000L}); - public static final BitSet FOLLOW_25 = new BitSet(new long[]{0x000FC91448000000L}); + public static final BitSet FOLLOW_25 = new BitSet(new long[]{0x0007E51440800000L}); public static final BitSet FOLLOW_26 = new BitSet(new long[]{0x0000000200000000L}); - public static final BitSet FOLLOW_27 = new BitSet(new long[]{0x000FC90448000000L}); - public static final BitSet FOLLOW_28 = new BitSet(new long[]{0x0030F00000000000L}); + public static final BitSet FOLLOW_27 = new BitSet(new long[]{0x0007E50440800000L}); + public static final BitSet FOLLOW_28 = new BitSet(new long[]{0x0018780000000000L}); public static final BitSet FOLLOW_29 = new BitSet(new long[]{0x0000000060000000L}); - public static final BitSet FOLLOW_30 = new BitSet(new long[]{0x0000000010000000L}); - public static final BitSet FOLLOW_31 = new BitSet(new long[]{0x0000080060000000L}); + public static final BitSet FOLLOW_30 = new BitSet(new long[]{0x0000000001000000L}); + public static final BitSet FOLLOW_31 = new BitSet(new long[]{0x0000040060000000L}); public static final BitSet FOLLOW_32 = new BitSet(new long[]{0x0000002000000000L}); - public static final BitSet FOLLOW_33 = new BitSet(new long[]{0x0040000000000000L}); + public static final BitSet FOLLOW_33 = new BitSet(new long[]{0x0020000000000000L}); public static final BitSet FOLLOW_34 = new BitSet(new long[]{0x000000C060000000L}); public static final BitSet FOLLOW_35 = new BitSet(new long[]{0x0000000060000002L}); } diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/internal/InternalQLParser.tokens b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/internal/InternalQLParser.tokens index d29f49900b1..8fa0d61b473 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/internal/InternalQLParser.tokens +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/internal/InternalQLParser.tokens @@ -1,55 +1,54 @@ -','=23 -'AND'=21 'Concept'=11 'Description'=8 -'MINUS'=14 -'OR'=22 'acceptableIn'=6 'active'=12 'caseSignificanceId'=4 -'exact'=15 -'false'=16 +'exact'=14 +'false'=15 'languageCode'=7 'languageRefSetId'=5 -'match'=17 +'match'=16 'moduleId'=10 'preferredIn'=9 -'regex'=18 -'term'=19 -'true'=20 +'regex'=17 +'term'=18 +'true'=19 'typeId'=13 RULE_CARET=40 -RULE_CLOSE_DOUBLE_BRACES=25 +RULE_CLOSE_DOUBLE_BRACES=21 RULE_COLON=31 +RULE_COMMA=25 +RULE_CONJUNCTION=26 RULE_CURLY_CLOSE=33 RULE_CURLY_OPEN=32 RULE_DASH=39 -RULE_DBL_GT=49 -RULE_DBL_LT=48 +RULE_DBL_GT=48 +RULE_DBL_LT=47 RULE_DIGIT_NONZERO=30 -RULE_DOT=42 -RULE_EQUAL=44 -RULE_GT=47 -RULE_GTE=52 -RULE_GT_EM=51 -RULE_HASH=54 -RULE_LT=46 -RULE_LTE=53 -RULE_LT_EM=50 -RULE_ML_COMMENT=56 -RULE_NOT=41 -RULE_NOT_EQUAL=45 -RULE_OPEN_DOUBLE_BRACES=24 +RULE_DISJUNCTION=27 +RULE_DOT=41 +RULE_EQUAL=43 +RULE_EXCLUSION=28 +RULE_GT=46 +RULE_GTE=51 +RULE_GT_EM=50 +RULE_HASH=53 +RULE_LT=45 +RULE_LTE=52 +RULE_LT_EM=49 +RULE_ML_COMMENT=55 +RULE_NOT_EQUAL=44 +RULE_OPEN_DOUBLE_BRACES=20 RULE_PLUS=38 -RULE_REVERSED=27 +RULE_REVERSED=23 RULE_ROUND_CLOSE=35 RULE_ROUND_OPEN=34 -RULE_SL_COMMENT=57 +RULE_SL_COMMENT=56 RULE_SQUARE_CLOSE=37 RULE_SQUARE_OPEN=36 -RULE_STRING=58 -RULE_TERM_STRING=26 -RULE_TO=28 -RULE_WILDCARD=43 -RULE_WS=55 +RULE_STRING=57 +RULE_TERM_STRING=22 +RULE_TO=24 +RULE_WILDCARD=42 +RULE_WS=54 RULE_ZERO=29 diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/lexer/InternalQLLexer.g b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/lexer/InternalQLLexer.g index 943199ca835..e79e0c1b47d 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/lexer/InternalQLLexer.g +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/lexer/InternalQLLexer.g @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,8 +43,6 @@ Active : ('A'|'a')('C'|'c')('T'|'t')('I'|'i')('V'|'v')('E'|'e'); TypeId : ('T'|'t')('Y'|'y')('P'|'p')('E'|'e')('I'|'i')('D'|'d'); -MINUS : ('M'|'m')('I'|'i')('N'|'n')('U'|'u')('S'|'s'); - Exact : ('E'|'e')('X'|'x')('A'|'a')('C'|'c')('T'|'t'); False : ('F'|'f')('A'|'a')('L'|'l')('S'|'s')('E'|'e'); @@ -57,12 +55,6 @@ Term : ('T'|'t')('E'|'e')('R'|'r')('M'|'m'); True : ('T'|'t')('R'|'r')('U'|'u')('E'|'e'); -AND : ('A'|'a')('N'|'n')('D'|'d'); - -OR : ('O'|'o')('R'|'r'); - -Comma : ','; - RULE_OPEN_DOUBLE_BRACES : '{{'; RULE_CLOSE_DOUBLE_BRACES : '}}'; @@ -73,6 +65,14 @@ RULE_REVERSED : 'R'; RULE_TO : '..'; +RULE_COMMA : ','; + +RULE_CONJUNCTION : ('a'|'A') ('n'|'N') ('d'|'D'); + +RULE_DISJUNCTION : ('o'|'O') ('r'|'R'); + +RULE_EXCLUSION : ('m'|'M') ('i'|'I') ('n'|'N') ('u'|'U') ('s'|'S'); + RULE_ZERO : '0'; RULE_DIGIT_NONZERO : '1'..'9'; @@ -97,8 +97,6 @@ RULE_DASH : '-'; RULE_CARET : '^'; -RULE_NOT : '!'; - RULE_DOT : '.'; RULE_WILDCARD : '*'; diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/lexer/InternalQLLexer.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/lexer/InternalQLLexer.java index b2507bfaf89..803b6aa84fe 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/lexer/InternalQLLexer.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/lexer/InternalQLLexer.java @@ -14,59 +14,58 @@ public class InternalQLLexer extends Lexer { public static final int RULE_DIGIT_NONZERO=30; public static final int RULE_CURLY_OPEN=32; - public static final int RULE_TO=28; + public static final int RULE_TO=24; public static final int RULE_ROUND_CLOSE=35; - public static final int RULE_DBL_GT=49; - public static final int True=20; - public static final int RULE_GT=47; - public static final int False=16; - public static final int MINUS=14; - public static final int RULE_GTE=52; + public static final int RULE_DBL_GT=48; + public static final int True=19; + public static final int RULE_GT=46; + public static final int False=15; + public static final int RULE_GTE=51; public static final int LanguageCode=7; public static final int ModuleId=10; - public static final int Regex=18; + public static final int Regex=17; public static final int RULE_ROUND_OPEN=34; - public static final int RULE_DBL_LT=48; - public static final int RULE_NOT_EQUAL=45; + public static final int RULE_DBL_LT=47; + public static final int RULE_NOT_EQUAL=44; public static final int Concept=11; public static final int AcceptableIn=6; public static final int TypeId=13; public static final int RULE_SQUARE_CLOSE=37; public static final int RULE_SQUARE_OPEN=36; - public static final int RULE_EQUAL=44; - public static final int RULE_LT_EM=50; + public static final int RULE_EQUAL=43; + public static final int RULE_COMMA=25; + public static final int RULE_LT_EM=49; public static final int RULE_CURLY_CLOSE=33; public static final int RULE_ZERO=29; - public static final int Term=19; + public static final int Term=18; public static final int RULE_COLON=31; - public static final int RULE_LT=46; + public static final int RULE_LT=45; public static final int Active=12; - public static final int AND=21; - public static final int RULE_ML_COMMENT=56; - public static final int RULE_LTE=53; + public static final int RULE_ML_COMMENT=55; + public static final int RULE_LTE=52; public static final int Description=8; - public static final int RULE_STRING=58; - public static final int RULE_NOT=41; - public static final int RULE_REVERSED=27; - public static final int Match=17; - public static final int RULE_SL_COMMENT=57; - public static final int RULE_CLOSE_DOUBLE_BRACES=25; + public static final int RULE_STRING=57; + public static final int RULE_REVERSED=23; + public static final int Match=16; + public static final int RULE_SL_COMMENT=56; + public static final int RULE_CLOSE_DOUBLE_BRACES=21; public static final int PreferredIn=9; - public static final int Comma=23; - public static final int RULE_HASH=54; + public static final int RULE_HASH=53; public static final int RULE_DASH=39; public static final int RULE_PLUS=38; - public static final int Exact=15; - public static final int RULE_DOT=42; + public static final int Exact=14; + public static final int RULE_DOT=41; public static final int EOF=-1; - public static final int OR=22; - public static final int RULE_GT_EM=51; - public static final int RULE_WS=55; - public static final int RULE_OPEN_DOUBLE_BRACES=24; + public static final int RULE_GT_EM=50; + public static final int RULE_WS=54; + public static final int RULE_EXCLUSION=28; + public static final int RULE_OPEN_DOUBLE_BRACES=20; public static final int RULE_CARET=40; - public static final int RULE_WILDCARD=43; + public static final int RULE_CONJUNCTION=26; + public static final int RULE_WILDCARD=42; + public static final int RULE_DISJUNCTION=27; public static final int LanguageRefSetId=5; - public static final int RULE_TERM_STRING=26; + public static final int RULE_TERM_STRING=22; public static final int CaseSignificanceId=4; // delegates @@ -1235,77 +1234,13 @@ public final void mTypeId() throws RecognitionException { } // $ANTLR end "TypeId" - // $ANTLR start "MINUS" - public final void mMINUS() throws RecognitionException { - try { - int _type = MINUS; - int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:46:7: ( ( 'M' | 'm' ) ( 'I' | 'i' ) ( 'N' | 'n' ) ( 'U' | 'u' ) ( 'S' | 's' ) ) - // InternalQLLexer.g:46:9: ( 'M' | 'm' ) ( 'I' | 'i' ) ( 'N' | 'n' ) ( 'U' | 'u' ) ( 'S' | 's' ) - { - if ( input.LA(1)=='M'||input.LA(1)=='m' ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - if ( input.LA(1)=='I'||input.LA(1)=='i' ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - if ( input.LA(1)=='N'||input.LA(1)=='n' ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - if ( input.LA(1)=='U'||input.LA(1)=='u' ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - if ( input.LA(1)=='S'||input.LA(1)=='s' ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "MINUS" - // $ANTLR start "Exact" public final void mExact() throws RecognitionException { try { int _type = Exact; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:48:7: ( ( 'E' | 'e' ) ( 'X' | 'x' ) ( 'A' | 'a' ) ( 'C' | 'c' ) ( 'T' | 't' ) ) - // InternalQLLexer.g:48:9: ( 'E' | 'e' ) ( 'X' | 'x' ) ( 'A' | 'a' ) ( 'C' | 'c' ) ( 'T' | 't' ) + // InternalQLLexer.g:46:7: ( ( 'E' | 'e' ) ( 'X' | 'x' ) ( 'A' | 'a' ) ( 'C' | 'c' ) ( 'T' | 't' ) ) + // InternalQLLexer.g:46:9: ( 'E' | 'e' ) ( 'X' | 'x' ) ( 'A' | 'a' ) ( 'C' | 'c' ) ( 'T' | 't' ) { if ( input.LA(1)=='E'||input.LA(1)=='e' ) { input.consume(); @@ -1368,8 +1303,8 @@ public final void mFalse() throws RecognitionException { try { int _type = False; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:50:7: ( ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) ) - // InternalQLLexer.g:50:9: ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) + // InternalQLLexer.g:48:7: ( ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) ) + // InternalQLLexer.g:48:9: ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) { if ( input.LA(1)=='F'||input.LA(1)=='f' ) { input.consume(); @@ -1432,8 +1367,8 @@ public final void mMatch() throws RecognitionException { try { int _type = Match; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:52:7: ( ( 'M' | 'm' ) ( 'A' | 'a' ) ( 'T' | 't' ) ( 'C' | 'c' ) ( 'H' | 'h' ) ) - // InternalQLLexer.g:52:9: ( 'M' | 'm' ) ( 'A' | 'a' ) ( 'T' | 't' ) ( 'C' | 'c' ) ( 'H' | 'h' ) + // InternalQLLexer.g:50:7: ( ( 'M' | 'm' ) ( 'A' | 'a' ) ( 'T' | 't' ) ( 'C' | 'c' ) ( 'H' | 'h' ) ) + // InternalQLLexer.g:50:9: ( 'M' | 'm' ) ( 'A' | 'a' ) ( 'T' | 't' ) ( 'C' | 'c' ) ( 'H' | 'h' ) { if ( input.LA(1)=='M'||input.LA(1)=='m' ) { input.consume(); @@ -1496,8 +1431,8 @@ public final void mRegex() throws RecognitionException { try { int _type = Regex; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:54:7: ( ( 'R' | 'r' ) ( 'E' | 'e' ) ( 'G' | 'g' ) ( 'E' | 'e' ) ( 'X' | 'x' ) ) - // InternalQLLexer.g:54:9: ( 'R' | 'r' ) ( 'E' | 'e' ) ( 'G' | 'g' ) ( 'E' | 'e' ) ( 'X' | 'x' ) + // InternalQLLexer.g:52:7: ( ( 'R' | 'r' ) ( 'E' | 'e' ) ( 'G' | 'g' ) ( 'E' | 'e' ) ( 'X' | 'x' ) ) + // InternalQLLexer.g:52:9: ( 'R' | 'r' ) ( 'E' | 'e' ) ( 'G' | 'g' ) ( 'E' | 'e' ) ( 'X' | 'x' ) { if ( input.LA(1)=='R'||input.LA(1)=='r' ) { input.consume(); @@ -1560,8 +1495,8 @@ public final void mTerm() throws RecognitionException { try { int _type = Term; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:56:6: ( ( 'T' | 't' ) ( 'E' | 'e' ) ( 'R' | 'r' ) ( 'M' | 'm' ) ) - // InternalQLLexer.g:56:8: ( 'T' | 't' ) ( 'E' | 'e' ) ( 'R' | 'r' ) ( 'M' | 'm' ) + // InternalQLLexer.g:54:6: ( ( 'T' | 't' ) ( 'E' | 'e' ) ( 'R' | 'r' ) ( 'M' | 'm' ) ) + // InternalQLLexer.g:54:8: ( 'T' | 't' ) ( 'E' | 'e' ) ( 'R' | 'r' ) ( 'M' | 'm' ) { if ( input.LA(1)=='T'||input.LA(1)=='t' ) { input.consume(); @@ -1615,8 +1550,8 @@ public final void mTrue() throws RecognitionException { try { int _type = True; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:58:6: ( ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) ) - // InternalQLLexer.g:58:8: ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) + // InternalQLLexer.g:56:6: ( ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) ) + // InternalQLLexer.g:56:8: ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) { if ( input.LA(1)=='T'||input.LA(1)=='t' ) { input.consume(); @@ -1665,116 +1600,13 @@ public final void mTrue() throws RecognitionException { } // $ANTLR end "True" - // $ANTLR start "AND" - public final void mAND() throws RecognitionException { - try { - int _type = AND; - int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:60:5: ( ( 'A' | 'a' ) ( 'N' | 'n' ) ( 'D' | 'd' ) ) - // InternalQLLexer.g:60:7: ( 'A' | 'a' ) ( 'N' | 'n' ) ( 'D' | 'd' ) - { - if ( input.LA(1)=='A'||input.LA(1)=='a' ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - if ( input.LA(1)=='N'||input.LA(1)=='n' ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - if ( input.LA(1)=='D'||input.LA(1)=='d' ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "AND" - - // $ANTLR start "OR" - public final void mOR() throws RecognitionException { - try { - int _type = OR; - int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:62:4: ( ( 'O' | 'o' ) ( 'R' | 'r' ) ) - // InternalQLLexer.g:62:6: ( 'O' | 'o' ) ( 'R' | 'r' ) - { - if ( input.LA(1)=='O'||input.LA(1)=='o' ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - if ( input.LA(1)=='R'||input.LA(1)=='r' ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "OR" - - // $ANTLR start "Comma" - public final void mComma() throws RecognitionException { - try { - int _type = Comma; - int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:64:7: ( ',' ) - // InternalQLLexer.g:64:9: ',' - { - match(','); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "Comma" - // $ANTLR start "RULE_OPEN_DOUBLE_BRACES" public final void mRULE_OPEN_DOUBLE_BRACES() throws RecognitionException { try { int _type = RULE_OPEN_DOUBLE_BRACES; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:66:25: ( '{{' ) - // InternalQLLexer.g:66:27: '{{' + // InternalQLLexer.g:58:25: ( '{{' ) + // InternalQLLexer.g:58:27: '{{' { match("{{"); @@ -1794,8 +1626,8 @@ public final void mRULE_CLOSE_DOUBLE_BRACES() throws RecognitionException { try { int _type = RULE_CLOSE_DOUBLE_BRACES; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:68:26: ( '}}' ) - // InternalQLLexer.g:68:28: '}}' + // InternalQLLexer.g:60:26: ( '}}' ) + // InternalQLLexer.g:60:28: '}}' { match("}}"); @@ -1815,11 +1647,11 @@ public final void mRULE_TERM_STRING() throws RecognitionException { try { int _type = RULE_TERM_STRING; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:70:18: ( '|' (~ ( '|' ) )* '|' ) - // InternalQLLexer.g:70:20: '|' (~ ( '|' ) )* '|' + // InternalQLLexer.g:62:18: ( '|' (~ ( '|' ) )* '|' ) + // InternalQLLexer.g:62:20: '|' (~ ( '|' ) )* '|' { match('|'); - // InternalQLLexer.g:70:24: (~ ( '|' ) )* + // InternalQLLexer.g:62:24: (~ ( '|' ) )* loop1: do { int alt1=2; @@ -1832,7 +1664,7 @@ public final void mRULE_TERM_STRING() throws RecognitionException { switch (alt1) { case 1 : - // InternalQLLexer.g:70:24: ~ ( '|' ) + // InternalQLLexer.g:62:24: ~ ( '|' ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='{')||(input.LA(1)>='}' && input.LA(1)<='\uFFFF') ) { input.consume(); @@ -1869,8 +1701,8 @@ public final void mRULE_REVERSED() throws RecognitionException { try { int _type = RULE_REVERSED; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:72:15: ( 'R' ) - // InternalQLLexer.g:72:17: 'R' + // InternalQLLexer.g:64:15: ( 'R' ) + // InternalQLLexer.g:64:17: 'R' { match('R'); @@ -1889,8 +1721,8 @@ public final void mRULE_TO() throws RecognitionException { try { int _type = RULE_TO; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:74:9: ( '..' ) - // InternalQLLexer.g:74:11: '..' + // InternalQLLexer.g:66:9: ( '..' ) + // InternalQLLexer.g:66:11: '..' { match(".."); @@ -1905,6 +1737,173 @@ public final void mRULE_TO() throws RecognitionException { } // $ANTLR end "RULE_TO" + // $ANTLR start "RULE_COMMA" + public final void mRULE_COMMA() throws RecognitionException { + try { + int _type = RULE_COMMA; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalQLLexer.g:68:12: ( ',' ) + // InternalQLLexer.g:68:14: ',' + { + match(','); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_COMMA" + + // $ANTLR start "RULE_CONJUNCTION" + public final void mRULE_CONJUNCTION() throws RecognitionException { + try { + int _type = RULE_CONJUNCTION; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalQLLexer.g:70:18: ( ( 'a' | 'A' ) ( 'n' | 'N' ) ( 'd' | 'D' ) ) + // InternalQLLexer.g:70:20: ( 'a' | 'A' ) ( 'n' | 'N' ) ( 'd' | 'D' ) + { + if ( input.LA(1)=='A'||input.LA(1)=='a' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='N'||input.LA(1)=='n' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='D'||input.LA(1)=='d' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_CONJUNCTION" + + // $ANTLR start "RULE_DISJUNCTION" + public final void mRULE_DISJUNCTION() throws RecognitionException { + try { + int _type = RULE_DISJUNCTION; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalQLLexer.g:72:18: ( ( 'o' | 'O' ) ( 'r' | 'R' ) ) + // InternalQLLexer.g:72:20: ( 'o' | 'O' ) ( 'r' | 'R' ) + { + if ( input.LA(1)=='O'||input.LA(1)=='o' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='R'||input.LA(1)=='r' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DISJUNCTION" + + // $ANTLR start "RULE_EXCLUSION" + public final void mRULE_EXCLUSION() throws RecognitionException { + try { + int _type = RULE_EXCLUSION; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalQLLexer.g:74:16: ( ( 'm' | 'M' ) ( 'i' | 'I' ) ( 'n' | 'N' ) ( 'u' | 'U' ) ( 's' | 'S' ) ) + // InternalQLLexer.g:74:18: ( 'm' | 'M' ) ( 'i' | 'I' ) ( 'n' | 'N' ) ( 'u' | 'U' ) ( 's' | 'S' ) + { + if ( input.LA(1)=='M'||input.LA(1)=='m' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='I'||input.LA(1)=='i' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='N'||input.LA(1)=='n' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='U'||input.LA(1)=='u' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + if ( input.LA(1)=='S'||input.LA(1)=='s' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_EXCLUSION" + // $ANTLR start "RULE_ZERO" public final void mRULE_ZERO() throws RecognitionException { try { @@ -2145,33 +2144,13 @@ public final void mRULE_CARET() throws RecognitionException { } // $ANTLR end "RULE_CARET" - // $ANTLR start "RULE_NOT" - public final void mRULE_NOT() throws RecognitionException { - try { - int _type = RULE_NOT; - int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:100:10: ( '!' ) - // InternalQLLexer.g:100:12: '!' - { - match('!'); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_NOT" - // $ANTLR start "RULE_DOT" public final void mRULE_DOT() throws RecognitionException { try { int _type = RULE_DOT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:102:10: ( '.' ) - // InternalQLLexer.g:102:12: '.' + // InternalQLLexer.g:100:10: ( '.' ) + // InternalQLLexer.g:100:12: '.' { match('.'); @@ -2190,8 +2169,8 @@ public final void mRULE_WILDCARD() throws RecognitionException { try { int _type = RULE_WILDCARD; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:104:15: ( '*' ) - // InternalQLLexer.g:104:17: '*' + // InternalQLLexer.g:102:15: ( '*' ) + // InternalQLLexer.g:102:17: '*' { match('*'); @@ -2210,8 +2189,8 @@ public final void mRULE_EQUAL() throws RecognitionException { try { int _type = RULE_EQUAL; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:106:12: ( '=' ) - // InternalQLLexer.g:106:14: '=' + // InternalQLLexer.g:104:12: ( '=' ) + // InternalQLLexer.g:104:14: '=' { match('='); @@ -2230,8 +2209,8 @@ public final void mRULE_NOT_EQUAL() throws RecognitionException { try { int _type = RULE_NOT_EQUAL; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:108:16: ( '!=' ) - // InternalQLLexer.g:108:18: '!=' + // InternalQLLexer.g:106:16: ( '!=' ) + // InternalQLLexer.g:106:18: '!=' { match("!="); @@ -2251,8 +2230,8 @@ public final void mRULE_LT() throws RecognitionException { try { int _type = RULE_LT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:110:9: ( '<' ) - // InternalQLLexer.g:110:11: '<' + // InternalQLLexer.g:108:9: ( '<' ) + // InternalQLLexer.g:108:11: '<' { match('<'); @@ -2271,8 +2250,8 @@ public final void mRULE_GT() throws RecognitionException { try { int _type = RULE_GT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:112:9: ( '>' ) - // InternalQLLexer.g:112:11: '>' + // InternalQLLexer.g:110:9: ( '>' ) + // InternalQLLexer.g:110:11: '>' { match('>'); @@ -2291,8 +2270,8 @@ public final void mRULE_DBL_LT() throws RecognitionException { try { int _type = RULE_DBL_LT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:114:13: ( '<<' ) - // InternalQLLexer.g:114:15: '<<' + // InternalQLLexer.g:112:13: ( '<<' ) + // InternalQLLexer.g:112:15: '<<' { match("<<"); @@ -2312,8 +2291,8 @@ public final void mRULE_DBL_GT() throws RecognitionException { try { int _type = RULE_DBL_GT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:116:13: ( '>>' ) - // InternalQLLexer.g:116:15: '>>' + // InternalQLLexer.g:114:13: ( '>>' ) + // InternalQLLexer.g:114:15: '>>' { match(">>"); @@ -2333,8 +2312,8 @@ public final void mRULE_LT_EM() throws RecognitionException { try { int _type = RULE_LT_EM; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:118:12: ( '!' ) - // InternalQLLexer.g:120:14: '>!' + // InternalQLLexer.g:118:12: ( '>!' ) + // InternalQLLexer.g:118:14: '>!' { match(">!"); @@ -2375,8 +2354,8 @@ public final void mRULE_GTE() throws RecognitionException { try { int _type = RULE_GTE; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:122:10: ( '>=' ) - // InternalQLLexer.g:122:12: '>=' + // InternalQLLexer.g:120:10: ( '>=' ) + // InternalQLLexer.g:120:12: '>=' { match(">="); @@ -2396,8 +2375,8 @@ public final void mRULE_LTE() throws RecognitionException { try { int _type = RULE_LTE; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:124:10: ( '<=' ) - // InternalQLLexer.g:124:12: '<=' + // InternalQLLexer.g:122:10: ( '<=' ) + // InternalQLLexer.g:122:12: '<=' { match("<="); @@ -2417,8 +2396,8 @@ public final void mRULE_HASH() throws RecognitionException { try { int _type = RULE_HASH; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:126:11: ( '#' ) - // InternalQLLexer.g:126:13: '#' + // InternalQLLexer.g:124:11: ( '#' ) + // InternalQLLexer.g:124:13: '#' { match('#'); @@ -2437,8 +2416,8 @@ public final void mRULE_WS() throws RecognitionException { try { int _type = RULE_WS; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:128:9: ( ( ' ' | '\\t' | '\\n' | '\\r' ) ) - // InternalQLLexer.g:128:11: ( ' ' | '\\t' | '\\n' | '\\r' ) + // InternalQLLexer.g:126:9: ( ( ' ' | '\\t' | '\\n' | '\\r' ) ) + // InternalQLLexer.g:126:11: ( ' ' | '\\t' | '\\n' | '\\r' ) { if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { input.consume(); @@ -2465,12 +2444,12 @@ public final void mRULE_ML_COMMENT() throws RecognitionException { try { int _type = RULE_ML_COMMENT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:130:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) - // InternalQLLexer.g:130:19: '/*' ( options {greedy=false; } : . )* '*/' + // InternalQLLexer.g:128:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) + // InternalQLLexer.g:128:19: '/*' ( options {greedy=false; } : . )* '*/' { match("/*"); - // InternalQLLexer.g:130:24: ( options {greedy=false; } : . )* + // InternalQLLexer.g:128:24: ( options {greedy=false; } : . )* loop2: do { int alt2=2; @@ -2495,7 +2474,7 @@ else if ( ((LA2_0>='\u0000' && LA2_0<=')')||(LA2_0>='+' && LA2_0<='\uFFFF')) ) { switch (alt2) { case 1 : - // InternalQLLexer.g:130:52: . + // InternalQLLexer.g:128:52: . { matchAny(); @@ -2525,12 +2504,12 @@ public final void mRULE_SL_COMMENT() throws RecognitionException { try { int _type = RULE_SL_COMMENT; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:132:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) - // InternalQLLexer.g:132:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? + // InternalQLLexer.g:130:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) + // InternalQLLexer.g:130:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? { match("//"); - // InternalQLLexer.g:132:24: (~ ( ( '\\n' | '\\r' ) ) )* + // InternalQLLexer.g:130:24: (~ ( ( '\\n' | '\\r' ) ) )* loop3: do { int alt3=2; @@ -2543,7 +2522,7 @@ public final void mRULE_SL_COMMENT() throws RecognitionException { switch (alt3) { case 1 : - // InternalQLLexer.g:132:24: ~ ( ( '\\n' | '\\r' ) ) + // InternalQLLexer.g:130:24: ~ ( ( '\\n' | '\\r' ) ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { input.consume(); @@ -2563,7 +2542,7 @@ public final void mRULE_SL_COMMENT() throws RecognitionException { } } while (true); - // InternalQLLexer.g:132:40: ( ( '\\r' )? '\\n' )? + // InternalQLLexer.g:130:40: ( ( '\\r' )? '\\n' )? int alt5=2; int LA5_0 = input.LA(1); @@ -2572,9 +2551,9 @@ public final void mRULE_SL_COMMENT() throws RecognitionException { } switch (alt5) { case 1 : - // InternalQLLexer.g:132:41: ( '\\r' )? '\\n' + // InternalQLLexer.g:130:41: ( '\\r' )? '\\n' { - // InternalQLLexer.g:132:41: ( '\\r' )? + // InternalQLLexer.g:130:41: ( '\\r' )? int alt4=2; int LA4_0 = input.LA(1); @@ -2583,7 +2562,7 @@ public final void mRULE_SL_COMMENT() throws RecognitionException { } switch (alt4) { case 1 : - // InternalQLLexer.g:132:41: '\\r' + // InternalQLLexer.g:130:41: '\\r' { match('\r'); @@ -2615,10 +2594,10 @@ public final void mRULE_STRING() throws RecognitionException { try { int _type = RULE_STRING; int _channel = DEFAULT_TOKEN_CHANNEL; - // InternalQLLexer.g:134:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) - // InternalQLLexer.g:134:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + // InternalQLLexer.g:132:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) + // InternalQLLexer.g:132:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) { - // InternalQLLexer.g:134:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + // InternalQLLexer.g:132:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) int alt8=2; int LA8_0 = input.LA(1); @@ -2636,10 +2615,10 @@ else if ( (LA8_0=='\'') ) { } switch (alt8) { case 1 : - // InternalQLLexer.g:134:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' + // InternalQLLexer.g:132:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' { match('\"'); - // InternalQLLexer.g:134:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* + // InternalQLLexer.g:132:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* loop6: do { int alt6=3; @@ -2655,7 +2634,7 @@ else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>= switch (alt6) { case 1 : - // InternalQLLexer.g:134:21: '\\\\' . + // InternalQLLexer.g:132:21: '\\\\' . { match('\\'); matchAny(); @@ -2663,7 +2642,7 @@ else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>= } break; case 2 : - // InternalQLLexer.g:134:28: ~ ( ( '\\\\' | '\"' ) ) + // InternalQLLexer.g:132:28: ~ ( ( '\\\\' | '\"' ) ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { input.consume(); @@ -2688,10 +2667,10 @@ else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>= } break; case 2 : - // InternalQLLexer.g:134:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' + // InternalQLLexer.g:132:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' { match('\''); - // InternalQLLexer.g:134:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* + // InternalQLLexer.g:132:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* loop7: do { int alt7=3; @@ -2707,7 +2686,7 @@ else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>= switch (alt7) { case 1 : - // InternalQLLexer.g:134:54: '\\\\' . + // InternalQLLexer.g:132:54: '\\\\' . { match('\\'); matchAny(); @@ -2715,7 +2694,7 @@ else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>= } break; case 2 : - // InternalQLLexer.g:134:61: ~ ( ( '\\\\' | '\\'' ) ) + // InternalQLLexer.g:132:61: ~ ( ( '\\\\' | '\\'' ) ) { if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { input.consume(); @@ -2754,8 +2733,8 @@ else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>= // $ANTLR end "RULE_STRING" public void mTokens() throws RecognitionException { - // InternalQLLexer.g:1:8: ( CaseSignificanceId | LanguageRefSetId | AcceptableIn | LanguageCode | Description | PreferredIn | ModuleId | Concept | Active | TypeId | MINUS | Exact | False | Match | Regex | Term | True | AND | OR | Comma | RULE_OPEN_DOUBLE_BRACES | RULE_CLOSE_DOUBLE_BRACES | RULE_TERM_STRING | RULE_REVERSED | RULE_TO | RULE_ZERO | RULE_DIGIT_NONZERO | RULE_COLON | RULE_CURLY_OPEN | RULE_CURLY_CLOSE | RULE_ROUND_OPEN | RULE_ROUND_CLOSE | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE | RULE_PLUS | RULE_DASH | RULE_CARET | RULE_NOT | RULE_DOT | RULE_WILDCARD | RULE_EQUAL | RULE_NOT_EQUAL | RULE_LT | RULE_GT | RULE_DBL_LT | RULE_DBL_GT | RULE_LT_EM | RULE_GT_EM | RULE_GTE | RULE_LTE | RULE_HASH | RULE_WS | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_STRING ) - int alt9=55; + // InternalQLLexer.g:1:8: ( CaseSignificanceId | LanguageRefSetId | AcceptableIn | LanguageCode | Description | PreferredIn | ModuleId | Concept | Active | TypeId | Exact | False | Match | Regex | Term | True | RULE_OPEN_DOUBLE_BRACES | RULE_CLOSE_DOUBLE_BRACES | RULE_TERM_STRING | RULE_REVERSED | RULE_TO | RULE_COMMA | RULE_CONJUNCTION | RULE_DISJUNCTION | RULE_EXCLUSION | RULE_ZERO | RULE_DIGIT_NONZERO | RULE_COLON | RULE_CURLY_OPEN | RULE_CURLY_CLOSE | RULE_ROUND_OPEN | RULE_ROUND_CLOSE | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE | RULE_PLUS | RULE_DASH | RULE_CARET | RULE_DOT | RULE_WILDCARD | RULE_EQUAL | RULE_NOT_EQUAL | RULE_LT | RULE_GT | RULE_DBL_LT | RULE_DBL_GT | RULE_LT_EM | RULE_GT_EM | RULE_GTE | RULE_LTE | RULE_HASH | RULE_WS | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_STRING ) + int alt9=54; alt9 = dfa9.predict(input); switch (alt9) { case 1 : @@ -2829,315 +2808,308 @@ public void mTokens() throws RecognitionException { } break; case 11 : - // InternalQLLexer.g:1:127: MINUS + // InternalQLLexer.g:1:127: Exact { - mMINUS(); + mExact(); } break; case 12 : - // InternalQLLexer.g:1:133: Exact + // InternalQLLexer.g:1:133: False { - mExact(); + mFalse(); } break; case 13 : - // InternalQLLexer.g:1:139: False + // InternalQLLexer.g:1:139: Match { - mFalse(); + mMatch(); } break; case 14 : - // InternalQLLexer.g:1:145: Match + // InternalQLLexer.g:1:145: Regex { - mMatch(); + mRegex(); } break; case 15 : - // InternalQLLexer.g:1:151: Regex + // InternalQLLexer.g:1:151: Term { - mRegex(); + mTerm(); } break; case 16 : - // InternalQLLexer.g:1:157: Term + // InternalQLLexer.g:1:156: True { - mTerm(); + mTrue(); } break; case 17 : - // InternalQLLexer.g:1:162: True + // InternalQLLexer.g:1:161: RULE_OPEN_DOUBLE_BRACES { - mTrue(); + mRULE_OPEN_DOUBLE_BRACES(); } break; case 18 : - // InternalQLLexer.g:1:167: AND + // InternalQLLexer.g:1:185: RULE_CLOSE_DOUBLE_BRACES { - mAND(); + mRULE_CLOSE_DOUBLE_BRACES(); } break; case 19 : - // InternalQLLexer.g:1:171: OR + // InternalQLLexer.g:1:210: RULE_TERM_STRING { - mOR(); + mRULE_TERM_STRING(); } break; case 20 : - // InternalQLLexer.g:1:174: Comma + // InternalQLLexer.g:1:227: RULE_REVERSED { - mComma(); + mRULE_REVERSED(); } break; case 21 : - // InternalQLLexer.g:1:180: RULE_OPEN_DOUBLE_BRACES + // InternalQLLexer.g:1:241: RULE_TO { - mRULE_OPEN_DOUBLE_BRACES(); + mRULE_TO(); } break; case 22 : - // InternalQLLexer.g:1:204: RULE_CLOSE_DOUBLE_BRACES + // InternalQLLexer.g:1:249: RULE_COMMA { - mRULE_CLOSE_DOUBLE_BRACES(); + mRULE_COMMA(); } break; case 23 : - // InternalQLLexer.g:1:229: RULE_TERM_STRING + // InternalQLLexer.g:1:260: RULE_CONJUNCTION { - mRULE_TERM_STRING(); + mRULE_CONJUNCTION(); } break; case 24 : - // InternalQLLexer.g:1:246: RULE_REVERSED + // InternalQLLexer.g:1:277: RULE_DISJUNCTION { - mRULE_REVERSED(); + mRULE_DISJUNCTION(); } break; case 25 : - // InternalQLLexer.g:1:260: RULE_TO + // InternalQLLexer.g:1:294: RULE_EXCLUSION { - mRULE_TO(); + mRULE_EXCLUSION(); } break; case 26 : - // InternalQLLexer.g:1:268: RULE_ZERO + // InternalQLLexer.g:1:309: RULE_ZERO { mRULE_ZERO(); } break; case 27 : - // InternalQLLexer.g:1:278: RULE_DIGIT_NONZERO + // InternalQLLexer.g:1:319: RULE_DIGIT_NONZERO { mRULE_DIGIT_NONZERO(); } break; case 28 : - // InternalQLLexer.g:1:297: RULE_COLON + // InternalQLLexer.g:1:338: RULE_COLON { mRULE_COLON(); } break; case 29 : - // InternalQLLexer.g:1:308: RULE_CURLY_OPEN + // InternalQLLexer.g:1:349: RULE_CURLY_OPEN { mRULE_CURLY_OPEN(); } break; case 30 : - // InternalQLLexer.g:1:324: RULE_CURLY_CLOSE + // InternalQLLexer.g:1:365: RULE_CURLY_CLOSE { mRULE_CURLY_CLOSE(); } break; case 31 : - // InternalQLLexer.g:1:341: RULE_ROUND_OPEN + // InternalQLLexer.g:1:382: RULE_ROUND_OPEN { mRULE_ROUND_OPEN(); } break; case 32 : - // InternalQLLexer.g:1:357: RULE_ROUND_CLOSE + // InternalQLLexer.g:1:398: RULE_ROUND_CLOSE { mRULE_ROUND_CLOSE(); } break; case 33 : - // InternalQLLexer.g:1:374: RULE_SQUARE_OPEN + // InternalQLLexer.g:1:415: RULE_SQUARE_OPEN { mRULE_SQUARE_OPEN(); } break; case 34 : - // InternalQLLexer.g:1:391: RULE_SQUARE_CLOSE + // InternalQLLexer.g:1:432: RULE_SQUARE_CLOSE { mRULE_SQUARE_CLOSE(); } break; case 35 : - // InternalQLLexer.g:1:409: RULE_PLUS + // InternalQLLexer.g:1:450: RULE_PLUS { mRULE_PLUS(); } break; case 36 : - // InternalQLLexer.g:1:419: RULE_DASH + // InternalQLLexer.g:1:460: RULE_DASH { mRULE_DASH(); } break; case 37 : - // InternalQLLexer.g:1:429: RULE_CARET + // InternalQLLexer.g:1:470: RULE_CARET { mRULE_CARET(); } break; case 38 : - // InternalQLLexer.g:1:440: RULE_NOT - { - mRULE_NOT(); - - } - break; - case 39 : - // InternalQLLexer.g:1:449: RULE_DOT + // InternalQLLexer.g:1:481: RULE_DOT { mRULE_DOT(); } break; - case 40 : - // InternalQLLexer.g:1:458: RULE_WILDCARD + case 39 : + // InternalQLLexer.g:1:490: RULE_WILDCARD { mRULE_WILDCARD(); } break; - case 41 : - // InternalQLLexer.g:1:472: RULE_EQUAL + case 40 : + // InternalQLLexer.g:1:504: RULE_EQUAL { mRULE_EQUAL(); } break; - case 42 : - // InternalQLLexer.g:1:483: RULE_NOT_EQUAL + case 41 : + // InternalQLLexer.g:1:515: RULE_NOT_EQUAL { mRULE_NOT_EQUAL(); } break; - case 43 : - // InternalQLLexer.g:1:498: RULE_LT + case 42 : + // InternalQLLexer.g:1:530: RULE_LT { mRULE_LT(); } break; - case 44 : - // InternalQLLexer.g:1:506: RULE_GT + case 43 : + // InternalQLLexer.g:1:538: RULE_GT { mRULE_GT(); } break; - case 45 : - // InternalQLLexer.g:1:514: RULE_DBL_LT + case 44 : + // InternalQLLexer.g:1:546: RULE_DBL_LT { mRULE_DBL_LT(); } break; - case 46 : - // InternalQLLexer.g:1:526: RULE_DBL_GT + case 45 : + // InternalQLLexer.g:1:558: RULE_DBL_GT { mRULE_DBL_GT(); } break; - case 47 : - // InternalQLLexer.g:1:538: RULE_LT_EM + case 46 : + // InternalQLLexer.g:1:570: RULE_LT_EM { mRULE_LT_EM(); } break; - case 48 : - // InternalQLLexer.g:1:549: RULE_GT_EM + case 47 : + // InternalQLLexer.g:1:581: RULE_GT_EM { mRULE_GT_EM(); } break; - case 49 : - // InternalQLLexer.g:1:560: RULE_GTE + case 48 : + // InternalQLLexer.g:1:592: RULE_GTE { mRULE_GTE(); } break; - case 50 : - // InternalQLLexer.g:1:569: RULE_LTE + case 49 : + // InternalQLLexer.g:1:601: RULE_LTE { mRULE_LTE(); } break; - case 51 : - // InternalQLLexer.g:1:578: RULE_HASH + case 50 : + // InternalQLLexer.g:1:610: RULE_HASH { mRULE_HASH(); } break; - case 52 : - // InternalQLLexer.g:1:588: RULE_WS + case 51 : + // InternalQLLexer.g:1:620: RULE_WS { mRULE_WS(); } break; - case 53 : - // InternalQLLexer.g:1:596: RULE_ML_COMMENT + case 52 : + // InternalQLLexer.g:1:628: RULE_ML_COMMENT { mRULE_ML_COMMENT(); } break; - case 54 : - // InternalQLLexer.g:1:612: RULE_SL_COMMENT + case 53 : + // InternalQLLexer.g:1:644: RULE_SL_COMMENT { mRULE_SL_COMMENT(); } break; - case 55 : - // InternalQLLexer.g:1:628: RULE_STRING + case 54 : + // InternalQLLexer.g:1:660: RULE_STRING { mRULE_STRING(); @@ -3151,96 +3123,97 @@ public void mTokens() throws RecognitionException { protected DFA9 dfa9 = new DFA9(this); static final String DFA9_eotS = - "\12\uffff\1\60\2\uffff\1\62\1\64\2\uffff\1\66\12\uffff\1\70\2\uffff\1\74\1\100\54\uffff"; + "\12\uffff\1\60\1\62\1\64\2\uffff\1\66\17\uffff\1\72\1\76\52\uffff"; static final String DFA9_eofS = - "\115\uffff"; + "\113\uffff"; static final String DFA9_minS = - "\1\11\2\101\1\103\2\uffff\1\101\1\105\2\uffff\1\105\2\uffff\1\173\1\175\2\uffff\1\56\12\uffff\1\75\2\uffff\2\41\2\uffff\1\52\3\uffff\1\116\1\103\32\uffff\1\107\2\uffff\1\125\1\101\1\107\1\105\1\103\2\uffff"; + "\1\11\2\101\1\103\2\uffff\1\101\1\105\2\uffff\1\105\1\173\1\175\2\uffff\1\56\17\uffff\2\41\2\uffff\1\52\3\uffff\1\116\1\103\30\uffff\1\107\2\uffff\1\125\1\101\1\107\1\105\1\103\2\uffff"; static final String DFA9_maxS = - "\1\175\1\157\1\141\1\156\2\uffff\1\157\1\171\2\uffff\1\145\2\uffff\1\173\1\175\2\uffff\1\56\12\uffff\1\75\2\uffff\1\75\1\76\2\uffff\1\57\3\uffff\1\156\1\164\32\uffff\1\147\2\uffff\1\165\1\141\1\147\1\145\1\162\2\uffff"; + "\1\175\1\157\1\141\1\156\2\uffff\1\157\1\171\2\uffff\1\145\1\173\1\175\2\uffff\1\56\17\uffff\1\75\1\76\2\uffff\1\57\3\uffff\1\156\1\164\30\uffff\1\147\2\uffff\1\165\1\141\1\147\1\145\1\162\2\uffff"; static final String DFA9_acceptS = - "\4\uffff\1\5\1\6\2\uffff\1\14\1\15\1\uffff\1\23\1\24\2\uffff\1\27\1\17\1\uffff\1\32\1\33\1\34\1\37\1\40\1\41\1\42\1\43\1\44\1\45\1\uffff\1\50\1\51\2\uffff\1\63\1\64\1\uffff\1\67\1\1\1\10\2\uffff\1\22\1\7\1\13\1\16\1\12\1\20\1\21\1\30\1\25\1\35\1\26\1\36\1\31\1\47\1\52\1\46\1\55\1\57\1\62\1\53\1\56\1\60\1\61\1\54\1\65\1\66\1\uffff\1\3\1\11\5\uffff\1\2\1\4"; + "\4\uffff\1\5\1\6\2\uffff\1\13\1\14\3\uffff\1\23\1\16\1\uffff\1\26\1\30\1\32\1\33\1\34\1\37\1\40\1\41\1\42\1\43\1\44\1\45\1\47\1\50\1\51\2\uffff\1\62\1\63\1\uffff\1\66\1\1\1\10\2\uffff\1\27\1\7\1\15\1\31\1\12\1\17\1\20\1\24\1\21\1\35\1\22\1\36\1\25\1\46\1\54\1\56\1\61\1\52\1\55\1\57\1\60\1\53\1\64\1\65\1\uffff\1\3\1\11\5\uffff\1\2\1\4"; static final String DFA9_specialS = - "\115\uffff}>"; - static final String[] DFA9_transitionS = { - "\2\42\2\uffff\1\42\22\uffff\1\42\1\34\1\44\1\41\3\uffff\1\44\1\25\1\26\1\35\1\31\1\14\1\32\1\21\1\43\1\22\11\23\1\24\1\uffff\1\37\1\36\1\40\2\uffff\1\3\1\uffff\1\1\1\4\1\10\1\11\5\uffff\1\2\1\6\1\uffff\1\13\1\5\1\uffff\1\12\1\uffff\1\7\6\uffff\1\27\1\uffff\1\30\1\33\2\uffff\1\3\1\uffff\1\1\1\4\1\10\1\11\5\uffff\1\2\1\6\1\uffff\1\13\1\5\1\uffff\1\20\1\uffff\1\7\6\uffff\1\15\1\17\1\16", - "\1\45\15\uffff\1\46\21\uffff\1\45\15\uffff\1\46", - "\1\47\37\uffff\1\47", - "\1\50\12\uffff\1\51\24\uffff\1\50\12\uffff\1\51", - "", - "", - "\1\54\7\uffff\1\53\5\uffff\1\52\21\uffff\1\54\7\uffff\1\53\5\uffff\1\52", - "\1\56\14\uffff\1\57\6\uffff\1\55\13\uffff\1\56\14\uffff\1\57\6\uffff\1\55", - "", - "", - "\1\20\37\uffff\1\20", - "", - "", - "\1\61", - "\1\63", - "", - "", - "\1\65", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "\1\67", - "", - "", - "\1\72\32\uffff\1\71\1\73", - "\1\76\33\uffff\1\77\1\75", - "", - "", - "\1\101\4\uffff\1\102", - "", - "", - "", - "\1\103\37\uffff\1\103", - "\1\104\20\uffff\1\105\16\uffff\1\104\20\uffff\1\105", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "\1\106\37\uffff\1\106", - "", - "", - "\1\107\37\uffff\1\107", - "\1\110\37\uffff\1\110", - "\1\111\37\uffff\1\111", - "\1\112\37\uffff\1\112", - "\1\114\16\uffff\1\113\20\uffff\1\114\16\uffff\1\113", - "", - "" - }; + "\113\uffff}>"; + static final String[] DFA9_transitionS = DFA9_transitionS_.DFA9_transitionS; + private static final class DFA9_transitionS_ { + static final String[] DFA9_transitionS = { + "\2\42\2\uffff\1\42\22\uffff\1\42\1\36\1\44\1\41\3\uffff\1\44\1\25\1\26\1\34\1\31\1\20\1\32\1\17\1\43\1\22\11\23\1\24\1\uffff\1\37\1\35\1\40\2\uffff\1\3\1\uffff\1\1\1\4\1\10\1\11\5\uffff\1\2\1\6\1\uffff\1\21\1\5\1\uffff\1\12\1\uffff\1\7\6\uffff\1\27\1\uffff\1\30\1\33\2\uffff\1\3\1\uffff\1\1\1\4\1\10\1\11\5\uffff\1\2\1\6\1\uffff\1\21\1\5\1\uffff\1\16\1\uffff\1\7\6\uffff\1\13\1\15\1\14", + "\1\45\15\uffff\1\46\21\uffff\1\45\15\uffff\1\46", + "\1\47\37\uffff\1\47", + "\1\50\12\uffff\1\51\24\uffff\1\50\12\uffff\1\51", + "", + "", + "\1\53\7\uffff\1\54\5\uffff\1\52\21\uffff\1\53\7\uffff\1\54\5\uffff\1\52", + "\1\56\14\uffff\1\57\6\uffff\1\55\13\uffff\1\56\14\uffff\1\57\6\uffff\1\55", + "", + "", + "\1\16\37\uffff\1\16", + "\1\61", + "\1\63", + "", + "", + "\1\65", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\1\70\32\uffff\1\67\1\71", + "\1\74\33\uffff\1\75\1\73", + "", + "", + "\1\77\4\uffff\1\100", + "", + "", + "", + "\1\101\37\uffff\1\101", + "\1\102\20\uffff\1\103\16\uffff\1\102\20\uffff\1\103", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\1\104\37\uffff\1\104", + "", + "", + "\1\105\37\uffff\1\105", + "\1\106\37\uffff\1\106", + "\1\107\37\uffff\1\107", + "\1\110\37\uffff\1\110", + "\1\112\16\uffff\1\111\20\uffff\1\112\16\uffff\1\111", + "", + "" + }; + } static final short[] DFA9_eot = DFA.unpackEncodedString(DFA9_eotS); static final short[] DFA9_eof = DFA.unpackEncodedString(DFA9_eofS); @@ -3272,7 +3245,7 @@ public DFA9(BaseRecognizer recognizer) { this.transition = DFA9_transition; } public String getDescription() { - return "1:1: Tokens : ( CaseSignificanceId | LanguageRefSetId | AcceptableIn | LanguageCode | Description | PreferredIn | ModuleId | Concept | Active | TypeId | MINUS | Exact | False | Match | Regex | Term | True | AND | OR | Comma | RULE_OPEN_DOUBLE_BRACES | RULE_CLOSE_DOUBLE_BRACES | RULE_TERM_STRING | RULE_REVERSED | RULE_TO | RULE_ZERO | RULE_DIGIT_NONZERO | RULE_COLON | RULE_CURLY_OPEN | RULE_CURLY_CLOSE | RULE_ROUND_OPEN | RULE_ROUND_CLOSE | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE | RULE_PLUS | RULE_DASH | RULE_CARET | RULE_NOT | RULE_DOT | RULE_WILDCARD | RULE_EQUAL | RULE_NOT_EQUAL | RULE_LT | RULE_GT | RULE_DBL_LT | RULE_DBL_GT | RULE_LT_EM | RULE_GT_EM | RULE_GTE | RULE_LTE | RULE_HASH | RULE_WS | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_STRING );"; + return "1:1: Tokens : ( CaseSignificanceId | LanguageRefSetId | AcceptableIn | LanguageCode | Description | PreferredIn | ModuleId | Concept | Active | TypeId | Exact | False | Match | Regex | Term | True | RULE_OPEN_DOUBLE_BRACES | RULE_CLOSE_DOUBLE_BRACES | RULE_TERM_STRING | RULE_REVERSED | RULE_TO | RULE_COMMA | RULE_CONJUNCTION | RULE_DISJUNCTION | RULE_EXCLUSION | RULE_ZERO | RULE_DIGIT_NONZERO | RULE_COLON | RULE_CURLY_OPEN | RULE_CURLY_CLOSE | RULE_ROUND_OPEN | RULE_ROUND_CLOSE | RULE_SQUARE_OPEN | RULE_SQUARE_CLOSE | RULE_PLUS | RULE_DASH | RULE_CARET | RULE_DOT | RULE_WILDCARD | RULE_EQUAL | RULE_NOT_EQUAL | RULE_LT | RULE_GT | RULE_DBL_LT | RULE_DBL_GT | RULE_LT_EM | RULE_GT_EM | RULE_GTE | RULE_LTE | RULE_HASH | RULE_WS | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_STRING );"; } } diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/lexer/InternalQLLexer.tokens b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/lexer/InternalQLLexer.tokens index 4c1006dc2a4..7722fa93508 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/lexer/InternalQLLexer.tokens +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/parser/antlr/lexer/InternalQLLexer.tokens @@ -1,55 +1,54 @@ -AND=21 AcceptableIn=6 Active=12 CaseSignificanceId=4 -Comma=23 Concept=11 Description=8 -Exact=15 -False=16 +Exact=14 +False=15 LanguageCode=7 LanguageRefSetId=5 -MINUS=14 -Match=17 +Match=16 ModuleId=10 -OR=22 PreferredIn=9 RULE_CARET=40 -RULE_CLOSE_DOUBLE_BRACES=25 +RULE_CLOSE_DOUBLE_BRACES=21 RULE_COLON=31 +RULE_COMMA=25 +RULE_CONJUNCTION=26 RULE_CURLY_CLOSE=33 RULE_CURLY_OPEN=32 RULE_DASH=39 -RULE_DBL_GT=49 -RULE_DBL_LT=48 +RULE_DBL_GT=48 +RULE_DBL_LT=47 RULE_DIGIT_NONZERO=30 -RULE_DOT=42 -RULE_EQUAL=44 -RULE_GT=47 -RULE_GTE=52 -RULE_GT_EM=51 -RULE_HASH=54 -RULE_LT=46 -RULE_LTE=53 -RULE_LT_EM=50 -RULE_ML_COMMENT=56 -RULE_NOT=41 -RULE_NOT_EQUAL=45 -RULE_OPEN_DOUBLE_BRACES=24 +RULE_DISJUNCTION=27 +RULE_DOT=41 +RULE_EQUAL=43 +RULE_EXCLUSION=28 +RULE_GT=46 +RULE_GTE=51 +RULE_GT_EM=50 +RULE_HASH=53 +RULE_LT=45 +RULE_LTE=52 +RULE_LT_EM=49 +RULE_ML_COMMENT=55 +RULE_NOT_EQUAL=44 +RULE_OPEN_DOUBLE_BRACES=20 RULE_PLUS=38 -RULE_REVERSED=27 +RULE_REVERSED=23 RULE_ROUND_CLOSE=35 RULE_ROUND_OPEN=34 -RULE_SL_COMMENT=57 +RULE_SL_COMMENT=56 RULE_SQUARE_CLOSE=37 RULE_SQUARE_OPEN=36 -RULE_STRING=58 -RULE_TERM_STRING=26 -RULE_TO=28 -RULE_WILDCARD=43 -RULE_WS=55 +RULE_STRING=57 +RULE_TERM_STRING=22 +RULE_TO=24 +RULE_WILDCARD=42 +RULE_WS=54 RULE_ZERO=29 -Regex=18 -Term=19 -True=20 +Regex=17 +Term=18 +True=19 TypeId=13 diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/AcceptableInFilter.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/AcceptableInFilter.java index 18465645d09..da6efddf45c 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/AcceptableInFilter.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/AcceptableInFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface AcceptableInFilter extends PropertyFilter /** * Returns the value of the 'Language Ref Set Id' containment reference. * - *

      - * If the meaning of the 'Language Ref Set Id' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Language Ref Set Id' containment reference. * @see #setLanguageRefSetId(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ActiveFilter.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ActiveFilter.java index e2cd395dac6..d471922e304 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ActiveFilter.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ActiveFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,10 +39,6 @@ public interface ActiveFilter extends PropertyFilter * Returns the value of the 'Domain' attribute. * The literals are from the enumeration {@link com.b2international.snowowl.snomed.ql.ql.Domain}. * - *

      - * If the meaning of the 'Domain' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Domain' attribute. * @see com.b2international.snowowl.snomed.ql.ql.Domain @@ -67,10 +63,6 @@ public interface ActiveFilter extends PropertyFilter /** * Returns the value of the 'Active' attribute. * - *

      - * If the meaning of the 'Active' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Active' attribute. * @see #setActive(boolean) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/CaseSignificanceFilter.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/CaseSignificanceFilter.java index 418d1d3e2ee..6d8b159f074 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/CaseSignificanceFilter.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/CaseSignificanceFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface CaseSignificanceFilter extends PropertyFilter /** * Returns the value of the 'Case Significance Id' containment reference. * - *

      - * If the meaning of the 'Case Significance Id' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Case Significance Id' containment reference. * @see #setCaseSignificanceId(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Conjunction.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ConjunctionFilter.java similarity index 75% rename from snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Conjunction.java rename to snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ConjunctionFilter.java index 9037f593b7c..84a3f806576 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Conjunction.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ConjunctionFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,41 +18,37 @@ /** * - * A representation of the model object 'Conjunction'. + * A representation of the model object 'Conjunction Filter'. * * *

      * The following features are supported: *

      *
        - *
      • {@link com.b2international.snowowl.snomed.ql.ql.Conjunction#getLeft Left}
      • - *
      • {@link com.b2international.snowowl.snomed.ql.ql.Conjunction#getRight Right}
      • + *
      • {@link com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter#getLeft Left}
      • + *
      • {@link com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter#getRight Right}
      • *
      * - * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getConjunction() + * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getConjunctionFilter() * @model * @generated */ -public interface Conjunction extends Filter +public interface ConjunctionFilter extends Filter { /** * Returns the value of the 'Left' containment reference. * - *

      - * If the meaning of the 'Left' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Left' containment reference. * @see #setLeft(Filter) - * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getConjunction_Left() + * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getConjunctionFilter_Left() * @model containment="true" * @generated */ Filter getLeft(); /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.ql.ql.Conjunction#getLeft Left}' containment reference. + * Sets the value of the '{@link com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter#getLeft Left}' containment reference. * * * @param value the new value of the 'Left' containment reference. @@ -64,21 +60,17 @@ public interface Conjunction extends Filter /** * Returns the value of the 'Right' containment reference. * - *

      - * If the meaning of the 'Right' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Right' containment reference. * @see #setRight(Filter) - * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getConjunction_Right() + * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getConjunctionFilter_Right() * @model containment="true" * @generated */ Filter getRight(); /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.ql.ql.Conjunction#getRight Right}' containment reference. + * Sets the value of the '{@link com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter#getRight Right}' containment reference. * * * @param value the new value of the 'Right' containment reference. @@ -87,4 +79,4 @@ public interface Conjunction extends Filter */ void setRight(Filter value); -} // Conjunction +} // ConjunctionFilter diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Disjunction.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/DisjunctionFilter.java similarity index 75% rename from snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Disjunction.java rename to snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/DisjunctionFilter.java index 941f34765cb..39371d8d8c6 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Disjunction.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/DisjunctionFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,41 +18,37 @@ /** * - * A representation of the model object 'Disjunction'. + * A representation of the model object 'Disjunction Filter'. * * *

      * The following features are supported: *

      *
        - *
      • {@link com.b2international.snowowl.snomed.ql.ql.Disjunction#getLeft Left}
      • - *
      • {@link com.b2international.snowowl.snomed.ql.ql.Disjunction#getRight Right}
      • + *
      • {@link com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter#getLeft Left}
      • + *
      • {@link com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter#getRight Right}
      • *
      * - * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getDisjunction() + * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getDisjunctionFilter() * @model * @generated */ -public interface Disjunction extends Filter +public interface DisjunctionFilter extends Filter { /** * Returns the value of the 'Left' containment reference. * - *

      - * If the meaning of the 'Left' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Left' containment reference. * @see #setLeft(Filter) - * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getDisjunction_Left() + * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getDisjunctionFilter_Left() * @model containment="true" * @generated */ Filter getLeft(); /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.ql.ql.Disjunction#getLeft Left}' containment reference. + * Sets the value of the '{@link com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter#getLeft Left}' containment reference. * * * @param value the new value of the 'Left' containment reference. @@ -64,21 +60,17 @@ public interface Disjunction extends Filter /** * Returns the value of the 'Right' containment reference. * - *

      - * If the meaning of the 'Right' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Right' containment reference. * @see #setRight(Filter) - * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getDisjunction_Right() + * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getDisjunctionFilter_Right() * @model containment="true" * @generated */ Filter getRight(); /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.ql.ql.Disjunction#getRight Right}' containment reference. + * Sets the value of the '{@link com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter#getRight Right}' containment reference. * * * @param value the new value of the 'Right' containment reference. @@ -87,4 +79,4 @@ public interface Disjunction extends Filter */ void setRight(Filter value); -} // Disjunction +} // DisjunctionFilter diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Domain.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Domain.java index b3b730e6d14..5430183e25f 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Domain.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Domain.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,10 +55,6 @@ public enum Domain implements Enumerator /** * The 'CONCEPT' literal value. * - *

      - * If the meaning of 'CONCEPT' literal object isn't clear, - * there really should be more of a description here... - *

      * * @see #CONCEPT * @model literal="Concept" @@ -70,10 +66,6 @@ public enum Domain implements Enumerator /** * The 'DESCRIPTION' literal value. * - *

      - * If the meaning of 'DESCRIPTION' literal object isn't clear, - * there really should be more of a description here... - *

      * * @see #DESCRIPTION * @model literal="Description" @@ -202,6 +194,7 @@ private Domain(int value, String name, String literal) * * @generated */ + @Override public int getValue() { return value; @@ -212,6 +205,7 @@ public int getValue() * * @generated */ + @Override public String getName() { return name; @@ -222,6 +216,7 @@ public String getName() * * @generated */ + @Override public String getLiteral() { return literal; diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/DomainQuery.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/DomainQuery.java index d949f4bce1b..907e49c8f6c 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/DomainQuery.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/DomainQuery.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,10 +39,6 @@ public interface DomainQuery extends SubQuery /** * Returns the value of the 'Ecl' containment reference. * - *

      - * If the meaning of the 'Ecl' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Ecl' containment reference. * @see #setEcl(ExpressionConstraint) @@ -65,10 +61,6 @@ public interface DomainQuery extends SubQuery /** * Returns the value of the 'Filter' containment reference. * - *

      - * If the meaning of the 'Filter' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Filter' containment reference. * @see #setFilter(Filter) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Exclusion.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ExclusionFilter.java similarity index 75% rename from snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Exclusion.java rename to snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ExclusionFilter.java index 1f7f01a2f51..3d1c685066c 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Exclusion.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ExclusionFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,41 +18,37 @@ /** * - * A representation of the model object 'Exclusion'. + * A representation of the model object 'Exclusion Filter'. * * *

      * The following features are supported: *

      *
        - *
      • {@link com.b2international.snowowl.snomed.ql.ql.Exclusion#getLeft Left}
      • - *
      • {@link com.b2international.snowowl.snomed.ql.ql.Exclusion#getRight Right}
      • + *
      • {@link com.b2international.snowowl.snomed.ql.ql.ExclusionFilter#getLeft Left}
      • + *
      • {@link com.b2international.snowowl.snomed.ql.ql.ExclusionFilter#getRight Right}
      • *
      * - * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getExclusion() + * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getExclusionFilter() * @model * @generated */ -public interface Exclusion extends Filter +public interface ExclusionFilter extends Filter { /** * Returns the value of the 'Left' containment reference. * - *

      - * If the meaning of the 'Left' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Left' containment reference. * @see #setLeft(PropertyFilter) - * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getExclusion_Left() + * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getExclusionFilter_Left() * @model containment="true" * @generated */ PropertyFilter getLeft(); /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.ql.ql.Exclusion#getLeft Left}' containment reference. + * Sets the value of the '{@link com.b2international.snowowl.snomed.ql.ql.ExclusionFilter#getLeft Left}' containment reference. * * * @param value the new value of the 'Left' containment reference. @@ -64,21 +60,17 @@ public interface Exclusion extends Filter /** * Returns the value of the 'Right' containment reference. * - *

      - * If the meaning of the 'Right' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Right' containment reference. * @see #setRight(PropertyFilter) - * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getExclusion_Right() + * @see com.b2international.snowowl.snomed.ql.ql.QlPackage#getExclusionFilter_Right() * @model containment="true" * @generated */ PropertyFilter getRight(); /** - * Sets the value of the '{@link com.b2international.snowowl.snomed.ql.ql.Exclusion#getRight Right}' containment reference. + * Sets the value of the '{@link com.b2international.snowowl.snomed.ql.ql.ExclusionFilter#getRight Right}' containment reference. * * * @param value the new value of the 'Right' containment reference. @@ -87,4 +79,4 @@ public interface Exclusion extends Filter */ void setRight(PropertyFilter value); -} // Exclusion +} // ExclusionFilter diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Filter.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Filter.java index 5b1f3f7505c..e981f099832 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Filter.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Filter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/LanguageCodeFilter.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/LanguageCodeFilter.java index 0bc19f9917c..c6f3ae173fb 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/LanguageCodeFilter.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/LanguageCodeFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface LanguageCodeFilter extends PropertyFilter /** * Returns the value of the 'Language Code' attribute. * - *

      - * If the meaning of the 'Language Code' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Language Code' attribute. * @see #setLanguageCode(String) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/LanguageRefSetFilter.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/LanguageRefSetFilter.java index 91cc410df06..266eed920f4 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/LanguageRefSetFilter.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/LanguageRefSetFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface LanguageRefSetFilter extends PropertyFilter /** * Returns the value of the 'Language Ref Set Id' containment reference. * - *

      - * If the meaning of the 'Language Ref Set Id' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Language Ref Set Id' containment reference. * @see #setLanguageRefSetId(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/LexicalSearchType.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/LexicalSearchType.java index cde86cf8d2b..a97786336df 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/LexicalSearchType.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/LexicalSearchType.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -65,10 +65,6 @@ public enum LexicalSearchType implements Enumerator /** * The 'MATCH' literal value. * - *

      - * If the meaning of 'MATCH' literal object isn't clear, - * there really should be more of a description here... - *

      * * @see #MATCH * @model literal="match" @@ -80,10 +76,6 @@ public enum LexicalSearchType implements Enumerator /** * The 'REGEX' literal value. * - *

      - * If the meaning of 'REGEX' literal object isn't clear, - * there really should be more of a description here... - *

      * * @see #REGEX * @model literal="regex" @@ -95,10 +87,6 @@ public enum LexicalSearchType implements Enumerator /** * The 'EXACT' literal value. * - *

      - * If the meaning of 'EXACT' literal object isn't clear, - * there really should be more of a description here... - *

      * * @see #EXACT * @model literal="exact" @@ -229,6 +217,7 @@ private LexicalSearchType(int value, String name, String literal) * * @generated */ + @Override public int getValue() { return value; @@ -239,6 +228,7 @@ public int getValue() * * @generated */ + @Override public String getName() { return name; @@ -249,6 +239,7 @@ public String getName() * * @generated */ + @Override public String getLiteral() { return literal; diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ModuleFilter.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ModuleFilter.java index dcb8f83994f..a525af56305 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ModuleFilter.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/ModuleFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,10 +40,6 @@ public interface ModuleFilter extends PropertyFilter * Returns the value of the 'Domain' attribute. * The literals are from the enumeration {@link com.b2international.snowowl.snomed.ql.ql.Domain}. * - *

      - * If the meaning of the 'Domain' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Domain' attribute. * @see com.b2international.snowowl.snomed.ql.ql.Domain @@ -68,10 +64,6 @@ public interface ModuleFilter extends PropertyFilter /** * Returns the value of the 'Module Id' containment reference. * - *

      - * If the meaning of the 'Module Id' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Module Id' containment reference. * @see #setModuleId(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/NestedFilter.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/NestedFilter.java index 5f0ca6c680a..50232822be0 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/NestedFilter.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/NestedFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface NestedFilter extends PropertyFilter /** * Returns the value of the 'Nested' containment reference. * - *

      - * If the meaning of the 'Nested' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Nested' containment reference. * @see #setNested(Filter) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/NestedQuery.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/NestedQuery.java index 180038a5aba..008e61c507d 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/NestedQuery.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/NestedQuery.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,6 @@ public interface NestedQuery extends SubQuery /** * Returns the value of the 'Nested' containment reference. * - *

      - * If the meaning of the 'Nested' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Nested' containment reference. * @see #setNested(QueryConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/PreferredInFilter.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/PreferredInFilter.java index fb805eb6565..a46ab3a1b0f 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/PreferredInFilter.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/PreferredInFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface PreferredInFilter extends PropertyFilter /** * Returns the value of the 'Language Ref Set Id' containment reference. * - *

      - * If the meaning of the 'Language Ref Set Id' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Language Ref Set Id' containment reference. * @see #setLanguageRefSetId(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/PropertyFilter.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/PropertyFilter.java index e506504677c..cff0640a356 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/PropertyFilter.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/PropertyFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QlFactory.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QlFactory.java index e7da71ea415..dc070f2c554 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QlFactory.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QlFactory.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -216,31 +216,31 @@ public interface QlFactory extends EFactory QueryExclusion createQueryExclusion(); /** - * Returns a new object of class 'Disjunction'. + * Returns a new object of class 'Disjunction Filter'. * * - * @return a new object of class 'Disjunction'. + * @return a new object of class 'Disjunction Filter'. * @generated */ - Disjunction createDisjunction(); + DisjunctionFilter createDisjunctionFilter(); /** - * Returns a new object of class 'Conjunction'. + * Returns a new object of class 'Conjunction Filter'. * * - * @return a new object of class 'Conjunction'. + * @return a new object of class 'Conjunction Filter'. * @generated */ - Conjunction createConjunction(); + ConjunctionFilter createConjunctionFilter(); /** - * Returns a new object of class 'Exclusion'. + * Returns a new object of class 'Exclusion Filter'. * * - * @return a new object of class 'Exclusion'. + * @return a new object of class 'Exclusion Filter'. * @generated */ - Exclusion createExclusion(); + ExclusionFilter createExclusionFilter(); /** * Returns the package supported by this factory. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QlPackage.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QlPackage.java index a84c501e88f..a7907c81b9c 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QlPackage.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QlPackage.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -658,14 +658,14 @@ public interface QlPackage extends EPackage int QUERY_EXCLUSION_FEATURE_COUNT = QUERY_CONSTRAINT_FEATURE_COUNT + 2; /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.ql.ql.impl.DisjunctionImpl Disjunction}' class. + * The meta object id for the '{@link com.b2international.snowowl.snomed.ql.ql.impl.DisjunctionFilterImpl Disjunction Filter}' class. * * - * @see com.b2international.snowowl.snomed.ql.ql.impl.DisjunctionImpl - * @see com.b2international.snowowl.snomed.ql.ql.impl.QlPackageImpl#getDisjunction() + * @see com.b2international.snowowl.snomed.ql.ql.impl.DisjunctionFilterImpl + * @see com.b2international.snowowl.snomed.ql.ql.impl.QlPackageImpl#getDisjunctionFilter() * @generated */ - int DISJUNCTION = 20; + int DISJUNCTION_FILTER = 20; /** * The feature id for the 'Left' containment reference. @@ -674,7 +674,7 @@ public interface QlPackage extends EPackage * @generated * @ordered */ - int DISJUNCTION__LEFT = FILTER_FEATURE_COUNT + 0; + int DISJUNCTION_FILTER__LEFT = FILTER_FEATURE_COUNT + 0; /** * The feature id for the 'Right' containment reference. @@ -683,26 +683,26 @@ public interface QlPackage extends EPackage * @generated * @ordered */ - int DISJUNCTION__RIGHT = FILTER_FEATURE_COUNT + 1; + int DISJUNCTION_FILTER__RIGHT = FILTER_FEATURE_COUNT + 1; /** - * The number of structural features of the 'Disjunction' class. + * The number of structural features of the 'Disjunction Filter' class. * * * @generated * @ordered */ - int DISJUNCTION_FEATURE_COUNT = FILTER_FEATURE_COUNT + 2; + int DISJUNCTION_FILTER_FEATURE_COUNT = FILTER_FEATURE_COUNT + 2; /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.ql.ql.impl.ConjunctionImpl Conjunction}' class. + * The meta object id for the '{@link com.b2international.snowowl.snomed.ql.ql.impl.ConjunctionFilterImpl Conjunction Filter}' class. * * - * @see com.b2international.snowowl.snomed.ql.ql.impl.ConjunctionImpl - * @see com.b2international.snowowl.snomed.ql.ql.impl.QlPackageImpl#getConjunction() + * @see com.b2international.snowowl.snomed.ql.ql.impl.ConjunctionFilterImpl + * @see com.b2international.snowowl.snomed.ql.ql.impl.QlPackageImpl#getConjunctionFilter() * @generated */ - int CONJUNCTION = 21; + int CONJUNCTION_FILTER = 21; /** * The feature id for the 'Left' containment reference. @@ -711,7 +711,7 @@ public interface QlPackage extends EPackage * @generated * @ordered */ - int CONJUNCTION__LEFT = FILTER_FEATURE_COUNT + 0; + int CONJUNCTION_FILTER__LEFT = FILTER_FEATURE_COUNT + 0; /** * The feature id for the 'Right' containment reference. @@ -720,26 +720,26 @@ public interface QlPackage extends EPackage * @generated * @ordered */ - int CONJUNCTION__RIGHT = FILTER_FEATURE_COUNT + 1; + int CONJUNCTION_FILTER__RIGHT = FILTER_FEATURE_COUNT + 1; /** - * The number of structural features of the 'Conjunction' class. + * The number of structural features of the 'Conjunction Filter' class. * * * @generated * @ordered */ - int CONJUNCTION_FEATURE_COUNT = FILTER_FEATURE_COUNT + 2; + int CONJUNCTION_FILTER_FEATURE_COUNT = FILTER_FEATURE_COUNT + 2; /** - * The meta object id for the '{@link com.b2international.snowowl.snomed.ql.ql.impl.ExclusionImpl Exclusion}' class. + * The meta object id for the '{@link com.b2international.snowowl.snomed.ql.ql.impl.ExclusionFilterImpl Exclusion Filter}' class. * * - * @see com.b2international.snowowl.snomed.ql.ql.impl.ExclusionImpl - * @see com.b2international.snowowl.snomed.ql.ql.impl.QlPackageImpl#getExclusion() + * @see com.b2international.snowowl.snomed.ql.ql.impl.ExclusionFilterImpl + * @see com.b2international.snowowl.snomed.ql.ql.impl.QlPackageImpl#getExclusionFilter() * @generated */ - int EXCLUSION = 22; + int EXCLUSION_FILTER = 22; /** * The feature id for the 'Left' containment reference. @@ -748,7 +748,7 @@ public interface QlPackage extends EPackage * @generated * @ordered */ - int EXCLUSION__LEFT = FILTER_FEATURE_COUNT + 0; + int EXCLUSION_FILTER__LEFT = FILTER_FEATURE_COUNT + 0; /** * The feature id for the 'Right' containment reference. @@ -757,16 +757,16 @@ public interface QlPackage extends EPackage * @generated * @ordered */ - int EXCLUSION__RIGHT = FILTER_FEATURE_COUNT + 1; + int EXCLUSION_FILTER__RIGHT = FILTER_FEATURE_COUNT + 1; /** - * The number of structural features of the 'Exclusion' class. + * The number of structural features of the 'Exclusion Filter' class. * * * @generated * @ordered */ - int EXCLUSION_FEATURE_COUNT = FILTER_FEATURE_COUNT + 2; + int EXCLUSION_FILTER_FEATURE_COUNT = FILTER_FEATURE_COUNT + 2; /** * The meta object id for the '{@link com.b2international.snowowl.snomed.ql.ql.LexicalSearchType Lexical Search Type}' enum. @@ -1243,100 +1243,100 @@ public interface QlPackage extends EPackage EReference getQueryExclusion_Right(); /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ql.ql.Disjunction Disjunction}'. + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter Disjunction Filter}'. * * - * @return the meta object for class 'Disjunction'. - * @see com.b2international.snowowl.snomed.ql.ql.Disjunction + * @return the meta object for class 'Disjunction Filter'. + * @see com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter * @generated */ - EClass getDisjunction(); + EClass getDisjunctionFilter(); /** - * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ql.ql.Disjunction#getLeft Left}'. + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter#getLeft Left}'. * * * @return the meta object for the containment reference 'Left'. - * @see com.b2international.snowowl.snomed.ql.ql.Disjunction#getLeft() - * @see #getDisjunction() + * @see com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter#getLeft() + * @see #getDisjunctionFilter() * @generated */ - EReference getDisjunction_Left(); + EReference getDisjunctionFilter_Left(); /** - * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ql.ql.Disjunction#getRight Right}'. + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter#getRight Right}'. * * * @return the meta object for the containment reference 'Right'. - * @see com.b2international.snowowl.snomed.ql.ql.Disjunction#getRight() - * @see #getDisjunction() + * @see com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter#getRight() + * @see #getDisjunctionFilter() * @generated */ - EReference getDisjunction_Right(); + EReference getDisjunctionFilter_Right(); /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ql.ql.Conjunction Conjunction}'. + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter Conjunction Filter}'. * * - * @return the meta object for class 'Conjunction'. - * @see com.b2international.snowowl.snomed.ql.ql.Conjunction + * @return the meta object for class 'Conjunction Filter'. + * @see com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter * @generated */ - EClass getConjunction(); + EClass getConjunctionFilter(); /** - * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ql.ql.Conjunction#getLeft Left}'. + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter#getLeft Left}'. * * * @return the meta object for the containment reference 'Left'. - * @see com.b2international.snowowl.snomed.ql.ql.Conjunction#getLeft() - * @see #getConjunction() + * @see com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter#getLeft() + * @see #getConjunctionFilter() * @generated */ - EReference getConjunction_Left(); + EReference getConjunctionFilter_Left(); /** - * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ql.ql.Conjunction#getRight Right}'. + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter#getRight Right}'. * * * @return the meta object for the containment reference 'Right'. - * @see com.b2international.snowowl.snomed.ql.ql.Conjunction#getRight() - * @see #getConjunction() + * @see com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter#getRight() + * @see #getConjunctionFilter() * @generated */ - EReference getConjunction_Right(); + EReference getConjunctionFilter_Right(); /** - * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ql.ql.Exclusion Exclusion}'. + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ql.ql.ExclusionFilter Exclusion Filter}'. * * - * @return the meta object for class 'Exclusion'. - * @see com.b2international.snowowl.snomed.ql.ql.Exclusion + * @return the meta object for class 'Exclusion Filter'. + * @see com.b2international.snowowl.snomed.ql.ql.ExclusionFilter * @generated */ - EClass getExclusion(); + EClass getExclusionFilter(); /** - * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ql.ql.Exclusion#getLeft Left}'. + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ql.ql.ExclusionFilter#getLeft Left}'. * * * @return the meta object for the containment reference 'Left'. - * @see com.b2international.snowowl.snomed.ql.ql.Exclusion#getLeft() - * @see #getExclusion() + * @see com.b2international.snowowl.snomed.ql.ql.ExclusionFilter#getLeft() + * @see #getExclusionFilter() * @generated */ - EReference getExclusion_Left(); + EReference getExclusionFilter_Left(); /** - * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ql.ql.Exclusion#getRight Right}'. + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.ql.ql.ExclusionFilter#getRight Right}'. * * * @return the meta object for the containment reference 'Right'. - * @see com.b2international.snowowl.snomed.ql.ql.Exclusion#getRight() - * @see #getExclusion() + * @see com.b2international.snowowl.snomed.ql.ql.ExclusionFilter#getRight() + * @see #getExclusionFilter() * @generated */ - EReference getExclusion_Right(); + EReference getExclusionFilter_Right(); /** * Returns the meta object for enum '{@link com.b2international.snowowl.snomed.ql.ql.LexicalSearchType Lexical Search Type}'. @@ -1766,14 +1766,14 @@ interface Literals EReference QUERY_EXCLUSION__RIGHT = eINSTANCE.getQueryExclusion_Right(); /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.ql.ql.impl.DisjunctionImpl Disjunction}' class. + * The meta object literal for the '{@link com.b2international.snowowl.snomed.ql.ql.impl.DisjunctionFilterImpl Disjunction Filter}' class. * * - * @see com.b2international.snowowl.snomed.ql.ql.impl.DisjunctionImpl - * @see com.b2international.snowowl.snomed.ql.ql.impl.QlPackageImpl#getDisjunction() + * @see com.b2international.snowowl.snomed.ql.ql.impl.DisjunctionFilterImpl + * @see com.b2international.snowowl.snomed.ql.ql.impl.QlPackageImpl#getDisjunctionFilter() * @generated */ - EClass DISJUNCTION = eINSTANCE.getDisjunction(); + EClass DISJUNCTION_FILTER = eINSTANCE.getDisjunctionFilter(); /** * The meta object literal for the 'Left' containment reference feature. @@ -1781,7 +1781,7 @@ interface Literals * * @generated */ - EReference DISJUNCTION__LEFT = eINSTANCE.getDisjunction_Left(); + EReference DISJUNCTION_FILTER__LEFT = eINSTANCE.getDisjunctionFilter_Left(); /** * The meta object literal for the 'Right' containment reference feature. @@ -1789,17 +1789,17 @@ interface Literals * * @generated */ - EReference DISJUNCTION__RIGHT = eINSTANCE.getDisjunction_Right(); + EReference DISJUNCTION_FILTER__RIGHT = eINSTANCE.getDisjunctionFilter_Right(); /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.ql.ql.impl.ConjunctionImpl Conjunction}' class. + * The meta object literal for the '{@link com.b2international.snowowl.snomed.ql.ql.impl.ConjunctionFilterImpl Conjunction Filter}' class. * * - * @see com.b2international.snowowl.snomed.ql.ql.impl.ConjunctionImpl - * @see com.b2international.snowowl.snomed.ql.ql.impl.QlPackageImpl#getConjunction() + * @see com.b2international.snowowl.snomed.ql.ql.impl.ConjunctionFilterImpl + * @see com.b2international.snowowl.snomed.ql.ql.impl.QlPackageImpl#getConjunctionFilter() * @generated */ - EClass CONJUNCTION = eINSTANCE.getConjunction(); + EClass CONJUNCTION_FILTER = eINSTANCE.getConjunctionFilter(); /** * The meta object literal for the 'Left' containment reference feature. @@ -1807,7 +1807,7 @@ interface Literals * * @generated */ - EReference CONJUNCTION__LEFT = eINSTANCE.getConjunction_Left(); + EReference CONJUNCTION_FILTER__LEFT = eINSTANCE.getConjunctionFilter_Left(); /** * The meta object literal for the 'Right' containment reference feature. @@ -1815,17 +1815,17 @@ interface Literals * * @generated */ - EReference CONJUNCTION__RIGHT = eINSTANCE.getConjunction_Right(); + EReference CONJUNCTION_FILTER__RIGHT = eINSTANCE.getConjunctionFilter_Right(); /** - * The meta object literal for the '{@link com.b2international.snowowl.snomed.ql.ql.impl.ExclusionImpl Exclusion}' class. + * The meta object literal for the '{@link com.b2international.snowowl.snomed.ql.ql.impl.ExclusionFilterImpl Exclusion Filter}' class. * * - * @see com.b2international.snowowl.snomed.ql.ql.impl.ExclusionImpl - * @see com.b2international.snowowl.snomed.ql.ql.impl.QlPackageImpl#getExclusion() + * @see com.b2international.snowowl.snomed.ql.ql.impl.ExclusionFilterImpl + * @see com.b2international.snowowl.snomed.ql.ql.impl.QlPackageImpl#getExclusionFilter() * @generated */ - EClass EXCLUSION = eINSTANCE.getExclusion(); + EClass EXCLUSION_FILTER = eINSTANCE.getExclusionFilter(); /** * The meta object literal for the 'Left' containment reference feature. @@ -1833,7 +1833,7 @@ interface Literals * * @generated */ - EReference EXCLUSION__LEFT = eINSTANCE.getExclusion_Left(); + EReference EXCLUSION_FILTER__LEFT = eINSTANCE.getExclusionFilter_Left(); /** * The meta object literal for the 'Right' containment reference feature. @@ -1841,7 +1841,7 @@ interface Literals * * @generated */ - EReference EXCLUSION__RIGHT = eINSTANCE.getExclusion_Right(); + EReference EXCLUSION_FILTER__RIGHT = eINSTANCE.getExclusionFilter_Right(); /** * The meta object literal for the '{@link com.b2international.snowowl.snomed.ql.ql.LexicalSearchType Lexical Search Type}' enum. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Query.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Query.java index da320ada91f..c902628db61 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Query.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/Query.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface Query extends EObject /** * Returns the value of the 'Query' containment reference. * - *

      - * If the meaning of the 'Query' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Query' containment reference. * @see #setQuery(QueryConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryConjunction.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryConjunction.java index fc613cd2ba5..e331124d061 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryConjunction.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryConjunction.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface QueryConjunction extends QueryConstraint /** * Returns the value of the 'Left' containment reference. * - *

      - * If the meaning of the 'Left' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Left' containment reference. * @see #setLeft(QueryConstraint) @@ -64,10 +60,6 @@ public interface QueryConjunction extends QueryConstraint /** * Returns the value of the 'Right' containment reference. * - *

      - * If the meaning of the 'Right' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Right' containment reference. * @see #setRight(QueryConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryConstraint.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryConstraint.java index 88616d1b53b..a32e9fdc5b6 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryConstraint.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryConstraint.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryDisjunction.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryDisjunction.java index eb562eba2f9..3e94200c9b1 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryDisjunction.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryDisjunction.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface QueryDisjunction extends QueryConstraint /** * Returns the value of the 'Left' containment reference. * - *

      - * If the meaning of the 'Left' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Left' containment reference. * @see #setLeft(QueryConstraint) @@ -64,10 +60,6 @@ public interface QueryDisjunction extends QueryConstraint /** * Returns the value of the 'Right' containment reference. * - *

      - * If the meaning of the 'Right' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Right' containment reference. * @see #setRight(QueryConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryExclusion.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryExclusion.java index 53b90c7c210..4217db24233 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryExclusion.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QueryExclusion.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface QueryExclusion extends QueryConstraint /** * Returns the value of the 'Left' containment reference. * - *

      - * If the meaning of the 'Left' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Left' containment reference. * @see #setLeft(SubQuery) @@ -64,10 +60,6 @@ public interface QueryExclusion extends QueryConstraint /** * Returns the value of the 'Right' containment reference. * - *

      - * If the meaning of the 'Right' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Right' containment reference. * @see #setRight(SubQuery) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/SubQuery.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/SubQuery.java index c3ae18f632e..00fdcc72ce8 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/SubQuery.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/SubQuery.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/TermFilter.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/TermFilter.java index a5224dfab10..8e8895b8110 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/TermFilter.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/TermFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,10 +39,6 @@ public interface TermFilter extends PropertyFilter * Returns the value of the 'Lexical Search Type' attribute. * The literals are from the enumeration {@link com.b2international.snowowl.snomed.ql.ql.LexicalSearchType}. * - *

      - * If the meaning of the 'Lexical Search Type' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Lexical Search Type' attribute. * @see com.b2international.snowowl.snomed.ql.ql.LexicalSearchType @@ -67,10 +63,6 @@ public interface TermFilter extends PropertyFilter /** * Returns the value of the 'Term' attribute. * - *

      - * If the meaning of the 'Term' attribute isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Term' attribute. * @see #setTerm(String) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/TypeFilter.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/TypeFilter.java index 9e94d868217..9269515ec0f 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/TypeFilter.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/TypeFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,6 @@ public interface TypeFilter extends PropertyFilter /** * Returns the value of the 'Type' containment reference. * - *

      - * If the meaning of the 'Type' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Type' containment reference. * @see #setType(ExpressionConstraint) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/AcceptableInFilterImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/AcceptableInFilterImpl.java index 9d1ab028691..621748f89cf 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/AcceptableInFilterImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/AcceptableInFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,6 +79,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getLanguageRefSetId() { return languageRefSetId; @@ -106,6 +107,7 @@ public NotificationChain basicSetLanguageRefSetId(ExpressionConstraint newLangua * * @generated */ + @Override public void setLanguageRefSetId(ExpressionConstraint newLanguageRefSetId) { if (newLanguageRefSetId != languageRefSetId) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ActiveFilterImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ActiveFilterImpl.java index 86796cbcac5..55b9f08d95f 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ActiveFilterImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ActiveFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -107,6 +107,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public Domain getDomain() { return domain; @@ -117,6 +118,7 @@ public Domain getDomain() * * @generated */ + @Override public void setDomain(Domain newDomain) { Domain oldDomain = domain; @@ -130,6 +132,7 @@ public void setDomain(Domain newDomain) * * @generated */ + @Override public boolean isActive() { return active; @@ -140,6 +143,7 @@ public boolean isActive() * * @generated */ + @Override public void setActive(boolean newActive) { boolean oldActive = active; @@ -234,7 +238,7 @@ public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (domain: "); result.append(domain); result.append(", active: "); diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/CaseSignificanceFilterImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/CaseSignificanceFilterImpl.java index 3a19a2831c4..1886f0fcd9f 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/CaseSignificanceFilterImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/CaseSignificanceFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,6 +79,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getCaseSignificanceId() { return caseSignificanceId; @@ -106,6 +107,7 @@ public NotificationChain basicSetCaseSignificanceId(ExpressionConstraint newCase * * @generated */ + @Override public void setCaseSignificanceId(ExpressionConstraint newCaseSignificanceId) { if (newCaseSignificanceId != caseSignificanceId) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ConjunctionImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ConjunctionFilterImpl.java similarity index 78% rename from snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ConjunctionImpl.java rename to snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ConjunctionFilterImpl.java index 7248fae771f..82034f43026 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ConjunctionImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ConjunctionFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ */ package com.b2international.snowowl.snomed.ql.ql.impl; -import com.b2international.snowowl.snomed.ql.ql.Conjunction; +import com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter; import com.b2international.snowowl.snomed.ql.ql.Filter; import com.b2international.snowowl.snomed.ql.ql.QlPackage; @@ -29,19 +29,19 @@ /** * - * An implementation of the model object 'Conjunction'. + * An implementation of the model object 'Conjunction Filter'. * *

      * The following features are implemented: *

      *
        - *
      • {@link com.b2international.snowowl.snomed.ql.ql.impl.ConjunctionImpl#getLeft Left}
      • - *
      • {@link com.b2international.snowowl.snomed.ql.ql.impl.ConjunctionImpl#getRight Right}
      • + *
      • {@link com.b2international.snowowl.snomed.ql.ql.impl.ConjunctionFilterImpl#getLeft Left}
      • + *
      • {@link com.b2international.snowowl.snomed.ql.ql.impl.ConjunctionFilterImpl#getRight Right}
      • *
      * * @generated */ -public class ConjunctionImpl extends FilterImpl implements Conjunction +public class ConjunctionFilterImpl extends FilterImpl implements ConjunctionFilter { /** * The cached value of the '{@link #getLeft() Left}' containment reference. @@ -68,7 +68,7 @@ public class ConjunctionImpl extends FilterImpl implements Conjunction * * @generated */ - protected ConjunctionImpl() + protected ConjunctionFilterImpl() { super(); } @@ -81,7 +81,7 @@ protected ConjunctionImpl() @Override protected EClass eStaticClass() { - return QlPackage.Literals.CONJUNCTION; + return QlPackage.Literals.CONJUNCTION_FILTER; } /** @@ -89,6 +89,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public Filter getLeft() { return left; @@ -105,7 +106,7 @@ public NotificationChain basicSetLeft(Filter newLeft, NotificationChain msgs) left = newLeft; if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QlPackage.CONJUNCTION__LEFT, oldLeft, newLeft); + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QlPackage.CONJUNCTION_FILTER__LEFT, oldLeft, newLeft); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; @@ -116,20 +117,21 @@ public NotificationChain basicSetLeft(Filter newLeft, NotificationChain msgs) * * @generated */ + @Override public void setLeft(Filter newLeft) { if (newLeft != left) { NotificationChain msgs = null; if (left != null) - msgs = ((InternalEObject)left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QlPackage.CONJUNCTION__LEFT, null, msgs); + msgs = ((InternalEObject)left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QlPackage.CONJUNCTION_FILTER__LEFT, null, msgs); if (newLeft != null) - msgs = ((InternalEObject)newLeft).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QlPackage.CONJUNCTION__LEFT, null, msgs); + msgs = ((InternalEObject)newLeft).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QlPackage.CONJUNCTION_FILTER__LEFT, null, msgs); msgs = basicSetLeft(newLeft, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, QlPackage.CONJUNCTION__LEFT, newLeft, newLeft)); + eNotify(new ENotificationImpl(this, Notification.SET, QlPackage.CONJUNCTION_FILTER__LEFT, newLeft, newLeft)); } /** @@ -137,6 +139,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public Filter getRight() { return right; @@ -153,7 +156,7 @@ public NotificationChain basicSetRight(Filter newRight, NotificationChain msgs) right = newRight; if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QlPackage.CONJUNCTION__RIGHT, oldRight, newRight); + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QlPackage.CONJUNCTION_FILTER__RIGHT, oldRight, newRight); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; @@ -164,20 +167,21 @@ public NotificationChain basicSetRight(Filter newRight, NotificationChain msgs) * * @generated */ + @Override public void setRight(Filter newRight) { if (newRight != right) { NotificationChain msgs = null; if (right != null) - msgs = ((InternalEObject)right).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QlPackage.CONJUNCTION__RIGHT, null, msgs); + msgs = ((InternalEObject)right).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QlPackage.CONJUNCTION_FILTER__RIGHT, null, msgs); if (newRight != null) - msgs = ((InternalEObject)newRight).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QlPackage.CONJUNCTION__RIGHT, null, msgs); + msgs = ((InternalEObject)newRight).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QlPackage.CONJUNCTION_FILTER__RIGHT, null, msgs); msgs = basicSetRight(newRight, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, QlPackage.CONJUNCTION__RIGHT, newRight, newRight)); + eNotify(new ENotificationImpl(this, Notification.SET, QlPackage.CONJUNCTION_FILTER__RIGHT, newRight, newRight)); } /** @@ -190,9 +194,9 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, { switch (featureID) { - case QlPackage.CONJUNCTION__LEFT: + case QlPackage.CONJUNCTION_FILTER__LEFT: return basicSetLeft(null, msgs); - case QlPackage.CONJUNCTION__RIGHT: + case QlPackage.CONJUNCTION_FILTER__RIGHT: return basicSetRight(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); @@ -208,9 +212,9 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case QlPackage.CONJUNCTION__LEFT: + case QlPackage.CONJUNCTION_FILTER__LEFT: return getLeft(); - case QlPackage.CONJUNCTION__RIGHT: + case QlPackage.CONJUNCTION_FILTER__RIGHT: return getRight(); } return super.eGet(featureID, resolve, coreType); @@ -226,10 +230,10 @@ public void eSet(int featureID, Object newValue) { switch (featureID) { - case QlPackage.CONJUNCTION__LEFT: + case QlPackage.CONJUNCTION_FILTER__LEFT: setLeft((Filter)newValue); return; - case QlPackage.CONJUNCTION__RIGHT: + case QlPackage.CONJUNCTION_FILTER__RIGHT: setRight((Filter)newValue); return; } @@ -246,10 +250,10 @@ public void eUnset(int featureID) { switch (featureID) { - case QlPackage.CONJUNCTION__LEFT: + case QlPackage.CONJUNCTION_FILTER__LEFT: setLeft((Filter)null); return; - case QlPackage.CONJUNCTION__RIGHT: + case QlPackage.CONJUNCTION_FILTER__RIGHT: setRight((Filter)null); return; } @@ -266,12 +270,12 @@ public boolean eIsSet(int featureID) { switch (featureID) { - case QlPackage.CONJUNCTION__LEFT: + case QlPackage.CONJUNCTION_FILTER__LEFT: return left != null; - case QlPackage.CONJUNCTION__RIGHT: + case QlPackage.CONJUNCTION_FILTER__RIGHT: return right != null; } return super.eIsSet(featureID); } -} //ConjunctionImpl +} //ConjunctionFilterImpl diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/DisjunctionImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/DisjunctionFilterImpl.java similarity index 78% rename from snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/DisjunctionImpl.java rename to snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/DisjunctionFilterImpl.java index 2b1ee0b2f4e..7e8f77435a1 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/DisjunctionImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/DisjunctionFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ */ package com.b2international.snowowl.snomed.ql.ql.impl; -import com.b2international.snowowl.snomed.ql.ql.Disjunction; +import com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter; import com.b2international.snowowl.snomed.ql.ql.Filter; import com.b2international.snowowl.snomed.ql.ql.QlPackage; @@ -29,19 +29,19 @@ /** * - * An implementation of the model object 'Disjunction'. + * An implementation of the model object 'Disjunction Filter'. * *

      * The following features are implemented: *

      *
        - *
      • {@link com.b2international.snowowl.snomed.ql.ql.impl.DisjunctionImpl#getLeft Left}
      • - *
      • {@link com.b2international.snowowl.snomed.ql.ql.impl.DisjunctionImpl#getRight Right}
      • + *
      • {@link com.b2international.snowowl.snomed.ql.ql.impl.DisjunctionFilterImpl#getLeft Left}
      • + *
      • {@link com.b2international.snowowl.snomed.ql.ql.impl.DisjunctionFilterImpl#getRight Right}
      • *
      * * @generated */ -public class DisjunctionImpl extends FilterImpl implements Disjunction +public class DisjunctionFilterImpl extends FilterImpl implements DisjunctionFilter { /** * The cached value of the '{@link #getLeft() Left}' containment reference. @@ -68,7 +68,7 @@ public class DisjunctionImpl extends FilterImpl implements Disjunction * * @generated */ - protected DisjunctionImpl() + protected DisjunctionFilterImpl() { super(); } @@ -81,7 +81,7 @@ protected DisjunctionImpl() @Override protected EClass eStaticClass() { - return QlPackage.Literals.DISJUNCTION; + return QlPackage.Literals.DISJUNCTION_FILTER; } /** @@ -89,6 +89,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public Filter getLeft() { return left; @@ -105,7 +106,7 @@ public NotificationChain basicSetLeft(Filter newLeft, NotificationChain msgs) left = newLeft; if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QlPackage.DISJUNCTION__LEFT, oldLeft, newLeft); + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QlPackage.DISJUNCTION_FILTER__LEFT, oldLeft, newLeft); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; @@ -116,20 +117,21 @@ public NotificationChain basicSetLeft(Filter newLeft, NotificationChain msgs) * * @generated */ + @Override public void setLeft(Filter newLeft) { if (newLeft != left) { NotificationChain msgs = null; if (left != null) - msgs = ((InternalEObject)left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QlPackage.DISJUNCTION__LEFT, null, msgs); + msgs = ((InternalEObject)left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QlPackage.DISJUNCTION_FILTER__LEFT, null, msgs); if (newLeft != null) - msgs = ((InternalEObject)newLeft).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QlPackage.DISJUNCTION__LEFT, null, msgs); + msgs = ((InternalEObject)newLeft).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QlPackage.DISJUNCTION_FILTER__LEFT, null, msgs); msgs = basicSetLeft(newLeft, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, QlPackage.DISJUNCTION__LEFT, newLeft, newLeft)); + eNotify(new ENotificationImpl(this, Notification.SET, QlPackage.DISJUNCTION_FILTER__LEFT, newLeft, newLeft)); } /** @@ -137,6 +139,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public Filter getRight() { return right; @@ -153,7 +156,7 @@ public NotificationChain basicSetRight(Filter newRight, NotificationChain msgs) right = newRight; if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QlPackage.DISJUNCTION__RIGHT, oldRight, newRight); + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QlPackage.DISJUNCTION_FILTER__RIGHT, oldRight, newRight); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; @@ -164,20 +167,21 @@ public NotificationChain basicSetRight(Filter newRight, NotificationChain msgs) * * @generated */ + @Override public void setRight(Filter newRight) { if (newRight != right) { NotificationChain msgs = null; if (right != null) - msgs = ((InternalEObject)right).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QlPackage.DISJUNCTION__RIGHT, null, msgs); + msgs = ((InternalEObject)right).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QlPackage.DISJUNCTION_FILTER__RIGHT, null, msgs); if (newRight != null) - msgs = ((InternalEObject)newRight).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QlPackage.DISJUNCTION__RIGHT, null, msgs); + msgs = ((InternalEObject)newRight).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QlPackage.DISJUNCTION_FILTER__RIGHT, null, msgs); msgs = basicSetRight(newRight, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, QlPackage.DISJUNCTION__RIGHT, newRight, newRight)); + eNotify(new ENotificationImpl(this, Notification.SET, QlPackage.DISJUNCTION_FILTER__RIGHT, newRight, newRight)); } /** @@ -190,9 +194,9 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, { switch (featureID) { - case QlPackage.DISJUNCTION__LEFT: + case QlPackage.DISJUNCTION_FILTER__LEFT: return basicSetLeft(null, msgs); - case QlPackage.DISJUNCTION__RIGHT: + case QlPackage.DISJUNCTION_FILTER__RIGHT: return basicSetRight(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); @@ -208,9 +212,9 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case QlPackage.DISJUNCTION__LEFT: + case QlPackage.DISJUNCTION_FILTER__LEFT: return getLeft(); - case QlPackage.DISJUNCTION__RIGHT: + case QlPackage.DISJUNCTION_FILTER__RIGHT: return getRight(); } return super.eGet(featureID, resolve, coreType); @@ -226,10 +230,10 @@ public void eSet(int featureID, Object newValue) { switch (featureID) { - case QlPackage.DISJUNCTION__LEFT: + case QlPackage.DISJUNCTION_FILTER__LEFT: setLeft((Filter)newValue); return; - case QlPackage.DISJUNCTION__RIGHT: + case QlPackage.DISJUNCTION_FILTER__RIGHT: setRight((Filter)newValue); return; } @@ -246,10 +250,10 @@ public void eUnset(int featureID) { switch (featureID) { - case QlPackage.DISJUNCTION__LEFT: + case QlPackage.DISJUNCTION_FILTER__LEFT: setLeft((Filter)null); return; - case QlPackage.DISJUNCTION__RIGHT: + case QlPackage.DISJUNCTION_FILTER__RIGHT: setRight((Filter)null); return; } @@ -266,12 +270,12 @@ public boolean eIsSet(int featureID) { switch (featureID) { - case QlPackage.DISJUNCTION__LEFT: + case QlPackage.DISJUNCTION_FILTER__LEFT: return left != null; - case QlPackage.DISJUNCTION__RIGHT: + case QlPackage.DISJUNCTION_FILTER__RIGHT: return right != null; } return super.eIsSet(featureID); } -} //DisjunctionImpl +} //DisjunctionFilterImpl diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/DomainQueryImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/DomainQueryImpl.java index b2d1c5e62df..43c127c5a08 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/DomainQueryImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/DomainQueryImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,6 +91,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getEcl() { return ecl; @@ -118,6 +119,7 @@ public NotificationChain basicSetEcl(ExpressionConstraint newEcl, NotificationCh * * @generated */ + @Override public void setEcl(ExpressionConstraint newEcl) { if (newEcl != ecl) @@ -139,6 +141,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public Filter getFilter() { return filter; @@ -166,6 +169,7 @@ public NotificationChain basicSetFilter(Filter newFilter, NotificationChain msgs * * @generated */ + @Override public void setFilter(Filter newFilter) { if (newFilter != filter) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ExclusionImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ExclusionFilterImpl.java similarity index 79% rename from snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ExclusionImpl.java rename to snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ExclusionFilterImpl.java index c2680be4c57..4699d134a8c 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ExclusionImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ExclusionFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ */ package com.b2international.snowowl.snomed.ql.ql.impl; -import com.b2international.snowowl.snomed.ql.ql.Exclusion; +import com.b2international.snowowl.snomed.ql.ql.ExclusionFilter; import com.b2international.snowowl.snomed.ql.ql.PropertyFilter; import com.b2international.snowowl.snomed.ql.ql.QlPackage; @@ -29,19 +29,19 @@ /** * - * An implementation of the model object 'Exclusion'. + * An implementation of the model object 'Exclusion Filter'. * *

      * The following features are implemented: *

      *
        - *
      • {@link com.b2international.snowowl.snomed.ql.ql.impl.ExclusionImpl#getLeft Left}
      • - *
      • {@link com.b2international.snowowl.snomed.ql.ql.impl.ExclusionImpl#getRight Right}
      • + *
      • {@link com.b2international.snowowl.snomed.ql.ql.impl.ExclusionFilterImpl#getLeft Left}
      • + *
      • {@link com.b2international.snowowl.snomed.ql.ql.impl.ExclusionFilterImpl#getRight Right}
      • *
      * * @generated */ -public class ExclusionImpl extends FilterImpl implements Exclusion +public class ExclusionFilterImpl extends FilterImpl implements ExclusionFilter { /** * The cached value of the '{@link #getLeft() Left}' containment reference. @@ -68,7 +68,7 @@ public class ExclusionImpl extends FilterImpl implements Exclusion * * @generated */ - protected ExclusionImpl() + protected ExclusionFilterImpl() { super(); } @@ -81,7 +81,7 @@ protected ExclusionImpl() @Override protected EClass eStaticClass() { - return QlPackage.Literals.EXCLUSION; + return QlPackage.Literals.EXCLUSION_FILTER; } /** @@ -89,6 +89,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public PropertyFilter getLeft() { return left; @@ -105,7 +106,7 @@ public NotificationChain basicSetLeft(PropertyFilter newLeft, NotificationChain left = newLeft; if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QlPackage.EXCLUSION__LEFT, oldLeft, newLeft); + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QlPackage.EXCLUSION_FILTER__LEFT, oldLeft, newLeft); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; @@ -116,20 +117,21 @@ public NotificationChain basicSetLeft(PropertyFilter newLeft, NotificationChain * * @generated */ + @Override public void setLeft(PropertyFilter newLeft) { if (newLeft != left) { NotificationChain msgs = null; if (left != null) - msgs = ((InternalEObject)left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QlPackage.EXCLUSION__LEFT, null, msgs); + msgs = ((InternalEObject)left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QlPackage.EXCLUSION_FILTER__LEFT, null, msgs); if (newLeft != null) - msgs = ((InternalEObject)newLeft).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QlPackage.EXCLUSION__LEFT, null, msgs); + msgs = ((InternalEObject)newLeft).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QlPackage.EXCLUSION_FILTER__LEFT, null, msgs); msgs = basicSetLeft(newLeft, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, QlPackage.EXCLUSION__LEFT, newLeft, newLeft)); + eNotify(new ENotificationImpl(this, Notification.SET, QlPackage.EXCLUSION_FILTER__LEFT, newLeft, newLeft)); } /** @@ -137,6 +139,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public PropertyFilter getRight() { return right; @@ -153,7 +156,7 @@ public NotificationChain basicSetRight(PropertyFilter newRight, NotificationChai right = newRight; if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QlPackage.EXCLUSION__RIGHT, oldRight, newRight); + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QlPackage.EXCLUSION_FILTER__RIGHT, oldRight, newRight); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; @@ -164,20 +167,21 @@ public NotificationChain basicSetRight(PropertyFilter newRight, NotificationChai * * @generated */ + @Override public void setRight(PropertyFilter newRight) { if (newRight != right) { NotificationChain msgs = null; if (right != null) - msgs = ((InternalEObject)right).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QlPackage.EXCLUSION__RIGHT, null, msgs); + msgs = ((InternalEObject)right).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QlPackage.EXCLUSION_FILTER__RIGHT, null, msgs); if (newRight != null) - msgs = ((InternalEObject)newRight).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QlPackage.EXCLUSION__RIGHT, null, msgs); + msgs = ((InternalEObject)newRight).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QlPackage.EXCLUSION_FILTER__RIGHT, null, msgs); msgs = basicSetRight(newRight, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, QlPackage.EXCLUSION__RIGHT, newRight, newRight)); + eNotify(new ENotificationImpl(this, Notification.SET, QlPackage.EXCLUSION_FILTER__RIGHT, newRight, newRight)); } /** @@ -190,9 +194,9 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, { switch (featureID) { - case QlPackage.EXCLUSION__LEFT: + case QlPackage.EXCLUSION_FILTER__LEFT: return basicSetLeft(null, msgs); - case QlPackage.EXCLUSION__RIGHT: + case QlPackage.EXCLUSION_FILTER__RIGHT: return basicSetRight(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); @@ -208,9 +212,9 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case QlPackage.EXCLUSION__LEFT: + case QlPackage.EXCLUSION_FILTER__LEFT: return getLeft(); - case QlPackage.EXCLUSION__RIGHT: + case QlPackage.EXCLUSION_FILTER__RIGHT: return getRight(); } return super.eGet(featureID, resolve, coreType); @@ -226,10 +230,10 @@ public void eSet(int featureID, Object newValue) { switch (featureID) { - case QlPackage.EXCLUSION__LEFT: + case QlPackage.EXCLUSION_FILTER__LEFT: setLeft((PropertyFilter)newValue); return; - case QlPackage.EXCLUSION__RIGHT: + case QlPackage.EXCLUSION_FILTER__RIGHT: setRight((PropertyFilter)newValue); return; } @@ -246,10 +250,10 @@ public void eUnset(int featureID) { switch (featureID) { - case QlPackage.EXCLUSION__LEFT: + case QlPackage.EXCLUSION_FILTER__LEFT: setLeft((PropertyFilter)null); return; - case QlPackage.EXCLUSION__RIGHT: + case QlPackage.EXCLUSION_FILTER__RIGHT: setRight((PropertyFilter)null); return; } @@ -266,12 +270,12 @@ public boolean eIsSet(int featureID) { switch (featureID) { - case QlPackage.EXCLUSION__LEFT: + case QlPackage.EXCLUSION_FILTER__LEFT: return left != null; - case QlPackage.EXCLUSION__RIGHT: + case QlPackage.EXCLUSION_FILTER__RIGHT: return right != null; } return super.eIsSet(featureID); } -} //ExclusionImpl +} //ExclusionFilterImpl diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/FilterImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/FilterImpl.java index 6dceacfebce..402cb4472d9 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/FilterImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/FilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/LanguageCodeFilterImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/LanguageCodeFilterImpl.java index 24e62c2691d..9da2bf8632c 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/LanguageCodeFilterImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/LanguageCodeFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,6 +85,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public String getLanguageCode() { return languageCode; @@ -95,6 +96,7 @@ public String getLanguageCode() * * @generated */ + @Override public void setLanguageCode(String newLanguageCode) { String oldLanguageCode = languageCode; @@ -179,7 +181,7 @@ public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (languageCode: "); result.append(languageCode); result.append(')'); diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/LanguageRefSetFilterImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/LanguageRefSetFilterImpl.java index 79f1118931d..a7b11460870 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/LanguageRefSetFilterImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/LanguageRefSetFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,6 +79,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getLanguageRefSetId() { return languageRefSetId; @@ -106,6 +107,7 @@ public NotificationChain basicSetLanguageRefSetId(ExpressionConstraint newLangua * * @generated */ + @Override public void setLanguageRefSetId(ExpressionConstraint newLanguageRefSetId) { if (newLanguageRefSetId != languageRefSetId) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ModuleFilterImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ModuleFilterImpl.java index e1c549b30d5..7c47ea7dd6f 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ModuleFilterImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/ModuleFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -101,6 +101,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public Domain getDomain() { return domain; @@ -111,6 +112,7 @@ public Domain getDomain() * * @generated */ + @Override public void setDomain(Domain newDomain) { Domain oldDomain = domain; @@ -124,6 +126,7 @@ public void setDomain(Domain newDomain) * * @generated */ + @Override public ExpressionConstraint getModuleId() { return moduleId; @@ -151,6 +154,7 @@ public NotificationChain basicSetModuleId(ExpressionConstraint newModuleId, Noti * * @generated */ + @Override public void setModuleId(ExpressionConstraint newModuleId) { if (newModuleId != moduleId) @@ -269,7 +273,7 @@ public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (domain: "); result.append(domain); result.append(')'); diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/NestedFilterImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/NestedFilterImpl.java index 3593d13ed3a..7279249aac3 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/NestedFilterImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/NestedFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public Filter getNested() { return nested; @@ -105,6 +106,7 @@ public NotificationChain basicSetNested(Filter newNested, NotificationChain msgs * * @generated */ + @Override public void setNested(Filter newNested) { if (newNested != nested) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/NestedQueryImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/NestedQueryImpl.java index c01d0e83ed1..19671afe78b 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/NestedQueryImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/NestedQueryImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public QueryConstraint getNested() { return nested; @@ -105,6 +106,7 @@ public NotificationChain basicSetNested(QueryConstraint newNested, NotificationC * * @generated */ + @Override public void setNested(QueryConstraint newNested) { if (newNested != nested) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/PreferredInFilterImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/PreferredInFilterImpl.java index d1321dc6427..c9543bea424 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/PreferredInFilterImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/PreferredInFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,6 +79,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getLanguageRefSetId() { return languageRefSetId; @@ -106,6 +107,7 @@ public NotificationChain basicSetLanguageRefSetId(ExpressionConstraint newLangua * * @generated */ + @Override public void setLanguageRefSetId(ExpressionConstraint newLanguageRefSetId) { if (newLanguageRefSetId != languageRefSetId) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/PropertyFilterImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/PropertyFilterImpl.java index 38008415799..2f21940ec2e 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/PropertyFilterImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/PropertyFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QlFactoryImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QlFactoryImpl.java index 159a2749ed7..f74228b1444 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QlFactoryImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QlFactoryImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,9 +98,9 @@ public EObject create(EClass eClass) case QlPackage.QUERY_DISJUNCTION: return createQueryDisjunction(); case QlPackage.QUERY_CONJUNCTION: return createQueryConjunction(); case QlPackage.QUERY_EXCLUSION: return createQueryExclusion(); - case QlPackage.DISJUNCTION: return createDisjunction(); - case QlPackage.CONJUNCTION: return createConjunction(); - case QlPackage.EXCLUSION: return createExclusion(); + case QlPackage.DISJUNCTION_FILTER: return createDisjunctionFilter(); + case QlPackage.CONJUNCTION_FILTER: return createConjunctionFilter(); + case QlPackage.EXCLUSION_FILTER: return createExclusionFilter(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -149,6 +149,7 @@ public String convertToString(EDataType eDataType, Object instanceValue) * * @generated */ + @Override public Query createQuery() { QueryImpl query = new QueryImpl(); @@ -160,6 +161,7 @@ public Query createQuery() * * @generated */ + @Override public QueryConstraint createQueryConstraint() { QueryConstraintImpl queryConstraint = new QueryConstraintImpl(); @@ -171,6 +173,7 @@ public QueryConstraint createQueryConstraint() * * @generated */ + @Override public SubQuery createSubQuery() { SubQueryImpl subQuery = new SubQueryImpl(); @@ -182,6 +185,7 @@ public SubQuery createSubQuery() * * @generated */ + @Override public DomainQuery createDomainQuery() { DomainQueryImpl domainQuery = new DomainQueryImpl(); @@ -193,6 +197,7 @@ public DomainQuery createDomainQuery() * * @generated */ + @Override public NestedQuery createNestedQuery() { NestedQueryImpl nestedQuery = new NestedQueryImpl(); @@ -204,6 +209,7 @@ public NestedQuery createNestedQuery() * * @generated */ + @Override public Filter createFilter() { FilterImpl filter = new FilterImpl(); @@ -215,6 +221,7 @@ public Filter createFilter() * * @generated */ + @Override public NestedFilter createNestedFilter() { NestedFilterImpl nestedFilter = new NestedFilterImpl(); @@ -226,6 +233,7 @@ public NestedFilter createNestedFilter() * * @generated */ + @Override public PropertyFilter createPropertyFilter() { PropertyFilterImpl propertyFilter = new PropertyFilterImpl(); @@ -237,6 +245,7 @@ public PropertyFilter createPropertyFilter() * * @generated */ + @Override public ActiveFilter createActiveFilter() { ActiveFilterImpl activeFilter = new ActiveFilterImpl(); @@ -248,6 +257,7 @@ public ActiveFilter createActiveFilter() * * @generated */ + @Override public ModuleFilter createModuleFilter() { ModuleFilterImpl moduleFilter = new ModuleFilterImpl(); @@ -259,6 +269,7 @@ public ModuleFilter createModuleFilter() * * @generated */ + @Override public TermFilter createTermFilter() { TermFilterImpl termFilter = new TermFilterImpl(); @@ -270,6 +281,7 @@ public TermFilter createTermFilter() * * @generated */ + @Override public PreferredInFilter createPreferredInFilter() { PreferredInFilterImpl preferredInFilter = new PreferredInFilterImpl(); @@ -281,6 +293,7 @@ public PreferredInFilter createPreferredInFilter() * * @generated */ + @Override public AcceptableInFilter createAcceptableInFilter() { AcceptableInFilterImpl acceptableInFilter = new AcceptableInFilterImpl(); @@ -292,6 +305,7 @@ public AcceptableInFilter createAcceptableInFilter() * * @generated */ + @Override public LanguageRefSetFilter createLanguageRefSetFilter() { LanguageRefSetFilterImpl languageRefSetFilter = new LanguageRefSetFilterImpl(); @@ -303,6 +317,7 @@ public LanguageRefSetFilter createLanguageRefSetFilter() * * @generated */ + @Override public TypeFilter createTypeFilter() { TypeFilterImpl typeFilter = new TypeFilterImpl(); @@ -314,6 +329,7 @@ public TypeFilter createTypeFilter() * * @generated */ + @Override public CaseSignificanceFilter createCaseSignificanceFilter() { CaseSignificanceFilterImpl caseSignificanceFilter = new CaseSignificanceFilterImpl(); @@ -325,6 +341,7 @@ public CaseSignificanceFilter createCaseSignificanceFilter() * * @generated */ + @Override public LanguageCodeFilter createLanguageCodeFilter() { LanguageCodeFilterImpl languageCodeFilter = new LanguageCodeFilterImpl(); @@ -336,6 +353,7 @@ public LanguageCodeFilter createLanguageCodeFilter() * * @generated */ + @Override public QueryDisjunction createQueryDisjunction() { QueryDisjunctionImpl queryDisjunction = new QueryDisjunctionImpl(); @@ -347,6 +365,7 @@ public QueryDisjunction createQueryDisjunction() * * @generated */ + @Override public QueryConjunction createQueryConjunction() { QueryConjunctionImpl queryConjunction = new QueryConjunctionImpl(); @@ -358,6 +377,7 @@ public QueryConjunction createQueryConjunction() * * @generated */ + @Override public QueryExclusion createQueryExclusion() { QueryExclusionImpl queryExclusion = new QueryExclusionImpl(); @@ -369,10 +389,11 @@ public QueryExclusion createQueryExclusion() * * @generated */ - public Disjunction createDisjunction() + @Override + public DisjunctionFilter createDisjunctionFilter() { - DisjunctionImpl disjunction = new DisjunctionImpl(); - return disjunction; + DisjunctionFilterImpl disjunctionFilter = new DisjunctionFilterImpl(); + return disjunctionFilter; } /** @@ -380,10 +401,11 @@ public Disjunction createDisjunction() * * @generated */ - public Conjunction createConjunction() + @Override + public ConjunctionFilter createConjunctionFilter() { - ConjunctionImpl conjunction = new ConjunctionImpl(); - return conjunction; + ConjunctionFilterImpl conjunctionFilter = new ConjunctionFilterImpl(); + return conjunctionFilter; } /** @@ -391,10 +413,11 @@ public Conjunction createConjunction() * * @generated */ - public Exclusion createExclusion() + @Override + public ExclusionFilter createExclusionFilter() { - ExclusionImpl exclusion = new ExclusionImpl(); - return exclusion; + ExclusionFilterImpl exclusionFilter = new ExclusionFilterImpl(); + return exclusionFilter; } /** @@ -446,6 +469,7 @@ public String convertDomainToString(EDataType eDataType, Object instanceValue) * * @generated */ + @Override public QlPackage getQlPackage() { return (QlPackage)getEPackage(); diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QlPackageImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QlPackageImpl.java index 1500ecafc92..cfbb5983f7a 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QlPackageImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QlPackageImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,11 +20,11 @@ import com.b2international.snowowl.snomed.ql.ql.AcceptableInFilter; import com.b2international.snowowl.snomed.ql.ql.ActiveFilter; import com.b2international.snowowl.snomed.ql.ql.CaseSignificanceFilter; -import com.b2international.snowowl.snomed.ql.ql.Conjunction; -import com.b2international.snowowl.snomed.ql.ql.Disjunction; +import com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter; +import com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter; import com.b2international.snowowl.snomed.ql.ql.Domain; import com.b2international.snowowl.snomed.ql.ql.DomainQuery; -import com.b2international.snowowl.snomed.ql.ql.Exclusion; +import com.b2international.snowowl.snomed.ql.ql.ExclusionFilter; import com.b2international.snowowl.snomed.ql.ql.Filter; import com.b2international.snowowl.snomed.ql.ql.LanguageCodeFilter; import com.b2international.snowowl.snomed.ql.ql.LanguageRefSetFilter; @@ -206,21 +206,21 @@ public class QlPackageImpl extends EPackageImpl implements QlPackage * * @generated */ - private EClass disjunctionEClass = null; + private EClass disjunctionFilterEClass = null; /** * * * @generated */ - private EClass conjunctionEClass = null; + private EClass conjunctionFilterEClass = null; /** * * * @generated */ - private EClass exclusionEClass = null; + private EClass exclusionFilterEClass = null; /** * @@ -265,7 +265,7 @@ private QlPackageImpl() /** * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * + * *

      This method is used to initialize {@link QlPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * @@ -280,7 +280,8 @@ public static QlPackage init() if (isInited) return (QlPackage)EPackage.Registry.INSTANCE.getEPackage(QlPackage.eNS_URI); // Obtain or create and register package - QlPackageImpl theQlPackage = (QlPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof QlPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new QlPackageImpl()); + Object registeredQlPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + QlPackageImpl theQlPackage = registeredQlPackage instanceof QlPackageImpl ? (QlPackageImpl)registeredQlPackage : new QlPackageImpl(); isInited = true; @@ -296,7 +297,6 @@ public static QlPackage init() // Mark meta-data to indicate it can't be changed theQlPackage.freeze(); - // Update the registry and return the package EPackage.Registry.INSTANCE.put(QlPackage.eNS_URI, theQlPackage); return theQlPackage; @@ -307,6 +307,7 @@ public static QlPackage init() * * @generated */ + @Override public EClass getQuery() { return queryEClass; @@ -317,6 +318,7 @@ public EClass getQuery() * * @generated */ + @Override public EReference getQuery_Query() { return (EReference)queryEClass.getEStructuralFeatures().get(0); @@ -327,6 +329,7 @@ public EReference getQuery_Query() * * @generated */ + @Override public EClass getQueryConstraint() { return queryConstraintEClass; @@ -337,6 +340,7 @@ public EClass getQueryConstraint() * * @generated */ + @Override public EClass getSubQuery() { return subQueryEClass; @@ -347,6 +351,7 @@ public EClass getSubQuery() * * @generated */ + @Override public EClass getDomainQuery() { return domainQueryEClass; @@ -357,6 +362,7 @@ public EClass getDomainQuery() * * @generated */ + @Override public EReference getDomainQuery_Ecl() { return (EReference)domainQueryEClass.getEStructuralFeatures().get(0); @@ -367,6 +373,7 @@ public EReference getDomainQuery_Ecl() * * @generated */ + @Override public EReference getDomainQuery_Filter() { return (EReference)domainQueryEClass.getEStructuralFeatures().get(1); @@ -377,6 +384,7 @@ public EReference getDomainQuery_Filter() * * @generated */ + @Override public EClass getNestedQuery() { return nestedQueryEClass; @@ -387,6 +395,7 @@ public EClass getNestedQuery() * * @generated */ + @Override public EReference getNestedQuery_Nested() { return (EReference)nestedQueryEClass.getEStructuralFeatures().get(0); @@ -397,6 +406,7 @@ public EReference getNestedQuery_Nested() * * @generated */ + @Override public EClass getFilter() { return filterEClass; @@ -407,6 +417,7 @@ public EClass getFilter() * * @generated */ + @Override public EClass getNestedFilter() { return nestedFilterEClass; @@ -417,6 +428,7 @@ public EClass getNestedFilter() * * @generated */ + @Override public EReference getNestedFilter_Nested() { return (EReference)nestedFilterEClass.getEStructuralFeatures().get(0); @@ -427,6 +439,7 @@ public EReference getNestedFilter_Nested() * * @generated */ + @Override public EClass getPropertyFilter() { return propertyFilterEClass; @@ -437,6 +450,7 @@ public EClass getPropertyFilter() * * @generated */ + @Override public EClass getActiveFilter() { return activeFilterEClass; @@ -447,6 +461,7 @@ public EClass getActiveFilter() * * @generated */ + @Override public EAttribute getActiveFilter_Domain() { return (EAttribute)activeFilterEClass.getEStructuralFeatures().get(0); @@ -457,6 +472,7 @@ public EAttribute getActiveFilter_Domain() * * @generated */ + @Override public EAttribute getActiveFilter_Active() { return (EAttribute)activeFilterEClass.getEStructuralFeatures().get(1); @@ -467,6 +483,7 @@ public EAttribute getActiveFilter_Active() * * @generated */ + @Override public EClass getModuleFilter() { return moduleFilterEClass; @@ -477,6 +494,7 @@ public EClass getModuleFilter() * * @generated */ + @Override public EAttribute getModuleFilter_Domain() { return (EAttribute)moduleFilterEClass.getEStructuralFeatures().get(0); @@ -487,6 +505,7 @@ public EAttribute getModuleFilter_Domain() * * @generated */ + @Override public EReference getModuleFilter_ModuleId() { return (EReference)moduleFilterEClass.getEStructuralFeatures().get(1); @@ -497,6 +516,7 @@ public EReference getModuleFilter_ModuleId() * * @generated */ + @Override public EClass getTermFilter() { return termFilterEClass; @@ -507,6 +527,7 @@ public EClass getTermFilter() * * @generated */ + @Override public EAttribute getTermFilter_LexicalSearchType() { return (EAttribute)termFilterEClass.getEStructuralFeatures().get(0); @@ -517,6 +538,7 @@ public EAttribute getTermFilter_LexicalSearchType() * * @generated */ + @Override public EAttribute getTermFilter_Term() { return (EAttribute)termFilterEClass.getEStructuralFeatures().get(1); @@ -527,6 +549,7 @@ public EAttribute getTermFilter_Term() * * @generated */ + @Override public EClass getPreferredInFilter() { return preferredInFilterEClass; @@ -537,6 +560,7 @@ public EClass getPreferredInFilter() * * @generated */ + @Override public EReference getPreferredInFilter_LanguageRefSetId() { return (EReference)preferredInFilterEClass.getEStructuralFeatures().get(0); @@ -547,6 +571,7 @@ public EReference getPreferredInFilter_LanguageRefSetId() * * @generated */ + @Override public EClass getAcceptableInFilter() { return acceptableInFilterEClass; @@ -557,6 +582,7 @@ public EClass getAcceptableInFilter() * * @generated */ + @Override public EReference getAcceptableInFilter_LanguageRefSetId() { return (EReference)acceptableInFilterEClass.getEStructuralFeatures().get(0); @@ -567,6 +593,7 @@ public EReference getAcceptableInFilter_LanguageRefSetId() * * @generated */ + @Override public EClass getLanguageRefSetFilter() { return languageRefSetFilterEClass; @@ -577,6 +604,7 @@ public EClass getLanguageRefSetFilter() * * @generated */ + @Override public EReference getLanguageRefSetFilter_LanguageRefSetId() { return (EReference)languageRefSetFilterEClass.getEStructuralFeatures().get(0); @@ -587,6 +615,7 @@ public EReference getLanguageRefSetFilter_LanguageRefSetId() * * @generated */ + @Override public EClass getTypeFilter() { return typeFilterEClass; @@ -597,6 +626,7 @@ public EClass getTypeFilter() * * @generated */ + @Override public EReference getTypeFilter_Type() { return (EReference)typeFilterEClass.getEStructuralFeatures().get(0); @@ -607,6 +637,7 @@ public EReference getTypeFilter_Type() * * @generated */ + @Override public EClass getCaseSignificanceFilter() { return caseSignificanceFilterEClass; @@ -617,6 +648,7 @@ public EClass getCaseSignificanceFilter() * * @generated */ + @Override public EReference getCaseSignificanceFilter_CaseSignificanceId() { return (EReference)caseSignificanceFilterEClass.getEStructuralFeatures().get(0); @@ -627,6 +659,7 @@ public EReference getCaseSignificanceFilter_CaseSignificanceId() * * @generated */ + @Override public EClass getLanguageCodeFilter() { return languageCodeFilterEClass; @@ -637,6 +670,7 @@ public EClass getLanguageCodeFilter() * * @generated */ + @Override public EAttribute getLanguageCodeFilter_LanguageCode() { return (EAttribute)languageCodeFilterEClass.getEStructuralFeatures().get(0); @@ -647,6 +681,7 @@ public EAttribute getLanguageCodeFilter_LanguageCode() * * @generated */ + @Override public EClass getQueryDisjunction() { return queryDisjunctionEClass; @@ -657,6 +692,7 @@ public EClass getQueryDisjunction() * * @generated */ + @Override public EReference getQueryDisjunction_Left() { return (EReference)queryDisjunctionEClass.getEStructuralFeatures().get(0); @@ -667,6 +703,7 @@ public EReference getQueryDisjunction_Left() * * @generated */ + @Override public EReference getQueryDisjunction_Right() { return (EReference)queryDisjunctionEClass.getEStructuralFeatures().get(1); @@ -677,6 +714,7 @@ public EReference getQueryDisjunction_Right() * * @generated */ + @Override public EClass getQueryConjunction() { return queryConjunctionEClass; @@ -687,6 +725,7 @@ public EClass getQueryConjunction() * * @generated */ + @Override public EReference getQueryConjunction_Left() { return (EReference)queryConjunctionEClass.getEStructuralFeatures().get(0); @@ -697,6 +736,7 @@ public EReference getQueryConjunction_Left() * * @generated */ + @Override public EReference getQueryConjunction_Right() { return (EReference)queryConjunctionEClass.getEStructuralFeatures().get(1); @@ -707,6 +747,7 @@ public EReference getQueryConjunction_Right() * * @generated */ + @Override public EClass getQueryExclusion() { return queryExclusionEClass; @@ -717,6 +758,7 @@ public EClass getQueryExclusion() * * @generated */ + @Override public EReference getQueryExclusion_Left() { return (EReference)queryExclusionEClass.getEStructuralFeatures().get(0); @@ -727,6 +769,7 @@ public EReference getQueryExclusion_Left() * * @generated */ + @Override public EReference getQueryExclusion_Right() { return (EReference)queryExclusionEClass.getEStructuralFeatures().get(1); @@ -737,9 +780,10 @@ public EReference getQueryExclusion_Right() * * @generated */ - public EClass getDisjunction() + @Override + public EClass getDisjunctionFilter() { - return disjunctionEClass; + return disjunctionFilterEClass; } /** @@ -747,9 +791,10 @@ public EClass getDisjunction() * * @generated */ - public EReference getDisjunction_Left() + @Override + public EReference getDisjunctionFilter_Left() { - return (EReference)disjunctionEClass.getEStructuralFeatures().get(0); + return (EReference)disjunctionFilterEClass.getEStructuralFeatures().get(0); } /** @@ -757,9 +802,10 @@ public EReference getDisjunction_Left() * * @generated */ - public EReference getDisjunction_Right() + @Override + public EReference getDisjunctionFilter_Right() { - return (EReference)disjunctionEClass.getEStructuralFeatures().get(1); + return (EReference)disjunctionFilterEClass.getEStructuralFeatures().get(1); } /** @@ -767,9 +813,10 @@ public EReference getDisjunction_Right() * * @generated */ - public EClass getConjunction() + @Override + public EClass getConjunctionFilter() { - return conjunctionEClass; + return conjunctionFilterEClass; } /** @@ -777,9 +824,10 @@ public EClass getConjunction() * * @generated */ - public EReference getConjunction_Left() + @Override + public EReference getConjunctionFilter_Left() { - return (EReference)conjunctionEClass.getEStructuralFeatures().get(0); + return (EReference)conjunctionFilterEClass.getEStructuralFeatures().get(0); } /** @@ -787,9 +835,10 @@ public EReference getConjunction_Left() * * @generated */ - public EReference getConjunction_Right() + @Override + public EReference getConjunctionFilter_Right() { - return (EReference)conjunctionEClass.getEStructuralFeatures().get(1); + return (EReference)conjunctionFilterEClass.getEStructuralFeatures().get(1); } /** @@ -797,9 +846,10 @@ public EReference getConjunction_Right() * * @generated */ - public EClass getExclusion() + @Override + public EClass getExclusionFilter() { - return exclusionEClass; + return exclusionFilterEClass; } /** @@ -807,9 +857,10 @@ public EClass getExclusion() * * @generated */ - public EReference getExclusion_Left() + @Override + public EReference getExclusionFilter_Left() { - return (EReference)exclusionEClass.getEStructuralFeatures().get(0); + return (EReference)exclusionFilterEClass.getEStructuralFeatures().get(0); } /** @@ -817,9 +868,10 @@ public EReference getExclusion_Left() * * @generated */ - public EReference getExclusion_Right() + @Override + public EReference getExclusionFilter_Right() { - return (EReference)exclusionEClass.getEStructuralFeatures().get(1); + return (EReference)exclusionFilterEClass.getEStructuralFeatures().get(1); } /** @@ -827,6 +879,7 @@ public EReference getExclusion_Right() * * @generated */ + @Override public EEnum getLexicalSearchType() { return lexicalSearchTypeEEnum; @@ -837,6 +890,7 @@ public EEnum getLexicalSearchType() * * @generated */ + @Override public EEnum getDomain() { return domainEEnum; @@ -847,6 +901,7 @@ public EEnum getDomain() * * @generated */ + @Override public QlFactory getQlFactory() { return (QlFactory)getEFactoryInstance(); @@ -935,17 +990,17 @@ public void createPackageContents() createEReference(queryExclusionEClass, QUERY_EXCLUSION__LEFT); createEReference(queryExclusionEClass, QUERY_EXCLUSION__RIGHT); - disjunctionEClass = createEClass(DISJUNCTION); - createEReference(disjunctionEClass, DISJUNCTION__LEFT); - createEReference(disjunctionEClass, DISJUNCTION__RIGHT); + disjunctionFilterEClass = createEClass(DISJUNCTION_FILTER); + createEReference(disjunctionFilterEClass, DISJUNCTION_FILTER__LEFT); + createEReference(disjunctionFilterEClass, DISJUNCTION_FILTER__RIGHT); - conjunctionEClass = createEClass(CONJUNCTION); - createEReference(conjunctionEClass, CONJUNCTION__LEFT); - createEReference(conjunctionEClass, CONJUNCTION__RIGHT); + conjunctionFilterEClass = createEClass(CONJUNCTION_FILTER); + createEReference(conjunctionFilterEClass, CONJUNCTION_FILTER__LEFT); + createEReference(conjunctionFilterEClass, CONJUNCTION_FILTER__RIGHT); - exclusionEClass = createEClass(EXCLUSION); - createEReference(exclusionEClass, EXCLUSION__LEFT); - createEReference(exclusionEClass, EXCLUSION__RIGHT); + exclusionFilterEClass = createEClass(EXCLUSION_FILTER); + createEReference(exclusionFilterEClass, EXCLUSION_FILTER__LEFT); + createEReference(exclusionFilterEClass, EXCLUSION_FILTER__RIGHT); // Create enums lexicalSearchTypeEEnum = createEEnum(LEXICAL_SEARCH_TYPE); @@ -1001,9 +1056,9 @@ public void initializePackageContents() queryDisjunctionEClass.getESuperTypes().add(this.getQueryConstraint()); queryConjunctionEClass.getESuperTypes().add(this.getQueryConstraint()); queryExclusionEClass.getESuperTypes().add(this.getQueryConstraint()); - disjunctionEClass.getESuperTypes().add(this.getFilter()); - conjunctionEClass.getESuperTypes().add(this.getFilter()); - exclusionEClass.getESuperTypes().add(this.getFilter()); + disjunctionFilterEClass.getESuperTypes().add(this.getFilter()); + conjunctionFilterEClass.getESuperTypes().add(this.getFilter()); + exclusionFilterEClass.getESuperTypes().add(this.getFilter()); // Initialize classes and features; add operations and parameters initEClass(queryEClass, Query.class, "Query", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -1069,17 +1124,17 @@ public void initializePackageContents() initEReference(getQueryExclusion_Left(), this.getSubQuery(), null, "left", null, 0, 1, QueryExclusion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getQueryExclusion_Right(), this.getSubQuery(), null, "right", null, 0, 1, QueryExclusion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(disjunctionEClass, Disjunction.class, "Disjunction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getDisjunction_Left(), this.getFilter(), null, "left", null, 0, 1, Disjunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getDisjunction_Right(), this.getFilter(), null, "right", null, 0, 1, Disjunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(disjunctionFilterEClass, DisjunctionFilter.class, "DisjunctionFilter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDisjunctionFilter_Left(), this.getFilter(), null, "left", null, 0, 1, DisjunctionFilter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDisjunctionFilter_Right(), this.getFilter(), null, "right", null, 0, 1, DisjunctionFilter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(conjunctionEClass, Conjunction.class, "Conjunction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getConjunction_Left(), this.getFilter(), null, "left", null, 0, 1, Conjunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getConjunction_Right(), this.getFilter(), null, "right", null, 0, 1, Conjunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(conjunctionFilterEClass, ConjunctionFilter.class, "ConjunctionFilter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getConjunctionFilter_Left(), this.getFilter(), null, "left", null, 0, 1, ConjunctionFilter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getConjunctionFilter_Right(), this.getFilter(), null, "right", null, 0, 1, ConjunctionFilter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(exclusionEClass, Exclusion.class, "Exclusion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getExclusion_Left(), this.getPropertyFilter(), null, "left", null, 0, 1, Exclusion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getExclusion_Right(), this.getPropertyFilter(), null, "right", null, 0, 1, Exclusion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(exclusionFilterEClass, ExclusionFilter.class, "ExclusionFilter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getExclusionFilter_Left(), this.getPropertyFilter(), null, "left", null, 0, 1, ExclusionFilter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getExclusionFilter_Right(), this.getPropertyFilter(), null, "right", null, 0, 1, ExclusionFilter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Initialize enums and add enum literals initEEnum(lexicalSearchTypeEEnum, LexicalSearchType.class, "LexicalSearchType"); diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryConjunctionImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryConjunctionImpl.java index 33465340ba8..1176d4ca542 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryConjunctionImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryConjunctionImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,6 +89,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public QueryConstraint getLeft() { return left; @@ -116,6 +117,7 @@ public NotificationChain basicSetLeft(QueryConstraint newLeft, NotificationChain * * @generated */ + @Override public void setLeft(QueryConstraint newLeft) { if (newLeft != left) @@ -137,6 +139,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public QueryConstraint getRight() { return right; @@ -164,6 +167,7 @@ public NotificationChain basicSetRight(QueryConstraint newRight, NotificationCha * * @generated */ + @Override public void setRight(QueryConstraint newRight) { if (newRight != right) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryConstraintImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryConstraintImpl.java index 75f6efc9fd2..2c98f25d8da 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryConstraintImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryConstraintImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryDisjunctionImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryDisjunctionImpl.java index 437058cb686..2902439a107 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryDisjunctionImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryDisjunctionImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,6 +89,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public QueryConstraint getLeft() { return left; @@ -116,6 +117,7 @@ public NotificationChain basicSetLeft(QueryConstraint newLeft, NotificationChain * * @generated */ + @Override public void setLeft(QueryConstraint newLeft) { if (newLeft != left) @@ -137,6 +139,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public QueryConstraint getRight() { return right; @@ -164,6 +167,7 @@ public NotificationChain basicSetRight(QueryConstraint newRight, NotificationCha * * @generated */ + @Override public void setRight(QueryConstraint newRight) { if (newRight != right) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryExclusionImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryExclusionImpl.java index 65d3df1fd3a..96f6589d584 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryExclusionImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryExclusionImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,6 +89,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public SubQuery getLeft() { return left; @@ -116,6 +117,7 @@ public NotificationChain basicSetLeft(SubQuery newLeft, NotificationChain msgs) * * @generated */ + @Override public void setLeft(SubQuery newLeft) { if (newLeft != left) @@ -137,6 +139,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public SubQuery getRight() { return right; @@ -164,6 +167,7 @@ public NotificationChain basicSetRight(SubQuery newRight, NotificationChain msgs * * @generated */ + @Override public void setRight(SubQuery newRight) { if (newRight != right) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryImpl.java index 854b59de0ab..7bb95c013f3 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/QueryImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,6 +79,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public QueryConstraint getQuery() { return query; @@ -106,6 +107,7 @@ public NotificationChain basicSetQuery(QueryConstraint newQuery, NotificationCha * * @generated */ + @Override public void setQuery(QueryConstraint newQuery) { if (newQuery != query) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/SubQueryImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/SubQueryImpl.java index f85cb0aa121..8f39e983b42 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/SubQueryImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/SubQueryImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/TermFilterImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/TermFilterImpl.java index 376253518ba..59db9339b79 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/TermFilterImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/TermFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -107,6 +107,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public LexicalSearchType getLexicalSearchType() { return lexicalSearchType; @@ -117,6 +118,7 @@ public LexicalSearchType getLexicalSearchType() * * @generated */ + @Override public void setLexicalSearchType(LexicalSearchType newLexicalSearchType) { LexicalSearchType oldLexicalSearchType = lexicalSearchType; @@ -130,6 +132,7 @@ public void setLexicalSearchType(LexicalSearchType newLexicalSearchType) * * @generated */ + @Override public String getTerm() { return term; @@ -140,6 +143,7 @@ public String getTerm() * * @generated */ + @Override public void setTerm(String newTerm) { String oldTerm = term; @@ -234,7 +238,7 @@ public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (lexicalSearchType: "); result.append(lexicalSearchType); result.append(", term: "); diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/TypeFilterImpl.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/TypeFilterImpl.java index b7c90198688..ccfa1002127 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/TypeFilterImpl.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/impl/TypeFilterImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,6 +79,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public ExpressionConstraint getType() { return type; @@ -106,6 +107,7 @@ public NotificationChain basicSetType(ExpressionConstraint newType, Notification * * @generated */ + @Override public void setType(ExpressionConstraint newType) { if (newType != type) diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/util/QlAdapterFactory.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/util/QlAdapterFactory.java index 64606ea92b4..e23b2bf94f6 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/util/QlAdapterFactory.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/util/QlAdapterFactory.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -188,19 +188,19 @@ public Adapter caseQueryExclusion(QueryExclusion object) return createQueryExclusionAdapter(); } @Override - public Adapter caseDisjunction(Disjunction object) + public Adapter caseDisjunctionFilter(DisjunctionFilter object) { - return createDisjunctionAdapter(); + return createDisjunctionFilterAdapter(); } @Override - public Adapter caseConjunction(Conjunction object) + public Adapter caseConjunctionFilter(ConjunctionFilter object) { - return createConjunctionAdapter(); + return createConjunctionFilterAdapter(); } @Override - public Adapter caseExclusion(Exclusion object) + public Adapter caseExclusionFilter(ExclusionFilter object) { - return createExclusionAdapter(); + return createExclusionFilterAdapter(); } @Override public Adapter defaultCase(EObject object) @@ -525,46 +525,46 @@ public Adapter createQueryExclusionAdapter() } /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.ql.ql.Disjunction Disjunction}'. + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter Disjunction Filter}'. * * 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. * * @return the new adapter. - * @see com.b2international.snowowl.snomed.ql.ql.Disjunction + * @see com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter * @generated */ - public Adapter createDisjunctionAdapter() + public Adapter createDisjunctionFilterAdapter() { return null; } /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.ql.ql.Conjunction Conjunction}'. + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter Conjunction Filter}'. * * 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. * * @return the new adapter. - * @see com.b2international.snowowl.snomed.ql.ql.Conjunction + * @see com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter * @generated */ - public Adapter createConjunctionAdapter() + public Adapter createConjunctionFilterAdapter() { return null; } /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.ql.ql.Exclusion Exclusion}'. + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.ql.ql.ExclusionFilter Exclusion Filter}'. * * 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. * * @return the new adapter. - * @see com.b2international.snowowl.snomed.ql.ql.Exclusion + * @see com.b2international.snowowl.snomed.ql.ql.ExclusionFilter * @generated */ - public Adapter createExclusionAdapter() + public Adapter createExclusionFilterAdapter() { return null; } diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/util/QlSwitch.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/util/QlSwitch.java index 1436ed3f825..32188bb1795 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/util/QlSwitch.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/util/QlSwitch.java @@ -1,5 +1,5 @@ /** - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -254,27 +254,27 @@ protected T doSwitch(int classifierID, EObject theEObject) if (result == null) result = defaultCase(theEObject); return result; } - case QlPackage.DISJUNCTION: + case QlPackage.DISJUNCTION_FILTER: { - Disjunction disjunction = (Disjunction)theEObject; - T result = caseDisjunction(disjunction); - if (result == null) result = caseFilter(disjunction); + DisjunctionFilter disjunctionFilter = (DisjunctionFilter)theEObject; + T result = caseDisjunctionFilter(disjunctionFilter); + if (result == null) result = caseFilter(disjunctionFilter); if (result == null) result = defaultCase(theEObject); return result; } - case QlPackage.CONJUNCTION: + case QlPackage.CONJUNCTION_FILTER: { - Conjunction conjunction = (Conjunction)theEObject; - T result = caseConjunction(conjunction); - if (result == null) result = caseFilter(conjunction); + ConjunctionFilter conjunctionFilter = (ConjunctionFilter)theEObject; + T result = caseConjunctionFilter(conjunctionFilter); + if (result == null) result = caseFilter(conjunctionFilter); if (result == null) result = defaultCase(theEObject); return result; } - case QlPackage.EXCLUSION: + case QlPackage.EXCLUSION_FILTER: { - Exclusion exclusion = (Exclusion)theEObject; - T result = caseExclusion(exclusion); - if (result == null) result = caseFilter(exclusion); + ExclusionFilter exclusionFilter = (ExclusionFilter)theEObject; + T result = caseExclusionFilter(exclusionFilter); + if (result == null) result = caseFilter(exclusionFilter); if (result == null) result = defaultCase(theEObject); return result; } @@ -603,49 +603,49 @@ public T caseQueryExclusion(QueryExclusion object) } /** - * Returns the result of interpreting the object as an instance of 'Disjunction'. + * Returns the result of interpreting the object as an instance of 'Disjunction Filter'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Disjunction'. + * @return the result of interpreting the object as an instance of 'Disjunction Filter'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseDisjunction(Disjunction object) + public T caseDisjunctionFilter(DisjunctionFilter object) { return null; } /** - * Returns the result of interpreting the object as an instance of 'Conjunction'. + * Returns the result of interpreting the object as an instance of 'Conjunction Filter'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Conjunction'. + * @return the result of interpreting the object as an instance of 'Conjunction Filter'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseConjunction(Conjunction object) + public T caseConjunctionFilter(ConjunctionFilter object) { return null; } /** - * Returns the result of interpreting the object as an instance of 'Exclusion'. + * Returns the result of interpreting the object as an instance of 'Exclusion Filter'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Exclusion'. + * @return the result of interpreting the object as an instance of 'Exclusion Filter'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseExclusion(Exclusion object) + public T caseExclusionFilter(ExclusionFilter object) { return null; } diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/scoping/AbstractQLScopeProvider.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/scoping/AbstractQLScopeProvider.java index 5cb9fdb5113..d4a3f1a2d07 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/scoping/AbstractQLScopeProvider.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/scoping/AbstractQLScopeProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/serializer/QLSemanticSequencer.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/serializer/QLSemanticSequencer.java index 8e3243dbc97..37bde32fe9f 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/serializer/QLSemanticSequencer.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/serializer/QLSemanticSequencer.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,14 +21,12 @@ import com.b2international.snowowl.snomed.ecl.ecl.AndRefinement; import com.b2international.snowowl.snomed.ecl.ecl.Any; import com.b2international.snowowl.snomed.ecl.ecl.AttributeConstraint; -import com.b2international.snowowl.snomed.ecl.ecl.AttributeGroup; import com.b2international.snowowl.snomed.ecl.ecl.AttributeValueEquals; import com.b2international.snowowl.snomed.ecl.ecl.AttributeValueNotEquals; import com.b2international.snowowl.snomed.ecl.ecl.BooleanValueEquals; import com.b2international.snowowl.snomed.ecl.ecl.BooleanValueNotEquals; import com.b2international.snowowl.snomed.ecl.ecl.Cardinality; import com.b2international.snowowl.snomed.ecl.ecl.ChildOf; -import com.b2international.snowowl.snomed.ecl.ecl.ConceptReference; import com.b2international.snowowl.snomed.ecl.ecl.DecimalValueEquals; import com.b2international.snowowl.snomed.ecl.ecl.DecimalValueGreaterThan; import com.b2international.snowowl.snomed.ecl.ecl.DecimalValueGreaterThanEquals; @@ -38,6 +36,8 @@ import com.b2international.snowowl.snomed.ecl.ecl.DescendantOf; import com.b2international.snowowl.snomed.ecl.ecl.DescendantOrSelfOf; import com.b2international.snowowl.snomed.ecl.ecl.DottedExpressionConstraint; +import com.b2international.snowowl.snomed.ecl.ecl.EclAttributeGroup; +import com.b2international.snowowl.snomed.ecl.ecl.EclConceptReference; import com.b2international.snowowl.snomed.ecl.ecl.EclPackage; import com.b2international.snowowl.snomed.ecl.ecl.ExclusionExpressionConstraint; import com.b2international.snowowl.snomed.ecl.ecl.IntegerValueEquals; @@ -60,10 +60,10 @@ import com.b2international.snowowl.snomed.ql.ql.AcceptableInFilter; import com.b2international.snowowl.snomed.ql.ql.ActiveFilter; import com.b2international.snowowl.snomed.ql.ql.CaseSignificanceFilter; -import com.b2international.snowowl.snomed.ql.ql.Conjunction; -import com.b2international.snowowl.snomed.ql.ql.Disjunction; +import com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter; +import com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter; import com.b2international.snowowl.snomed.ql.ql.DomainQuery; -import com.b2international.snowowl.snomed.ql.ql.Exclusion; +import com.b2international.snowowl.snomed.ql.ql.ExclusionFilter; import com.b2international.snowowl.snomed.ql.ql.LanguageCodeFilter; import com.b2international.snowowl.snomed.ql.ql.LanguageRefSetFilter; import com.b2international.snowowl.snomed.ql.ql.ModuleFilter; @@ -113,7 +113,7 @@ public void sequence(ISerializationContext context, EObject semanticObject) { sequence_AndExpressionConstraint(context, (AndExpressionConstraint) semanticObject); return; case EclPackage.AND_REFINEMENT: - if (rule == grammarAccess.getAttributeSetRule() + if (rule == grammarAccess.getEclAttributeSetRule() || rule == grammarAccess.getOrAttributeSetRule() || action == grammarAccess.getOrAttributeSetAccess().getOrRefinementLeftAction_1_0() || rule == grammarAccess.getAndAttributeSetRule() @@ -121,7 +121,7 @@ public void sequence(ISerializationContext context, EObject semanticObject) { sequence_AndAttributeSet(context, (AndRefinement) semanticObject); return; } - else if (rule == grammarAccess.getRefinementRule() + else if (rule == grammarAccess.getEclRefinementRule() || rule == grammarAccess.getOrRefinementRule() || action == grammarAccess.getOrRefinementAccess().getOrRefinementLeftAction_1_0_0() || rule == grammarAccess.getAndRefinementRule() @@ -136,9 +136,6 @@ else if (rule == grammarAccess.getRefinementRule() case EclPackage.ATTRIBUTE_CONSTRAINT: sequence_AttributeConstraint(context, (AttributeConstraint) semanticObject); return; - case EclPackage.ATTRIBUTE_GROUP: - sequence_AttributeGroup(context, (AttributeGroup) semanticObject); - return; case EclPackage.ATTRIBUTE_VALUE_EQUALS: sequence_AttributeValueEquals(context, (AttributeValueEquals) semanticObject); return; @@ -157,9 +154,6 @@ else if (rule == grammarAccess.getRefinementRule() case EclPackage.CHILD_OF: sequence_ChildOf(context, (ChildOf) semanticObject); return; - case EclPackage.CONCEPT_REFERENCE: - sequence_ConceptReference(context, (ConceptReference) semanticObject); - return; case EclPackage.DECIMAL_VALUE_EQUALS: sequence_DecimalValueEquals(context, (DecimalValueEquals) semanticObject); return; @@ -187,6 +181,12 @@ else if (rule == grammarAccess.getRefinementRule() case EclPackage.DOTTED_EXPRESSION_CONSTRAINT: sequence_DottedExpressionConstraint(context, (DottedExpressionConstraint) semanticObject); return; + case EclPackage.ECL_ATTRIBUTE_GROUP: + sequence_EclAttributeGroup(context, (EclAttributeGroup) semanticObject); + return; + case EclPackage.ECL_CONCEPT_REFERENCE: + sequence_EclConceptReference(context, (EclConceptReference) semanticObject); + return; case EclPackage.EXCLUSION_EXPRESSION_CONSTRAINT: sequence_ExclusionExpressionConstraint(context, (ExclusionExpressionConstraint) semanticObject); return; @@ -215,7 +215,7 @@ else if (rule == grammarAccess.getRefinementRule() sequence_NestedExpression(context, (NestedExpression) semanticObject); return; case EclPackage.NESTED_REFINEMENT: - if (rule == grammarAccess.getAttributeSetRule() + if (rule == grammarAccess.getEclAttributeSetRule() || rule == grammarAccess.getOrAttributeSetRule() || action == grammarAccess.getOrAttributeSetAccess().getOrRefinementLeftAction_1_0() || rule == grammarAccess.getAndAttributeSetRule() @@ -225,7 +225,7 @@ else if (rule == grammarAccess.getRefinementRule() sequence_NestedAttributeSet(context, (NestedRefinement) semanticObject); return; } - else if (rule == grammarAccess.getRefinementRule() + else if (rule == grammarAccess.getEclRefinementRule() || rule == grammarAccess.getOrRefinementRule() || action == grammarAccess.getOrRefinementAccess().getOrRefinementLeftAction_1_0_0() || rule == grammarAccess.getAndRefinementRule() @@ -240,13 +240,13 @@ else if (rule == grammarAccess.getRefinementRule() sequence_OrExpressionConstraint(context, (OrExpressionConstraint) semanticObject); return; case EclPackage.OR_REFINEMENT: - if (rule == grammarAccess.getAttributeSetRule() + if (rule == grammarAccess.getEclAttributeSetRule() || rule == grammarAccess.getOrAttributeSetRule() || action == grammarAccess.getOrAttributeSetAccess().getOrRefinementLeftAction_1_0()) { sequence_OrAttributeSet(context, (OrRefinement) semanticObject); return; } - else if (rule == grammarAccess.getRefinementRule() + else if (rule == grammarAccess.getEclRefinementRule() || rule == grammarAccess.getOrRefinementRule() || action == grammarAccess.getOrRefinementAccess().getOrRefinementLeftAction_1_0_0()) { sequence_OrRefinement(context, (OrRefinement) semanticObject); @@ -280,17 +280,17 @@ else if (epackage == QlPackage.eINSTANCE) case QlPackage.CASE_SIGNIFICANCE_FILTER: sequence_CaseSignificanceFilter(context, (CaseSignificanceFilter) semanticObject); return; - case QlPackage.CONJUNCTION: - sequence_Conjunction(context, (Conjunction) semanticObject); + case QlPackage.CONJUNCTION_FILTER: + sequence_ConjunctionFilter(context, (ConjunctionFilter) semanticObject); return; - case QlPackage.DISJUNCTION: - sequence_Disjunction(context, (Disjunction) semanticObject); + case QlPackage.DISJUNCTION_FILTER: + sequence_DisjunctionFilter(context, (DisjunctionFilter) semanticObject); return; case QlPackage.DOMAIN_QUERY: sequence_DomainQuery(context, (DomainQuery) semanticObject); return; - case QlPackage.EXCLUSION: - sequence_Exclusion(context, (Exclusion) semanticObject); + case QlPackage.EXCLUSION_FILTER: + sequence_ExclusionFilter(context, (ExclusionFilter) semanticObject); return; case QlPackage.LANGUAGE_CODE_FILTER: sequence_LanguageCodeFilter(context, (LanguageCodeFilter) semanticObject); @@ -336,12 +336,12 @@ else if (epackage == QlPackage.eINSTANCE) /** * Contexts: * Filter returns AcceptableInFilter - * Disjunction returns AcceptableInFilter - * Disjunction.Disjunction_1_0 returns AcceptableInFilter - * Conjunction returns AcceptableInFilter - * Conjunction.Conjunction_1_0 returns AcceptableInFilter - * Exclusion returns AcceptableInFilter - * Exclusion.Exclusion_1_0 returns AcceptableInFilter + * DisjunctionFilter returns AcceptableInFilter + * DisjunctionFilter.DisjunctionFilter_1_0 returns AcceptableInFilter + * ConjunctionFilter returns AcceptableInFilter + * ConjunctionFilter.ConjunctionFilter_1_0 returns AcceptableInFilter + * ExclusionFilter returns AcceptableInFilter + * ExclusionFilter.ExclusionFilter_1_0 returns AcceptableInFilter * PropertyFilter returns AcceptableInFilter * AcceptableInFilter returns AcceptableInFilter * @@ -362,12 +362,12 @@ protected void sequence_AcceptableInFilter(ISerializationContext context, Accept /** * Contexts: * Filter returns ActiveFilter - * Disjunction returns ActiveFilter - * Disjunction.Disjunction_1_0 returns ActiveFilter - * Conjunction returns ActiveFilter - * Conjunction.Conjunction_1_0 returns ActiveFilter - * Exclusion returns ActiveFilter - * Exclusion.Exclusion_1_0 returns ActiveFilter + * DisjunctionFilter returns ActiveFilter + * DisjunctionFilter.DisjunctionFilter_1_0 returns ActiveFilter + * ConjunctionFilter returns ActiveFilter + * ConjunctionFilter.ConjunctionFilter_1_0 returns ActiveFilter + * ExclusionFilter returns ActiveFilter + * ExclusionFilter.ExclusionFilter_1_0 returns ActiveFilter * PropertyFilter returns ActiveFilter * ActiveFilter returns ActiveFilter * @@ -382,12 +382,12 @@ protected void sequence_ActiveFilter(ISerializationContext context, ActiveFilter /** * Contexts: * Filter returns CaseSignificanceFilter - * Disjunction returns CaseSignificanceFilter - * Disjunction.Disjunction_1_0 returns CaseSignificanceFilter - * Conjunction returns CaseSignificanceFilter - * Conjunction.Conjunction_1_0 returns CaseSignificanceFilter - * Exclusion returns CaseSignificanceFilter - * Exclusion.Exclusion_1_0 returns CaseSignificanceFilter + * DisjunctionFilter returns CaseSignificanceFilter + * DisjunctionFilter.DisjunctionFilter_1_0 returns CaseSignificanceFilter + * ConjunctionFilter returns CaseSignificanceFilter + * ConjunctionFilter.ConjunctionFilter_1_0 returns CaseSignificanceFilter + * ExclusionFilter returns CaseSignificanceFilter + * ExclusionFilter.ExclusionFilter_1_0 returns CaseSignificanceFilter * PropertyFilter returns CaseSignificanceFilter * CaseSignificanceFilter returns CaseSignificanceFilter * @@ -407,48 +407,48 @@ protected void sequence_CaseSignificanceFilter(ISerializationContext context, Ca /** * Contexts: - * Filter returns Conjunction - * Disjunction returns Conjunction - * Disjunction.Disjunction_1_0 returns Conjunction - * Conjunction returns Conjunction - * Conjunction.Conjunction_1_0 returns Conjunction + * Filter returns ConjunctionFilter + * DisjunctionFilter returns ConjunctionFilter + * DisjunctionFilter.DisjunctionFilter_1_0 returns ConjunctionFilter + * ConjunctionFilter returns ConjunctionFilter + * ConjunctionFilter.ConjunctionFilter_1_0 returns ConjunctionFilter * * Constraint: - * (left=Conjunction_Conjunction_1_0 right=Exclusion) + * (left=ConjunctionFilter_ConjunctionFilter_1_0 right=ExclusionFilter) */ - protected void sequence_Conjunction(ISerializationContext context, Conjunction semanticObject) { + protected void sequence_ConjunctionFilter(ISerializationContext context, ConjunctionFilter semanticObject) { if (errorAcceptor != null) { - if (transientValues.isValueTransient(semanticObject, QlPackage.Literals.CONJUNCTION__LEFT) == ValueTransient.YES) - errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, QlPackage.Literals.CONJUNCTION__LEFT)); - if (transientValues.isValueTransient(semanticObject, QlPackage.Literals.CONJUNCTION__RIGHT) == ValueTransient.YES) - errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, QlPackage.Literals.CONJUNCTION__RIGHT)); + if (transientValues.isValueTransient(semanticObject, QlPackage.Literals.CONJUNCTION_FILTER__LEFT) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, QlPackage.Literals.CONJUNCTION_FILTER__LEFT)); + if (transientValues.isValueTransient(semanticObject, QlPackage.Literals.CONJUNCTION_FILTER__RIGHT) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, QlPackage.Literals.CONJUNCTION_FILTER__RIGHT)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); - feeder.accept(grammarAccess.getConjunctionAccess().getConjunctionLeftAction_1_0(), semanticObject.getLeft()); - feeder.accept(grammarAccess.getConjunctionAccess().getRightExclusionParserRuleCall_1_2_0(), semanticObject.getRight()); + feeder.accept(grammarAccess.getConjunctionFilterAccess().getConjunctionFilterLeftAction_1_0(), semanticObject.getLeft()); + feeder.accept(grammarAccess.getConjunctionFilterAccess().getRightExclusionFilterParserRuleCall_1_2_0(), semanticObject.getRight()); feeder.finish(); } /** * Contexts: - * Filter returns Disjunction - * Disjunction returns Disjunction - * Disjunction.Disjunction_1_0 returns Disjunction + * Filter returns DisjunctionFilter + * DisjunctionFilter returns DisjunctionFilter + * DisjunctionFilter.DisjunctionFilter_1_0 returns DisjunctionFilter * * Constraint: - * (left=Disjunction_Disjunction_1_0 right=Conjunction) + * (left=DisjunctionFilter_DisjunctionFilter_1_0 right=ConjunctionFilter) */ - protected void sequence_Disjunction(ISerializationContext context, Disjunction semanticObject) { + protected void sequence_DisjunctionFilter(ISerializationContext context, DisjunctionFilter semanticObject) { if (errorAcceptor != null) { - if (transientValues.isValueTransient(semanticObject, QlPackage.Literals.DISJUNCTION__LEFT) == ValueTransient.YES) - errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, QlPackage.Literals.DISJUNCTION__LEFT)); - if (transientValues.isValueTransient(semanticObject, QlPackage.Literals.DISJUNCTION__RIGHT) == ValueTransient.YES) - errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, QlPackage.Literals.DISJUNCTION__RIGHT)); + if (transientValues.isValueTransient(semanticObject, QlPackage.Literals.DISJUNCTION_FILTER__LEFT) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, QlPackage.Literals.DISJUNCTION_FILTER__LEFT)); + if (transientValues.isValueTransient(semanticObject, QlPackage.Literals.DISJUNCTION_FILTER__RIGHT) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, QlPackage.Literals.DISJUNCTION_FILTER__RIGHT)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); - feeder.accept(grammarAccess.getDisjunctionAccess().getDisjunctionLeftAction_1_0(), semanticObject.getLeft()); - feeder.accept(grammarAccess.getDisjunctionAccess().getRightConjunctionParserRuleCall_1_2_0(), semanticObject.getRight()); + feeder.accept(grammarAccess.getDisjunctionFilterAccess().getDisjunctionFilterLeftAction_1_0(), semanticObject.getLeft()); + feeder.accept(grammarAccess.getDisjunctionFilterAccess().getRightConjunctionFilterParserRuleCall_1_2_0(), semanticObject.getRight()); feeder.finish(); } @@ -475,26 +475,26 @@ protected void sequence_DomainQuery(ISerializationContext context, DomainQuery s /** * Contexts: - * Filter returns Exclusion - * Disjunction returns Exclusion - * Disjunction.Disjunction_1_0 returns Exclusion - * Conjunction returns Exclusion - * Conjunction.Conjunction_1_0 returns Exclusion - * Exclusion returns Exclusion + * Filter returns ExclusionFilter + * DisjunctionFilter returns ExclusionFilter + * DisjunctionFilter.DisjunctionFilter_1_0 returns ExclusionFilter + * ConjunctionFilter returns ExclusionFilter + * ConjunctionFilter.ConjunctionFilter_1_0 returns ExclusionFilter + * ExclusionFilter returns ExclusionFilter * * Constraint: - * (left=Exclusion_Exclusion_1_0 right=PropertyFilter) + * (left=ExclusionFilter_ExclusionFilter_1_0 right=PropertyFilter) */ - protected void sequence_Exclusion(ISerializationContext context, Exclusion semanticObject) { + protected void sequence_ExclusionFilter(ISerializationContext context, ExclusionFilter semanticObject) { if (errorAcceptor != null) { - if (transientValues.isValueTransient(semanticObject, QlPackage.Literals.EXCLUSION__LEFT) == ValueTransient.YES) - errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, QlPackage.Literals.EXCLUSION__LEFT)); - if (transientValues.isValueTransient(semanticObject, QlPackage.Literals.EXCLUSION__RIGHT) == ValueTransient.YES) - errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, QlPackage.Literals.EXCLUSION__RIGHT)); + if (transientValues.isValueTransient(semanticObject, QlPackage.Literals.EXCLUSION_FILTER__LEFT) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, QlPackage.Literals.EXCLUSION_FILTER__LEFT)); + if (transientValues.isValueTransient(semanticObject, QlPackage.Literals.EXCLUSION_FILTER__RIGHT) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, QlPackage.Literals.EXCLUSION_FILTER__RIGHT)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); - feeder.accept(grammarAccess.getExclusionAccess().getExclusionLeftAction_1_0(), semanticObject.getLeft()); - feeder.accept(grammarAccess.getExclusionAccess().getRightPropertyFilterParserRuleCall_1_2_0(), semanticObject.getRight()); + feeder.accept(grammarAccess.getExclusionFilterAccess().getExclusionFilterLeftAction_1_0(), semanticObject.getLeft()); + feeder.accept(grammarAccess.getExclusionFilterAccess().getRightPropertyFilterParserRuleCall_1_2_0(), semanticObject.getRight()); feeder.finish(); } @@ -502,12 +502,12 @@ protected void sequence_Exclusion(ISerializationContext context, Exclusion seman /** * Contexts: * Filter returns LanguageCodeFilter - * Disjunction returns LanguageCodeFilter - * Disjunction.Disjunction_1_0 returns LanguageCodeFilter - * Conjunction returns LanguageCodeFilter - * Conjunction.Conjunction_1_0 returns LanguageCodeFilter - * Exclusion returns LanguageCodeFilter - * Exclusion.Exclusion_1_0 returns LanguageCodeFilter + * DisjunctionFilter returns LanguageCodeFilter + * DisjunctionFilter.DisjunctionFilter_1_0 returns LanguageCodeFilter + * ConjunctionFilter returns LanguageCodeFilter + * ConjunctionFilter.ConjunctionFilter_1_0 returns LanguageCodeFilter + * ExclusionFilter returns LanguageCodeFilter + * ExclusionFilter.ExclusionFilter_1_0 returns LanguageCodeFilter * PropertyFilter returns LanguageCodeFilter * LanguageCodeFilter returns LanguageCodeFilter * @@ -528,12 +528,12 @@ protected void sequence_LanguageCodeFilter(ISerializationContext context, Langua /** * Contexts: * Filter returns LanguageRefSetFilter - * Disjunction returns LanguageRefSetFilter - * Disjunction.Disjunction_1_0 returns LanguageRefSetFilter - * Conjunction returns LanguageRefSetFilter - * Conjunction.Conjunction_1_0 returns LanguageRefSetFilter - * Exclusion returns LanguageRefSetFilter - * Exclusion.Exclusion_1_0 returns LanguageRefSetFilter + * DisjunctionFilter returns LanguageRefSetFilter + * DisjunctionFilter.DisjunctionFilter_1_0 returns LanguageRefSetFilter + * ConjunctionFilter returns LanguageRefSetFilter + * ConjunctionFilter.ConjunctionFilter_1_0 returns LanguageRefSetFilter + * ExclusionFilter returns LanguageRefSetFilter + * ExclusionFilter.ExclusionFilter_1_0 returns LanguageRefSetFilter * PropertyFilter returns LanguageRefSetFilter * LanguageRefSetFilter returns LanguageRefSetFilter * @@ -554,12 +554,12 @@ protected void sequence_LanguageRefSetFilter(ISerializationContext context, Lang /** * Contexts: * Filter returns ModuleFilter - * Disjunction returns ModuleFilter - * Disjunction.Disjunction_1_0 returns ModuleFilter - * Conjunction returns ModuleFilter - * Conjunction.Conjunction_1_0 returns ModuleFilter - * Exclusion returns ModuleFilter - * Exclusion.Exclusion_1_0 returns ModuleFilter + * DisjunctionFilter returns ModuleFilter + * DisjunctionFilter.DisjunctionFilter_1_0 returns ModuleFilter + * ConjunctionFilter returns ModuleFilter + * ConjunctionFilter.ConjunctionFilter_1_0 returns ModuleFilter + * ExclusionFilter returns ModuleFilter + * ExclusionFilter.ExclusionFilter_1_0 returns ModuleFilter * PropertyFilter returns ModuleFilter * ModuleFilter returns ModuleFilter * @@ -574,12 +574,12 @@ protected void sequence_ModuleFilter(ISerializationContext context, ModuleFilter /** * Contexts: * Filter returns NestedFilter - * Disjunction returns NestedFilter - * Disjunction.Disjunction_1_0 returns NestedFilter - * Conjunction returns NestedFilter - * Conjunction.Conjunction_1_0 returns NestedFilter - * Exclusion returns NestedFilter - * Exclusion.Exclusion_1_0 returns NestedFilter + * DisjunctionFilter returns NestedFilter + * DisjunctionFilter.DisjunctionFilter_1_0 returns NestedFilter + * ConjunctionFilter returns NestedFilter + * ConjunctionFilter.ConjunctionFilter_1_0 returns NestedFilter + * ExclusionFilter returns NestedFilter + * ExclusionFilter.ExclusionFilter_1_0 returns NestedFilter * NestedFilter returns NestedFilter * PropertyFilter returns NestedFilter * @@ -626,12 +626,12 @@ protected void sequence_NestedQuery(ISerializationContext context, NestedQuery s /** * Contexts: * Filter returns PreferredInFilter - * Disjunction returns PreferredInFilter - * Disjunction.Disjunction_1_0 returns PreferredInFilter - * Conjunction returns PreferredInFilter - * Conjunction.Conjunction_1_0 returns PreferredInFilter - * Exclusion returns PreferredInFilter - * Exclusion.Exclusion_1_0 returns PreferredInFilter + * DisjunctionFilter returns PreferredInFilter + * DisjunctionFilter.DisjunctionFilter_1_0 returns PreferredInFilter + * ConjunctionFilter returns PreferredInFilter + * ConjunctionFilter.ConjunctionFilter_1_0 returns PreferredInFilter + * ExclusionFilter returns PreferredInFilter + * ExclusionFilter.ExclusionFilter_1_0 returns PreferredInFilter * PropertyFilter returns PreferredInFilter * PreferredInFilter returns PreferredInFilter * @@ -738,12 +738,12 @@ protected void sequence_Query(ISerializationContext context, Query semanticObjec /** * Contexts: * Filter returns TermFilter - * Disjunction returns TermFilter - * Disjunction.Disjunction_1_0 returns TermFilter - * Conjunction returns TermFilter - * Conjunction.Conjunction_1_0 returns TermFilter - * Exclusion returns TermFilter - * Exclusion.Exclusion_1_0 returns TermFilter + * DisjunctionFilter returns TermFilter + * DisjunctionFilter.DisjunctionFilter_1_0 returns TermFilter + * ConjunctionFilter returns TermFilter + * ConjunctionFilter.ConjunctionFilter_1_0 returns TermFilter + * ExclusionFilter returns TermFilter + * ExclusionFilter.ExclusionFilter_1_0 returns TermFilter * PropertyFilter returns TermFilter * TermFilter returns TermFilter * @@ -758,12 +758,12 @@ protected void sequence_TermFilter(ISerializationContext context, TermFilter sem /** * Contexts: * Filter returns TypeFilter - * Disjunction returns TypeFilter - * Disjunction.Disjunction_1_0 returns TypeFilter - * Conjunction returns TypeFilter - * Conjunction.Conjunction_1_0 returns TypeFilter - * Exclusion returns TypeFilter - * Exclusion.Exclusion_1_0 returns TypeFilter + * DisjunctionFilter returns TypeFilter + * DisjunctionFilter.DisjunctionFilter_1_0 returns TypeFilter + * ConjunctionFilter returns TypeFilter + * ConjunctionFilter.ConjunctionFilter_1_0 returns TypeFilter + * ExclusionFilter returns TypeFilter + * ExclusionFilter.ExclusionFilter_1_0 returns TypeFilter * PropertyFilter returns TypeFilter * TypeFilter returns TypeFilter * diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/serializer/QLSyntacticSequencer.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/serializer/QLSyntacticSequencer.java index 505d0246a96..045e9744ffc 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/serializer/QLSyntacticSequencer.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/serializer/QLSyntacticSequencer.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,20 +33,20 @@ public class QLSyntacticSequencer extends AbstractSyntacticSequencer { protected QLGrammarAccess grammarAccess; - protected AbstractElementAlias match_AndAttributeSet_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1; - protected AbstractElementAlias match_AndExpressionConstraint_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1; - protected AbstractElementAlias match_AndRefinement_ANDKeyword_1_0_1_0_or_CommaKeyword_1_0_1_1; - protected AbstractElementAlias match_Conjunction_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1; - protected AbstractElementAlias match_QueryConjunction_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1; + protected AbstractElementAlias match_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0; + protected AbstractElementAlias match_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0; + protected AbstractElementAlias match_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0; + protected AbstractElementAlias match_ConjunctionFilter_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0; + protected AbstractElementAlias match_QueryConjunction_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0; @Inject protected void init(IGrammarAccess access) { grammarAccess = (QLGrammarAccess) access; - match_AndAttributeSet_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndAttributeSetAccess().getANDKeyword_1_1_0()), new TokenAlias(false, false, grammarAccess.getAndAttributeSetAccess().getCommaKeyword_1_1_1())); - match_AndExpressionConstraint_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndExpressionConstraintAccess().getANDKeyword_1_1_0()), new TokenAlias(false, false, grammarAccess.getAndExpressionConstraintAccess().getCommaKeyword_1_1_1())); - match_AndRefinement_ANDKeyword_1_0_1_0_or_CommaKeyword_1_0_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndRefinementAccess().getANDKeyword_1_0_1_0()), new TokenAlias(false, false, grammarAccess.getAndRefinementAccess().getCommaKeyword_1_0_1_1())); - match_Conjunction_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getConjunctionAccess().getANDKeyword_1_1_0()), new TokenAlias(false, false, grammarAccess.getConjunctionAccess().getCommaKeyword_1_1_1())); - match_QueryConjunction_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getQueryConjunctionAccess().getANDKeyword_1_1_0()), new TokenAlias(false, false, grammarAccess.getQueryConjunctionAccess().getCommaKeyword_1_1_1())); + match_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndAttributeSetAccess().getCOMMATerminalRuleCall_1_1_1()), new TokenAlias(false, false, grammarAccess.getAndAttributeSetAccess().getCONJUNCTIONTerminalRuleCall_1_1_0())); + match_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndExpressionConstraintAccess().getCOMMATerminalRuleCall_1_1_1()), new TokenAlias(false, false, grammarAccess.getAndExpressionConstraintAccess().getCONJUNCTIONTerminalRuleCall_1_1_0())); + match_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getAndRefinementAccess().getCOMMATerminalRuleCall_1_0_1_1()), new TokenAlias(false, false, grammarAccess.getAndRefinementAccess().getCONJUNCTIONTerminalRuleCall_1_0_1_0())); + match_ConjunctionFilter_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getConjunctionFilterAccess().getCOMMATerminalRuleCall_1_1_1()), new TokenAlias(false, false, grammarAccess.getConjunctionFilterAccess().getCONJUNCTIONTerminalRuleCall_1_1_0())); + match_QueryConjunction_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getQueryConjunctionAccess().getCOMMATerminalRuleCall_1_1_1()), new TokenAlias(false, false, grammarAccess.getQueryConjunctionAccess().getCONJUNCTIONTerminalRuleCall_1_1_0())); } @Override @@ -57,6 +57,10 @@ else if (ruleCall.getRule() == grammarAccess.getCLOSE_DOUBLE_BRACESRule()) return getCLOSE_DOUBLE_BRACESToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getCOLONRule()) return getCOLONToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getCOMMARule()) + return getCOMMAToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getCONJUNCTIONRule()) + return getCONJUNCTIONToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getCURLY_CLOSERule()) return getCURLY_CLOSEToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getCURLY_OPENRule()) @@ -65,10 +69,14 @@ else if (ruleCall.getRule() == grammarAccess.getDBL_GTRule()) return getDBL_GTToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getDBL_LTRule()) return getDBL_LTToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getDISJUNCTIONRule()) + return getDISJUNCTIONToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getDOTRule()) return getDOTToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getEQUALRule()) return getEQUALToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getEXCLUSIONRule()) + return getEXCLUSIONToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getGTRule()) return getGTToken(semanticObject, ruleCall, node); else if (ruleCall.getRule() == grammarAccess.getGTERule()) @@ -134,6 +142,26 @@ protected String getCOLONToken(EObject semanticObject, RuleCall ruleCall, INode return ":"; } + /** + * terminal COMMA: + * ','; + */ + protected String getCOMMAToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return ","; + } + + /** + * terminal CONJUNCTION: + * ('a' | 'A') ('n' | 'N') ('d' | 'D'); + */ + protected String getCONJUNCTIONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "and"; + } + /** * terminal CURLY_CLOSE: * '}'; @@ -174,6 +202,16 @@ protected String getDBL_LTToken(EObject semanticObject, RuleCall ruleCall, INode return "<<"; } + /** + * terminal DISJUNCTION: + * ('o' | 'O') ('r' | 'R'); + */ + protected String getDISJUNCTIONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "or"; + } + /** * terminal DOT: * '.'; @@ -194,6 +232,16 @@ protected String getEQUALToken(EObject semanticObject, RuleCall ruleCall, INode return "="; } + /** + * terminal EXCLUSION: + * ('m' | 'M') ('i' | 'I') ('n' | 'N') ('u' | 'U') ('s' | 'S'); + */ + protected String getEXCLUSIONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "minus"; + } + /** * terminal GT: * '>'; @@ -360,72 +408,72 @@ protected void emitUnassignedTokens(EObject semanticObject, ISynTransition trans List transitionNodes = collectNodes(fromNode, toNode); for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { List syntaxNodes = getNodesFor(transitionNodes, syntax); - if (match_AndAttributeSet_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1.equals(syntax)) - emit_AndAttributeSet_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1(semanticObject, getLastNavigableState(), syntaxNodes); - else if (match_AndExpressionConstraint_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1.equals(syntax)) - emit_AndExpressionConstraint_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1(semanticObject, getLastNavigableState(), syntaxNodes); - else if (match_AndRefinement_ANDKeyword_1_0_1_0_or_CommaKeyword_1_0_1_1.equals(syntax)) - emit_AndRefinement_ANDKeyword_1_0_1_0_or_CommaKeyword_1_0_1_1(semanticObject, getLastNavigableState(), syntaxNodes); - else if (match_Conjunction_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1.equals(syntax)) - emit_Conjunction_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1(semanticObject, getLastNavigableState(), syntaxNodes); - else if (match_QueryConjunction_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1.equals(syntax)) - emit_QueryConjunction_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1(semanticObject, getLastNavigableState(), syntaxNodes); + if (match_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0.equals(syntax)) + emit_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0.equals(syntax)) + emit_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0.equals(syntax)) + emit_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_ConjunctionFilter_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0.equals(syntax)) + emit_ConjunctionFilter_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_QueryConjunction_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0.equals(syntax)) + emit_QueryConjunction_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(semanticObject, getLastNavigableState(), syntaxNodes); else acceptNodes(getLastNavigableState(), syntaxNodes); } } /** * Ambiguous syntax: - * 'AND' | ',' + * CONJUNCTION | COMMA * * This ambiguous syntax occurs at: * {AndRefinement.left=} (ambiguity) right=SubAttributeSet */ - protected void emit_AndAttributeSet_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1(EObject semanticObject, ISynNavigable transition, List nodes) { + protected void emit_AndAttributeSet_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(EObject semanticObject, ISynNavigable transition, List nodes) { acceptNodes(transition, nodes); } /** * Ambiguous syntax: - * ',' | 'AND' + * CONJUNCTION | COMMA * * This ambiguous syntax occurs at: * {AndExpressionConstraint.left=} (ambiguity) right=ExclusionExpressionConstraint */ - protected void emit_AndExpressionConstraint_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1(EObject semanticObject, ISynNavigable transition, List nodes) { + protected void emit_AndExpressionConstraint_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(EObject semanticObject, ISynNavigable transition, List nodes) { acceptNodes(transition, nodes); } /** * Ambiguous syntax: - * 'AND' | ',' + * CONJUNCTION | COMMA * * This ambiguous syntax occurs at: * {AndRefinement.left=} (ambiguity) right=SubRefinement */ - protected void emit_AndRefinement_ANDKeyword_1_0_1_0_or_CommaKeyword_1_0_1_1(EObject semanticObject, ISynNavigable transition, List nodes) { + protected void emit_AndRefinement_COMMATerminalRuleCall_1_0_1_1_or_CONJUNCTIONTerminalRuleCall_1_0_1_0(EObject semanticObject, ISynNavigable transition, List nodes) { acceptNodes(transition, nodes); } /** * Ambiguous syntax: - * 'AND' | ',' + * CONJUNCTION | COMMA * * This ambiguous syntax occurs at: - * {Conjunction.left=} (ambiguity) right=Exclusion + * {ConjunctionFilter.left=} (ambiguity) right=ExclusionFilter */ - protected void emit_Conjunction_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1(EObject semanticObject, ISynNavigable transition, List nodes) { + protected void emit_ConjunctionFilter_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(EObject semanticObject, ISynNavigable transition, List nodes) { acceptNodes(transition, nodes); } /** * Ambiguous syntax: - * ',' | 'AND' + * CONJUNCTION | COMMA * * This ambiguous syntax occurs at: * {QueryConjunction.left=} (ambiguity) right=QueryExclusion */ - protected void emit_QueryConjunction_ANDKeyword_1_1_0_or_CommaKeyword_1_1_1(EObject semanticObject, ISynNavigable transition, List nodes) { + protected void emit_QueryConjunction_COMMATerminalRuleCall_1_1_1_or_CONJUNCTIONTerminalRuleCall_1_1_0(EObject semanticObject, ISynNavigable transition, List nodes) { acceptNodes(transition, nodes); } diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/services/QLGrammarAccess.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/services/QLGrammarAccess.java index 5741a4c00b7..d987f9c5314 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/services/QLGrammarAccess.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/services/QLGrammarAccess.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,28 +79,28 @@ public class QueryDisjunctionElements extends AbstractParserRuleElementFinder { private final RuleCall cQueryConjunctionParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Group cGroup_1 = (Group)cGroup.eContents().get(1); private final Action cQueryDisjunctionLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); - private final Keyword cORKeyword_1_1 = (Keyword)cGroup_1.eContents().get(1); + private final RuleCall cDISJUNCTIONTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); private final RuleCall cRightQueryConjunctionParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); //QueryDisjunction QueryConstraint: - // QueryConjunction ({QueryDisjunction.left=current} 'OR' right=QueryConjunction)*; + // QueryConjunction ({QueryDisjunction.left=current} DISJUNCTION right=QueryConjunction)*; @Override public ParserRule getRule() { return rule; } - //QueryConjunction ({QueryDisjunction.left=current} 'OR' right=QueryConjunction)* + //QueryConjunction ({QueryDisjunction.left=current} DISJUNCTION right=QueryConjunction)* public Group getGroup() { return cGroup; } //QueryConjunction public RuleCall getQueryConjunctionParserRuleCall_0() { return cQueryConjunctionParserRuleCall_0; } - //({QueryDisjunction.left=current} 'OR' right=QueryConjunction)* + //({QueryDisjunction.left=current} DISJUNCTION right=QueryConjunction)* public Group getGroup_1() { return cGroup_1; } //{QueryDisjunction.left=current} public Action getQueryDisjunctionLeftAction_1_0() { return cQueryDisjunctionLeftAction_1_0; } - //'OR' - public Keyword getORKeyword_1_1() { return cORKeyword_1_1; } + //DISJUNCTION + public RuleCall getDISJUNCTIONTerminalRuleCall_1_1() { return cDISJUNCTIONTerminalRuleCall_1_1; } //right=QueryConjunction public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } @@ -115,35 +115,35 @@ public class QueryConjunctionElements extends AbstractParserRuleElementFinder { private final Group cGroup_1 = (Group)cGroup.eContents().get(1); private final Action cQueryConjunctionLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); private final Alternatives cAlternatives_1_1 = (Alternatives)cGroup_1.eContents().get(1); - private final Keyword cANDKeyword_1_1_0 = (Keyword)cAlternatives_1_1.eContents().get(0); - private final Keyword cCommaKeyword_1_1_1 = (Keyword)cAlternatives_1_1.eContents().get(1); + private final RuleCall cCONJUNCTIONTerminalRuleCall_1_1_0 = (RuleCall)cAlternatives_1_1.eContents().get(0); + private final RuleCall cCOMMATerminalRuleCall_1_1_1 = (RuleCall)cAlternatives_1_1.eContents().get(1); private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); private final RuleCall cRightQueryExclusionParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); //QueryConjunction QueryConstraint: - // QueryExclusion ({QueryConjunction.left=current} ('AND' | ',') right=QueryExclusion)*; + // QueryExclusion ({QueryConjunction.left=current} (CONJUNCTION | COMMA) right=QueryExclusion)*; @Override public ParserRule getRule() { return rule; } - //QueryExclusion ({QueryConjunction.left=current} ('AND' | ',') right=QueryExclusion)* + //QueryExclusion ({QueryConjunction.left=current} (CONJUNCTION | COMMA) right=QueryExclusion)* public Group getGroup() { return cGroup; } //QueryExclusion public RuleCall getQueryExclusionParserRuleCall_0() { return cQueryExclusionParserRuleCall_0; } - //({QueryConjunction.left=current} ('AND' | ',') right=QueryExclusion)* + //({QueryConjunction.left=current} (CONJUNCTION | COMMA) right=QueryExclusion)* public Group getGroup_1() { return cGroup_1; } //{QueryConjunction.left=current} public Action getQueryConjunctionLeftAction_1_0() { return cQueryConjunctionLeftAction_1_0; } - //'AND' | ',' + //CONJUNCTION | COMMA public Alternatives getAlternatives_1_1() { return cAlternatives_1_1; } - //'AND' - public Keyword getANDKeyword_1_1_0() { return cANDKeyword_1_1_0; } + //CONJUNCTION + public RuleCall getCONJUNCTIONTerminalRuleCall_1_1_0() { return cCONJUNCTIONTerminalRuleCall_1_1_0; } - //',' - public Keyword getCommaKeyword_1_1_1() { return cCommaKeyword_1_1_1; } + //COMMA + public RuleCall getCOMMATerminalRuleCall_1_1_1() { return cCOMMATerminalRuleCall_1_1_1; } //right=QueryExclusion public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } @@ -157,28 +157,28 @@ public class QueryExclusionElements extends AbstractParserRuleElementFinder { private final RuleCall cSubQueryParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Group cGroup_1 = (Group)cGroup.eContents().get(1); private final Action cQueryExclusionLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); - private final Keyword cMINUSKeyword_1_1 = (Keyword)cGroup_1.eContents().get(1); + private final RuleCall cEXCLUSIONTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); private final RuleCall cRightSubQueryParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); //QueryExclusion QueryConstraint: - // SubQuery ({QueryExclusion.left=current} 'MINUS' right=SubQuery)?; + // SubQuery ({QueryExclusion.left=current} EXCLUSION right=SubQuery)?; @Override public ParserRule getRule() { return rule; } - //SubQuery ({QueryExclusion.left=current} 'MINUS' right=SubQuery)? + //SubQuery ({QueryExclusion.left=current} EXCLUSION right=SubQuery)? public Group getGroup() { return cGroup; } //SubQuery public RuleCall getSubQueryParserRuleCall_0() { return cSubQueryParserRuleCall_0; } - //({QueryExclusion.left=current} 'MINUS' right=SubQuery)? + //({QueryExclusion.left=current} EXCLUSION right=SubQuery)? public Group getGroup_1() { return cGroup_1; } //{QueryExclusion.left=current} public Action getQueryExclusionLeftAction_1_0() { return cQueryExclusionLeftAction_1_0; } - //'MINUS' - public Keyword getMINUSKeyword_1_1() { return cMINUSKeyword_1_1; } + //EXCLUSION + public RuleCall getEXCLUSIONTerminalRuleCall_1_1() { return cEXCLUSIONTerminalRuleCall_1_1; } //right=SubQuery public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } @@ -277,122 +277,122 @@ public class NestedQueryElements extends AbstractParserRuleElementFinder { } public class FilterElements extends AbstractParserRuleElementFinder { private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ql.QL.Filter"); - private final RuleCall cDisjunctionParserRuleCall = (RuleCall)rule.eContents().get(1); + private final RuleCall cDisjunctionFilterParserRuleCall = (RuleCall)rule.eContents().get(1); //// Domain Property Filters //Filter: - // Disjunction; + // DisjunctionFilter; @Override public ParserRule getRule() { return rule; } - //Disjunction - public RuleCall getDisjunctionParserRuleCall() { return cDisjunctionParserRuleCall; } + //DisjunctionFilter + public RuleCall getDisjunctionFilterParserRuleCall() { return cDisjunctionFilterParserRuleCall; } } - public class DisjunctionElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ql.QL.Disjunction"); + public class DisjunctionFilterElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ql.QL.DisjunctionFilter"); private final Group cGroup = (Group)rule.eContents().get(1); - private final RuleCall cConjunctionParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final RuleCall cConjunctionFilterParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Group cGroup_1 = (Group)cGroup.eContents().get(1); - private final Action cDisjunctionLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); - private final Keyword cORKeyword_1_1 = (Keyword)cGroup_1.eContents().get(1); + private final Action cDisjunctionFilterLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); + private final RuleCall cDISJUNCTIONTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); - private final RuleCall cRightConjunctionParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); + private final RuleCall cRightConjunctionFilterParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); - //Disjunction Filter: - // Conjunction ({Disjunction.left=current} 'OR' right=Conjunction)*; + //DisjunctionFilter Filter: + // ConjunctionFilter ({DisjunctionFilter.left=current} DISJUNCTION right=ConjunctionFilter)*; @Override public ParserRule getRule() { return rule; } - //Conjunction ({Disjunction.left=current} 'OR' right=Conjunction)* + //ConjunctionFilter ({DisjunctionFilter.left=current} DISJUNCTION right=ConjunctionFilter)* public Group getGroup() { return cGroup; } - //Conjunction - public RuleCall getConjunctionParserRuleCall_0() { return cConjunctionParserRuleCall_0; } + //ConjunctionFilter + public RuleCall getConjunctionFilterParserRuleCall_0() { return cConjunctionFilterParserRuleCall_0; } - //({Disjunction.left=current} 'OR' right=Conjunction)* + //({DisjunctionFilter.left=current} DISJUNCTION right=ConjunctionFilter)* public Group getGroup_1() { return cGroup_1; } - //{Disjunction.left=current} - public Action getDisjunctionLeftAction_1_0() { return cDisjunctionLeftAction_1_0; } + //{DisjunctionFilter.left=current} + public Action getDisjunctionFilterLeftAction_1_0() { return cDisjunctionFilterLeftAction_1_0; } - //'OR' - public Keyword getORKeyword_1_1() { return cORKeyword_1_1; } + //DISJUNCTION + public RuleCall getDISJUNCTIONTerminalRuleCall_1_1() { return cDISJUNCTIONTerminalRuleCall_1_1; } - //right=Conjunction + //right=ConjunctionFilter public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } - //Conjunction - public RuleCall getRightConjunctionParserRuleCall_1_2_0() { return cRightConjunctionParserRuleCall_1_2_0; } + //ConjunctionFilter + public RuleCall getRightConjunctionFilterParserRuleCall_1_2_0() { return cRightConjunctionFilterParserRuleCall_1_2_0; } } - public class ConjunctionElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ql.QL.Conjunction"); + public class ConjunctionFilterElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ql.QL.ConjunctionFilter"); private final Group cGroup = (Group)rule.eContents().get(1); - private final RuleCall cExclusionParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final RuleCall cExclusionFilterParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Group cGroup_1 = (Group)cGroup.eContents().get(1); - private final Action cConjunctionLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); + private final Action cConjunctionFilterLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); private final Alternatives cAlternatives_1_1 = (Alternatives)cGroup_1.eContents().get(1); - private final Keyword cANDKeyword_1_1_0 = (Keyword)cAlternatives_1_1.eContents().get(0); - private final Keyword cCommaKeyword_1_1_1 = (Keyword)cAlternatives_1_1.eContents().get(1); + private final RuleCall cCONJUNCTIONTerminalRuleCall_1_1_0 = (RuleCall)cAlternatives_1_1.eContents().get(0); + private final RuleCall cCOMMATerminalRuleCall_1_1_1 = (RuleCall)cAlternatives_1_1.eContents().get(1); private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); - private final RuleCall cRightExclusionParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); + private final RuleCall cRightExclusionFilterParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); - //Conjunction Filter: - // Exclusion ({Conjunction.left=current} ('AND' | ',') right=Exclusion)*; + //ConjunctionFilter Filter: + // ExclusionFilter ({ConjunctionFilter.left=current} (CONJUNCTION | COMMA) right=ExclusionFilter)*; @Override public ParserRule getRule() { return rule; } - //Exclusion ({Conjunction.left=current} ('AND' | ',') right=Exclusion)* + //ExclusionFilter ({ConjunctionFilter.left=current} (CONJUNCTION | COMMA) right=ExclusionFilter)* public Group getGroup() { return cGroup; } - //Exclusion - public RuleCall getExclusionParserRuleCall_0() { return cExclusionParserRuleCall_0; } + //ExclusionFilter + public RuleCall getExclusionFilterParserRuleCall_0() { return cExclusionFilterParserRuleCall_0; } - //({Conjunction.left=current} ('AND' | ',') right=Exclusion)* + //({ConjunctionFilter.left=current} (CONJUNCTION | COMMA) right=ExclusionFilter)* public Group getGroup_1() { return cGroup_1; } - //{Conjunction.left=current} - public Action getConjunctionLeftAction_1_0() { return cConjunctionLeftAction_1_0; } + //{ConjunctionFilter.left=current} + public Action getConjunctionFilterLeftAction_1_0() { return cConjunctionFilterLeftAction_1_0; } - //'AND' | ',' + //CONJUNCTION | COMMA public Alternatives getAlternatives_1_1() { return cAlternatives_1_1; } - //'AND' - public Keyword getANDKeyword_1_1_0() { return cANDKeyword_1_1_0; } + //CONJUNCTION + public RuleCall getCONJUNCTIONTerminalRuleCall_1_1_0() { return cCONJUNCTIONTerminalRuleCall_1_1_0; } - //',' - public Keyword getCommaKeyword_1_1_1() { return cCommaKeyword_1_1_1; } + //COMMA + public RuleCall getCOMMATerminalRuleCall_1_1_1() { return cCOMMATerminalRuleCall_1_1_1; } - //right=Exclusion + //right=ExclusionFilter public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } - //Exclusion - public RuleCall getRightExclusionParserRuleCall_1_2_0() { return cRightExclusionParserRuleCall_1_2_0; } + //ExclusionFilter + public RuleCall getRightExclusionFilterParserRuleCall_1_2_0() { return cRightExclusionFilterParserRuleCall_1_2_0; } } - public class ExclusionElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ql.QL.Exclusion"); + public class ExclusionFilterElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.ql.QL.ExclusionFilter"); private final Group cGroup = (Group)rule.eContents().get(1); private final RuleCall cPropertyFilterParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); private final Group cGroup_1 = (Group)cGroup.eContents().get(1); - private final Action cExclusionLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); - private final Keyword cMINUSKeyword_1_1 = (Keyword)cGroup_1.eContents().get(1); + private final Action cExclusionFilterLeftAction_1_0 = (Action)cGroup_1.eContents().get(0); + private final RuleCall cEXCLUSIONTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); private final Assignment cRightAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); private final RuleCall cRightPropertyFilterParserRuleCall_1_2_0 = (RuleCall)cRightAssignment_1_2.eContents().get(0); - //Exclusion Filter: - // PropertyFilter ({Exclusion.left=current} 'MINUS' right=PropertyFilter)?; + //ExclusionFilter Filter: + // PropertyFilter ({ExclusionFilter.left=current} EXCLUSION right=PropertyFilter)?; @Override public ParserRule getRule() { return rule; } - //PropertyFilter ({Exclusion.left=current} 'MINUS' right=PropertyFilter)? + //PropertyFilter ({ExclusionFilter.left=current} EXCLUSION right=PropertyFilter)? public Group getGroup() { return cGroup; } //PropertyFilter public RuleCall getPropertyFilterParserRuleCall_0() { return cPropertyFilterParserRuleCall_0; } - //({Exclusion.left=current} 'MINUS' right=PropertyFilter)? + //({ExclusionFilter.left=current} EXCLUSION right=PropertyFilter)? public Group getGroup_1() { return cGroup_1; } - //{Exclusion.left=current} - public Action getExclusionLeftAction_1_0() { return cExclusionLeftAction_1_0; } + //{ExclusionFilter.left=current} + public Action getExclusionFilterLeftAction_1_0() { return cExclusionFilterLeftAction_1_0; } - //'MINUS' - public Keyword getMINUSKeyword_1_1() { return cMINUSKeyword_1_1; } + //EXCLUSION + public RuleCall getEXCLUSIONTerminalRuleCall_1_1() { return cEXCLUSIONTerminalRuleCall_1_1; } //right=PropertyFilter public Assignment getRightAssignment_1_2() { return cRightAssignment_1_2; } @@ -845,9 +845,9 @@ public class DomainElements extends AbstractEnumRuleElementFinder { private final DomainQueryElements pDomainQuery; private final NestedQueryElements pNestedQuery; private final FilterElements pFilter; - private final DisjunctionElements pDisjunction; - private final ConjunctionElements pConjunction; - private final ExclusionElements pExclusion; + private final DisjunctionFilterElements pDisjunctionFilter; + private final ConjunctionFilterElements pConjunctionFilter; + private final ExclusionFilterElements pExclusionFilter; private final NestedFilterElements pNestedFilter; private final PropertyFilterElements pPropertyFilter; private final ActiveFilterElements pActiveFilter; @@ -882,9 +882,9 @@ public QLGrammarAccess(GrammarProvider grammarProvider, this.pDomainQuery = new DomainQueryElements(); this.pNestedQuery = new NestedQueryElements(); this.pFilter = new FilterElements(); - this.pDisjunction = new DisjunctionElements(); - this.pConjunction = new ConjunctionElements(); - this.pExclusion = new ExclusionElements(); + this.pDisjunctionFilter = new DisjunctionFilterElements(); + this.pConjunctionFilter = new ConjunctionFilterElements(); + this.pExclusionFilter = new ExclusionFilterElements(); this.pNestedFilter = new NestedFilterElements(); this.pPropertyFilter = new PropertyFilterElements(); this.pActiveFilter = new ActiveFilterElements(); @@ -951,7 +951,7 @@ public ParserRule getQueryConstraintRule() { } //QueryDisjunction QueryConstraint: - // QueryConjunction ({QueryDisjunction.left=current} 'OR' right=QueryConjunction)*; + // QueryConjunction ({QueryDisjunction.left=current} DISJUNCTION right=QueryConjunction)*; public QueryDisjunctionElements getQueryDisjunctionAccess() { return pQueryDisjunction; } @@ -961,7 +961,7 @@ public ParserRule getQueryDisjunctionRule() { } //QueryConjunction QueryConstraint: - // QueryExclusion ({QueryConjunction.left=current} ('AND' | ',') right=QueryExclusion)*; + // QueryExclusion ({QueryConjunction.left=current} (CONJUNCTION | COMMA) right=QueryExclusion)*; public QueryConjunctionElements getQueryConjunctionAccess() { return pQueryConjunction; } @@ -971,7 +971,7 @@ public ParserRule getQueryConjunctionRule() { } //QueryExclusion QueryConstraint: - // SubQuery ({QueryExclusion.left=current} 'MINUS' right=SubQuery)?; + // SubQuery ({QueryExclusion.left=current} EXCLUSION right=SubQuery)?; public QueryExclusionElements getQueryExclusionAccess() { return pQueryExclusion; } @@ -1012,7 +1012,7 @@ public ParserRule getNestedQueryRule() { //// Domain Property Filters //Filter: - // Disjunction; + // DisjunctionFilter; public FilterElements getFilterAccess() { return pFilter; } @@ -1021,34 +1021,34 @@ public ParserRule getFilterRule() { return getFilterAccess().getRule(); } - //Disjunction Filter: - // Conjunction ({Disjunction.left=current} 'OR' right=Conjunction)*; - public DisjunctionElements getDisjunctionAccess() { - return pDisjunction; + //DisjunctionFilter Filter: + // ConjunctionFilter ({DisjunctionFilter.left=current} DISJUNCTION right=ConjunctionFilter)*; + public DisjunctionFilterElements getDisjunctionFilterAccess() { + return pDisjunctionFilter; } - public ParserRule getDisjunctionRule() { - return getDisjunctionAccess().getRule(); + public ParserRule getDisjunctionFilterRule() { + return getDisjunctionFilterAccess().getRule(); } - //Conjunction Filter: - // Exclusion ({Conjunction.left=current} ('AND' | ',') right=Exclusion)*; - public ConjunctionElements getConjunctionAccess() { - return pConjunction; + //ConjunctionFilter Filter: + // ExclusionFilter ({ConjunctionFilter.left=current} (CONJUNCTION | COMMA) right=ExclusionFilter)*; + public ConjunctionFilterElements getConjunctionFilterAccess() { + return pConjunctionFilter; } - public ParserRule getConjunctionRule() { - return getConjunctionAccess().getRule(); + public ParserRule getConjunctionFilterRule() { + return getConjunctionFilterAccess().getRule(); } - //Exclusion Filter: - // PropertyFilter ({Exclusion.left=current} 'MINUS' right=PropertyFilter)?; - public ExclusionElements getExclusionAccess() { - return pExclusion; + //ExclusionFilter Filter: + // PropertyFilter ({ExclusionFilter.left=current} EXCLUSION right=PropertyFilter)?; + public ExclusionFilterElements getExclusionFilterAccess() { + return pExclusionFilter; } - public ParserRule getExclusionRule() { - return getExclusionAccess().getRule(); + public ParserRule getExclusionFilterRule() { + return getExclusionFilterAccess().getRule(); } //NestedFilter: @@ -1216,7 +1216,7 @@ public ParserRule getExpressionConstraintRule() { } //OrExpressionConstraint ExpressionConstraint: - // AndExpressionConstraint ({OrExpressionConstraint.left=current} 'OR' right=AndExpressionConstraint)*; + // AndExpressionConstraint ({OrExpressionConstraint.left=current} DISJUNCTION right=AndExpressionConstraint)*; public EclGrammarAccess.OrExpressionConstraintElements getOrExpressionConstraintAccess() { return gaEcl.getOrExpressionConstraintAccess(); } @@ -1226,7 +1226,7 @@ public ParserRule getOrExpressionConstraintRule() { } //AndExpressionConstraint ExpressionConstraint: - // ExclusionExpressionConstraint ({AndExpressionConstraint.left=current} ('AND' | ',') + // ExclusionExpressionConstraint ({AndExpressionConstraint.left=current} (CONJUNCTION | COMMA) // right=ExclusionExpressionConstraint)*; public EclGrammarAccess.AndExpressionConstraintElements getAndExpressionConstraintAccess() { return gaEcl.getAndExpressionConstraintAccess(); @@ -1237,7 +1237,8 @@ public ParserRule getAndExpressionConstraintRule() { } //ExclusionExpressionConstraint ExpressionConstraint: - // RefinedExpressionConstraint ({ExclusionExpressionConstraint.left=current} 'MINUS' right=RefinedExpressionConstraint)?; + // RefinedExpressionConstraint ({ExclusionExpressionConstraint.left=current} EXCLUSION + // right=RefinedExpressionConstraint)?; public EclGrammarAccess.ExclusionExpressionConstraintElements getExclusionExpressionConstraintAccess() { return gaEcl.getExclusionExpressionConstraintAccess(); } @@ -1247,7 +1248,7 @@ public ParserRule getExclusionExpressionConstraintRule() { } //RefinedExpressionConstraint ExpressionConstraint: - // DottedExpressionConstraint ({RefinedExpressionConstraint.constraint=current} COLON refinement=Refinement)?; + // DottedExpressionConstraint ({RefinedExpressionConstraint.constraint=current} COLON refinement=EclRefinement)?; public EclGrammarAccess.RefinedExpressionConstraintElements getRefinedExpressionConstraintAccess() { return gaEcl.getRefinedExpressionConstraintAccess(); } @@ -1267,7 +1268,7 @@ public ParserRule getDottedExpressionConstraintRule() { } //SubExpressionConstraint ExpressionConstraint: - // ChildOf | DescendantOf | DescendantOrSelfOf | ParentOf | AncestorOf | AncestorOrSelfOf | FocusConcept; + // ChildOf | DescendantOf | DescendantOrSelfOf | ParentOf | AncestorOf | AncestorOrSelfOf | EclFocusConcept; public EclGrammarAccess.SubExpressionConstraintElements getSubExpressionConstraintAccess() { return gaEcl.getSubExpressionConstraintAccess(); } @@ -1276,18 +1277,18 @@ public ParserRule getSubExpressionConstraintRule() { return getSubExpressionConstraintAccess().getRule(); } - //FocusConcept ExpressionConstraint: - // MemberOf | ConceptReference | Any | NestedExpression; - public EclGrammarAccess.FocusConceptElements getFocusConceptAccess() { - return gaEcl.getFocusConceptAccess(); + //EclFocusConcept ExpressionConstraint: + // MemberOf | EclConceptReference | Any | NestedExpression; + public EclGrammarAccess.EclFocusConceptElements getEclFocusConceptAccess() { + return gaEcl.getEclFocusConceptAccess(); } - public ParserRule getFocusConceptRule() { - return getFocusConceptAccess().getRule(); + public ParserRule getEclFocusConceptRule() { + return getEclFocusConceptAccess().getRule(); } //ChildOf: - // LT_EM constraint=FocusConcept; + // LT_EM constraint=EclFocusConcept; public EclGrammarAccess.ChildOfElements getChildOfAccess() { return gaEcl.getChildOfAccess(); } @@ -1297,7 +1298,7 @@ public ParserRule getChildOfRule() { } //DescendantOf: - // LT constraint=FocusConcept; + // LT constraint=EclFocusConcept; public EclGrammarAccess.DescendantOfElements getDescendantOfAccess() { return gaEcl.getDescendantOfAccess(); } @@ -1307,7 +1308,7 @@ public ParserRule getDescendantOfRule() { } //DescendantOrSelfOf: - // DBL_LT constraint=FocusConcept; + // DBL_LT constraint=EclFocusConcept; public EclGrammarAccess.DescendantOrSelfOfElements getDescendantOrSelfOfAccess() { return gaEcl.getDescendantOrSelfOfAccess(); } @@ -1317,7 +1318,7 @@ public ParserRule getDescendantOrSelfOfRule() { } //ParentOf: - // GT_EM constraint=FocusConcept; + // GT_EM constraint=EclFocusConcept; public EclGrammarAccess.ParentOfElements getParentOfAccess() { return gaEcl.getParentOfAccess(); } @@ -1327,7 +1328,7 @@ public ParserRule getParentOfRule() { } //AncestorOf: - // GT constraint=FocusConcept; + // GT constraint=EclFocusConcept; public EclGrammarAccess.AncestorOfElements getAncestorOfAccess() { return gaEcl.getAncestorOfAccess(); } @@ -1337,7 +1338,7 @@ public ParserRule getAncestorOfRule() { } //AncestorOrSelfOf: - // DBL_GT constraint=FocusConcept; + // DBL_GT constraint=EclFocusConcept; public EclGrammarAccess.AncestorOrSelfOfElements getAncestorOrSelfOfAccess() { return gaEcl.getAncestorOrSelfOfAccess(); } @@ -1347,7 +1348,7 @@ public ParserRule getAncestorOrSelfOfRule() { } //MemberOf: - // CARET constraint=(ConceptReference | Any | NestedExpression); + // CARET constraint=(EclConceptReference | Any | NestedExpression); public EclGrammarAccess.MemberOfElements getMemberOfAccess() { return gaEcl.getMemberOfAccess(); } @@ -1356,14 +1357,14 @@ public ParserRule getMemberOfRule() { return getMemberOfAccess().getRule(); } - //ConceptReference: + //EclConceptReference: // id=SnomedIdentifier term=TERM_STRING?; - public EclGrammarAccess.ConceptReferenceElements getConceptReferenceAccess() { - return gaEcl.getConceptReferenceAccess(); + public EclGrammarAccess.EclConceptReferenceElements getEclConceptReferenceAccess() { + return gaEcl.getEclConceptReferenceAccess(); } - public ParserRule getConceptReferenceRule() { - return getConceptReferenceAccess().getRule(); + public ParserRule getEclConceptReferenceRule() { + return getEclConceptReferenceAccess().getRule(); } //Any: @@ -1376,18 +1377,18 @@ public ParserRule getAnyRule() { return getAnyAccess().getRule(); } - //Refinement: + //EclRefinement: // OrRefinement; - public EclGrammarAccess.RefinementElements getRefinementAccess() { - return gaEcl.getRefinementAccess(); + public EclGrammarAccess.EclRefinementElements getEclRefinementAccess() { + return gaEcl.getEclRefinementAccess(); } - public ParserRule getRefinementRule() { - return getRefinementAccess().getRule(); + public ParserRule getEclRefinementRule() { + return getEclRefinementAccess().getRule(); } - //OrRefinement Refinement: - // AndRefinement -> ({OrRefinement.left=current} 'OR' right=AndRefinement)*; + //OrRefinement EclRefinement: + // AndRefinement -> ({OrRefinement.left=current} DISJUNCTION right=AndRefinement)*; public EclGrammarAccess.OrRefinementElements getOrRefinementAccess() { return gaEcl.getOrRefinementAccess(); } @@ -1396,8 +1397,8 @@ public ParserRule getOrRefinementRule() { return getOrRefinementAccess().getRule(); } - //AndRefinement Refinement: - // SubRefinement -> ({AndRefinement.left=current} ('AND' | ',') right=SubRefinement)*; + //AndRefinement EclRefinement: + // SubRefinement -> ({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubRefinement)*; public EclGrammarAccess.AndRefinementElements getAndRefinementAccess() { return gaEcl.getAndRefinementAccess(); } @@ -1406,8 +1407,8 @@ public ParserRule getAndRefinementRule() { return getAndRefinementAccess().getRule(); } - //SubRefinement Refinement: - // AttributeConstraint | AttributeGroup | NestedRefinement; + //SubRefinement EclRefinement: + // AttributeConstraint | EclAttributeGroup | NestedRefinement; public EclGrammarAccess.SubRefinementElements getSubRefinementAccess() { return gaEcl.getSubRefinementAccess(); } @@ -1417,7 +1418,7 @@ public ParserRule getSubRefinementRule() { } //NestedRefinement: - // ROUND_OPEN nested=Refinement ROUND_CLOSE; + // ROUND_OPEN nested=EclRefinement ROUND_CLOSE; public EclGrammarAccess.NestedRefinementElements getNestedRefinementAccess() { return gaEcl.getNestedRefinementAccess(); } @@ -1426,28 +1427,28 @@ public ParserRule getNestedRefinementRule() { return getNestedRefinementAccess().getRule(); } - //AttributeGroup: - // cardinality=Cardinality? CURLY_OPEN refinement=AttributeSet CURLY_CLOSE; - public EclGrammarAccess.AttributeGroupElements getAttributeGroupAccess() { - return gaEcl.getAttributeGroupAccess(); + //EclAttributeGroup: + // cardinality=Cardinality? CURLY_OPEN refinement=EclAttributeSet CURLY_CLOSE; + public EclGrammarAccess.EclAttributeGroupElements getEclAttributeGroupAccess() { + return gaEcl.getEclAttributeGroupAccess(); } - public ParserRule getAttributeGroupRule() { - return getAttributeGroupAccess().getRule(); + public ParserRule getEclAttributeGroupRule() { + return getEclAttributeGroupAccess().getRule(); } - //AttributeSet Refinement: + //EclAttributeSet EclRefinement: // OrAttributeSet; - public EclGrammarAccess.AttributeSetElements getAttributeSetAccess() { - return gaEcl.getAttributeSetAccess(); + public EclGrammarAccess.EclAttributeSetElements getEclAttributeSetAccess() { + return gaEcl.getEclAttributeSetAccess(); } - public ParserRule getAttributeSetRule() { - return getAttributeSetAccess().getRule(); + public ParserRule getEclAttributeSetRule() { + return getEclAttributeSetAccess().getRule(); } - //OrAttributeSet Refinement: - // AndAttributeSet ({OrRefinement.left=current} 'OR' right=AndAttributeSet)*; + //OrAttributeSet EclRefinement: + // AndAttributeSet ({OrRefinement.left=current} DISJUNCTION right=AndAttributeSet)*; public EclGrammarAccess.OrAttributeSetElements getOrAttributeSetAccess() { return gaEcl.getOrAttributeSetAccess(); } @@ -1456,8 +1457,8 @@ public ParserRule getOrAttributeSetRule() { return getOrAttributeSetAccess().getRule(); } - //AndAttributeSet Refinement: - // SubAttributeSet ({AndRefinement.left=current} ('AND' | ',') right=SubAttributeSet)*; + //AndAttributeSet EclRefinement: + // SubAttributeSet ({AndRefinement.left=current} (CONJUNCTION | COMMA) right=SubAttributeSet)*; public EclGrammarAccess.AndAttributeSetElements getAndAttributeSetAccess() { return gaEcl.getAndAttributeSetAccess(); } @@ -1466,7 +1467,7 @@ public ParserRule getAndAttributeSetRule() { return getAndAttributeSetAccess().getRule(); } - //SubAttributeSet Refinement: + //SubAttributeSet EclRefinement: // AttributeConstraint | NestedAttributeSet; public EclGrammarAccess.SubAttributeSetElements getSubAttributeSetAccess() { return gaEcl.getSubAttributeSetAccess(); @@ -1477,7 +1478,7 @@ public ParserRule getSubAttributeSetRule() { } //NestedAttributeSet NestedRefinement: - // ROUND_OPEN nested=AttributeSet ROUND_CLOSE; + // ROUND_OPEN nested=EclAttributeSet ROUND_CLOSE; public EclGrammarAccess.NestedAttributeSetElements getNestedAttributeSetAccess() { return gaEcl.getNestedAttributeSetAccess(); } @@ -1831,6 +1832,30 @@ public TerminalRule getTORule() { return gaEcl.getTORule(); } + //terminal COMMA: + // ','; + public TerminalRule getCOMMARule() { + return gaEcl.getCOMMARule(); + } + + //terminal CONJUNCTION: + // ('a' | 'A') ('n' | 'N') ('d' | 'D'); + public TerminalRule getCONJUNCTIONRule() { + return gaEcl.getCONJUNCTIONRule(); + } + + //terminal DISJUNCTION: + // ('o' | 'O') ('r' | 'R'); + public TerminalRule getDISJUNCTIONRule() { + return gaEcl.getDISJUNCTIONRule(); + } + + //terminal EXCLUSION: + // ('m' | 'M') ('i' | 'I') ('n' | 'N') ('u' | 'U') ('s' | 'S'); + public TerminalRule getEXCLUSIONRule() { + return gaEcl.getEXCLUSIONRule(); + } + //terminal ZERO: // '0'; public TerminalRule getZERORule() { @@ -1903,12 +1928,6 @@ public TerminalRule getCARETRule() { return gaEcl.getCARETRule(); } - //terminal NOT: - // '!'; - public TerminalRule getNOTRule() { - return gaEcl.getNOTRule(); - } - //terminal DOT: // '.'; public TerminalRule getDOTRule() { diff --git a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/validation/AbstractQLValidator.java b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/validation/AbstractQLValidator.java index 8ece530ad0b..f4d0f415db4 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/validation/AbstractQLValidator.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/validation/AbstractQLValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,5 +28,4 @@ protected List getEPackages() { result.add(com.b2international.snowowl.snomed.ql.ql.QlPackage.eINSTANCE); return result; } - } diff --git a/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/GenerateQL.mwe2 b/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/GenerateQL.mwe2 index 9b311facd7f..535db8abd9c 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/GenerateQL.mwe2 +++ b/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/GenerateQL.mwe2 @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the \"License\"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ import org.eclipse.xtext.xtext.generator.model.project.* var rootPath = ".." var header = "/* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the \"License\"); * you may not use this file except in compliance with the License. @@ -46,9 +46,10 @@ Workflow { genericIde = { enabled = true root = "../../../snow-owl-ext/snomed-ui/com.b2international.snowowl.snomed.ql.ui" + name = "com.b2international.snowowl.snomed.ql.ui" } runtimeTest = { - enabled = false + enabled = true } eclipsePlugin = { enabled = true @@ -57,7 +58,7 @@ Workflow { eclipsePluginTest = { enabled = false } - createEclipseMetaData = true + createEclipseMetaData = false } code = { encoding = "UTF-8" diff --git a/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/QL.xtext b/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/QL.xtext index 2e38c67c7a4..c2891449b12 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/QL.xtext +++ b/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/QL.xtext @@ -27,13 +27,13 @@ QueryConstraint: QueryDisjunction; QueryDisjunction returns QueryConstraint: - QueryConjunction ({QueryDisjunction.left=current} 'OR' right=QueryConjunction)*; + QueryConjunction ({QueryDisjunction.left=current} DISJUNCTION right=QueryConjunction)*; QueryConjunction returns QueryConstraint: - QueryExclusion ({QueryConjunction.left=current} ('AND' | ',') right=QueryExclusion)*; + QueryExclusion ({QueryConjunction.left=current} (CONJUNCTION | COMMA) right=QueryExclusion)*; QueryExclusion returns QueryConstraint: - SubQuery ({QueryExclusion.left=current} 'MINUS' right=SubQuery)?; + SubQuery ({QueryExclusion.left=current} EXCLUSION right=SubQuery)?; SubQuery: DomainQuery | NestedQuery; @@ -47,16 +47,16 @@ NestedQuery: // Domain Property Filters Filter: - Disjunction; + DisjunctionFilter; -Disjunction returns Filter: - Conjunction ({Disjunction.left=current} 'OR' right=Conjunction)*; +DisjunctionFilter returns Filter: + ConjunctionFilter ({DisjunctionFilter.left=current} DISJUNCTION right=ConjunctionFilter)*; -Conjunction returns Filter: - Exclusion ({Conjunction.left=current} ('AND' | ',') right=Exclusion)*; +ConjunctionFilter returns Filter: + ExclusionFilter ({ConjunctionFilter.left=current} (CONJUNCTION | COMMA) right=ExclusionFilter)*; -Exclusion returns Filter: - PropertyFilter ({Exclusion.left=current} 'MINUS' right=PropertyFilter)?; +ExclusionFilter returns Filter: + PropertyFilter ({ExclusionFilter.left=current} EXCLUSION right=PropertyFilter)?; NestedFilter: ROUND_OPEN nested=Filter ROUND_CLOSE; diff --git a/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/QLRuntimeModule.java b/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/QLRuntimeModule.java index dbe4bd3f615..6ccf7bfa24d 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/QLRuntimeModule.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/QLRuntimeModule.java @@ -21,10 +21,10 @@ import com.b2international.snowowl.snomed.ql.ql.AcceptableInFilter; import com.b2international.snowowl.snomed.ql.ql.ActiveFilter; import com.b2international.snowowl.snomed.ql.ql.CaseSignificanceFilter; -import com.b2international.snowowl.snomed.ql.ql.Conjunction; -import com.b2international.snowowl.snomed.ql.ql.Disjunction; +import com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter; +import com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter; import com.b2international.snowowl.snomed.ql.ql.Domain; -import com.b2international.snowowl.snomed.ql.ql.Exclusion; +import com.b2international.snowowl.snomed.ql.ql.ExclusionFilter; import com.b2international.snowowl.snomed.ql.ql.Filter; import com.b2international.snowowl.snomed.ql.ql.LanguageCodeFilter; import com.b2international.snowowl.snomed.ql.ql.LanguageRefSetFilter; @@ -52,23 +52,23 @@ public static Domain getDomain(Filter constraint) { private static Domain getDomainInternal(Filter constraint) { if (constraint instanceof NestedFilter) { return getDomain(((NestedFilter) constraint).getNested()); - } else if (constraint instanceof Conjunction) { - Domain leftDomain = getDomain(((Conjunction) constraint).getLeft()); - Domain rightDomain = getDomain(((Conjunction) constraint).getRight()); + } else if (constraint instanceof ConjunctionFilter) { + Domain leftDomain = getDomain(((ConjunctionFilter) constraint).getLeft()); + Domain rightDomain = getDomain(((ConjunctionFilter) constraint).getRight()); if (leftDomain != rightDomain) { throw new IllegalStateException("Constraint with inconsistent left and right domains."); } return leftDomain; - } else if (constraint instanceof Disjunction) { - Domain leftDomain = getDomain(((Disjunction) constraint).getLeft()); - Domain rightDomain = getDomain(((Disjunction) constraint).getRight()); + } else if (constraint instanceof DisjunctionFilter) { + Domain leftDomain = getDomain(((DisjunctionFilter) constraint).getLeft()); + Domain rightDomain = getDomain(((DisjunctionFilter) constraint).getRight()); if (leftDomain != rightDomain) { throw new IllegalStateException("Constraint with inconsistent left and right domains."); } return leftDomain; - } else if (constraint instanceof Exclusion) { - Domain leftDomain = getDomain(((Exclusion) constraint).getLeft()); - Domain rightDomain = getDomain(((Exclusion) constraint).getRight()); + } else if (constraint instanceof ExclusionFilter) { + Domain leftDomain = getDomain(((ExclusionFilter) constraint).getLeft()); + Domain rightDomain = getDomain(((ExclusionFilter) constraint).getRight()); if (leftDomain != rightDomain) { throw new IllegalStateException("Constraint with inconsistent left and right domains."); } diff --git a/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/validation/QLValidator.java b/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/validation/QLValidator.java index 58628d3d5de..a259172c4a5 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/validation/QLValidator.java +++ b/snomed/com.b2international.snowowl.snomed.ql/src/com/b2international/snowowl/snomed/ql/validation/QLValidator.java @@ -21,11 +21,11 @@ import org.eclipse.xtext.validation.Check; import com.b2international.snowowl.snomed.ql.QLRuntimeModule; -import com.b2international.snowowl.snomed.ql.ql.Conjunction; -import com.b2international.snowowl.snomed.ql.ql.Disjunction; +import com.b2international.snowowl.snomed.ql.ql.ConjunctionFilter; +import com.b2international.snowowl.snomed.ql.ql.DisjunctionFilter; import com.b2international.snowowl.snomed.ql.ql.Domain; import com.b2international.snowowl.snomed.ql.ql.DomainQuery; -import com.b2international.snowowl.snomed.ql.ql.Exclusion; +import com.b2international.snowowl.snomed.ql.ql.ExclusionFilter; import com.b2international.snowowl.snomed.ql.ql.Filter; import com.b2international.snowowl.snomed.ql.ql.LanguageCodeFilter; import com.b2international.snowowl.snomed.ql.ql.QlPackage; @@ -67,51 +67,51 @@ public void checkLanguageCodeFilter(LanguageCodeFilter it) { } @Check - public void checkDisjunction(Disjunction it) { + public void checkDisjunction(DisjunctionFilter it) { if (isAmbiguous(it, it.getLeft())) { - error(AMBIGUOUS_MESSAGE, it, QlPackage.Literals.DISJUNCTION__LEFT, AMBIGUOUS_CODE); + error(AMBIGUOUS_MESSAGE, it, QlPackage.Literals.DISJUNCTION_FILTER__LEFT, AMBIGUOUS_CODE); } else if (isAmbiguous(it, it.getRight())) { - error(AMBIGUOUS_MESSAGE, it, QlPackage.Literals.DISJUNCTION__RIGHT, AMBIGUOUS_CODE); + error(AMBIGUOUS_MESSAGE, it, QlPackage.Literals.DISJUNCTION_FILTER__RIGHT, AMBIGUOUS_CODE); } Domain leftDomain = QLRuntimeModule.getDomain(it.getLeft()); Domain rightDomain = QLRuntimeModule.getDomain(it.getRight()); if (leftDomain != rightDomain) { - error(DOMAIN_INCONSISTENCY_MESSAGE, it, QlPackage.Literals.DISJUNCTION__LEFT, DOMAIN_INCONSISTENCY_CODE); + error(DOMAIN_INCONSISTENCY_MESSAGE, it, QlPackage.Literals.DISJUNCTION_FILTER__LEFT, DOMAIN_INCONSISTENCY_CODE); } } @Check - public void checkConjunction(Conjunction it) { + public void checkConjunction(ConjunctionFilter it) { if (isAmbiguous(it, it.getLeft())) { - error(AMBIGUOUS_MESSAGE, it, QlPackage.Literals.CONJUNCTION__LEFT, AMBIGUOUS_CODE); + error(AMBIGUOUS_MESSAGE, it, QlPackage.Literals.CONJUNCTION_FILTER__LEFT, AMBIGUOUS_CODE); } else if (isAmbiguous(it, it.getRight())) { - error(AMBIGUOUS_MESSAGE, it, QlPackage.Literals.CONJUNCTION__RIGHT, AMBIGUOUS_CODE); + error(AMBIGUOUS_MESSAGE, it, QlPackage.Literals.CONJUNCTION_FILTER__RIGHT, AMBIGUOUS_CODE); } Domain leftDomain = QLRuntimeModule.getDomain(it.getLeft()); Domain rightDomain = QLRuntimeModule.getDomain(it.getRight()); if (leftDomain != rightDomain) { - error(DOMAIN_INCONSISTENCY_MESSAGE, it, QlPackage.Literals.CONJUNCTION__LEFT, DOMAIN_INCONSISTENCY_CODE); + error(DOMAIN_INCONSISTENCY_MESSAGE, it, QlPackage.Literals.CONJUNCTION_FILTER__LEFT, DOMAIN_INCONSISTENCY_CODE); } } @Check - public void checkExclusion(Exclusion it) { + public void checkExclusion(ExclusionFilter it) { if (isAmbiguous(it, it.getLeft())) { - error(AMBIGUOUS_MESSAGE, it, QlPackage.Literals.CONJUNCTION__LEFT, AMBIGUOUS_CODE); + error(AMBIGUOUS_MESSAGE, it, QlPackage.Literals.CONJUNCTION_FILTER__LEFT, AMBIGUOUS_CODE); } else if (isAmbiguous(it, it.getRight())) { - error(AMBIGUOUS_MESSAGE, it, QlPackage.Literals.CONJUNCTION__RIGHT, AMBIGUOUS_CODE); + error(AMBIGUOUS_MESSAGE, it, QlPackage.Literals.CONJUNCTION_FILTER__RIGHT, AMBIGUOUS_CODE); } Domain leftDomain = QLRuntimeModule.getDomain(it.getLeft()); Domain rightDomain = QLRuntimeModule.getDomain(it.getRight()); if (leftDomain != rightDomain) { - error(DOMAIN_INCONSISTENCY_MESSAGE, it, QlPackage.Literals.EXCLUSION__LEFT, DOMAIN_INCONSISTENCY_CODE); + error(DOMAIN_INCONSISTENCY_MESSAGE, it, QlPackage.Literals.EXCLUSION_FILTER__LEFT, DOMAIN_INCONSISTENCY_CODE); } } @@ -125,9 +125,9 @@ public void checkShortTermFilter(TermFilter it) { private boolean isAmbiguous(Filter parent, Filter child) { return parent.getClass() != child.getClass() && - (child instanceof Disjunction - || child instanceof Conjunction - || child instanceof Exclusion); + (child instanceof DisjunctionFilter + || child instanceof ConjunctionFilter + || child instanceof ExclusionFilter); } } diff --git a/snomed/com.b2international.snowowl.snomed.reasoner.tests/.launch/snomed-reasoner-unit-tests.launch b/snomed/com.b2international.snowowl.snomed.reasoner.tests/.launch/snomed-reasoner-unit-tests.launch index 526b77aed63..9b7206d8f8c 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner.tests/.launch/snomed-reasoner-unit-tests.launch +++ b/snomed/com.b2international.snowowl.snomed.reasoner.tests/.launch/snomed-reasoner-unit-tests.launch @@ -33,12 +33,12 @@ - + - - + + diff --git a/snomed/com.b2international.snowowl.snomed.reasoner.tests/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.reasoner.tests/META-INF/MANIFEST.MF index d461cd764b3..00a59c1bb88 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner.tests/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.reasoner.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Reasoner Tests Bundle-SymbolicName: com.b2international.snowowl.snomed.reasoner.tests;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.snomed.reasoner Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/snomed/com.b2international.snowowl.snomed.reasoner.tests/pom.xml b/snomed/com.b2international.snowowl.snomed.reasoner.tests/pom.xml index 2b565c56705..c97f125095a 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner.tests/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.reasoner.tests/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.b2international.snowowl - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT snomed-parent com.b2international.snowowl.snomed.reasoner.tests @@ -46,8 +46,8 @@ org.eclipse.tycho tycho-surefire-plugin - ${tycho.version} + ${tycho.testArgLine} -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch **/AllSnomedReasonerTests.java diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.reasoner/META-INF/MANIFEST.MF index 03420421e3d..195d0de99bd 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.reasoner/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Reasoner Plug-in Bundle-SymbolicName: com.b2international.snowowl.snomed.reasoner;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", org.semanticweb.owl.owlapi;bundle-version="[4.5.10,5.0.0)", diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/pom.xml b/snomed/com.b2international.snowowl.snomed.reasoner/pom.xml index 48a370aa47e..475f614518d 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.reasoner/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl snomed-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.snomed.reasoner eclipse-plugin diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/ClassificationTaskConverter.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/ClassificationTaskConverter.java index b2d15337f57..81ff1439f38 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/ClassificationTaskConverter.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/ClassificationTaskConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,13 +60,8 @@ public ClassificationTaskConverter(final RepositoryContext context, final Option } @Override - protected ClassificationTasks createCollectionResource(final List results, - final String scrollId, - final String searchAfter, - final int limit, - final int total) { - - return new ClassificationTasks(results, scrollId, searchAfter, limit, total); + protected ClassificationTasks createCollectionResource(final List results, final String searchAfter, final int limit, final int total) { + return new ClassificationTasks(results, searchAfter, limit, total); } @Override @@ -146,7 +141,7 @@ private void expandEquivalentConceptSets(final List results, for (final ClassificationTask classificationTask : results) { final List taskSets = setsByTaskId.get(classificationTask.getId()); - classificationTask.setEquivalentConceptSets(new EquivalentConceptSets(taskSets, null, null, taskSets.size(), taskSets.size())); + classificationTask.setEquivalentConceptSets(new EquivalentConceptSets(taskSets, null, taskSets.size(), taskSets.size())); } } @@ -177,9 +172,7 @@ private void expandRelationshipChanges(final List results, f for (final ClassificationTask classificationTask : results) { final List taskChanges = relationshipChangesByTaskId.get(classificationTask.getId()); - classificationTask.setRelationshipChanges(new RelationshipChanges(taskChanges, null, null, - taskChanges.size(), - taskChanges.size())); + classificationTask.setRelationshipChanges(new RelationshipChanges(taskChanges, null, taskChanges.size(), taskChanges.size())); } } @@ -203,9 +196,7 @@ private void expandConcreteDomainChanges(final List results, for (final ClassificationTask classificationTask : results) { final List taskChanges = concreteDomainChangesByTaskId.get(classificationTask.getId()); - classificationTask.setConcreteDomainChanges(new ConcreteDomainChanges(taskChanges, null, null, - taskChanges.size(), - taskChanges.size())); + classificationTask.setConcreteDomainChanges(new ConcreteDomainChanges(taskChanges, null, taskChanges.size(), taskChanges.size())); } } } diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/ConceptChangeConverter.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/ConceptChangeConverter.java index 16813289680..d8ef9ca9543 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/ConceptChangeConverter.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/ConceptChangeConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,12 +59,11 @@ public ConceptChangeConverter(final RepositoryContext context, final Options exp @Override protected ConceptChanges createCollectionResource(final List results, - final String scrollId, final String searchAfter, final int limit, final int total) { - return new ConceptChanges(results, scrollId, searchAfter, limit, total); + return new ConceptChanges(results, searchAfter, limit, total); } @Override @@ -133,7 +132,7 @@ protected void expand(final List results) { final SnomedConcept expandedConcept = conceptsById.get(conceptId); - reasonerConcept.setDefinitionStatus(expandedConcept.getDefinitionStatus()); + reasonerConcept.setDefinitionStatusId(expandedConcept.getDefinitionStatusId()); reasonerConcept.setPt(expandedConcept.getPt()); reasonerConcept.setFsn(expandedConcept.getFsn()); // reasonerConcept.setReleased(...) is already set diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/ConcreteDomainChangeConverter.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/ConcreteDomainChangeConverter.java index ee065215fc7..7f4b1f7eaf4 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/ConcreteDomainChangeConverter.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/ConcreteDomainChangeConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,13 +61,8 @@ public ConcreteDomainChangeConverter(final RepositoryContext context, final Opti } @Override - protected ConcreteDomainChanges createCollectionResource(final List results, - final String scrollId, - final String searchAfter, - final int limit, - final int total) { - - return new ConcreteDomainChanges(results, scrollId, searchAfter, limit, total); + protected ConcreteDomainChanges createCollectionResource(final List results, final String searchAfter, final int limit, final int total) { + return new ConcreteDomainChanges(results, searchAfter, limit, total); } @Override diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/DescriptionChangeConverter.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/DescriptionChangeConverter.java index ebba75410d7..d6968fb216b 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/DescriptionChangeConverter.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/DescriptionChangeConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,13 +57,8 @@ public DescriptionChangeConverter(final RepositoryContext context, final Options } @Override - protected DescriptionChanges createCollectionResource(final List results, - final String scrollId, - final String searchAfter, - final int limit, - final int total) { - - return new DescriptionChanges(results, scrollId, searchAfter, limit, total); + protected DescriptionChanges createCollectionResource(final List results, final String searchAfter, final int limit, final int total) { + return new DescriptionChanges(results, searchAfter, limit, total); } @Override @@ -189,7 +184,7 @@ protected void expand(final List results) { final SnomedDescription expandedDescription = descriptionsById.get(descriptionId); reasonerDescription.setAcceptabilityMap(expandedDescription.getAcceptabilityMap()); - reasonerDescription.setCaseSignificance(expandedDescription.getCaseSignificance()); + reasonerDescription.setCaseSignificanceId(expandedDescription.getCaseSignificanceId()); // reasonerDescription.setConcept(...) is already set earlier (or expanded) reasonerDescription.setLanguageCode(expandedDescription.getLanguageCode()); // reasonerMember.setReleased(...) is already set @@ -203,7 +198,7 @@ protected void expand(final List results) { final SnomedDescription expandedDescription = descriptionsById.get(descriptionId); reasonerDescription.setAcceptabilityMap(expandedDescription.getAcceptabilityMap()); - reasonerDescription.setCaseSignificance(expandedDescription.getCaseSignificance()); + reasonerDescription.setCaseSignificanceId(expandedDescription.getCaseSignificanceId()); reasonerDescription.setConcept(expandedDescription.getConcept()); reasonerDescription.setLanguageCode(expandedDescription.getLanguageCode()); // reasonerMember.setReleased(...) is already set diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/EquivalentConceptSetConverter.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/EquivalentConceptSetConverter.java index 730414a92aa..f3971190d91 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/EquivalentConceptSetConverter.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/EquivalentConceptSetConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,13 +55,8 @@ public EquivalentConceptSetConverter(final RepositoryContext context, final Opti } @Override - protected EquivalentConceptSets createCollectionResource(final List results, - final String scrollId, - final String searchAfter, - final int limit, - final int total) { - - return new EquivalentConceptSets(results, scrollId, searchAfter, limit, total); + protected EquivalentConceptSets createCollectionResource(final List results, final String searchAfter, final int limit, final int total) { + return new EquivalentConceptSets(results, searchAfter, limit, total); } @Override @@ -75,7 +70,7 @@ protected EquivalentConceptSet toResource(final EquivalentConceptSetDocument ent items.add(new SnomedConcept(Long.toString(itr.next()))); } - final SnomedConcepts equivalentConcepts = new SnomedConcepts(items, null, null, items.size(), items.size()); + final SnomedConcepts equivalentConcepts = new SnomedConcepts(items, null, items.size(), items.size()); resource.setEquivalentConcepts(equivalentConcepts); return resource; } diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/RelationshipChangeConverter.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/RelationshipChangeConverter.java index 78f8776eb3a..fdab6080095 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/RelationshipChangeConverter.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/converter/RelationshipChangeConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,8 +31,7 @@ import com.b2international.snowowl.datastore.converter.BaseResourceConverter; import com.b2international.snowowl.datastore.request.BranchRequest; import com.b2international.snowowl.datastore.request.RevisionIndexReadRequest; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; @@ -64,13 +63,8 @@ public RelationshipChangeConverter(final RepositoryContext context, final Option } @Override - protected RelationshipChanges createCollectionResource(final List results, - final String scrollId, - final String searchAfter, - final int limit, - final int total) { - - return new RelationshipChanges(results, scrollId, searchAfter, limit, total); + protected RelationshipChanges createCollectionResource(final List results, final String searchAfter, final int limit, final int total) { + return new RelationshipChanges(results, searchAfter, limit, total); } @Override @@ -105,7 +99,7 @@ protected RelationshipChange toResource(final RelationshipChangeDocument entry) */ relationship.setGroup(entry.getGroup()); relationship.setUnionGroup(entry.getUnionGroup()); - relationship.setCharacteristicType(CharacteristicType.getByConceptId(entry.getCharacteristicTypeId())); + relationship.setCharacteristicTypeId(entry.getCharacteristicTypeId()); /* * Inferred IS A relationships have even more stored information, which we set on the response object. @@ -231,7 +225,7 @@ protected void expand(final List results) { // reasonerRelationship.setDestination(...) is already set reasonerRelationship.setDestinationNegated(false); // reasonerRelationship.setGroup(...) is already set - reasonerRelationship.setModifier(RelationshipModifier.EXISTENTIAL); + reasonerRelationship.setModifierId(Concepts.EXISTENTIAL_RESTRICTION_MODIFIER); // reasonerRelationship.setReleased(...) is already set // reasonerRelationship.setSource(...) is already set // reasonerRelationship.setType(...) is already set @@ -245,7 +239,7 @@ protected void expand(final List results) { reasonerRelationship.setDestination(expandedRelationship.getDestination()); reasonerRelationship.setDestinationNegated(expandedRelationship.isDestinationNegated()); // reasonerRelationship.setGroup(...) is already set - reasonerRelationship.setModifier(expandedRelationship.getModifier()); + reasonerRelationship.setModifierId(expandedRelationship.getModifierId()); // reasonerRelationship.setReleased(...) is already set // reasonerRelationship.setSource(...) is already set reasonerRelationship.setType(expandedRelationship.getType()); @@ -257,11 +251,11 @@ protected void expand(final List results) { if (!inferredOnly) { final SnomedRelationship expandedRelationship = relationshipsById.get(originId); - reasonerRelationship.setCharacteristicType(expandedRelationship.getCharacteristicType()); + reasonerRelationship.setCharacteristicTypeId(expandedRelationship.getCharacteristicTypeId()); reasonerRelationship.setDestination(expandedRelationship.getDestination()); reasonerRelationship.setDestinationNegated(expandedRelationship.isDestinationNegated()); // reasonerRelationship.setGroup(...) is already set - reasonerRelationship.setModifier(expandedRelationship.getModifier()); + reasonerRelationship.setModifierId(expandedRelationship.getModifierId()); // reasonerRelationship.setReleased(...) is already set reasonerRelationship.setSource(expandedRelationship.getSource()); reasonerRelationship.setType(expandedRelationship.getType()); @@ -273,11 +267,11 @@ protected void expand(final List results) { if (!inferredOnly) { final SnomedRelationship expandedRelationship = relationshipsById.get(originId); - reasonerRelationship.setCharacteristicType(expandedRelationship.getCharacteristicType()); + reasonerRelationship.setCharacteristicTypeId(expandedRelationship.getCharacteristicTypeId()); reasonerRelationship.setDestination(expandedRelationship.getDestination()); reasonerRelationship.setDestinationNegated(expandedRelationship.isDestinationNegated()); reasonerRelationship.setGroup(expandedRelationship.getGroup()); - reasonerRelationship.setModifier(expandedRelationship.getModifier()); + reasonerRelationship.setModifierId(expandedRelationship.getModifierId()); // reasonerRelationship.setReleased(...) is already set reasonerRelationship.setSource(expandedRelationship.getSource()); reasonerRelationship.setType(expandedRelationship.getType()); diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ClassificationTasks.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ClassificationTasks.java index 8198089caa0..4a50028eac6 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ClassificationTasks.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ClassificationTasks.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,32 +28,38 @@ */ public final class ClassificationTasks extends PageableCollectionResource { + private static final long serialVersionUID = 1L; + /** * Instantiates an empty pageable collection for classification tasks. * - * @param limit of items for a single page - * @param total number of items in the result set + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ public ClassificationTasks(final int limit, final int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } /** * Instantiates a pageable collection of classification tasks. * - * @param list of @link {@link SnomedConcept}s - * @param scrollId for paging the result set continuously - * @param searchAfter for paging the result set with a live cursor - * @param limit of items for a single page - * @param total number of items in the result set + * @param items + * - list of @link {@link SnomedConcept}s + * @param searchAfter + * - for paging the result set with a live cursor + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ @JsonCreator public ClassificationTasks( @JsonProperty("items") final List items, - @JsonProperty("scrollId") final String scrollId, @JsonProperty("searchAfter") final String searchAfter, @JsonProperty("limit") final int limit, @JsonProperty("total") final int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ConceptChanges.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ConceptChanges.java index 21d8e4c856e..4e21125531f 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ConceptChanges.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ConceptChanges.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,32 +27,38 @@ */ public final class ConceptChanges extends PageableCollectionResource { + private static final long serialVersionUID = 1L; + /** * Instantiates an empty pageable collection for concept changes. * - * @param limit of items for a single page - * @param total number of items in the result set + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ public ConceptChanges(final int limit, final int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } /** * Instantiates a pageable collection of concept changes. * - * @param list of @link {@link ConceptChange}s - * @param scrollId for paging the result set continuously - * @param searchAfter for paging the result set with a live cursor - * @param limit of items for a single page - * @param total number of items in the result set + * @param items + * - list of @link {@link ConceptChange}s + * @param searchAfter + * - for paging the result set with a live cursor + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ @JsonCreator public ConceptChanges( @JsonProperty("items") final List items, - @JsonProperty("scrollId") final String scrollId, @JsonProperty("searchAfter") final String searchAfter, @JsonProperty("limit") final int limit, @JsonProperty("total") final int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ConcreteDomainChanges.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ConcreteDomainChanges.java index 6e5598f0467..03cf700fbeb 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ConcreteDomainChanges.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ConcreteDomainChanges.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,32 +27,38 @@ */ public final class ConcreteDomainChanges extends PageableCollectionResource { + private static final long serialVersionUID = 1L; + /** * Instantiates an empty pageable collection for concrete domain changes. * - * @param limit of items for a single page - * @param total number of items in the result set + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ public ConcreteDomainChanges(final int limit, final int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } /** * Instantiates a pageable collection of concrete domain changes. * - * @param list of @link {@link ConcreteDomainChange}s - * @param scrollId for paging the result set continuously - * @param searchAfter for paging the result set with a live cursor - * @param limit of items for a single page - * @param total number of items in the result set + * @param items + * - list of @link {@link ConcreteDomainChange}s + * @param searchAfter + * - for paging the result set with a live cursor + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ @JsonCreator public ConcreteDomainChanges( @JsonProperty("items") final List items, - @JsonProperty("scrollId") final String scrollId, @JsonProperty("searchAfter") final String searchAfter, @JsonProperty("limit") final int limit, @JsonProperty("total") final int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/DescriptionChanges.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/DescriptionChanges.java index 1bee41a2e5d..ecf00430180 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/DescriptionChanges.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/DescriptionChanges.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,32 +27,38 @@ */ public final class DescriptionChanges extends PageableCollectionResource { + private static final long serialVersionUID = 1L; + /** * Instantiates an empty pageable collection for description changes. * - * @param limit of items for a single page - * @param total number of items in the result set + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ public DescriptionChanges(final int limit, final int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } /** * Instantiates a pageable collection of description changes. * - * @param list of @link {@link DescriptionChange}s - * @param scrollId for paging the result set continuously - * @param searchAfter for paging the result set with a live cursor - * @param limit of items for a single page - * @param total number of items in the result set + * @param items + * - list of @link {@link DescriptionChange}s + * @param searchAfter + * - for paging the result set with a live cursor + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ @JsonCreator public DescriptionChanges( @JsonProperty("items") final List items, - @JsonProperty("scrollId") final String scrollId, @JsonProperty("searchAfter") final String searchAfter, @JsonProperty("limit") final int limit, @JsonProperty("total") final int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/EquivalentConceptSets.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/EquivalentConceptSets.java index 25faaf8e6c1..d6895f6b034 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/EquivalentConceptSets.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/EquivalentConceptSets.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,32 +28,38 @@ */ public final class EquivalentConceptSets extends PageableCollectionResource { + private static final long serialVersionUID = 1L; + /** * Instantiates an empty pageable collection for equivalent concept sets. * - * @param limit of items for a single page - * @param total number of items in the result set + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ public EquivalentConceptSets(final int limit, final int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } /** * Instantiates a pageable collection of equivalent concept sets. * - * @param list of @link {@link SnomedConcept}s - * @param scrollId for paging the result set continuously - * @param searchAfter for paging the result set with a live cursor - * @param limit of items for a single page - * @param total number of items in the result set + * @param items + * - list of @link {@link SnomedConcept}s + * @param searchAfter + * - for paging the result set with a live cursor + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ @JsonCreator public EquivalentConceptSets( @JsonProperty("items") final List items, - @JsonProperty("scrollId") final String scrollId, @JsonProperty("searchAfter") final String searchAfter, - @JsonProperty("limit") final int limit, + @JsonProperty("limit") final int limit, @JsonProperty("total") final int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerConcept.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerConcept.java index c8e9a4d6fde..de2e5f23198 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerConcept.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerConcept.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,6 @@ import java.io.Serializable; -import com.b2international.snowowl.snomed.core.domain.DefinitionStatus; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; /** @@ -32,7 +31,7 @@ public final class ReasonerConcept implements Serializable { * Values below will match the origin concept ID, as they will only appear as * "removed" changes. */ - private DefinitionStatus definitionStatus; + private String definitionStatusId; private SnomedDescription fsn; private SnomedDescription pt; @@ -59,12 +58,12 @@ public void setReleased(final Boolean released) { this.released = released; } - public DefinitionStatus getDefinitionStatus() { - return definitionStatus; + public String getDefinitionStatus() { + return definitionStatusId; } - public void setDefinitionStatus(final DefinitionStatus definitionStatus) { - this.definitionStatus = definitionStatus; + public void setDefinitionStatusId(final String definitionStatusId) { + this.definitionStatusId = definitionStatusId; } public SnomedDescription getPt() { @@ -90,8 +89,8 @@ public String toString() { builder.append(originConceptId); builder.append(", released="); builder.append(released); - builder.append(", definitionStatus="); - builder.append(definitionStatus); + builder.append(", definitionStatusId="); + builder.append(definitionStatusId); builder.append(", fsn="); builder.append(fsn); builder.append(", pt="); diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerDescription.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerDescription.java index bbd0873c081..53107b8de94 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerDescription.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerDescription.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,6 @@ import java.util.Map; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -41,7 +40,7 @@ public final class ReasonerDescription implements Serializable { private SnomedConcept type; private String languageCode; private String term; - private CaseSignificance caseSignificance; + private String caseSignificanceId; private Map acceptabilityMap; // Default constructor is used in JSON de-serialization @@ -109,12 +108,12 @@ public void setTerm(final String term) { this.term = term; } - public CaseSignificance getCaseSignificance() { - return caseSignificance; + public String getCaseSignificanceId() { + return caseSignificanceId; } - public void setCaseSignificance(final CaseSignificance caseSignificance) { - this.caseSignificance = caseSignificance; + public void setCaseSignificanceId(final String caseSignificanceId) { + this.caseSignificanceId = caseSignificanceId; } public Map getAcceptabilityMap() { @@ -140,8 +139,8 @@ public String toString() { builder.append(languageCode); builder.append(", term="); builder.append(term); - builder.append(", caseSignificance="); - builder.append(caseSignificance); + builder.append(", caseSignificanceId="); + builder.append(caseSignificanceId); builder.append(", acceptabilityMap="); builder.append(acceptabilityMap); builder.append("]"); diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerExtensions.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerExtensions.java index 5c96b4e007f..596a3c50c02 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerExtensions.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerExtensions.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,32 +28,38 @@ */ public final class ReasonerExtensions extends PageableCollectionResource { + private static final long serialVersionUID = 1L; + /** * Instantiates an empty pageable collection for reasoner extensions. * - * @param limit of items for a single page - * @param total number of items in the result set + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ public ReasonerExtensions(final int limit, final int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } /** * Instantiates a pageable collection of reasoner extensions. * - * @param list of @link {@link SnomedConcept}s - * @param scrollId for paging the result set continuously - * @param searchAfter for paging the result set with a live cursor - * @param limit of items for a single page - * @param total number of items in the result set + * @param items + * - list of @link {@link SnomedConcept}s + * @param searchAfter + * - for paging the result set with a live cursor + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ @JsonCreator public ReasonerExtensions( @JsonProperty("items") final List items, - @JsonProperty("scrollId") final String scrollId, @JsonProperty("searchAfter") final String searchAfter, - @JsonProperty("limit") final int limit, + @JsonProperty("limit") final int limit, @JsonProperty("total") final int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerRelationship.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerRelationship.java index b446cf26b9a..590ce2d2b7a 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerRelationship.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/ReasonerRelationship.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,6 @@ import java.io.Serializable; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -39,8 +37,8 @@ public final class ReasonerRelationship implements Serializable { private Boolean destinationNegated; private Integer group; private Integer unionGroup; - private CharacteristicType characteristicType; - private RelationshipModifier modifier; + private String characteristicTypeId; + private String modifierId; private SnomedConcept source; private SnomedConcept destination; private SnomedConcept type; @@ -144,8 +142,8 @@ public Integer getUnionGroup() { * * @return the relationship's characteristic type */ - public CharacteristicType getCharacteristicType() { - return characteristicType; + public String getCharacteristicTypeId() { + return characteristicTypeId; } /** @@ -153,8 +151,8 @@ public CharacteristicType getCharacteristicType() { * * @return the modifier of this relationship */ - public RelationshipModifier getModifier() { - return modifier; + public String getModifierId() { + return modifierId; } public void setSource(final SnomedConcept source) { @@ -196,12 +194,12 @@ public void setUnionGroup(final Integer unionGroup) { this.unionGroup = unionGroup; } - public void setCharacteristicType(final CharacteristicType characteristicType) { - this.characteristicType = characteristicType; + public void setCharacteristicTypeId(final String characteristicTypeId) { + this.characteristicTypeId = characteristicTypeId; } - public void setModifier(final RelationshipModifier modifier) { - this.modifier = modifier; + public void setModifierId(final String modifierId) { + this.modifierId = modifierId; } @Override @@ -217,10 +215,10 @@ public String toString() { builder.append(group); builder.append(", unionGroup="); builder.append(unionGroup); - builder.append(", characteristicType="); - builder.append(characteristicType); - builder.append(", modifier="); - builder.append(modifier); + builder.append(", characteristicTypeId="); + builder.append(characteristicTypeId); + builder.append(", modifierId="); + builder.append(modifierId); builder.append(", source="); builder.append(source); builder.append(", destination="); diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/RelationshipChanges.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/RelationshipChanges.java index 27d21dfe49c..a6df2a1eeeb 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/RelationshipChanges.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/domain/RelationshipChanges.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,32 +27,38 @@ */ public final class RelationshipChanges extends PageableCollectionResource { + private static final long serialVersionUID = 1L; + /** * Instantiates an empty pageable collection for relationship changes. * - * @param limit of items for a single page - * @param total number of items in the result set + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ public RelationshipChanges(final int limit, final int total) { - super(Collections.emptyList(), null, null, limit, total); + super(Collections.emptyList(), null, limit, total); } /** * Instantiates a pageable collection of relationship changes. * - * @param list of @link {@link RelationshipChange}s - * @param scrollId for paging the result set continuously - * @param searchAfter for paging the result set with a live cursor - * @param limit of items for a single page - * @param total number of items in the result set + * @param items + * - list of @link {@link RelationshipChange}s + * @param searchAfter + * - for paging the result set with a live cursor + * @param limit + * - number of items for a single page + * @param total + * - number of items in the result set */ @JsonCreator public RelationshipChanges( @JsonProperty("items") final List items, - @JsonProperty("scrollId") final String scrollId, @JsonProperty("searchAfter") final String searchAfter, @JsonProperty("limit") final int limit, @JsonProperty("total") final int total) { - super(items, scrollId, searchAfter, limit, total); + super(items, searchAfter, limit, total); } } diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationGetRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationGetRequestBuilder.java index 98a77880c4c..d916dec6cc6 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationGetRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationGetRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.request.GetResourceRequestBuilder; -import com.b2international.snowowl.datastore.request.RepositoryIndexRequestBuilder; +import com.b2international.snowowl.datastore.request.RepositoryRequestBuilder; import com.b2international.snowowl.snomed.reasoner.domain.ClassificationTask; /** @@ -25,7 +25,7 @@ */ public final class ClassificationGetRequestBuilder extends GetResourceRequestBuilder - implements RepositoryIndexRequestBuilder { + implements RepositoryRequestBuilder { ClassificationGetRequestBuilder(final String classificationId) { super(new ClassificationGetRequest(classificationId)); diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSaveRequest.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSaveRequest.java index b4245163488..4fbed82c36d 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSaveRequest.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSaveRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,6 @@ import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.events.AsyncRequest; import com.b2international.snowowl.core.events.Request; -import com.b2international.snowowl.datastore.request.IndexReadRequest; import com.b2international.snowowl.datastore.request.RepositoryRequests; import com.b2international.snowowl.datastore.request.job.JobRequests; import com.b2international.snowowl.identity.domain.Permission; @@ -118,14 +117,14 @@ public String execute(final RepositoryContext context) { .prepareGetClassification(classificationId) .build(); - final ClassificationTask classification = new IndexReadRequest<>(classificationRequest).execute(context); + final ClassificationTask classification = classificationRequest.execute(context); final String branchPath = classification.getBranch(); final Request branchRequest = RepositoryRequests.branching() .prepareGet(branchPath) .build(); - final Branch branch = new IndexReadRequest<>(branchRequest).execute(context); + final Branch branch = branchRequest.execute(context); if (!SAVEABLE_STATUSES.contains(classification.getStatus())) { throw new BadRequestException("Classification '%s' is not in the expected state to start saving changes.", classificationId); diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSearchRequest.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSearchRequest.java index 40723bea908..091474c1cae 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSearchRequest.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,7 +98,6 @@ protected Class getDocumentType() { @Override protected ClassificationTasks toCollectionResource(final RepositoryContext context, final Hits hits) { return new ClassificationTaskConverter(context, expand(), locales()).convert(hits.getHits(), - hits.getScrollId(), hits.getSearchAfter(), hits.getLimit(), hits.getTotal()); diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSearchRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSearchRequestBuilder.java index 723501dd275..83c9b55d04a 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSearchRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSearchRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.request.SearchResourceRequest; import com.b2international.snowowl.core.request.SearchResourceRequestBuilder; -import com.b2international.snowowl.datastore.request.RepositoryIndexRequestBuilder; +import com.b2international.snowowl.datastore.request.RepositoryRequestBuilder; import com.b2international.snowowl.snomed.reasoner.domain.ClassificationStatus; import com.b2international.snowowl.snomed.reasoner.domain.ClassificationTasks; import com.b2international.snowowl.snomed.reasoner.request.ClassificationSearchRequest.OptionKey; @@ -28,7 +28,7 @@ */ public final class ClassificationSearchRequestBuilder extends SearchResourceRequestBuilder - implements RepositoryIndexRequestBuilder { + implements RepositoryRequestBuilder { ClassificationSearchRequestBuilder() {} diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ConcreteDomainChangeSearchRequest.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ConcreteDomainChangeSearchRequest.java index f5aac15b05b..d8c4a7e3b2a 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ConcreteDomainChangeSearchRequest.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ConcreteDomainChangeSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,7 +74,6 @@ protected Class getDocumentType() { @Override protected ConcreteDomainChanges toCollectionResource(final RepositoryContext context, final Hits hits) { return new ConcreteDomainChangeConverter(context, expand(), locales()).convert(hits.getHits(), - hits.getScrollId(), hits.getSearchAfter(), hits.getLimit(), hits.getTotal()); diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ConcreteDomainChangeSearchRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ConcreteDomainChangeSearchRequestBuilder.java index d10d99bffb5..a80369b98e6 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ConcreteDomainChangeSearchRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ConcreteDomainChangeSearchRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.request.SearchResourceRequest; import com.b2international.snowowl.core.request.SearchResourceRequestBuilder; -import com.b2international.snowowl.datastore.request.RepositoryIndexRequestBuilder; +import com.b2international.snowowl.datastore.request.RepositoryRequestBuilder; import com.b2international.snowowl.snomed.reasoner.domain.ConcreteDomainChanges; import com.b2international.snowowl.snomed.reasoner.request.ConcreteDomainChangeSearchRequest.OptionKey; @@ -27,7 +27,7 @@ */ public final class ConcreteDomainChangeSearchRequestBuilder extends SearchResourceRequestBuilder - implements RepositoryIndexRequestBuilder { + implements RepositoryRequestBuilder { ConcreteDomainChangeSearchRequestBuilder() {} diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/EquivalentConceptSetSearchRequest.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/EquivalentConceptSetSearchRequest.java index f9fdcd8cb39..11691b615da 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/EquivalentConceptSetSearchRequest.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/EquivalentConceptSetSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,7 +74,6 @@ protected Class getDocumentType() { @Override protected EquivalentConceptSets toCollectionResource(final RepositoryContext context, final Hits hits) { return new EquivalentConceptSetConverter(context, expand(), locales()).convert(hits.getHits(), - hits.getScrollId(), hits.getSearchAfter(), hits.getLimit(), hits.getTotal()); diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/EquivalentConceptSetSearchRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/EquivalentConceptSetSearchRequestBuilder.java index 25c7dd28622..b701567a518 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/EquivalentConceptSetSearchRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/EquivalentConceptSetSearchRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.request.SearchResourceRequest; import com.b2international.snowowl.core.request.SearchResourceRequestBuilder; -import com.b2international.snowowl.datastore.request.RepositoryIndexRequestBuilder; +import com.b2international.snowowl.datastore.request.RepositoryRequestBuilder; import com.b2international.snowowl.snomed.reasoner.domain.EquivalentConceptSets; import com.b2international.snowowl.snomed.reasoner.request.EquivalentConceptSetSearchRequest.OptionKey; @@ -27,7 +27,7 @@ */ public final class EquivalentConceptSetSearchRequestBuilder extends SearchResourceRequestBuilder - implements RepositoryIndexRequestBuilder { + implements RepositoryRequestBuilder { EquivalentConceptSetSearchRequestBuilder() {} diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ReasonerExtensionSearchRequest.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ReasonerExtensionSearchRequest.java index abc9dd8fc25..07aab629a39 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ReasonerExtensionSearchRequest.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ReasonerExtensionSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -69,7 +69,7 @@ public ReasonerExtensions execute(final ServiceProvider context) { reasonerExtensions.add(reasonerExtension); } - return new ReasonerExtensions(reasonerExtensions, null, null, reasonerExtensions.size(), reasonerExtensions.size()); + return new ReasonerExtensions(reasonerExtensions, null, reasonerExtensions.size(), reasonerExtensions.size()); } } diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/RelationshipChangeSearchRequest.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/RelationshipChangeSearchRequest.java index d014c5d018a..4921b9cf873 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/RelationshipChangeSearchRequest.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/RelationshipChangeSearchRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -84,7 +84,6 @@ protected Class getDocumentType() { @Override protected RelationshipChanges toCollectionResource(final RepositoryContext context, final Hits hits) { return new RelationshipChangeConverter(context, expand(), locales()).convert(hits.getHits(), - hits.getScrollId(), hits.getSearchAfter(), hits.getLimit(), hits.getTotal()); diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/RelationshipChangeSearchRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/RelationshipChangeSearchRequestBuilder.java index aca6a9706ae..5f42dac808f 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/RelationshipChangeSearchRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/RelationshipChangeSearchRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.request.SearchResourceRequest; import com.b2international.snowowl.core.request.SearchResourceRequestBuilder; -import com.b2international.snowowl.datastore.request.RepositoryIndexRequestBuilder; +import com.b2international.snowowl.datastore.request.RepositoryRequestBuilder; import com.b2international.snowowl.snomed.reasoner.domain.RelationshipChanges; import com.b2international.snowowl.snomed.reasoner.request.RelationshipChangeSearchRequest.OptionKey; @@ -27,7 +27,7 @@ */ public final class RelationshipChangeSearchRequestBuilder extends SearchResourceRequestBuilder - implements RepositoryIndexRequestBuilder { + implements RepositoryRequestBuilder { RelationshipChangeSearchRequestBuilder() {} diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/SaveJobRequest.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/SaveJobRequest.java index a5de47315ef..259904bf44e 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/SaveJobRequest.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/SaveJobRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,9 +50,7 @@ import com.b2international.snowowl.identity.domain.Permission; import com.b2international.snowowl.identity.domain.User; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; -import com.b2international.snowowl.snomed.core.domain.CharacteristicType; -import com.b2international.snowowl.snomed.core.domain.InactivationIndicator; -import com.b2international.snowowl.snomed.core.domain.RelationshipModifier; +import com.b2international.snowowl.snomed.core.domain.InactivationProperties; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; @@ -70,7 +68,16 @@ import com.b2international.snowowl.snomed.datastore.request.SnomedRelationshipUpdateRequestBuilder; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; import com.b2international.snowowl.snomed.reasoner.classification.ClassificationTracker; -import com.b2international.snowowl.snomed.reasoner.domain.*; +import com.b2international.snowowl.snomed.reasoner.domain.ChangeNature; +import com.b2international.snowowl.snomed.reasoner.domain.ClassificationTask; +import com.b2international.snowowl.snomed.reasoner.domain.ConcreteDomainChange; +import com.b2international.snowowl.snomed.reasoner.domain.ConcreteDomainChanges; +import com.b2international.snowowl.snomed.reasoner.domain.EquivalentConceptSet; +import com.b2international.snowowl.snomed.reasoner.domain.EquivalentConceptSets; +import com.b2international.snowowl.snomed.reasoner.domain.ReasonerConcreteDomainMember; +import com.b2international.snowowl.snomed.reasoner.domain.ReasonerRelationship; +import com.b2international.snowowl.snomed.reasoner.domain.RelationshipChange; +import com.b2international.snowowl.snomed.reasoner.domain.RelationshipChanges; import com.b2international.snowowl.snomed.reasoner.equivalence.IEquivalentConceptMerger; import com.b2international.snowowl.snomed.reasoner.exceptions.ReasonerApiException; import com.google.common.base.Strings; @@ -89,7 +96,6 @@ final class SaveJobRequest implements Request, BranchAcc private static final Logger LOG = LoggerFactory.getLogger("reasoner"); private static final int SCROLL_LIMIT = 10_000; - private static final String SCROLL_KEEP_ALIVE = "5m"; @NotEmpty private String classificationId; @@ -242,7 +248,6 @@ private void applyRelationshipChanges(final BranchContext context, final RelationshipChangeSearchRequestBuilder relationshipRequestBuilder = ClassificationRequests.prepareSearchRelationshipChange() .setLimit(SCROLL_LIMIT) - .setScroll(SCROLL_KEEP_ALIVE) .setExpand("relationship(inferredOnly:true)") .filterByClassificationId(classificationId); @@ -331,7 +336,6 @@ private void applyConcreteDomainChanges(final BranchContext context, final ConcreteDomainChangeSearchRequestBuilder concreteDomainRequestBuilder = ClassificationRequests.prepareSearchConcreteDomainChange() .setLimit(SCROLL_LIMIT) - .setScroll(SCROLL_KEEP_ALIVE) .setExpand("concreteDomainMember(inferredOnly:true)") .filterByClassificationId(classificationId); @@ -430,7 +434,6 @@ private Set mergeEquivalentConcepts(final BranchContext context, final EquivalentConceptSetSearchRequestBuilder equivalentConceptRequest = ClassificationRequests.prepareSearchEquivalentConceptSet() .setLimit(SCROLL_LIMIT) - .setScroll(SCROLL_KEEP_ALIVE) .setExpand(expand) .filterByClassificationId(classificationId); @@ -605,7 +608,7 @@ private void removeOrDeactivate(final BulkRequestBuilder bul .prepareUpdateConcept(concept.getId()) .setModuleId(namespaceAndModuleAssigner.getRelationshipModuleId(concept.getId())) .setActive(false) - .setInactivationIndicator(InactivationIndicator.RETIRED) + .setInactivationProperties(new InactivationProperties("" /*RETIRED*/, Collections.emptyList())) .build(); } else { request = SnomedRequests @@ -714,14 +717,14 @@ private void addComponent(final BulkRequestBuilder bulkReque final String typeId = relationship.getTypeId(); final String destinationId = relationship.getDestinationId(); final boolean destinationNegated = relationship.isDestinationNegated(); - final CharacteristicType characteristicType = relationship.getCharacteristicType(); + final String characteristicTypeId = relationship.getCharacteristicTypeId(); final int group = relationship.getGroup(); final int unionGroup = relationship.getUnionGroup(); - final RelationshipModifier modifier = relationship.getModifier(); + final String modifier = relationship.getModifierId(); addComponent(bulkRequestBuilder, namespaceAndModuleAssigner, sourceId, typeId, destinationId, destinationNegated, - characteristicType, group, unionGroup, modifier); + characteristicTypeId, group, unionGroup, modifier); } private void addComponent(final BulkRequestBuilder bulkRequestBuilder, @@ -732,14 +735,14 @@ private void addComponent(final BulkRequestBuilder bulkReque final String typeId = relationship.getTypeId(); final String destinationId = relationship.getDestinationId(); final boolean destinationNegated = relationship.isDestinationNegated(); - final CharacteristicType characteristicType = relationship.getCharacteristicType(); + final String characteristicTypeId = relationship.getCharacteristicTypeId(); final int group = relationship.getGroup(); final int unionGroup = relationship.getUnionGroup(); - final RelationshipModifier modifier = relationship.getModifier(); + final String modifier = relationship.getModifierId(); addComponent(bulkRequestBuilder, namespaceAndModuleAssigner, sourceId, typeId, destinationId, destinationNegated, - characteristicType, group, unionGroup, modifier); + characteristicTypeId, group, unionGroup, modifier); } private void addComponent(final BulkRequestBuilder bulkRequestBuilder, @@ -748,10 +751,10 @@ private void addComponent(final BulkRequestBuilder bulkReque final String typeId, final String destinationId, final boolean destinationNegated, - final CharacteristicType characteristicType, + final String characteristicTypeId, final int group, final int unionGroup, - final RelationshipModifier modifier) { + final String modifier) { final String moduleId = namespaceAndModuleAssigner.getRelationshipModuleId(sourceId); final String namespace = namespaceAndModuleAssigner.getRelationshipNamespace(sourceId); @@ -760,13 +763,13 @@ private void addComponent(final BulkRequestBuilder bulkReque .setIdFromNamespace(namespace) .setTypeId(typeId) .setActive(true) - .setCharacteristicType(characteristicType) + .setCharacteristicTypeId(characteristicTypeId) .setSourceId(sourceId) .setDestinationId(destinationId) .setDestinationNegated(destinationNegated) .setGroup(group) .setUnionGroup(unionGroup) - .setModifier(modifier) + .setModifierId(modifier) .setModuleId(moduleId); bulkRequestBuilder.add(createRequest); @@ -840,7 +843,7 @@ private void addComponent(BulkRequestBuilder bulkRequestBuil .setIdFromNamespace(namespace) .setAcceptability(description.getAcceptabilityMap()) .setActive(true) - .setCaseSignificance(description.getCaseSignificance()) + .setCaseSignificanceId(description.getCaseSignificanceId()) .setConceptId(description.getConceptId()) .setLanguageCode(description.getLanguageCode()) .setModuleId(moduleId) diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/.classpath b/snomed/com.b2international.snowowl.snomed.scg.tests/.classpath similarity index 51% rename from snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/.classpath rename to snomed/com.b2international.snowowl.snomed.scg.tests/.classpath index 8f1dba04e60..48522a76f44 100644 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/.classpath +++ b/snomed/com.b2international.snowowl.snomed.scg.tests/.classpath @@ -6,6 +6,20 @@ - + + + + + + + + + + + + + + + diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/.project b/snomed/com.b2international.snowowl.snomed.scg.tests/.project similarity index 76% rename from snomed/com.b2international.snowowl.snomed.semanticengine.test/.project rename to snomed/com.b2international.snowowl.snomed.scg.tests/.project index 9cfc1af5cd0..b6ba7c821d8 100644 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/.project +++ b/snomed/com.b2international.snowowl.snomed.scg.tests/.project @@ -1,10 +1,15 @@ - com.b2international.snowowl.snomed.semanticengine.test + com.b2international.snowowl.snomed.scg.tests + + org.eclipse.xtext.ui.shared.xtextBuilder + + + org.eclipse.jdt.core.javabuilder @@ -28,7 +33,8 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature diff --git a/snomed/com.b2international.snowowl.snomed.scg.tests/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.scg.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..37aafab398f --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg.tests/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Snow Owl SNOMED CT Compositional Grammar Tests +Bundle-SymbolicName: com.b2international.snowowl.snomed.scg.tests +Bundle-Version: 7.4.0.qualifier +Bundle-Vendor: B2i Healthcare +Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-ActivationPolicy: lazy +Require-Bundle: org.junit;bundle-version="4.12.0", + org.eclipse.xtend.lib;bundle-version="[2.18.0,2.19.0)", + org.eclipse.xtext.testing;bundle-version="[2.18.0,2.19.0)", + com.b2international.snowowl.snomed.scg diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/build.properties b/snomed/com.b2international.snowowl.snomed.scg.tests/build.properties similarity index 53% rename from snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/build.properties rename to snomed/com.b2international.snowowl.snomed.scg.tests/build.properties index 56d77655550..b6d6b8fb3fe 100644 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/build.properties +++ b/snomed/com.b2international.snowowl.snomed.scg.tests/build.properties @@ -1,4 +1,6 @@ -source.. = src/ +source.. = src/,\ + src-gen/,\ + xtend-gen/ output.. = target/classes/ bin.includes = META-INF/,\ . diff --git a/snomed/com.b2international.snowowl.snomed.scg.tests/pom.xml b/snomed/com.b2international.snowowl.snomed.scg.tests/pom.xml new file mode 100644 index 00000000000..264936c8309 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg.tests/pom.xml @@ -0,0 +1,67 @@ + + 4.0.0 + + com.b2international.snowowl + snomed-parent + 7.4.0-SNAPSHOT + + com.b2international.snowowl.snomed.scg.tests + eclipse-test-plugin + + + + src + + + xtend-gen + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.5 + + + + xtend-gen + + .gitignore + + + + + + + org.eclipse.xtend + xtend-maven-plugin + ${xtend.compiler.version} + + ${basedir}/xtend-gen + + + + + compile + + + + + + org.eclipse.tycho + target-platform-configuration + ${tycho.version} + + + org.eclipse.tycho + tycho-surefire-plugin + ${tycho.version} + + + **/*Test.java + + + + + + \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg.tests/src-gen/com/b2international/snowowl/snomed/scg/tests/ScgInjectorProvider.java b/snomed/com.b2international.snowowl.snomed.scg.tests/src-gen/com/b2international/snowowl/snomed/scg/tests/ScgInjectorProvider.java new file mode 100644 index 00000000000..a0eb338225a --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg.tests/src-gen/com/b2international/snowowl/snomed/scg/tests/ScgInjectorProvider.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.tests; + +import com.b2international.snowowl.snomed.scg.ScgRuntimeModule; +import com.b2international.snowowl.snomed.scg.ScgStandaloneSetup; +import com.google.inject.Guice; +import com.google.inject.Injector; +import org.eclipse.xtext.testing.GlobalRegistries; +import org.eclipse.xtext.testing.GlobalRegistries.GlobalStateMemento; +import org.eclipse.xtext.testing.IInjectorProvider; +import org.eclipse.xtext.testing.IRegistryConfigurator; + +public class ScgInjectorProvider implements IInjectorProvider, IRegistryConfigurator { + + protected GlobalStateMemento stateBeforeInjectorCreation; + protected GlobalStateMemento stateAfterInjectorCreation; + protected Injector injector; + + static { + GlobalRegistries.initializeDefaults(); + } + + @Override + public Injector getInjector() { + if (injector == null) { + this.injector = internalCreateInjector(); + stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + } + return injector; + } + + protected Injector internalCreateInjector() { + return new ScgStandaloneSetup() { + @Override + public Injector createInjector() { + return Guice.createInjector(createRuntimeModule()); + } + }.createInjectorAndDoEMFRegistration(); + } + + protected ScgRuntimeModule createRuntimeModule() { + // make it work also with Maven/Tycho and OSGI + // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=493672 + return new ScgRuntimeModule() { + @Override + public ClassLoader bindClassLoaderToInstance() { + return ScgInjectorProvider.class + .getClassLoader(); + } + }; + } + + @Override + public void restoreRegistry() { + stateBeforeInjectorCreation.restoreGlobalState(); + stateBeforeInjectorCreation = null; + } + + @Override + public void setupRegistry() { + stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + if (injector == null) { + getInjector(); + } + stateAfterInjectorCreation.restoreGlobalState(); + } +} diff --git a/snomed/com.b2international.snowowl.snomed.scg.tests/src/com/b2international/snowowl/snomed/scg/tests/ScgParsingTest.xtend b/snomed/com.b2international.snowowl.snomed.scg.tests/src/com/b2international/snowowl/snomed/scg/tests/ScgParsingTest.xtend new file mode 100644 index 00000000000..358cadb898d --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg.tests/src/com/b2international/snowowl/snomed/scg/tests/ScgParsingTest.xtend @@ -0,0 +1,706 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.tests + +import com.b2international.snowowl.snomed.scg.scg.Attribute +import com.b2international.snowowl.snomed.scg.scg.ConceptReference +import com.b2international.snowowl.snomed.scg.scg.DecimalValue +import com.b2international.snowowl.snomed.scg.scg.Expression +import com.b2international.snowowl.snomed.scg.scg.IntegerValue +import com.b2international.snowowl.snomed.scg.scg.StringValue +import com.b2international.snowowl.snomed.scg.scg.SubExpression +import com.google.inject.Inject +import java.math.BigDecimal +import org.eclipse.xtext.testing.InjectWith +import org.eclipse.xtext.testing.XtextRunner +import org.eclipse.xtext.testing.util.ParseHelper +import org.eclipse.xtext.testing.validation.ValidationTestHelper +import org.junit.Test +import org.junit.runner.RunWith + +import static org.junit.Assert.assertEquals +import static org.junit.Assert.assertFalse +import static org.junit.Assert.assertNotNull +import static org.junit.Assert.assertNull +import static org.junit.Assert.assertTrue + +@RunWith(XtextRunner) +@InjectWith(ScgInjectorProvider) +class ScgParsingTest { + + @Inject extension ParseHelper + @Inject extension ValidationTestHelper + + @Test + def void test_empty() { + ''.assertNoErrors + } + + // Official examples from https://github.com/IHTSDO/SNOMEDCT-Languages + + @Test + def void test_simple_expression_1() { + + val expression = ''' + 73211009 |diabetes mellitus| + '''.assertNoErrors + + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "73211009", "diabetes mellitus") + assertNull(expression.expression.refinement) + + } + + @Test + def void test_simple_expression_2() { + + val expression = ''' + 73211009 + '''.assertNoErrors + + assertEquals(1, expression.expression.focusConcepts.size) + assertEquals("73211009", expression.expression.focusConcepts.head.id) + assertNull(expression.expression.focusConcepts.head.term) + assertNull(expression.expression.refinement) + + } + + @Test + def void test_multiple_focus_concepts_1() { + + val expression = ''' + 421720008 |spray dose form| + 7946007 |drug suspension| + '''.assertNoErrors + + assertEquals(2, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "421720008", "spray dose form") + assertConceptReference(expression.expression.focusConcepts.last, "7946007", "drug suspension") + assertNull(expression.expression.refinement) + + } + + @Test + def void test_multiple_focus_concepts_2() { + + val expression = ''' + 421720008 + 7946007 |drug suspension| + '''.assertNoErrors + + assertEquals(2, expression.expression.focusConcepts.size) + assertEquals("421720008", expression.expression.focusConcepts.head.id) + assertNull(expression.expression.focusConcepts.head.term) + assertConceptReference(expression.expression.focusConcepts.last, "7946007", "drug suspension") + assertNull(expression.expression.refinement) + + } + + @Test + def void test_multiple_focus_concepts_3() { + + val expression = ''' + 421720008 + + 7946007 + |drug suspension| + '''.assertNoErrors + + assertEquals(2, expression.expression.focusConcepts.size) + assertEquals("421720008", expression.expression.focusConcepts.head.id) + assertNull(expression.expression.focusConcepts.head.term) + assertConceptReference(expression.expression.focusConcepts.last, "7946007", "drug suspension") + assertNull(expression.expression.refinement) + + } + + @Test + def void test_expression_with_definition_type_1() { + + val expression = ''' + === 46866001 |fracture of lower limb| + 428881005 |injury of tibia|: + 116676008 |associated morphology| = 72704001 |fracture|, + 363698007 |finding site| = 12611008 |bone structure of tibia| + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(2, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "46866001", "fracture of lower limb") + assertConceptReference(expression.expression.focusConcepts.last, "428881005", "injury of tibia") + + assertEquals(2, expression.expression.refinement.attributes.size) + assertSimpleAttribute(expression.expression.refinement.attributes.head, "116676008", "associated morphology", "72704001", "fracture") + assertSimpleAttribute(expression.expression.refinement.attributes.last, "363698007", "finding site", "12611008", "bone structure of tibia") + + } + + @Test + def void test_expression_with_definition_type_2() { + + val expression = ''' + <<< 73211009 |diabetes mellitus|: 363698007 |finding site| = 113331007 |endocrine system| + '''.assertNoErrors + + assertTrue(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "73211009", "diabetes mellitus") + + assertEquals(1, expression.expression.refinement.attributes.size) + assertSimpleAttribute(expression.expression.refinement.attributes.head, "363698007", "finding site", "113331007", "endocrine system") + + } + + @Test + def void test_expression_with_attribute_group_1() { + + val expression = ''' + 71388002 |procedure|: + { + 260686004 |method| = 129304002 |excision - action|, + 405813007 |procedure site - direct| = 15497006 |ovarian structure| + } + { + 260686004 |method| = 129304002 |excision - action|, + 405813007 |procedure site - direct| = 31435000 |fallopian tube structure| + } + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "71388002", "procedure") + + assertTrue(expression.expression.refinement.attributes.empty) + assertEquals(2, expression.expression.refinement.groups.size) + + val group1 = expression.expression.refinement.groups.head + + assertEquals(2, group1.attributes.size) + + assertSimpleAttribute(group1.attributes.head, "260686004", "method", "129304002", "excision - action") + assertSimpleAttribute(group1.attributes.last, "405813007", "procedure site - direct", "15497006", "ovarian structure") + + val group2 = expression.expression.refinement.groups.last + + assertEquals(2, group2.attributes.size) + + assertSimpleAttribute(group2.attributes.head, "260686004", "method", "129304002", "excision - action") + assertSimpleAttribute(group2.attributes.last, "405813007", "procedure site - direct", "31435000", "fallopian tube structure") + + } + + @Test + def void test_expression_with_attribute_group_2() { + + val expression = ''' + 71388002 |procedure|: + { + 260686004 |method| = 129304002 |excision - action|, + 405813007 |procedure site - direct| = 20837000 |structure of right ovary|, + 424226004 |using device| = 122456005 |laser device| + } + { + 260686004 |method| = 261519002 |diathermy excision - action|, + 405813007 |procedure site - direct| = 113293009 |structure of left fallopian tube| + } + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "71388002", "procedure") + + assertTrue(expression.expression.refinement.attributes.empty) + assertEquals(2, expression.expression.refinement.groups.size) + + val group1 = expression.expression.refinement.groups.head + + assertEquals(3, group1.attributes.size) + + assertSimpleAttribute(group1.attributes.get(0), "260686004", "method", "129304002", "excision - action") + assertSimpleAttribute(group1.attributes.get(1), "405813007", "procedure site - direct", "20837000", "structure of right ovary") + assertSimpleAttribute(group1.attributes.get(2), "424226004", "using device", "122456005", "laser device") + + val group2 = expression.expression.refinement.groups.last + + assertEquals(2, group2.attributes.size) + + assertSimpleAttribute(group2.attributes.get(0), "260686004", "method", "261519002", "diathermy excision - action") + assertSimpleAttribute(group2.attributes.get(1), "405813007", "procedure site - direct", "113293009", "structure of left fallopian tube") + + } + + @Test + def void test_expression_with_concrete_value_1() { + + val expression = ''' + 373873005 |pharmaceutical / biologic product|: + 411116001 |has dose form| = 385049006 |capsule|, + 111115 |active ingredient count| = #1, + { + 127489000 |has active ingredient| = 96068000 |amoxicillin trihydrate|, + 111115 |has reference basis of strength| = 372687004 |amoxicillin|, + 111115 |strength magnitude equal to| = #500, + 111115 |strength unit| = 258684004 |mg| + } + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "373873005", "pharmaceutical / biologic product") + + assertEquals(2, expression.expression.refinement.attributes.size) + + assertSimpleAttribute(expression.expression.refinement.attributes.head, "411116001", "has dose form", "385049006", "capsule") + assertIntegerAttribute(expression.expression.refinement.attributes.last, "111115", "active ingredient count", 1) + + assertEquals(1, expression.expression.refinement.groups.size) + + val group = expression.expression.refinement.groups.head + + assertEquals(4, group.attributes.size) + + assertSimpleAttribute(group.attributes.get(0), "127489000", "has active ingredient", "96068000", "amoxicillin trihydrate") + assertSimpleAttribute(group.attributes.get(1), "111115", "has reference basis of strength", "372687004", "amoxicillin") + assertIntegerAttribute(group.attributes.get(2), "111115", "strength magnitude equal to", 500) + assertSimpleAttribute(group.attributes.get(3), "111115", "strength unit", "258684004", "mg") + + } + + @Test + def void test_expression_with_concrete_value_2() { + + val expression = ''' + 373873005 |pharmaceutical / biologic product|: + 411116001 |has dose form| = 385023001 |oral solution|, + 111115 |active ingredient count| = #1, + { + 127489000 |has active ingredient| = 372897005 |albuterol|, + 111115 |has reference basis of strength| = 372897005 |albuterol|, + 111115 |strength magnitude equal to| = #0.083, + 111115 |strength unit| = 118582008 |%| + } + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "373873005", "pharmaceutical / biologic product") + + assertEquals(2, expression.expression.refinement.attributes.size) + + assertSimpleAttribute(expression.expression.refinement.attributes.head, "411116001", "has dose form", "385023001", "oral solution") + assertIntegerAttribute(expression.expression.refinement.attributes.last, "111115", "active ingredient count", 1) + + assertEquals(1, expression.expression.refinement.groups.size) + + val group = expression.expression.refinement.groups.head + + assertEquals(4, group.attributes.size) + + assertSimpleAttribute(group.attributes.get(0), "127489000", "has active ingredient", "372897005", "albuterol") + assertSimpleAttribute(group.attributes.get(1), "111115", "has reference basis of strength", "372897005", "albuterol") + assertDecimalAttribute(group.attributes.get(2), "111115", "strength magnitude equal to", 0.083bd) + assertSimpleAttribute(group.attributes.get(3), "111115", "strength unit", "118582008", "%") + + } + + @Test + def void test_expression_with_concrete_value_3() { + + val expression = ''' + 322236009 |paracetamol 500 mg tablet|: 111115 |trade name| = "PANADOL" + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "322236009", "paracetamol 500 mg tablet") + + assertEquals(1, expression.expression.refinement.attributes.size) + assertStringAttribute(expression.expression.refinement.attributes.head, "111115", "trade name", "PANADOL") + + } + + @Test + def void test_expression_with_concrete_value_4() { + + val expression = ''' + 373873005 |pharmaceutical / biologic product|: + 411116001 |has dose form| = 385218009 |injection|, + 111115 |active ingredient count| = #2, + { + 127489000 |has active ingredient| = 428126001 |diphtheria toxoid|, + 111115 |has reference basis of strength| = 428126001 |diphtheria toxoid|, + 111115 |strength magnitude minimum| = #4, + 111115 |strength unit| = 259002007 |IU/mL| + } + { + 127489000 |has active ingredient| = 412375000 |tetanus toxoid|, + 111115 |has reference basis of strength| = 412375000 |tetanus toxoid|, + 111115 |strength magnitude equal to| = #40, + 111115 |strength unit| = 259002007 |IU/mL| + } + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "373873005", "pharmaceutical / biologic product") + + assertEquals(2, expression.expression.refinement.attributes.size) + + assertSimpleAttribute(expression.expression.refinement.attributes.head, "411116001", "has dose form", "385218009", "injection") + assertIntegerAttribute(expression.expression.refinement.attributes.last, "111115", "active ingredient count", 2) + + assertEquals(2, expression.expression.refinement.groups.size) + + val group1 = expression.expression.refinement.groups.head + + assertEquals(4, group1.attributes.size) + + assertSimpleAttribute(group1.attributes.get(0), "127489000", "has active ingredient", "428126001", "diphtheria toxoid") + assertSimpleAttribute(group1.attributes.get(1), "111115", "has reference basis of strength", "428126001", "diphtheria toxoid") + assertIntegerAttribute(group1.attributes.get(2), "111115", "strength magnitude minimum", 4) + assertSimpleAttribute(group1.attributes.get(3), "111115", "strength unit", "259002007", "IU/mL") + + val group2 = expression.expression.refinement.groups.last + + assertEquals(4, group2.attributes.size) + + assertSimpleAttribute(group2.attributes.get(0), "127489000", "has active ingredient", "412375000", "tetanus toxoid") + assertSimpleAttribute(group2.attributes.get(1), "111115", "has reference basis of strength", "412375000", "tetanus toxoid") + assertIntegerAttribute(group2.attributes.get(2), "111115", "strength magnitude equal to", 40) + assertSimpleAttribute(group2.attributes.get(3), "111115", "strength unit", "259002007", "IU/mL") + + } + + @Test + def void test_expression_with_refinement_1() { + + val expression = ''' + 83152002 |oophorectomy|: + 405815000|procedure device| = 122456005 |laser device| + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "83152002", "oophorectomy") + + assertTrue(expression.expression.refinement.groups.empty) + assertEquals(1, expression.expression.refinement.attributes.size) + + assertSimpleAttribute(expression.expression.refinement.attributes.head, "405815000", "procedure device", "122456005", "laser device") + + } + + @Test + def void test_expression_with_refinement_2() { + + val expression = ''' + 182201002 |hip joint|: + 272741003 |laterality| = 24028007 |right| + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "182201002", "hip joint") + + assertTrue(expression.expression.refinement.groups.empty) + assertEquals(1, expression.expression.refinement.attributes.size) + + assertSimpleAttribute(expression.expression.refinement.attributes.head, "272741003", "laterality", "24028007", "right") + + } + + @Test + def void test_expression_with_refinement_3() { + + val expression = ''' + 71388002 |procedure|: + 405815000|procedure device| = 122456005 |laser device|, + 260686004 |method| = 129304002 |excision - action|, + 405813007 |procedure site - direct| = 15497006 |ovarian structure| + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "71388002", "procedure") + + assertTrue(expression.expression.refinement.groups.empty) + assertEquals(3, expression.expression.refinement.attributes.size) + + assertSimpleAttribute(expression.expression.refinement.attributes.get(0), "405815000", "procedure device", "122456005", "laser device") + assertSimpleAttribute(expression.expression.refinement.attributes.get(1), "260686004", "method", "129304002", "excision - action") + assertSimpleAttribute(expression.expression.refinement.attributes.get(2), "405813007", "procedure site - direct", "15497006", "ovarian structure") + + } + + @Test + def void test_expression_with_refinement_4() { + + val expression = ''' + 65801008 |excision|: + 405813007 |procedure site - direct| = 66754008 |appendix structure|, + 260870009 |priority| = 25876001 |emergency| + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "65801008", "excision") + + assertTrue(expression.expression.refinement.groups.empty) + assertEquals(2, expression.expression.refinement.attributes.size) + + assertSimpleAttribute(expression.expression.refinement.attributes.head, "405813007", "procedure site - direct", "66754008", "appendix structure") + assertSimpleAttribute(expression.expression.refinement.attributes.last, "260870009", "priority", "25876001", "emergency") + + } + + @Test + def void test_expression_with_refinement_5() { + + val expression = ''' + 313056006 |epiphysis of ulna|: 272741003 |laterality| = 7771000 |left| + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "313056006", "epiphysis of ulna") + + assertTrue(expression.expression.refinement.groups.empty) + assertEquals(1, expression.expression.refinement.attributes.size) + + assertSimpleAttribute(expression.expression.refinement.attributes.head, "272741003", "laterality", "7771000", "left") + + } + + @Test + def void test_expression_with_refinement_6() { + + val expression = ''' + 119189000 |ulna part| + 312845000 |epiphysis of upper limb|: + 272741003 |laterality| = 7771000 |left| + '''.assertNoErrors + + assertEquals(2, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "119189000", "ulna part") + assertConceptReference(expression.expression.focusConcepts.last, "312845000", "epiphysis of upper limb") + + assertTrue(expression.expression.refinement.groups.empty) + assertEquals(1, expression.expression.refinement.attributes.size) + + assertSimpleAttribute(expression.expression.refinement.attributes.head, "272741003", "laterality", "7771000", "left") + + } + + @Test + def void test_expression_with_nested_refinement_1() { + + val expression = ''' + 373873005 |pharmaceutical / biologic product|: + 411116001 |has dose form| = (421720008 |spray dose form| + 7946007 |drug suspension|) + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "373873005", "pharmaceutical / biologic product") + + assertEquals(1, expression.expression.refinement.attributes.size) + + val attribute = expression.expression.refinement.attributes.head + + assertConceptReference(attribute.name, "411116001", "has dose form") + + assertTrue(attribute.value instanceof SubExpression) + val subExpression = attribute.value as SubExpression + + assertEquals(2, subExpression.focusConcepts.size) + assertNull(subExpression.refinement) + + assertConceptReference(subExpression.focusConcepts.head, "421720008", "spray dose form") + assertConceptReference(subExpression.focusConcepts.last, "7946007", "drug suspension") + + } + + @Test + def void test_expression_with_nested_refinement_2() { + + val expression = ''' + 397956004 |prosthetic arthroplasty of the hip|: + 363704007 |procedure site| = (24136001 |hip joint structure|: 272741003 |laterality| = 7771000 |left|) + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "397956004", "prosthetic arthroplasty of the hip") + + assertEquals(1, expression.expression.refinement.attributes.size) + + val attribute = expression.expression.refinement.attributes.head + + assertConceptReference(attribute.name, "363704007", "procedure site") + + assertTrue(attribute.value instanceof SubExpression) + val subExpression = attribute.value as SubExpression + + assertEquals(1, subExpression.focusConcepts.size) + assertConceptReference(subExpression.focusConcepts.head, "24136001", "hip joint structure") + + assertEquals(1, subExpression.refinement.attributes.size) + assertSimpleAttribute(subExpression.refinement.attributes.head, "272741003", "laterality", "7771000", "left") + + } + + @Test + def void test_expression_with_nested_refinement_3() { + + val expression = ''' + 397956004 |prosthetic arthroplasty of the hip|: + 363704007 |procedure site| = (24136001 |hip joint structure|: 272741003 |laterality| = 7771000 |left|), + { + 363699004 |direct device| = 304120007 |total hip replacement prosthesis|, + 260686004 |method| = 257867005 |insertion - action| + } + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "397956004", "prosthetic arthroplasty of the hip") + + assertEquals(1, expression.expression.refinement.attributes.size) + + val attribute = expression.expression.refinement.attributes.head + + assertConceptReference(attribute.name, "363704007", "procedure site") + + assertTrue(attribute.value instanceof SubExpression) + val subExpression = attribute.value as SubExpression + + assertEquals(1, subExpression.focusConcepts.size) + assertConceptReference(subExpression.focusConcepts.head, "24136001", "hip joint structure") + + assertEquals(1, subExpression.refinement.attributes.size) + assertSimpleAttribute(subExpression.refinement.attributes.head, "272741003", "laterality", "7771000", "left") + + assertEquals(1, expression.expression.refinement.groups.size) + + val group = expression.expression.refinement.groups.head + + assertEquals(2, group.attributes.size) + + assertSimpleAttribute(group.attributes.head, "363699004", "direct device", "304120007", "total hip replacement prosthesis") + assertSimpleAttribute(group.attributes.last, "260686004", "method", "257867005", "insertion - action") + + } + + @Test + def void test_expression_with_nested_refinement_4() { + + val expression = ''' + 243796009 |situation with explicit context|: + { + 408730004 |procedure context| = 385658003 |done|, + 408731000 |temporal context| = 410512000 |current or specified|, + 408732007 |subject relationship context| = 410604004 |subject of record|, + 363589002 |associated procedure| = ( + 397956004 |prosthetic arthroplasty of the hip|: + 363704007 |procedure site| = (24136001 |hip joint structure|: 272741003 |laterality| = 7771000 |left|) + { + 363699004 |direct device| = 304120007 |total hip replacement prosthesis|, + 260686004 |method| = 257867005 |insertion - action| + } + ) + } + '''.assertNoErrors + + assertFalse(expression.isPrimitive) + assertEquals(1, expression.expression.focusConcepts.size) + assertConceptReference(expression.expression.focusConcepts.head, "243796009", "situation with explicit context") + + assertTrue(expression.expression.refinement.attributes.empty) + assertEquals(1, expression.expression.refinement.groups.size) + + val group = expression.expression.refinement.groups.head + + assertEquals(4, group.attributes.size) + + assertSimpleAttribute(group.attributes.get(0), "408730004", "procedure context", "385658003", "done") + assertSimpleAttribute(group.attributes.get(1), "408731000", "temporal context", "410512000", "current or specified") + assertSimpleAttribute(group.attributes.get(2), "408732007", "subject relationship context", "410604004", "subject of record") + + val attribute = group.attributes.get(3) + + assertConceptReference(attribute.name, "363589002", "associated procedure") + + assertTrue(attribute.value instanceof SubExpression) + val subExpression = attribute.value as SubExpression + + assertEquals(1, subExpression.focusConcepts.size) + assertConceptReference(subExpression.focusConcepts.head, "397956004", "prosthetic arthroplasty of the hip") + + + assertEquals(1, subExpression.refinement.attributes.size) + + assertConceptReference(subExpression.refinement.attributes.head.name, "363704007", "procedure site") + + assertTrue(subExpression.refinement.attributes.head.value instanceof SubExpression) + val subExpression2 = subExpression.refinement.attributes.head.value as SubExpression + + assertEquals(1, subExpression2.focusConcepts.size) + assertConceptReference(subExpression2.focusConcepts.head, "24136001", "hip joint structure") + + assertEquals(1, subExpression2.refinement.attributes.size) + assertSimpleAttribute(subExpression2.refinement.attributes.head, "272741003", "laterality", "7771000", "left") + + + assertEquals(1, subExpression.refinement.groups.size) + val subGroup = subExpression.refinement.groups.head + assertEquals(2, subGroup.attributes.size) + + assertSimpleAttribute(subGroup.attributes.head, "363699004", "direct device", "304120007", "total hip replacement prosthesis") + assertSimpleAttribute(subGroup.attributes.last, "260686004", "method", "257867005", "insertion - action") + + } + + def private void assertSimpleAttribute(Attribute attribute, String nameId, String nameTerm, String valueId, String valueTerm) { + assertConceptReference(attribute.name, nameId, nameTerm) + assertTrue(attribute.value instanceof ConceptReference) + assertConceptReference((attribute.value as ConceptReference), valueId, valueTerm) + } + + def private void assertIntegerAttribute(Attribute attribute, String nameId, String nameTerm, int intValue) { + assertConceptReference(attribute.name, nameId, nameTerm) + assertTrue(attribute.value instanceof IntegerValue) + assertEquals(intValue, (attribute.value as IntegerValue).value) + } + + def private void assertDecimalAttribute(Attribute attribute, String nameId, String nameTerm, BigDecimal decimalValue) { + assertConceptReference(attribute.name, nameId, nameTerm) + assertTrue(attribute.value instanceof DecimalValue) + assertTrue(decimalValue.equals((attribute.value as DecimalValue).value)) + } + + def private void assertStringAttribute(Attribute attribute, String nameId, String nameTerm, String stringValue) { + assertConceptReference(attribute.name, nameId, nameTerm) + assertTrue(attribute.value instanceof StringValue) + assertEquals(stringValue, (attribute.value as StringValue).value) + } + + def private void assertConceptReference(ConceptReference reference, String id, String term) { + assertEquals(id, reference.id) + assertEquals('|' + term + '|', reference.term) + } + + private def Expression assertNoErrors(CharSequence it) throws Exception { + val expression = parse + assertNotNull('''Cannot parse expression: «it».''', expression) + expression.assertNoErrors + return expression + } +} diff --git a/snomed/com.b2international.snowowl.snomed.scg.tests/xtend-gen/.gitignore b/snomed/com.b2international.snowowl.snomed.scg.tests/xtend-gen/.gitignore new file mode 100644 index 00000000000..02b6653cb30 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg.tests/xtend-gen/.gitignore @@ -0,0 +1,5 @@ +#This file is needed to prevent git from omitting this folder that would cause build issues/compile errors. +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/snomed/com.b2international.snowowl.snomed.scg/.classpath b/snomed/com.b2international.snowowl.snomed.scg/.classpath index dd9974e1e33..75a54f54d0b 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/.classpath +++ b/snomed/com.b2international.snowowl.snomed.scg/.classpath @@ -1,12 +1,8 @@ - - - - - + + + - - diff --git a/snomed/com.b2international.snowowl.snomed.scg/.project b/snomed/com.b2international.snowowl.snomed.scg/.project index 33bcc45294c..429c416225c 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/.project +++ b/snomed/com.b2international.snowowl.snomed.scg/.project @@ -6,35 +6,29 @@ - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder + org.eclipse.xtext.ui.shared.xtextBuilder - org.eclipse.pde.SchemaBuilder + org.eclipse.jdt.core.javabuilder - org.eclipse.xtend.shared.ui.xtendBuilder + org.eclipse.pde.ManifestBuilder - org.eclipse.m2e.core.maven2Builder + org.eclipse.pde.SchemaBuilder - org.eclipse.m2e.core.maven2Nature + org.eclipse.xtext.ui.shared.xtextNature org.eclipse.jdt.core.javanature org.eclipse.pde.PluginNature - org.eclipse.xtext.ui.shared.xtextNature diff --git a/snomed/com.b2international.snowowl.snomed.scg/AFTER_REGENERATION_TODO.txt b/snomed/com.b2international.snowowl.snomed.scg/AFTER_REGENERATION_TODO.txt deleted file mode 100644 index f58365f13ef..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/AFTER_REGENERATION_TODO.txt +++ /dev/null @@ -1,169 +0,0 @@ -1. Add the following toString() implementations in generated model classes: - -AttributeImpl.java ------------------- - - /** - * - * - * @generated NOT - */ - @Override - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(); - result.append(name); - result.append('='); - - if (value instanceof Expression) { - /* - * 5.5.2 Canonical representations - * If a value contains nested refinements, the value is enclosed in - * round brackets (which may influence the sort order) - */ - result.append('('); - result.append(value); - result.append(')'); - } else { - result.append(value); - } - - return result.toString(); - } - -ConceptImpl.java ----------------- - - /** - * - * - * @generated NOT - */ - @Override - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(); - result.append(id); - - if (term != null && term.length() > 0) { - result.append("|" + term + "|"); - } - - return result.toString(); - } - -ExpressionImpl.java -------------------- - - /** - * - * - * @generated NOT - */ - @Override - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(); - - // get all LValue labels - List lValueLabels = new ArrayList(); - for (Concept lValue : getConcepts()) { - lValueLabels.add(lValue.toString()); - } - // sort LValue labels - Collections.sort(lValueLabels); - - for (Iterator iterator = lValueLabels.iterator(); iterator.hasNext();) { - result.append(iterator.next()); - if (iterator.hasNext()) - result.append('+'); - } - // return if no refinements - if (getAttributes().isEmpty() && getGroups().isEmpty()) { - return result.toString(); - } - result.append(':'); - result.append(refinementsToString()); - return result.toString(); - } - - /** - * - * - * @generated NOT - */ - private String refinementsToString() - { - StringBuffer result = new StringBuffer(); - // ungrouped attributes - // get all attribute labels - List ungroupedAttributeLabels = new ArrayList(); - for (Attribute ungroupedAttribute : getAttributes()) { - ungroupedAttributeLabels.add(ungroupedAttribute.toString()); - } - - // sort attribute labels alphabetically - Collections.sort(ungroupedAttributeLabels); - - for (Iterator iterator = ungroupedAttributeLabels.iterator(); iterator.hasNext();) { - String attributeLabel = (String) iterator.next(); - result.append(attributeLabel); - if (iterator.hasNext()) - result.append(','); - } - // attribute groups - List attributeGroupLabels = new ArrayList(); - // get all attribute groups labels - for (Group attributeGroup : getGroups()) { - attributeGroupLabels.add(attributeGroup.toString()); - } - - // sort attribute group labels - Collections.sort(attributeGroupLabels); - - for (Iterator iterator = attributeGroupLabels.iterator(); iterator.hasNext();) { - result.append(iterator.next()); - } - - return result.toString(); - } - -GroupImpl.java --------------- - - /** - * - * - * @generated NOT - */ - @Override - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(); - result.append('{'); - // get all attribute labels - List attributeLabels = new ArrayList(); - for (Attribute attribute : getAttributes()) { - attributeLabels.add(attribute.toString()); - } - // sort attribute labels - Collections.sort(attributeLabels); - - for (Iterator iterator = attributeLabels.iterator(); iterator.hasNext();) { - result.append(iterator.next()); - if (iterator.hasNext()) - result.append(','); - } - result.append('}'); - return result.toString(); - } - -2. Organize imports diff --git a/snomed/com.b2international.snowowl.snomed.scg/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.scg/META-INF/MANIFEST.MF index a6a68d2d1d2..ee5576e5d12 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.scg/META-INF/MANIFEST.MF @@ -1,26 +1,32 @@ Manifest-Version: 1.0 +Automatic-Module-Name: com.b2international.snowowl.snomed.scg Bundle-ManifestVersion: 2 -Bundle-Name: Snow Owl SCG Core +Bundle-Name: Snow Owl SNOMED CT Compositional Grammar Bundle-Vendor: B2i Healthcare -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-SymbolicName: com.b2international.snowowl.snomed.scg;singleton:=true Bundle-ActivationPolicy: lazy -Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", - org.eclipse.emf.common;bundle-version="2.10.0", - org.eclipse.emf.ecore;bundle-version="2.10.0", - org.eclipse.xtext;bundle-version="[2.18.0,2.19.0)", +Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0", + org.eclipse.emf.ecore, + org.eclipse.emf.common, + org.eclipse.xtext;bundle-version="[2.18.0,2.19.0)";visibility:=reexport, org.eclipse.xtext.util;bundle-version="[2.18.0,2.19.0)", + org.eclipse.xtext.xbase.lib;bundle-version="[2.18.0,2.19.0)", + org.eclipse.xtext.common.types;bundle-version="[2.18.0,2.19.0)", org.antlr.runtime, - com.b2international.snowowl.snomed.dsl, - com.b2international.snowowl.snomed.datastore;visibility:=reexport -Import-Package: org.slf4j;version="1.7.25" + org.objectweb.asm;bundle-version="[7.1.0,7.2.0)";resolution:=optional Bundle-RequiredExecutionEnvironment: JavaSE-11 -Export-Package: com.b2international.snowowl.dsl,com.b2international.sn - owowl.dsl.expressionextractor,com.b2international.snowowl.dsl.parseTr - eeConstruction,com.b2international.snowowl.dsl.parser.antlr,com.b2int - ernational.snowowl.dsl.parser.antlr.internal,com.b2international.snow - owl.dsl.scg,com.b2international.snowowl.dsl.scg.impl,com.b2internatio - nal.snowowl.dsl.services,com.b2international.snowowl.dsl.util,com.b2i - nternational.snowowl.dsl.validation,com.b2international.snowowl.dsl.s - cg.util,com.b2international.snowowl.dsl.scoping,com.b2international.s - nowowl.dsl.formatting +Import-Package: org.apache.log4j, + org.slf4j;version="1.7.25" +Export-Package: com.b2international.snowowl.snomed.scg, + com.b2international.snowowl.snomed.scg.generator, + com.b2international.snowowl.snomed.scg.parser.antlr, + com.b2international.snowowl.snomed.scg.parser.antlr.internal, + com.b2international.snowowl.snomed.scg.parser.antlr.lexer, + com.b2international.snowowl.snomed.scg.scg, + com.b2international.snowowl.snomed.scg.scg.impl, + com.b2international.snowowl.snomed.scg.scg.util, + com.b2international.snowowl.snomed.scg.scoping, + com.b2international.snowowl.snomed.scg.serializer, + com.b2international.snowowl.snomed.scg.services, + com.b2international.snowowl.snomed.scg.validation diff --git a/snomed/com.b2international.snowowl.snomed.scg/SCG_v2.3.1_ABNF_syntax_20170717.txt b/snomed/com.b2international.snowowl.snomed.scg/SCG_v2.3.1_ABNF_syntax_20170717.txt new file mode 100644 index 00000000000..2823d28a731 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/SCG_v2.3.1_ABNF_syntax_20170717.txt @@ -0,0 +1,38 @@ +expression = ws [definitionStatus ws] subExpression ws +subExpression = focusConcept [ws ":" ws refinement] +definitionStatus = equivalentTo / subtypeOf +equivalentTo = "===" +subtypeOf = "<<<" +focusConcept = conceptReference *(ws "+" ws conceptReference) +conceptReference = conceptId [ws "|" ws term ws "|"] +conceptId = sctId +term = nonwsNonPipe *( *SP nonwsNonPipe ) +refinement = (attributeSet / attributeGroup) *( ws ["," ws] attributeGroup ) +attributeGroup = "{" ws attributeSet ws "}" +attributeSet = attribute *(ws "," ws attribute) +attribute = attributeName ws "=" ws attributeValue +attributeName = conceptReference +attributeValue = expressionValue / QM stringValue QM / "#" numericValue +expressionValue = conceptReference / "(" ws subExpression ws ")" +stringValue = 1*(anyNonEscapedChar / escapedChar) +numericValue = ["-"/"+"] (decimalValue / integerValue) +integerValue = digitNonZero *digit / zero +decimalValue = integerValue "." 1*digit +sctId = digitNonZero 5*17( digit ) +ws = *( SP / HTAB / CR / LF ) ; optional white space +SP = %x20 ; space +HTAB = %x09 ; tab +CR = %x0D ; carriage return +LF = %x0A ; line feed +QM = %x22 ; quotation mark +BS = %x5C ; back slash +digit = %x30-39 +zero = %x30 +digitNonZero = %x31-39 +nonwsNonPipe = %x21-7B / %x7D-7E / UTF8-2 / UTF8-3 / UTF8-4 +anyNonEscapedChar = HTAB / CR / LF / %x20-21 / %x23-5B / %x5D-7E / UTF8-2 / UTF8-3 / UTF8-4 +escapedChar = BS QM / BS BS +UTF8-2 = %xC2-DF UTF8-tail +UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail ) +UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / %xF4 %x80-8F 2( UTF8-tail ) +UTF8-tail = %x80-BF diff --git a/snomed/com.b2international.snowowl.snomed.scg/build.properties b/snomed/com.b2international.snowowl.snomed.scg/build.properties index bf35f6b3261..37f6ee77ae0 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/build.properties +++ b/snomed/com.b2international.snowowl.snomed.scg/build.properties @@ -1,6 +1,20 @@ source.. = src/,\ src-gen/ output.. = target/classes/ -bin.includes = META-INF/,\ - .,\ - plugin.xml +bin.includes = .,\ + META-INF/,\ + plugin.xml,\ + model/ +bin.excludes = **/*.mwe2 +additional.bundles = org.eclipse.xtext.xbase,\ + org.eclipse.xtext.common.types,\ + org.eclipse.xtext.xtext.generator,\ + org.eclipse.emf.codegen.ecore,\ + org.eclipse.emf.mwe.utils,\ + org.eclipse.emf.mwe2.launch,\ + org.eclipse.emf.mwe2.lib,\ + org.objectweb.asm,\ + org.apache.commons.logging,\ + com.ibm.icu, \ + ch.qos.logback.classic,\ + ch.qos.logback.core diff --git a/snomed/com.b2international.snowowl.snomed.scg/model/generated/Scg.ecore b/snomed/com.b2international.snowowl.snomed.scg/model/generated/Scg.ecore new file mode 100644 index 00000000000..3f707d16e61 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/model/generated/Scg.ecore @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/snomed/com.b2international.snowowl.snomed.scg/model/generated/Scg.genmodel b/snomed/com.b2international.snowowl.snomed.scg/model/generated/Scg.genmodel new file mode 100644 index 00000000000..cbec32b7508 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/model/generated/Scg.genmodel @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/snomed/com.b2international.snowowl.snomed.scg/plugin.properties b/snomed/com.b2international.snowowl.snomed.scg/plugin.properties deleted file mode 100644 index fabcf964041..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/plugin.properties +++ /dev/null @@ -1,8 +0,0 @@ - -# -# -# -# $Id$ - -pluginName = SCG Model -providerName = www.example.org diff --git a/snomed/com.b2international.snowowl.snomed.scg/plugin.xml b/snomed/com.b2international.snowowl.snomed.scg/plugin.xml index e87a913045a..b7eb7c78a80 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/plugin.xml +++ b/snomed/com.b2international.snowowl.snomed.scg/plugin.xml @@ -1,13 +1,13 @@ - - + + + + + - - - - diff --git a/snomed/com.b2international.snowowl.snomed.scg/pom.xml b/snomed/com.b2international.snowowl.snomed.scg/pom.xml index a05f007525c..d0c1d338c13 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.scg/pom.xml @@ -1,12 +1,13 @@ - - 4.0.0 - - com.b2international.snowowl - snomed-parent - 7.3.0-SNAPSHOT - - com.b2international.snowowl.snomed.scg - eclipse-plugin + + 4.0.0 + + com.b2international.snowowl + snomed-parent + 7.4.0-SNAPSHOT + + com.b2international.snowowl.snomed.scg + eclipse-plugin diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/AbstractSCGRuntimeModule.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/AbstractSCGRuntimeModule.java deleted file mode 100644 index a3e1edf8a4f..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/AbstractSCGRuntimeModule.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl; - -import java.util.Properties; - -import org.eclipse.xtext.Constants; -import org.eclipse.xtext.service.DefaultRuntimeModule; - -import com.google.inject.Binder; -import com.google.inject.name.Names; - -/** - * Manual modifications go to {com.b2international.snowowl.dsl.SCGRuntimeModule} - */ - @SuppressWarnings("all") -public abstract class AbstractSCGRuntimeModule extends DefaultRuntimeModule { - - protected Properties properties = null; - - @Override - public void configure(Binder binder) { - properties = tryBindProperties(binder, "com/b2international/snowowl/dsl/SCG.properties"); - super.configure(binder); - } - - public void configureLanguageName(Binder binder) { - binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("com.b2international.snowowl.dsl.SCG"); - } - - public void configureFileExtensions(Binder binder) { - if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null) - binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("scg"); - } - - // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment - public java.lang.ClassLoader bindClassLoaderToInstance() { - return getClass().getClassLoader(); - } - - // contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment - public Class bindIGrammarAccess() { - return com.b2international.snowowl.dsl.services.SCGGrammarAccess.class; - } - - // contributed by org.eclipse.xtext.generator.parseTreeConstructor.ParseTreeConstructorFragment - public Class bindIParseTreeConstructor() { - return com.b2international.snowowl.dsl.parseTreeConstruction.SCGParsetreeConstructor.class; - } - - // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment - public Class bindIParser() { - return com.b2international.snowowl.dsl.parser.antlr.SCGParser.class; - } - - // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment - public Class bindITokenToStringConverter() { - return org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter.class; - } - - // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment - public Class bindIAntlrTokenFileProvider() { - return com.b2international.snowowl.dsl.parser.antlr.SCGAntlrTokenFileProvider.class; - } - - // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment - public Class bindLexer() { - return com.b2international.snowowl.dsl.parser.antlr.internal.InternalSCGLexer.class; - } - - // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment - public com.google.inject.Provider provideInternalSCGLexer() { - return org.eclipse.xtext.parser.antlr.LexerProvider.create(com.b2international.snowowl.dsl.parser.antlr.internal.InternalSCGLexer.class); - } - - // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment - public void configureRuntimeLexer(com.google.inject.Binder binder) { - binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME)).to(com.b2international.snowowl.dsl.parser.antlr.internal.InternalSCGLexer.class); - } - - // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment - public Class bindITokenDefProvider() { - return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class; - } - - // contributed by org.eclipse.xtext.generator.validation.JavaValidatorFragment - @org.eclipse.xtext.service.SingletonBinding(eager=true) public Class bindSCGJavaValidator() { - return com.b2international.snowowl.dsl.validation.SCGJavaValidator.class; - } - - // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment - public Class bindIScopeProvider() { - return com.b2international.snowowl.dsl.scoping.SCGScopeProvider.class; - } - - // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment - public void configureIScopeProviderDelegate(com.google.inject.Binder binder) { - binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider.class); - } - - // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment - public Class bindIGlobalScopeProvider() { - return org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider.class; - } - - // contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment - public void configureIgnoreCaseLinking(com.google.inject.Binder binder) { - binder.bindConstant().annotatedWith(org.eclipse.xtext.scoping.IgnoreCaseLinking.class).to(false); - } - - // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment - public Class bindIQualifiedNameProvider() { - return org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider.class; - } - - // contributed by org.eclipse.xtext.generator.formatting.FormatterFragment - public Class bindIFormatter() { - return com.b2international.snowowl.dsl.formatting.SCGFormatter.class; - } - - // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment - public Class bindIContainer$Manager() { - return org.eclipse.xtext.resource.containers.StateBasedContainerManager.class; - } - - // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment - public Class bindIAllContainersState$Provider() { - return org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.class; - } - - // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment - public void configureIResourceDescriptions(com.google.inject.Binder binder) { - binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class); - } - - // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment - public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) { - binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCG.ecore b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCG.ecore deleted file mode 100644 index 529e7e39042..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCG.ecore +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCG.genmodel b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCG.genmodel deleted file mode 100644 index f28ff98e2df..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCG.genmodel +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCG.xmi b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCG.xmi deleted file mode 100644 index 6ff9e26ae84..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCG.xmi +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCGStandaloneSetupGenerated.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCGStandaloneSetupGenerated.java deleted file mode 100644 index 5bf21db5409..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/SCGStandaloneSetupGenerated.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl; - -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.xtext.ISetup; -import org.eclipse.emf.ecore.resource.Resource; - -import com.google.inject.Guice; -import com.google.inject.Injector; - -/** - * Generated from StandaloneSetup.xpt! - */ -@SuppressWarnings("all") -public class SCGStandaloneSetupGenerated implements ISetup { - - public Injector createInjectorAndDoEMFRegistration() { - // register default ePackages - if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("ecore")) - Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put( - "ecore", new org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl()); - if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi")) - Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put( - "xmi", new org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl()); - if (!EPackage.Registry.INSTANCE.containsKey(org.eclipse.xtext.XtextPackage.eNS_URI)) - EPackage.Registry.INSTANCE.put(org.eclipse.xtext.XtextPackage.eNS_URI, org.eclipse.xtext.XtextPackage.eINSTANCE); - - Injector injector = createInjector(); - register(injector); - return injector; - } - - public Injector createInjector() { - return Guice.createInjector(new com.b2international.snowowl.dsl.SCGRuntimeModule()); - } - - public void register(Injector injector) { - if (!EPackage.Registry.INSTANCE.containsKey("http://www.b2international.com/snowowl/SCG")) { - EPackage.Registry.INSTANCE.put("http://www.b2international.com/snowowl/SCG", com.b2international.snowowl.dsl.scg.ScgPackage.eINSTANCE); - } - - org.eclipse.xtext.resource.IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class); - org.eclipse.xtext.resource.IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class); - Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("scg", resourceFactory); - org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("scg", serviceProvider); - - - - - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parseTreeConstruction/SCGParsetreeConstructor.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parseTreeConstruction/SCGParsetreeConstructor.java deleted file mode 100644 index 26a936b98bf..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parseTreeConstruction/SCGParsetreeConstructor.java +++ /dev/null @@ -1,1239 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.parseTreeConstruction; - -import org.eclipse.emf.ecore.*; -import org.eclipse.xtext.*; -import org.eclipse.xtext.parsetree.reconstr.IEObjectConsumer; - -import com.b2international.snowowl.dsl.services.SCGGrammarAccess; - -import com.google.inject.Inject; - -@SuppressWarnings("all") -public class SCGParsetreeConstructor extends org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor { - - @Inject - private SCGGrammarAccess grammarAccess; - - @Override - protected AbstractToken getRootToken(IEObjectConsumer inst) { - return new ThisRootNode(inst); - } - -protected class ThisRootNode extends RootToken { - public ThisRootNode(IEObjectConsumer inst) { - super(inst); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Expression_Group(this, this, 0, inst); - case 1: return new Concept_Group(this, this, 1, inst); - case 2: return new Group_Group(this, this, 2, inst); - case 3: return new Attribute_Group(this, this, 3, inst); - case 4: return new AttributeValue_Alternatives(this, this, 4, inst); - default: return null; - } - } -} - - -/************ begin Rule Expression **************** - * - * Expression hidden(WS, SL_COMMENT, ML_COMMENT): - * - * concepts+=Concept (PLUS_SIGN concepts+=Concept)* (COLON (attributes+=Attribute (COMMA attributes+=Attribute)*)? - * - * groups+=Group*)?; - * - **/ - -// concepts+=Concept (PLUS_SIGN concepts+=Concept)* (COLON (attributes+=Attribute (COMMA attributes+=Attribute)*)? -// -// groups+=Group*)? -protected class Expression_Group extends GroupToken { - - public Expression_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Group getGrammarElement() { - return grammarAccess.getExpressionAccess().getGroup(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Expression_Group_2(lastRuleCallOrigin, this, 0, inst); - case 1: return new Expression_Group_1(lastRuleCallOrigin, this, 1, inst); - case 2: return new Expression_ConceptsAssignment_0(lastRuleCallOrigin, this, 2, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if(getEObject().eClass() != grammarAccess.getExpressionRule().getType().getClassifier()) - return null; - return eObjectConsumer; - } - -} - -// concepts+=Concept -protected class Expression_ConceptsAssignment_0 extends AssignmentToken { - - public Expression_ConceptsAssignment_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Assignment getGrammarElement() { - return grammarAccess.getExpressionAccess().getConceptsAssignment_0(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Concept_Group(this, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if((value = eObjectConsumer.getConsumable("concepts",true)) == null) return null; - IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("concepts"); - if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl - IEObjectConsumer param = createEObjectConsumer((EObject)value); - if(param.isInstanceOf(grammarAccess.getConceptRule().getType().getClassifier())) { - type = AssignmentType.PARSER_RULE_CALL; - element = grammarAccess.getExpressionAccess().getConceptsConceptParserRuleCall_0_0(); - consumed = obj; - return param; - } - } - return null; - } - - @Override - public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) { - if(value == inst.getEObject() && !inst.isConsumed()) return null; - switch(index) { - default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, consumed); - } - } -} - -// (PLUS_SIGN concepts+=Concept)* -protected class Expression_Group_1 extends GroupToken { - - public Expression_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Group getGrammarElement() { - return grammarAccess.getExpressionAccess().getGroup_1(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Expression_ConceptsAssignment_1_1(lastRuleCallOrigin, this, 0, inst); - default: return null; - } - } - -} - -// PLUS_SIGN -protected class Expression_PLUS_SIGNTerminalRuleCall_1_0 extends UnassignedTextToken { - - public Expression_PLUS_SIGNTerminalRuleCall_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public RuleCall getGrammarElement() { - return grammarAccess.getExpressionAccess().getPLUS_SIGNTerminalRuleCall_1_0(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Expression_Group_1(lastRuleCallOrigin, this, 0, inst); - case 1: return new Expression_ConceptsAssignment_0(lastRuleCallOrigin, this, 1, inst); - default: return null; - } - } - -} - -// concepts+=Concept -protected class Expression_ConceptsAssignment_1_1 extends AssignmentToken { - - public Expression_ConceptsAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Assignment getGrammarElement() { - return grammarAccess.getExpressionAccess().getConceptsAssignment_1_1(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Concept_Group(this, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if((value = eObjectConsumer.getConsumable("concepts",false)) == null) return null; - IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("concepts"); - if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl - IEObjectConsumer param = createEObjectConsumer((EObject)value); - if(param.isInstanceOf(grammarAccess.getConceptRule().getType().getClassifier())) { - type = AssignmentType.PARSER_RULE_CALL; - element = grammarAccess.getExpressionAccess().getConceptsConceptParserRuleCall_1_1_0(); - consumed = obj; - return param; - } - } - return null; - } - - @Override - public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) { - if(value == inst.getEObject() && !inst.isConsumed()) return null; - switch(index) { - case 0: return new Expression_PLUS_SIGNTerminalRuleCall_1_0(lastRuleCallOrigin, next, actIndex, consumed); - default: return null; - } - } -} - - -// (COLON (attributes+=Attribute (COMMA attributes+=Attribute)*)? groups+=Group*)? -protected class Expression_Group_2 extends GroupToken { - - public Expression_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Group getGrammarElement() { - return grammarAccess.getExpressionAccess().getGroup_2(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Expression_GroupsAssignment_2_2(lastRuleCallOrigin, this, 0, inst); - case 1: return new Expression_Group_2_1(lastRuleCallOrigin, this, 1, inst); - default: return null; - } - } - -} - -// COLON -protected class Expression_COLONTerminalRuleCall_2_0 extends UnassignedTextToken { - - public Expression_COLONTerminalRuleCall_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public RuleCall getGrammarElement() { - return grammarAccess.getExpressionAccess().getCOLONTerminalRuleCall_2_0(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Expression_Group_1(lastRuleCallOrigin, this, 0, inst); - case 1: return new Expression_ConceptsAssignment_0(lastRuleCallOrigin, this, 1, inst); - default: return null; - } - } - -} - -// (attributes+=Attribute (COMMA attributes+=Attribute)*)? -protected class Expression_Group_2_1 extends GroupToken { - - public Expression_Group_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Group getGrammarElement() { - return grammarAccess.getExpressionAccess().getGroup_2_1(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Expression_Group_2_1_1(lastRuleCallOrigin, this, 0, inst); - case 1: return new Expression_AttributesAssignment_2_1_0(lastRuleCallOrigin, this, 1, inst); - default: return null; - } - } - -} - -// attributes+=Attribute -protected class Expression_AttributesAssignment_2_1_0 extends AssignmentToken { - - public Expression_AttributesAssignment_2_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Assignment getGrammarElement() { - return grammarAccess.getExpressionAccess().getAttributesAssignment_2_1_0(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Attribute_Group(this, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if((value = eObjectConsumer.getConsumable("attributes",true)) == null) return null; - IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("attributes"); - if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl - IEObjectConsumer param = createEObjectConsumer((EObject)value); - if(param.isInstanceOf(grammarAccess.getAttributeRule().getType().getClassifier())) { - type = AssignmentType.PARSER_RULE_CALL; - element = grammarAccess.getExpressionAccess().getAttributesAttributeParserRuleCall_2_1_0_0(); - consumed = obj; - return param; - } - } - return null; - } - - @Override - public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) { - if(value == inst.getEObject() && !inst.isConsumed()) return null; - switch(index) { - case 0: return new Expression_COLONTerminalRuleCall_2_0(lastRuleCallOrigin, next, actIndex, consumed); - default: return null; - } - } -} - -// (COMMA attributes+=Attribute)* -protected class Expression_Group_2_1_1 extends GroupToken { - - public Expression_Group_2_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Group getGrammarElement() { - return grammarAccess.getExpressionAccess().getGroup_2_1_1(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Expression_AttributesAssignment_2_1_1_1(lastRuleCallOrigin, this, 0, inst); - default: return null; - } - } - -} - -// COMMA -protected class Expression_COMMATerminalRuleCall_2_1_1_0 extends UnassignedTextToken { - - public Expression_COMMATerminalRuleCall_2_1_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public RuleCall getGrammarElement() { - return grammarAccess.getExpressionAccess().getCOMMATerminalRuleCall_2_1_1_0(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Expression_Group_2_1_1(lastRuleCallOrigin, this, 0, inst); - case 1: return new Expression_AttributesAssignment_2_1_0(lastRuleCallOrigin, this, 1, inst); - default: return null; - } - } - -} - -// attributes+=Attribute -protected class Expression_AttributesAssignment_2_1_1_1 extends AssignmentToken { - - public Expression_AttributesAssignment_2_1_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Assignment getGrammarElement() { - return grammarAccess.getExpressionAccess().getAttributesAssignment_2_1_1_1(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Attribute_Group(this, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if((value = eObjectConsumer.getConsumable("attributes",false)) == null) return null; - IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("attributes"); - if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl - IEObjectConsumer param = createEObjectConsumer((EObject)value); - if(param.isInstanceOf(grammarAccess.getAttributeRule().getType().getClassifier())) { - type = AssignmentType.PARSER_RULE_CALL; - element = grammarAccess.getExpressionAccess().getAttributesAttributeParserRuleCall_2_1_1_1_0(); - consumed = obj; - return param; - } - } - return null; - } - - @Override - public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) { - if(value == inst.getEObject() && !inst.isConsumed()) return null; - switch(index) { - case 0: return new Expression_COMMATerminalRuleCall_2_1_1_0(lastRuleCallOrigin, next, actIndex, consumed); - default: return null; - } - } -} - - - -// groups+=Group* -protected class Expression_GroupsAssignment_2_2 extends AssignmentToken { - - public Expression_GroupsAssignment_2_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Assignment getGrammarElement() { - return grammarAccess.getExpressionAccess().getGroupsAssignment_2_2(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Group_Group(this, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if((value = eObjectConsumer.getConsumable("groups",false)) == null) return null; - IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("groups"); - if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl - IEObjectConsumer param = createEObjectConsumer((EObject)value); - if(param.isInstanceOf(grammarAccess.getGroupRule().getType().getClassifier())) { - type = AssignmentType.PARSER_RULE_CALL; - element = grammarAccess.getExpressionAccess().getGroupsGroupParserRuleCall_2_2_0(); - consumed = obj; - return param; - } - } - return null; - } - - @Override - public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) { - if(value == inst.getEObject() && !inst.isConsumed()) return null; - switch(index) { - case 0: return new Expression_GroupsAssignment_2_2(lastRuleCallOrigin, next, actIndex, consumed); - case 1: return new Expression_Group_2_1(lastRuleCallOrigin, next, actIndex, consumed); - case 2: return new Expression_COLONTerminalRuleCall_2_0(lastRuleCallOrigin, next, actIndex, consumed); - default: return null; - } - } -} - - - -/************ end Rule Expression ****************/ - - -/************ begin Rule Concept **************** - * - * Concept: - * - * id=ConceptId (PIPE WS* term=Term WS* PIPE)?; - * - **/ - -// id=ConceptId (PIPE WS* term=Term WS* PIPE)? -protected class Concept_Group extends GroupToken { - - public Concept_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Group getGrammarElement() { - return grammarAccess.getConceptAccess().getGroup(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Concept_Group_1(lastRuleCallOrigin, this, 0, inst); - case 1: return new Concept_IdAssignment_0(lastRuleCallOrigin, this, 1, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if(getEObject().eClass() != grammarAccess.getConceptRule().getType().getClassifier()) - return null; - return eObjectConsumer; - } - -} - -// id=ConceptId -protected class Concept_IdAssignment_0 extends AssignmentToken { - - public Concept_IdAssignment_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Assignment getGrammarElement() { - return grammarAccess.getConceptAccess().getIdAssignment_0(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst); - } - } - - @Override - public IEObjectConsumer tryConsume() { - if((value = eObjectConsumer.getConsumable("id",true)) == null) return null; - IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("id"); - if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getConceptAccess().getIdConceptIdParserRuleCall_0_0(), value, null)) { - type = AssignmentType.DATATYPE_RULE_CALL; - element = grammarAccess.getConceptAccess().getIdConceptIdParserRuleCall_0_0(); - return obj; - } - return null; - } - -} - -// (PIPE WS* term=Term WS* PIPE)? -protected class Concept_Group_1 extends GroupToken { - - public Concept_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Group getGrammarElement() { - return grammarAccess.getConceptAccess().getGroup_1(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Concept_PIPETerminalRuleCall_1_4(lastRuleCallOrigin, this, 0, inst); - default: return null; - } - } - -} - -// PIPE -protected class Concept_PIPETerminalRuleCall_1_0 extends UnassignedTextToken { - - public Concept_PIPETerminalRuleCall_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public RuleCall getGrammarElement() { - return grammarAccess.getConceptAccess().getPIPETerminalRuleCall_1_0(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Concept_IdAssignment_0(lastRuleCallOrigin, this, 0, inst); - default: return null; - } - } - -} - -// term=Term -protected class Concept_TermAssignment_1_2 extends AssignmentToken { - - public Concept_TermAssignment_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Assignment getGrammarElement() { - return grammarAccess.getConceptAccess().getTermAssignment_1_2(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Concept_PIPETerminalRuleCall_1_0(lastRuleCallOrigin, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if((value = eObjectConsumer.getConsumable("term",false)) == null) return null; - IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("term"); - if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getConceptAccess().getTermTermParserRuleCall_1_2_0(), value, null)) { - type = AssignmentType.DATATYPE_RULE_CALL; - element = grammarAccess.getConceptAccess().getTermTermParserRuleCall_1_2_0(); - return obj; - } - return null; - } - -} - -// PIPE -protected class Concept_PIPETerminalRuleCall_1_4 extends UnassignedTextToken { - - public Concept_PIPETerminalRuleCall_1_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public RuleCall getGrammarElement() { - return grammarAccess.getConceptAccess().getPIPETerminalRuleCall_1_4(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Concept_TermAssignment_1_2(lastRuleCallOrigin, this, 0, inst); - default: return null; - } - } - -} - - - -/************ end Rule Concept ****************/ - - -/************ begin Rule Group **************** - * - * Group: - * - * OPENING_CURLY_BRACKET attributes+=Attribute (COMMA attributes+=Attribute)* CLOSING_CURLY_BRACKET; - * - **/ - -// OPENING_CURLY_BRACKET attributes+=Attribute (COMMA attributes+=Attribute)* CLOSING_CURLY_BRACKET -protected class Group_Group extends GroupToken { - - public Group_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Group getGrammarElement() { - return grammarAccess.getGroupAccess().getGroup(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Group_CLOSING_CURLY_BRACKETTerminalRuleCall_3(lastRuleCallOrigin, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if(getEObject().eClass() != grammarAccess.getGroupRule().getType().getClassifier()) - return null; - return eObjectConsumer; - } - -} - -// OPENING_CURLY_BRACKET -protected class Group_OPENING_CURLY_BRACKETTerminalRuleCall_0 extends UnassignedTextToken { - - public Group_OPENING_CURLY_BRACKETTerminalRuleCall_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public RuleCall getGrammarElement() { - return grammarAccess.getGroupAccess().getOPENING_CURLY_BRACKETTerminalRuleCall_0(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst); - } - } - -} - -// attributes+=Attribute -protected class Group_AttributesAssignment_1 extends AssignmentToken { - - public Group_AttributesAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Assignment getGrammarElement() { - return grammarAccess.getGroupAccess().getAttributesAssignment_1(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Attribute_Group(this, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if((value = eObjectConsumer.getConsumable("attributes",true)) == null) return null; - IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("attributes"); - if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl - IEObjectConsumer param = createEObjectConsumer((EObject)value); - if(param.isInstanceOf(grammarAccess.getAttributeRule().getType().getClassifier())) { - type = AssignmentType.PARSER_RULE_CALL; - element = grammarAccess.getGroupAccess().getAttributesAttributeParserRuleCall_1_0(); - consumed = obj; - return param; - } - } - return null; - } - - @Override - public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) { - if(value == inst.getEObject() && !inst.isConsumed()) return null; - switch(index) { - case 0: return new Group_OPENING_CURLY_BRACKETTerminalRuleCall_0(lastRuleCallOrigin, next, actIndex, consumed); - default: return null; - } - } -} - -// (COMMA attributes+=Attribute)* -protected class Group_Group_2 extends GroupToken { - - public Group_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Group getGrammarElement() { - return grammarAccess.getGroupAccess().getGroup_2(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Group_AttributesAssignment_2_1(lastRuleCallOrigin, this, 0, inst); - default: return null; - } - } - -} - -// COMMA -protected class Group_COMMATerminalRuleCall_2_0 extends UnassignedTextToken { - - public Group_COMMATerminalRuleCall_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public RuleCall getGrammarElement() { - return grammarAccess.getGroupAccess().getCOMMATerminalRuleCall_2_0(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Group_Group_2(lastRuleCallOrigin, this, 0, inst); - case 1: return new Group_AttributesAssignment_1(lastRuleCallOrigin, this, 1, inst); - default: return null; - } - } - -} - -// attributes+=Attribute -protected class Group_AttributesAssignment_2_1 extends AssignmentToken { - - public Group_AttributesAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Assignment getGrammarElement() { - return grammarAccess.getGroupAccess().getAttributesAssignment_2_1(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Attribute_Group(this, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if((value = eObjectConsumer.getConsumable("attributes",false)) == null) return null; - IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("attributes"); - if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl - IEObjectConsumer param = createEObjectConsumer((EObject)value); - if(param.isInstanceOf(grammarAccess.getAttributeRule().getType().getClassifier())) { - type = AssignmentType.PARSER_RULE_CALL; - element = grammarAccess.getGroupAccess().getAttributesAttributeParserRuleCall_2_1_0(); - consumed = obj; - return param; - } - } - return null; - } - - @Override - public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) { - if(value == inst.getEObject() && !inst.isConsumed()) return null; - switch(index) { - case 0: return new Group_COMMATerminalRuleCall_2_0(lastRuleCallOrigin, next, actIndex, consumed); - default: return null; - } - } -} - - -// CLOSING_CURLY_BRACKET -protected class Group_CLOSING_CURLY_BRACKETTerminalRuleCall_3 extends UnassignedTextToken { - - public Group_CLOSING_CURLY_BRACKETTerminalRuleCall_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public RuleCall getGrammarElement() { - return grammarAccess.getGroupAccess().getCLOSING_CURLY_BRACKETTerminalRuleCall_3(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Group_Group_2(lastRuleCallOrigin, this, 0, inst); - case 1: return new Group_AttributesAssignment_1(lastRuleCallOrigin, this, 1, inst); - default: return null; - } - } - -} - - -/************ end Rule Group ****************/ - - -/************ begin Rule Attribute **************** - * - * Attribute: - * - * name=Concept EQUAL_SIGN value=AttributeValue; - * - **/ - -// name=Concept EQUAL_SIGN value=AttributeValue -protected class Attribute_Group extends GroupToken { - - public Attribute_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Group getGrammarElement() { - return grammarAccess.getAttributeAccess().getGroup(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Attribute_ValueAssignment_2(lastRuleCallOrigin, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if(getEObject().eClass() != grammarAccess.getAttributeRule().getType().getClassifier()) - return null; - return eObjectConsumer; - } - -} - -// name=Concept -protected class Attribute_NameAssignment_0 extends AssignmentToken { - - public Attribute_NameAssignment_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Assignment getGrammarElement() { - return grammarAccess.getAttributeAccess().getNameAssignment_0(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Concept_Group(this, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if((value = eObjectConsumer.getConsumable("name",true)) == null) return null; - IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name"); - if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl - IEObjectConsumer param = createEObjectConsumer((EObject)value); - if(param.isInstanceOf(grammarAccess.getConceptRule().getType().getClassifier())) { - type = AssignmentType.PARSER_RULE_CALL; - element = grammarAccess.getAttributeAccess().getNameConceptParserRuleCall_0_0(); - consumed = obj; - return param; - } - } - return null; - } - - @Override - public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) { - if(value == inst.getEObject() && !inst.isConsumed()) return null; - switch(index) { - default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, consumed); - } - } -} - -// EQUAL_SIGN -protected class Attribute_EQUAL_SIGNTerminalRuleCall_1 extends UnassignedTextToken { - - public Attribute_EQUAL_SIGNTerminalRuleCall_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public RuleCall getGrammarElement() { - return grammarAccess.getAttributeAccess().getEQUAL_SIGNTerminalRuleCall_1(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Attribute_NameAssignment_0(lastRuleCallOrigin, this, 0, inst); - default: return null; - } - } - -} - -// value=AttributeValue -protected class Attribute_ValueAssignment_2 extends AssignmentToken { - - public Attribute_ValueAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Assignment getGrammarElement() { - return grammarAccess.getAttributeAccess().getValueAssignment_2(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new AttributeValue_Alternatives(this, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if((value = eObjectConsumer.getConsumable("value",true)) == null) return null; - IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("value"); - if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl - IEObjectConsumer param = createEObjectConsumer((EObject)value); - if(param.isInstanceOf(grammarAccess.getAttributeValueRule().getType().getClassifier())) { - type = AssignmentType.PARSER_RULE_CALL; - element = grammarAccess.getAttributeAccess().getValueAttributeValueParserRuleCall_2_0(); - consumed = obj; - return param; - } - } - return null; - } - - @Override - public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) { - if(value == inst.getEObject() && !inst.isConsumed()) return null; - switch(index) { - case 0: return new Attribute_EQUAL_SIGNTerminalRuleCall_1(lastRuleCallOrigin, next, actIndex, consumed); - default: return null; - } - } -} - - -/************ end Rule Attribute ****************/ - - -/************ begin Rule AttributeValue **************** - * - * AttributeValue: - * - * Concept | OPENING_ROUND_BRACKET Expression CLOSING_ROUND_BRACKET; - * - **/ - -// Concept | OPENING_ROUND_BRACKET Expression CLOSING_ROUND_BRACKET -protected class AttributeValue_Alternatives extends AlternativesToken { - - public AttributeValue_Alternatives(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Alternatives getGrammarElement() { - return grammarAccess.getAttributeValueAccess().getAlternatives(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new AttributeValue_ConceptParserRuleCall_0(lastRuleCallOrigin, this, 0, inst); - case 1: return new AttributeValue_Group_1(lastRuleCallOrigin, this, 1, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if(getEObject().eClass() != grammarAccess.getConceptRule().getType().getClassifier() && - getEObject().eClass() != grammarAccess.getExpressionRule().getType().getClassifier()) - return null; - return eObjectConsumer; - } - -} - -// Concept -protected class AttributeValue_ConceptParserRuleCall_0 extends RuleCallToken { - - public AttributeValue_ConceptParserRuleCall_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public RuleCall getGrammarElement() { - return grammarAccess.getAttributeValueAccess().getConceptParserRuleCall_0(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Concept_Group(this, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if(getEObject().eClass() != grammarAccess.getConceptRule().getType().getClassifier()) - return null; - if(checkForRecursion(Concept_Group.class, eObjectConsumer)) return null; - return eObjectConsumer; - } - - @Override - public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) { - switch(index) { - default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst); - } - } -} - -// OPENING_ROUND_BRACKET Expression CLOSING_ROUND_BRACKET -protected class AttributeValue_Group_1 extends GroupToken { - - public AttributeValue_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public Group getGrammarElement() { - return grammarAccess.getAttributeValueAccess().getGroup_1(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new AttributeValue_CLOSING_ROUND_BRACKETTerminalRuleCall_1_2(lastRuleCallOrigin, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if(getEObject().eClass() != grammarAccess.getExpressionRule().getType().getClassifier()) - return null; - return eObjectConsumer; - } - -} - -// OPENING_ROUND_BRACKET -protected class AttributeValue_OPENING_ROUND_BRACKETTerminalRuleCall_1_0 extends UnassignedTextToken { - - public AttributeValue_OPENING_ROUND_BRACKETTerminalRuleCall_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public RuleCall getGrammarElement() { - return grammarAccess.getAttributeValueAccess().getOPENING_ROUND_BRACKETTerminalRuleCall_1_0(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst); - } - } - -} - -// Expression -protected class AttributeValue_ExpressionParserRuleCall_1_1 extends RuleCallToken { - - public AttributeValue_ExpressionParserRuleCall_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public RuleCall getGrammarElement() { - return grammarAccess.getAttributeValueAccess().getExpressionParserRuleCall_1_1(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new Expression_Group(this, this, 0, inst); - default: return null; - } - } - - @Override - public IEObjectConsumer tryConsume() { - if(checkForRecursion(Expression_Group.class, eObjectConsumer)) return null; - return eObjectConsumer; - } - - @Override - public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new AttributeValue_OPENING_ROUND_BRACKETTerminalRuleCall_1_0(lastRuleCallOrigin, next, actIndex, inst); - default: return null; - } - } -} - -// CLOSING_ROUND_BRACKET -protected class AttributeValue_CLOSING_ROUND_BRACKETTerminalRuleCall_1_2 extends UnassignedTextToken { - - public AttributeValue_CLOSING_ROUND_BRACKETTerminalRuleCall_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) { - super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer); - } - - @Override - public RuleCall getGrammarElement() { - return grammarAccess.getAttributeValueAccess().getCLOSING_ROUND_BRACKETTerminalRuleCall_1_2(); - } - - @Override - public AbstractToken createFollower(int index, IEObjectConsumer inst) { - switch(index) { - case 0: return new AttributeValue_ExpressionParserRuleCall_1_1(lastRuleCallOrigin, this, 0, inst); - default: return null; - } - } - -} - - - -/************ end Rule AttributeValue ****************/ - - - - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g deleted file mode 100644 index c317f19ea67..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g +++ /dev/null @@ -1,793 +0,0 @@ -/* -* generated by Xtext -*/ -grammar InternalSCG; - -options { - superClass=AbstractInternalAntlrParser; - backtrack=true; - -} - -@lexer::header { -package com.b2international.snowowl.dsl.parser.antlr.internal; - -// Hack: Use our own Lexer superclass by means of import. -// Currently there is no other way to specify the superclass for the lexer. -import org.eclipse.xtext.parser.antlr.Lexer; -} - -@parser::header { -package com.b2international.snowowl.dsl.parser.antlr.internal; - -import org.eclipse.xtext.*; -import org.eclipse.xtext.parser.*; -import org.eclipse.xtext.parser.impl.*; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; -import org.eclipse.xtext.parser.antlr.XtextTokenStream; -import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; -import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; -import com.b2international.snowowl.dsl.services.SCGGrammarAccess; - -} - -@parser::members { - -/* - This grammar contains a lot of empty actions to work around a bug in ANTLR. - Otherwise the ANTLR tool will create synpreds that cannot be compiled in some rare cases. -*/ - - private SCGGrammarAccess grammarAccess; - - public InternalSCGParser(TokenStream input, SCGGrammarAccess grammarAccess) { - this(input); - this.grammarAccess = grammarAccess; - registerRules(grammarAccess.getGrammar()); - } - - @Override - protected String getFirstRuleName() { - return "Expression"; - } - - @Override - protected SCGGrammarAccess getGrammarAccess() { - return grammarAccess; - } -} - -@rulecatch { - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } -} - - - - -// Entry rule entryRuleExpression -entryRuleExpression returns [EObject current=null] - @init { - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS", "RULE_SL_COMMENT", "RULE_ML_COMMENT"); - } - : - { newCompositeNode(grammarAccess.getExpressionRule()); } - iv_ruleExpression=ruleExpression - { $current=$iv_ruleExpression.current; } - EOF -; -finally { - myHiddenTokenState.restore(); -} - -// Rule Expression -ruleExpression returns [EObject current=null] - @init { enterRule(); - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS", "RULE_SL_COMMENT", "RULE_ML_COMMENT"); - } - @after { leaveRule(); }: -(( -( - { - newCompositeNode(grammarAccess.getExpressionAccess().getConceptsConceptParserRuleCall_0_0()); - } - lv_concepts_0_0=ruleConcept { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getExpressionRule()); - } - add( - $current, - "concepts", - lv_concepts_0_0, - "Concept"); - afterParserOrEnumRuleCall(); - } - -) -)(this_PLUS_SIGN_1=RULE_PLUS_SIGN - { - newLeafNode(this_PLUS_SIGN_1, grammarAccess.getExpressionAccess().getPLUS_SIGNTerminalRuleCall_1_0()); - } -( -( - { - newCompositeNode(grammarAccess.getExpressionAccess().getConceptsConceptParserRuleCall_1_1_0()); - } - lv_concepts_2_0=ruleConcept { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getExpressionRule()); - } - add( - $current, - "concepts", - lv_concepts_2_0, - "Concept"); - afterParserOrEnumRuleCall(); - } - -) -))*(this_COLON_3=RULE_COLON - { - newLeafNode(this_COLON_3, grammarAccess.getExpressionAccess().getCOLONTerminalRuleCall_2_0()); - } -(( -( - { - newCompositeNode(grammarAccess.getExpressionAccess().getAttributesAttributeParserRuleCall_2_1_0_0()); - } - lv_attributes_4_0=ruleAttribute { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getExpressionRule()); - } - add( - $current, - "attributes", - lv_attributes_4_0, - "Attribute"); - afterParserOrEnumRuleCall(); - } - -) -)(this_COMMA_5=RULE_COMMA - { - newLeafNode(this_COMMA_5, grammarAccess.getExpressionAccess().getCOMMATerminalRuleCall_2_1_1_0()); - } -( -( - { - newCompositeNode(grammarAccess.getExpressionAccess().getAttributesAttributeParserRuleCall_2_1_1_1_0()); - } - lv_attributes_6_0=ruleAttribute { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getExpressionRule()); - } - add( - $current, - "attributes", - lv_attributes_6_0, - "Attribute"); - afterParserOrEnumRuleCall(); - } - -) -))*)?( -( - { - newCompositeNode(grammarAccess.getExpressionAccess().getGroupsGroupParserRuleCall_2_2_0()); - } - lv_groups_7_0=ruleGroup { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getExpressionRule()); - } - add( - $current, - "groups", - lv_groups_7_0, - "Group"); - afterParserOrEnumRuleCall(); - } - -) -)*)?) -; -finally { - myHiddenTokenState.restore(); -} - - - - - -// Entry rule entryRuleConcept -entryRuleConcept returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getConceptRule()); } - iv_ruleConcept=ruleConcept - { $current=$iv_ruleConcept.current; } - EOF -; - -// Rule Concept -ruleConcept returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -(( -( - { - newCompositeNode(grammarAccess.getConceptAccess().getIdConceptIdParserRuleCall_0_0()); - } - lv_id_0_0=ruleConceptId { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getConceptRule()); - } - set( - $current, - "id", - lv_id_0_0, - "ConceptId"); - afterParserOrEnumRuleCall(); - } - -) -)(this_PIPE_1=RULE_PIPE - { - newLeafNode(this_PIPE_1, grammarAccess.getConceptAccess().getPIPETerminalRuleCall_1_0()); - } -(this_WS_2=RULE_WS - { - newLeafNode(this_WS_2, grammarAccess.getConceptAccess().getWSTerminalRuleCall_1_1()); - } -)*( -( - { - newCompositeNode(grammarAccess.getConceptAccess().getTermTermParserRuleCall_1_2_0()); - } - lv_term_3_0=ruleTerm { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getConceptRule()); - } - set( - $current, - "term", - lv_term_3_0, - "Term"); - afterParserOrEnumRuleCall(); - } - -) -)(this_WS_4=RULE_WS - { - newLeafNode(this_WS_4, grammarAccess.getConceptAccess().getWSTerminalRuleCall_1_3()); - } -)*this_PIPE_5=RULE_PIPE - { - newLeafNode(this_PIPE_5, grammarAccess.getConceptAccess().getPIPETerminalRuleCall_1_4()); - } -)?) -; - - - - - -// Entry rule entryRuleGroup -entryRuleGroup returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getGroupRule()); } - iv_ruleGroup=ruleGroup - { $current=$iv_ruleGroup.current; } - EOF -; - -// Rule Group -ruleGroup returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -(this_OPENING_CURLY_BRACKET_0=RULE_OPENING_CURLY_BRACKET - { - newLeafNode(this_OPENING_CURLY_BRACKET_0, grammarAccess.getGroupAccess().getOPENING_CURLY_BRACKETTerminalRuleCall_0()); - } -( -( - { - newCompositeNode(grammarAccess.getGroupAccess().getAttributesAttributeParserRuleCall_1_0()); - } - lv_attributes_1_0=ruleAttribute { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getGroupRule()); - } - add( - $current, - "attributes", - lv_attributes_1_0, - "Attribute"); - afterParserOrEnumRuleCall(); - } - -) -)(this_COMMA_2=RULE_COMMA - { - newLeafNode(this_COMMA_2, grammarAccess.getGroupAccess().getCOMMATerminalRuleCall_2_0()); - } -( -( - { - newCompositeNode(grammarAccess.getGroupAccess().getAttributesAttributeParserRuleCall_2_1_0()); - } - lv_attributes_3_0=ruleAttribute { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getGroupRule()); - } - add( - $current, - "attributes", - lv_attributes_3_0, - "Attribute"); - afterParserOrEnumRuleCall(); - } - -) -))*this_CLOSING_CURLY_BRACKET_4=RULE_CLOSING_CURLY_BRACKET - { - newLeafNode(this_CLOSING_CURLY_BRACKET_4, grammarAccess.getGroupAccess().getCLOSING_CURLY_BRACKETTerminalRuleCall_3()); - } -) -; - - - - - -// Entry rule entryRuleAttribute -entryRuleAttribute returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getAttributeRule()); } - iv_ruleAttribute=ruleAttribute - { $current=$iv_ruleAttribute.current; } - EOF -; - -// Rule Attribute -ruleAttribute returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -(( -( - { - newCompositeNode(grammarAccess.getAttributeAccess().getNameConceptParserRuleCall_0_0()); - } - lv_name_0_0=ruleConcept { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getAttributeRule()); - } - set( - $current, - "name", - lv_name_0_0, - "Concept"); - afterParserOrEnumRuleCall(); - } - -) -)this_EQUAL_SIGN_1=RULE_EQUAL_SIGN - { - newLeafNode(this_EQUAL_SIGN_1, grammarAccess.getAttributeAccess().getEQUAL_SIGNTerminalRuleCall_1()); - } -( -( - { - newCompositeNode(grammarAccess.getAttributeAccess().getValueAttributeValueParserRuleCall_2_0()); - } - lv_value_2_0=ruleAttributeValue { - if ($current==null) { - $current = createModelElementForParent(grammarAccess.getAttributeRule()); - } - set( - $current, - "value", - lv_value_2_0, - "AttributeValue"); - afterParserOrEnumRuleCall(); - } - -) -)) -; - - - - - -// Entry rule entryRuleAttributeValue -entryRuleAttributeValue returns [EObject current=null] - : - { newCompositeNode(grammarAccess.getAttributeValueRule()); } - iv_ruleAttributeValue=ruleAttributeValue - { $current=$iv_ruleAttributeValue.current; } - EOF -; - -// Rule AttributeValue -ruleAttributeValue returns [EObject current=null] - @init { enterRule(); - } - @after { leaveRule(); }: -( - { - /* */ - } - { - newCompositeNode(grammarAccess.getAttributeValueAccess().getConceptParserRuleCall_0()); - } - this_Concept_0=ruleConcept - { - $current = $this_Concept_0.current; - afterParserOrEnumRuleCall(); - } - - |(this_OPENING_ROUND_BRACKET_1=RULE_OPENING_ROUND_BRACKET - { - newLeafNode(this_OPENING_ROUND_BRACKET_1, grammarAccess.getAttributeValueAccess().getOPENING_ROUND_BRACKETTerminalRuleCall_1_0()); - } - - { - /* */ - } - { - newCompositeNode(grammarAccess.getAttributeValueAccess().getExpressionParserRuleCall_1_1()); - } - this_Expression_2=ruleExpression - { - $current = $this_Expression_2.current; - afterParserOrEnumRuleCall(); - } -this_CLOSING_ROUND_BRACKET_3=RULE_CLOSING_ROUND_BRACKET - { - newLeafNode(this_CLOSING_ROUND_BRACKET_3, grammarAccess.getAttributeValueAccess().getCLOSING_ROUND_BRACKETTerminalRuleCall_1_2()); - } -)) -; - - - - - -// Entry rule entryRuleTerm -entryRuleTerm returns [String current=null] - @init { - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); - } - : - { newCompositeNode(grammarAccess.getTermRule()); } - iv_ruleTerm=ruleTerm - { $current=$iv_ruleTerm.current.getText(); } - EOF -; -finally { - myHiddenTokenState.restore(); -} - -// Rule Term -ruleTerm returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] - @init { enterRule(); - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); - } - @after { leaveRule(); }: -(( - { - newCompositeNode(grammarAccess.getTermAccess().getTermCharacterParserRuleCall_0()); - } - this_TermCharacter_0=ruleTermCharacter { - $current.merge(this_TermCharacter_0); - } - - { - afterParserOrEnumRuleCall(); - } -)+(( this_WS_1=RULE_WS { - $current.merge(this_WS_1); - } - - { - newLeafNode(this_WS_1, grammarAccess.getTermAccess().getWSTerminalRuleCall_1_0()); - } -)+( - { - newCompositeNode(grammarAccess.getTermAccess().getTermCharacterParserRuleCall_1_1()); - } - this_TermCharacter_2=ruleTermCharacter { - $current.merge(this_TermCharacter_2); - } - - { - afterParserOrEnumRuleCall(); - } -)+)*) - ; -finally { - myHiddenTokenState.restore(); -} - - - - - -// Entry rule entryRuleConceptId -entryRuleConceptId returns [String current=null] - @init { - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); - } - : - { newCompositeNode(grammarAccess.getConceptIdRule()); } - iv_ruleConceptId=ruleConceptId - { $current=$iv_ruleConceptId.current.getText(); } - EOF -; -finally { - myHiddenTokenState.restore(); -} - -// Rule ConceptId -ruleConceptId returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] - @init { enterRule(); - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); - } - @after { leaveRule(); }: -( this_DIGIT_NONZERO_0=RULE_DIGIT_NONZERO { - $current.merge(this_DIGIT_NONZERO_0); - } - - { - newLeafNode(this_DIGIT_NONZERO_0, grammarAccess.getConceptIdAccess().getDIGIT_NONZEROTerminalRuleCall_0()); - } -( this_DIGIT_NONZERO_1=RULE_DIGIT_NONZERO { - $current.merge(this_DIGIT_NONZERO_1); - } - - { - newLeafNode(this_DIGIT_NONZERO_1, grammarAccess.getConceptIdAccess().getDIGIT_NONZEROTerminalRuleCall_1_0()); - } - - | this_ZERO_2=RULE_ZERO { - $current.merge(this_ZERO_2); - } - - { - newLeafNode(this_ZERO_2, grammarAccess.getConceptIdAccess().getZEROTerminalRuleCall_1_1()); - } -)( this_DIGIT_NONZERO_3=RULE_DIGIT_NONZERO { - $current.merge(this_DIGIT_NONZERO_3); - } - - { - newLeafNode(this_DIGIT_NONZERO_3, grammarAccess.getConceptIdAccess().getDIGIT_NONZEROTerminalRuleCall_2_0()); - } - - | this_ZERO_4=RULE_ZERO { - $current.merge(this_ZERO_4); - } - - { - newLeafNode(this_ZERO_4, grammarAccess.getConceptIdAccess().getZEROTerminalRuleCall_2_1()); - } -)( this_DIGIT_NONZERO_5=RULE_DIGIT_NONZERO { - $current.merge(this_DIGIT_NONZERO_5); - } - - { - newLeafNode(this_DIGIT_NONZERO_5, grammarAccess.getConceptIdAccess().getDIGIT_NONZEROTerminalRuleCall_3_0()); - } - - | this_ZERO_6=RULE_ZERO { - $current.merge(this_ZERO_6); - } - - { - newLeafNode(this_ZERO_6, grammarAccess.getConceptIdAccess().getZEROTerminalRuleCall_3_1()); - } -)( this_DIGIT_NONZERO_7=RULE_DIGIT_NONZERO { - $current.merge(this_DIGIT_NONZERO_7); - } - - { - newLeafNode(this_DIGIT_NONZERO_7, grammarAccess.getConceptIdAccess().getDIGIT_NONZEROTerminalRuleCall_4_0()); - } - - | this_ZERO_8=RULE_ZERO { - $current.merge(this_ZERO_8); - } - - { - newLeafNode(this_ZERO_8, grammarAccess.getConceptIdAccess().getZEROTerminalRuleCall_4_1()); - } -)( this_DIGIT_NONZERO_9=RULE_DIGIT_NONZERO { - $current.merge(this_DIGIT_NONZERO_9); - } - - { - newLeafNode(this_DIGIT_NONZERO_9, grammarAccess.getConceptIdAccess().getDIGIT_NONZEROTerminalRuleCall_5_0()); - } - - | this_ZERO_10=RULE_ZERO { - $current.merge(this_ZERO_10); - } - - { - newLeafNode(this_ZERO_10, grammarAccess.getConceptIdAccess().getZEROTerminalRuleCall_5_1()); - } -)+) - ; -finally { - myHiddenTokenState.restore(); -} - - - - - -// Entry rule entryRuleTermCharacter -entryRuleTermCharacter returns [String current=null] - @init { - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); - } - : - { newCompositeNode(grammarAccess.getTermCharacterRule()); } - iv_ruleTermCharacter=ruleTermCharacter - { $current=$iv_ruleTermCharacter.current.getText(); } - EOF -; -finally { - myHiddenTokenState.restore(); -} - -// Rule TermCharacter -ruleTermCharacter returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] - @init { enterRule(); - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); - } - @after { leaveRule(); }: -( this_DIGIT_NONZERO_0=RULE_DIGIT_NONZERO { - $current.merge(this_DIGIT_NONZERO_0); - } - - { - newLeafNode(this_DIGIT_NONZERO_0, grammarAccess.getTermCharacterAccess().getDIGIT_NONZEROTerminalRuleCall_0()); - } - - | this_ZERO_1=RULE_ZERO { - $current.merge(this_ZERO_1); - } - - { - newLeafNode(this_ZERO_1, grammarAccess.getTermCharacterAccess().getZEROTerminalRuleCall_1()); - } - - | this_LETTER_2=RULE_LETTER { - $current.merge(this_LETTER_2); - } - - { - newLeafNode(this_LETTER_2, grammarAccess.getTermCharacterAccess().getLETTERTerminalRuleCall_2()); - } - - | this_COMMA_3=RULE_COMMA { - $current.merge(this_COMMA_3); - } - - { - newLeafNode(this_COMMA_3, grammarAccess.getTermCharacterAccess().getCOMMATerminalRuleCall_3()); - } - - | this_OPENING_CURLY_BRACKET_4=RULE_OPENING_CURLY_BRACKET { - $current.merge(this_OPENING_CURLY_BRACKET_4); - } - - { - newLeafNode(this_OPENING_CURLY_BRACKET_4, grammarAccess.getTermCharacterAccess().getOPENING_CURLY_BRACKETTerminalRuleCall_4()); - } - - | this_CLOSING_CURLY_BRACKET_5=RULE_CLOSING_CURLY_BRACKET { - $current.merge(this_CLOSING_CURLY_BRACKET_5); - } - - { - newLeafNode(this_CLOSING_CURLY_BRACKET_5, grammarAccess.getTermCharacterAccess().getCLOSING_CURLY_BRACKETTerminalRuleCall_5()); - } - - | this_EQUAL_SIGN_6=RULE_EQUAL_SIGN { - $current.merge(this_EQUAL_SIGN_6); - } - - { - newLeafNode(this_EQUAL_SIGN_6, grammarAccess.getTermCharacterAccess().getEQUAL_SIGNTerminalRuleCall_6()); - } - - | this_OPENING_ROUND_BRACKET_7=RULE_OPENING_ROUND_BRACKET { - $current.merge(this_OPENING_ROUND_BRACKET_7); - } - - { - newLeafNode(this_OPENING_ROUND_BRACKET_7, grammarAccess.getTermCharacterAccess().getOPENING_ROUND_BRACKETTerminalRuleCall_7()); - } - - | this_CLOSING_ROUND_BRACKET_8=RULE_CLOSING_ROUND_BRACKET { - $current.merge(this_CLOSING_ROUND_BRACKET_8); - } - - { - newLeafNode(this_CLOSING_ROUND_BRACKET_8, grammarAccess.getTermCharacterAccess().getCLOSING_ROUND_BRACKETTerminalRuleCall_8()); - } - - | this_PLUS_SIGN_9=RULE_PLUS_SIGN { - $current.merge(this_PLUS_SIGN_9); - } - - { - newLeafNode(this_PLUS_SIGN_9, grammarAccess.getTermCharacterAccess().getPLUS_SIGNTerminalRuleCall_9()); - } - - | this_COLON_10=RULE_COLON { - $current.merge(this_COLON_10); - } - - { - newLeafNode(this_COLON_10, grammarAccess.getTermCharacterAccess().getCOLONTerminalRuleCall_10()); - } - - | this_OTHER_ALLOWED_TERM_CHARACTER_11=RULE_OTHER_ALLOWED_TERM_CHARACTER { - $current.merge(this_OTHER_ALLOWED_TERM_CHARACTER_11); - } - - { - newLeafNode(this_OTHER_ALLOWED_TERM_CHARACTER_11, grammarAccess.getTermCharacterAccess().getOTHER_ALLOWED_TERM_CHARACTERTerminalRuleCall_11()); - } -) - ; -finally { - myHiddenTokenState.restore(); -} - - - - - -RULE_ZERO : '0'; - -RULE_DIGIT_NONZERO : '1'..'9'; - -RULE_LETTER : ('a'..'z'|'A'..'Z'); - -RULE_WS : (' '|'\t'|'\n'|'\r'); - -RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; - -RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; - -RULE_PIPE : '|'; - -RULE_COLON : ':'; - -RULE_OPENING_CURLY_BRACKET : '{'; - -RULE_CLOSING_CURLY_BRACKET : '}'; - -RULE_EQUAL_SIGN : '='; - -RULE_COMMA : ','; - -RULE_OPENING_ROUND_BRACKET : '('; - -RULE_CLOSING_ROUND_BRACKET : ')'; - -RULE_PLUS_SIGN : '+'; - -RULE_OTHER_ALLOWED_TERM_CHARACTER : .; - - diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.tokens b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.tokens deleted file mode 100644 index 6aedcc58d23..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.tokens +++ /dev/null @@ -1,16 +0,0 @@ -RULE_ZERO=15 -RULE_OPENING_CURLY_BRACKET=9 -RULE_EQUAL_SIGN=11 -RULE_COMMA=6 -RULE_DIGIT_NONZERO=14 -RULE_OPENING_ROUND_BRACKET=12 -RULE_OTHER_ALLOWED_TERM_CHARACTER=17 -RULE_SL_COMMENT=19 -RULE_LETTER=16 -RULE_ML_COMMENT=18 -RULE_CLOSING_CURLY_BRACKET=10 -RULE_COLON=5 -RULE_CLOSING_ROUND_BRACKET=13 -RULE_PIPE=7 -RULE_PLUS_SIGN=4 -RULE_WS=8 diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCGLexer.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCGLexer.java deleted file mode 100644 index 54bbe50239b..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCGLexer.java +++ /dev/null @@ -1,762 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.parser.antlr.internal; - -// Hack: Use our own Lexer superclass by means of import. -// Currently there is no other way to specify the superclass for the lexer. -import org.eclipse.xtext.parser.antlr.Lexer; - - -import org.antlr.runtime.*; -import java.util.Stack; -import java.util.List; -import java.util.ArrayList; - -@SuppressWarnings("all") -public class InternalSCGLexer extends Lexer { - public static final int RULE_ZERO=15; - public static final int RULE_OPENING_CURLY_BRACKET=9; - public static final int RULE_EQUAL_SIGN=11; - public static final int RULE_COMMA=6; - public static final int RULE_DIGIT_NONZERO=14; - public static final int RULE_OPENING_ROUND_BRACKET=12; - public static final int RULE_OTHER_ALLOWED_TERM_CHARACTER=17; - public static final int EOF=-1; - public static final int RULE_SL_COMMENT=19; - public static final int RULE_LETTER=16; - public static final int RULE_ML_COMMENT=18; - public static final int RULE_CLOSING_CURLY_BRACKET=10; - public static final int RULE_COLON=5; - public static final int RULE_CLOSING_ROUND_BRACKET=13; - public static final int RULE_PIPE=7; - public static final int RULE_PLUS_SIGN=4; - public static final int RULE_WS=8; - - // delegates - // delegators - - public InternalSCGLexer() {;} - public InternalSCGLexer(CharStream input) { - this(input, new RecognizerSharedState()); - } - public InternalSCGLexer(CharStream input, RecognizerSharedState state) { - super(input,state); - - } - public String getGrammarFileName() { return "../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g"; } - - // $ANTLR start "RULE_ZERO" - public final void mRULE_ZERO() throws RecognitionException { - try { - int _type = RULE_ZERO; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:761:11: ( '0' ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:761:13: '0' - { - match('0'); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_ZERO" - - // $ANTLR start "RULE_DIGIT_NONZERO" - public final void mRULE_DIGIT_NONZERO() throws RecognitionException { - try { - int _type = RULE_DIGIT_NONZERO; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:763:20: ( '1' .. '9' ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:763:22: '1' .. '9' - { - matchRange('1','9'); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_DIGIT_NONZERO" - - // $ANTLR start "RULE_LETTER" - public final void mRULE_LETTER() throws RecognitionException { - try { - int _type = RULE_LETTER; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:765:13: ( ( 'a' .. 'z' | 'A' .. 'Z' ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:765:15: ( 'a' .. 'z' | 'A' .. 'Z' ) - { - if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_LETTER" - - // $ANTLR start "RULE_WS" - public final void mRULE_WS() throws RecognitionException { - try { - int _type = RULE_WS; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:767:9: ( ( ' ' | '\\t' | '\\n' | '\\r' ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:767:11: ( ' ' | '\\t' | '\\n' | '\\r' ) - { - if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_WS" - - // $ANTLR start "RULE_ML_COMMENT" - public final void mRULE_ML_COMMENT() throws RecognitionException { - try { - int _type = RULE_ML_COMMENT; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:769:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:769:19: '/*' ( options {greedy=false; } : . )* '*/' - { - match("/*"); - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:769:24: ( options {greedy=false; } : . )* - loop1: - do { - int alt1=2; - int LA1_0 = input.LA(1); - - if ( (LA1_0=='*') ) { - int LA1_1 = input.LA(2); - - if ( (LA1_1=='/') ) { - alt1=2; - } - else if ( ((LA1_1>='\u0000' && LA1_1<='.')||(LA1_1>='0' && LA1_1<='\uFFFF')) ) { - alt1=1; - } - - - } - else if ( ((LA1_0>='\u0000' && LA1_0<=')')||(LA1_0>='+' && LA1_0<='\uFFFF')) ) { - alt1=1; - } - - - switch (alt1) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:769:52: . - { - matchAny(); - - } - break; - - default : - break loop1; - } - } while (true); - - match("*/"); - - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_ML_COMMENT" - - // $ANTLR start "RULE_SL_COMMENT" - public final void mRULE_SL_COMMENT() throws RecognitionException { - try { - int _type = RULE_SL_COMMENT; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:771:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:771:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? - { - match("//"); - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:771:24: (~ ( ( '\\n' | '\\r' ) ) )* - loop2: - do { - int alt2=2; - int LA2_0 = input.LA(1); - - if ( ((LA2_0>='\u0000' && LA2_0<='\t')||(LA2_0>='\u000B' && LA2_0<='\f')||(LA2_0>='\u000E' && LA2_0<='\uFFFF')) ) { - alt2=1; - } - - - switch (alt2) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:771:24: ~ ( ( '\\n' | '\\r' ) ) - { - if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { - input.consume(); - - } - else { - MismatchedSetException mse = new MismatchedSetException(null,input); - recover(mse); - throw mse;} - - - } - break; - - default : - break loop2; - } - } while (true); - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:771:40: ( ( '\\r' )? '\\n' )? - int alt4=2; - int LA4_0 = input.LA(1); - - if ( (LA4_0=='\n'||LA4_0=='\r') ) { - alt4=1; - } - switch (alt4) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:771:41: ( '\\r' )? '\\n' - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:771:41: ( '\\r' )? - int alt3=2; - int LA3_0 = input.LA(1); - - if ( (LA3_0=='\r') ) { - alt3=1; - } - switch (alt3) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:771:41: '\\r' - { - match('\r'); - - } - break; - - } - - match('\n'); - - } - break; - - } - - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_SL_COMMENT" - - // $ANTLR start "RULE_PIPE" - public final void mRULE_PIPE() throws RecognitionException { - try { - int _type = RULE_PIPE; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:773:11: ( '|' ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:773:13: '|' - { - match('|'); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_PIPE" - - // $ANTLR start "RULE_COLON" - public final void mRULE_COLON() throws RecognitionException { - try { - int _type = RULE_COLON; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:775:12: ( ':' ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:775:14: ':' - { - match(':'); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_COLON" - - // $ANTLR start "RULE_OPENING_CURLY_BRACKET" - public final void mRULE_OPENING_CURLY_BRACKET() throws RecognitionException { - try { - int _type = RULE_OPENING_CURLY_BRACKET; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:777:28: ( '{' ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:777:30: '{' - { - match('{'); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_OPENING_CURLY_BRACKET" - - // $ANTLR start "RULE_CLOSING_CURLY_BRACKET" - public final void mRULE_CLOSING_CURLY_BRACKET() throws RecognitionException { - try { - int _type = RULE_CLOSING_CURLY_BRACKET; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:779:28: ( '}' ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:779:30: '}' - { - match('}'); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_CLOSING_CURLY_BRACKET" - - // $ANTLR start "RULE_EQUAL_SIGN" - public final void mRULE_EQUAL_SIGN() throws RecognitionException { - try { - int _type = RULE_EQUAL_SIGN; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:781:17: ( '=' ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:781:19: '=' - { - match('='); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_EQUAL_SIGN" - - // $ANTLR start "RULE_COMMA" - public final void mRULE_COMMA() throws RecognitionException { - try { - int _type = RULE_COMMA; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:783:12: ( ',' ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:783:14: ',' - { - match(','); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_COMMA" - - // $ANTLR start "RULE_OPENING_ROUND_BRACKET" - public final void mRULE_OPENING_ROUND_BRACKET() throws RecognitionException { - try { - int _type = RULE_OPENING_ROUND_BRACKET; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:785:28: ( '(' ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:785:30: '(' - { - match('('); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_OPENING_ROUND_BRACKET" - - // $ANTLR start "RULE_CLOSING_ROUND_BRACKET" - public final void mRULE_CLOSING_ROUND_BRACKET() throws RecognitionException { - try { - int _type = RULE_CLOSING_ROUND_BRACKET; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:787:28: ( ')' ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:787:30: ')' - { - match(')'); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_CLOSING_ROUND_BRACKET" - - // $ANTLR start "RULE_PLUS_SIGN" - public final void mRULE_PLUS_SIGN() throws RecognitionException { - try { - int _type = RULE_PLUS_SIGN; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:789:16: ( '+' ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:789:18: '+' - { - match('+'); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_PLUS_SIGN" - - // $ANTLR start "RULE_OTHER_ALLOWED_TERM_CHARACTER" - public final void mRULE_OTHER_ALLOWED_TERM_CHARACTER() throws RecognitionException { - try { - int _type = RULE_OTHER_ALLOWED_TERM_CHARACTER; - int _channel = DEFAULT_TOKEN_CHANNEL; - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:791:35: ( . ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:791:37: . - { - matchAny(); - - } - - state.type = _type; - state.channel = _channel; - } - finally { - } - } - // $ANTLR end "RULE_OTHER_ALLOWED_TERM_CHARACTER" - - public void mTokens() throws RecognitionException { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:8: ( RULE_ZERO | RULE_DIGIT_NONZERO | RULE_LETTER | RULE_WS | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_PIPE | RULE_COLON | RULE_OPENING_CURLY_BRACKET | RULE_CLOSING_CURLY_BRACKET | RULE_EQUAL_SIGN | RULE_COMMA | RULE_OPENING_ROUND_BRACKET | RULE_CLOSING_ROUND_BRACKET | RULE_PLUS_SIGN | RULE_OTHER_ALLOWED_TERM_CHARACTER ) - int alt5=16; - alt5 = dfa5.predict(input); - switch (alt5) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:10: RULE_ZERO - { - mRULE_ZERO(); - - } - break; - case 2 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:20: RULE_DIGIT_NONZERO - { - mRULE_DIGIT_NONZERO(); - - } - break; - case 3 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:39: RULE_LETTER - { - mRULE_LETTER(); - - } - break; - case 4 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:51: RULE_WS - { - mRULE_WS(); - - } - break; - case 5 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:59: RULE_ML_COMMENT - { - mRULE_ML_COMMENT(); - - } - break; - case 6 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:75: RULE_SL_COMMENT - { - mRULE_SL_COMMENT(); - - } - break; - case 7 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:91: RULE_PIPE - { - mRULE_PIPE(); - - } - break; - case 8 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:101: RULE_COLON - { - mRULE_COLON(); - - } - break; - case 9 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:112: RULE_OPENING_CURLY_BRACKET - { - mRULE_OPENING_CURLY_BRACKET(); - - } - break; - case 10 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:139: RULE_CLOSING_CURLY_BRACKET - { - mRULE_CLOSING_CURLY_BRACKET(); - - } - break; - case 11 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:166: RULE_EQUAL_SIGN - { - mRULE_EQUAL_SIGN(); - - } - break; - case 12 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:182: RULE_COMMA - { - mRULE_COMMA(); - - } - break; - case 13 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:193: RULE_OPENING_ROUND_BRACKET - { - mRULE_OPENING_ROUND_BRACKET(); - - } - break; - case 14 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:220: RULE_CLOSING_ROUND_BRACKET - { - mRULE_CLOSING_ROUND_BRACKET(); - - } - break; - case 15 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:247: RULE_PLUS_SIGN - { - mRULE_PLUS_SIGN(); - - } - break; - case 16 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:1:262: RULE_OTHER_ALLOWED_TERM_CHARACTER - { - mRULE_OTHER_ALLOWED_TERM_CHARACTER(); - - } - break; - - } - - } - - - protected DFA5 dfa5 = new DFA5(this); - static final String DFA5_eotS = - "\5\uffff\1\17\31\uffff"; - static final String DFA5_eofS = - "\37\uffff"; - static final String DFA5_minS = - "\1\0\4\uffff\1\52\31\uffff"; - static final String DFA5_maxS = - "\1\uffff\4\uffff\1\57\31\uffff"; - static final String DFA5_acceptS = - "\1\uffff\1\1\1\2\1\3\1\4\1\uffff\1\7\1\10\1\11\1\12\1\13\1\14\1"+ - "\15\1\16\1\17\1\20\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11\1\12\1"+ - "\13\1\14\1\15\1\16\1\17"; - static final String DFA5_specialS = - "\1\0\36\uffff}>"; - static final String[] DFA5_transitionS = { - "\11\17\2\4\2\17\1\4\22\17\1\4\7\17\1\14\1\15\1\17\1\16\1\13"+ - "\2\17\1\5\1\1\11\2\1\7\2\17\1\12\3\17\32\3\6\17\32\3\1\10\1"+ - "\6\1\11\uff82\17", - "", - "", - "", - "", - "\1\24\4\uffff\1\25", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - }; - - static final short[] DFA5_eot = DFA.unpackEncodedString(DFA5_eotS); - static final short[] DFA5_eof = DFA.unpackEncodedString(DFA5_eofS); - static final char[] DFA5_min = DFA.unpackEncodedStringToUnsignedChars(DFA5_minS); - static final char[] DFA5_max = DFA.unpackEncodedStringToUnsignedChars(DFA5_maxS); - static final short[] DFA5_accept = DFA.unpackEncodedString(DFA5_acceptS); - static final short[] DFA5_special = DFA.unpackEncodedString(DFA5_specialS); - static final short[][] DFA5_transition; - - static { - int numStates = DFA5_transitionS.length; - DFA5_transition = new short[numStates][]; - for (int i=0; i='1' && LA5_0<='9')) ) {s = 2;} - - else if ( ((LA5_0>='A' && LA5_0<='Z')||(LA5_0>='a' && LA5_0<='z')) ) {s = 3;} - - else if ( ((LA5_0>='\t' && LA5_0<='\n')||LA5_0=='\r'||LA5_0==' ') ) {s = 4;} - - else if ( (LA5_0=='/') ) {s = 5;} - - else if ( (LA5_0=='|') ) {s = 6;} - - else if ( (LA5_0==':') ) {s = 7;} - - else if ( (LA5_0=='{') ) {s = 8;} - - else if ( (LA5_0=='}') ) {s = 9;} - - else if ( (LA5_0=='=') ) {s = 10;} - - else if ( (LA5_0==',') ) {s = 11;} - - else if ( (LA5_0=='(') ) {s = 12;} - - else if ( (LA5_0==')') ) {s = 13;} - - else if ( (LA5_0=='+') ) {s = 14;} - - else if ( ((LA5_0>='\u0000' && LA5_0<='\b')||(LA5_0>='\u000B' && LA5_0<='\f')||(LA5_0>='\u000E' && LA5_0<='\u001F')||(LA5_0>='!' && LA5_0<='\'')||LA5_0=='*'||(LA5_0>='-' && LA5_0<='.')||(LA5_0>=';' && LA5_0<='<')||(LA5_0>='>' && LA5_0<='@')||(LA5_0>='[' && LA5_0<='`')||(LA5_0>='~' && LA5_0<='\uFFFF')) ) {s = 15;} - - if ( s>=0 ) return s; - break; - } - NoViableAltException nvae = - new NoViableAltException(getDescription(), 5, _s, input); - error(nvae); - throw nvae; - } - } - - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCGParser.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCGParser.java deleted file mode 100644 index 00c498e87a5..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCGParser.java +++ /dev/null @@ -1,2403 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.parser.antlr.internal; - -import org.eclipse.xtext.*; -import org.eclipse.xtext.parser.*; -import org.eclipse.xtext.parser.impl.*; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; -import org.eclipse.xtext.parser.antlr.XtextTokenStream; -import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; -import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; -import com.b2international.snowowl.dsl.services.SCGGrammarAccess; - - - -import org.antlr.runtime.*; -import java.util.Stack; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -@SuppressWarnings("all") -public class InternalSCGParser extends AbstractInternalAntlrParser { - public static final String[] tokenNames = new String[] { - "", "", "", "", "RULE_PLUS_SIGN", "RULE_COLON", "RULE_COMMA", "RULE_PIPE", "RULE_WS", "RULE_OPENING_CURLY_BRACKET", "RULE_CLOSING_CURLY_BRACKET", "RULE_EQUAL_SIGN", "RULE_OPENING_ROUND_BRACKET", "RULE_CLOSING_ROUND_BRACKET", "RULE_DIGIT_NONZERO", "RULE_ZERO", "RULE_LETTER", "RULE_OTHER_ALLOWED_TERM_CHARACTER", "RULE_ML_COMMENT", "RULE_SL_COMMENT" - }; - public static final int RULE_ZERO=15; - public static final int RULE_OPENING_CURLY_BRACKET=9; - public static final int RULE_EQUAL_SIGN=11; - public static final int RULE_COMMA=6; - public static final int RULE_DIGIT_NONZERO=14; - public static final int RULE_OPENING_ROUND_BRACKET=12; - public static final int RULE_OTHER_ALLOWED_TERM_CHARACTER=17; - public static final int EOF=-1; - public static final int RULE_SL_COMMENT=19; - public static final int RULE_LETTER=16; - public static final int RULE_ML_COMMENT=18; - public static final int RULE_CLOSING_CURLY_BRACKET=10; - public static final int RULE_COLON=5; - public static final int RULE_CLOSING_ROUND_BRACKET=13; - public static final int RULE_PIPE=7; - public static final int RULE_PLUS_SIGN=4; - public static final int RULE_WS=8; - - // delegates - // delegators - - - public InternalSCGParser(TokenStream input) { - this(input, new RecognizerSharedState()); - } - public InternalSCGParser(TokenStream input, RecognizerSharedState state) { - super(input, state); - - } - - - public String[] getTokenNames() { return InternalSCGParser.tokenNames; } - public String getGrammarFileName() { return "../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g"; } - - - - /* - This grammar contains a lot of empty actions to work around a bug in ANTLR. - Otherwise the ANTLR tool will create synpreds that cannot be compiled in some rare cases. - */ - - private SCGGrammarAccess grammarAccess; - - public InternalSCGParser(TokenStream input, SCGGrammarAccess grammarAccess) { - this(input); - this.grammarAccess = grammarAccess; - registerRules(grammarAccess.getGrammar()); - } - - @Override - protected String getFirstRuleName() { - return "Expression"; - } - - @Override - protected SCGGrammarAccess getGrammarAccess() { - return grammarAccess; - } - - - - // $ANTLR start "entryRuleExpression" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:73:1: entryRuleExpression returns [EObject current=null] : iv_ruleExpression= ruleExpression EOF ; - public final EObject entryRuleExpression() throws RecognitionException { - EObject current = null; - - EObject iv_ruleExpression = null; - - - - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS", "RULE_SL_COMMENT", "RULE_ML_COMMENT"); - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:77:2: (iv_ruleExpression= ruleExpression EOF ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:78:2: iv_ruleExpression= ruleExpression EOF - { - if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getExpressionRule()); - } - pushFollow(FOLLOW_ruleExpression_in_entryRuleExpression87); - iv_ruleExpression=ruleExpression(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - current =iv_ruleExpression; - } - match(input,EOF,FOLLOW_EOF_in_entryRuleExpression97); if (state.failed) return current; - - } - - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - - myHiddenTokenState.restore(); - - } - return current; - } - // $ANTLR end "entryRuleExpression" - - - // $ANTLR start "ruleExpression" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:88:1: ruleExpression returns [EObject current=null] : ( ( (lv_concepts_0_0= ruleConcept ) ) (this_PLUS_SIGN_1= RULE_PLUS_SIGN ( (lv_concepts_2_0= ruleConcept ) ) )* (this_COLON_3= RULE_COLON ( ( (lv_attributes_4_0= ruleAttribute ) ) (this_COMMA_5= RULE_COMMA ( (lv_attributes_6_0= ruleAttribute ) ) )* )? ( (lv_groups_7_0= ruleGroup ) )* )? ) ; - public final EObject ruleExpression() throws RecognitionException { - EObject current = null; - - Token this_PLUS_SIGN_1=null; - Token this_COLON_3=null; - Token this_COMMA_5=null; - EObject lv_concepts_0_0 = null; - - EObject lv_concepts_2_0 = null; - - EObject lv_attributes_4_0 = null; - - EObject lv_attributes_6_0 = null; - - EObject lv_groups_7_0 = null; - - - enterRule(); - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS", "RULE_SL_COMMENT", "RULE_ML_COMMENT"); - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:92:28: ( ( ( (lv_concepts_0_0= ruleConcept ) ) (this_PLUS_SIGN_1= RULE_PLUS_SIGN ( (lv_concepts_2_0= ruleConcept ) ) )* (this_COLON_3= RULE_COLON ( ( (lv_attributes_4_0= ruleAttribute ) ) (this_COMMA_5= RULE_COMMA ( (lv_attributes_6_0= ruleAttribute ) ) )* )? ( (lv_groups_7_0= ruleGroup ) )* )? ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:93:1: ( ( (lv_concepts_0_0= ruleConcept ) ) (this_PLUS_SIGN_1= RULE_PLUS_SIGN ( (lv_concepts_2_0= ruleConcept ) ) )* (this_COLON_3= RULE_COLON ( ( (lv_attributes_4_0= ruleAttribute ) ) (this_COMMA_5= RULE_COMMA ( (lv_attributes_6_0= ruleAttribute ) ) )* )? ( (lv_groups_7_0= ruleGroup ) )* )? ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:93:1: ( ( (lv_concepts_0_0= ruleConcept ) ) (this_PLUS_SIGN_1= RULE_PLUS_SIGN ( (lv_concepts_2_0= ruleConcept ) ) )* (this_COLON_3= RULE_COLON ( ( (lv_attributes_4_0= ruleAttribute ) ) (this_COMMA_5= RULE_COMMA ( (lv_attributes_6_0= ruleAttribute ) ) )* )? ( (lv_groups_7_0= ruleGroup ) )* )? ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:93:2: ( (lv_concepts_0_0= ruleConcept ) ) (this_PLUS_SIGN_1= RULE_PLUS_SIGN ( (lv_concepts_2_0= ruleConcept ) ) )* (this_COLON_3= RULE_COLON ( ( (lv_attributes_4_0= ruleAttribute ) ) (this_COMMA_5= RULE_COMMA ( (lv_attributes_6_0= ruleAttribute ) ) )* )? ( (lv_groups_7_0= ruleGroup ) )* )? - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:93:2: ( (lv_concepts_0_0= ruleConcept ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:94:1: (lv_concepts_0_0= ruleConcept ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:94:1: (lv_concepts_0_0= ruleConcept ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:95:3: lv_concepts_0_0= ruleConcept - { - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getExpressionAccess().getConceptsConceptParserRuleCall_0_0()); - - } - pushFollow(FOLLOW_ruleConcept_in_ruleExpression147); - lv_concepts_0_0=ruleConcept(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - if (current==null) { - current = createModelElementForParent(grammarAccess.getExpressionRule()); - } - add( - current, - "concepts", - lv_concepts_0_0, - "Concept"); - afterParserOrEnumRuleCall(); - - } - - } - - - } - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:111:2: (this_PLUS_SIGN_1= RULE_PLUS_SIGN ( (lv_concepts_2_0= ruleConcept ) ) )* - loop1: - do { - int alt1=2; - int LA1_0 = input.LA(1); - - if ( (LA1_0==RULE_PLUS_SIGN) ) { - alt1=1; - } - - - switch (alt1) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:111:3: this_PLUS_SIGN_1= RULE_PLUS_SIGN ( (lv_concepts_2_0= ruleConcept ) ) - { - this_PLUS_SIGN_1=(Token)match(input,RULE_PLUS_SIGN,FOLLOW_RULE_PLUS_SIGN_in_ruleExpression159); if (state.failed) return current; - if ( state.backtracking==0 ) { - - newLeafNode(this_PLUS_SIGN_1, grammarAccess.getExpressionAccess().getPLUS_SIGNTerminalRuleCall_1_0()); - - } - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:115:1: ( (lv_concepts_2_0= ruleConcept ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:116:1: (lv_concepts_2_0= ruleConcept ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:116:1: (lv_concepts_2_0= ruleConcept ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:117:3: lv_concepts_2_0= ruleConcept - { - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getExpressionAccess().getConceptsConceptParserRuleCall_1_1_0()); - - } - pushFollow(FOLLOW_ruleConcept_in_ruleExpression179); - lv_concepts_2_0=ruleConcept(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - if (current==null) { - current = createModelElementForParent(grammarAccess.getExpressionRule()); - } - add( - current, - "concepts", - lv_concepts_2_0, - "Concept"); - afterParserOrEnumRuleCall(); - - } - - } - - - } - - - } - break; - - default : - break loop1; - } - } while (true); - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:133:4: (this_COLON_3= RULE_COLON ( ( (lv_attributes_4_0= ruleAttribute ) ) (this_COMMA_5= RULE_COMMA ( (lv_attributes_6_0= ruleAttribute ) ) )* )? ( (lv_groups_7_0= ruleGroup ) )* )? - int alt5=2; - int LA5_0 = input.LA(1); - - if ( (LA5_0==RULE_COLON) ) { - alt5=1; - } - switch (alt5) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:133:5: this_COLON_3= RULE_COLON ( ( (lv_attributes_4_0= ruleAttribute ) ) (this_COMMA_5= RULE_COMMA ( (lv_attributes_6_0= ruleAttribute ) ) )* )? ( (lv_groups_7_0= ruleGroup ) )* - { - this_COLON_3=(Token)match(input,RULE_COLON,FOLLOW_RULE_COLON_in_ruleExpression193); if (state.failed) return current; - if ( state.backtracking==0 ) { - - newLeafNode(this_COLON_3, grammarAccess.getExpressionAccess().getCOLONTerminalRuleCall_2_0()); - - } - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:137:1: ( ( (lv_attributes_4_0= ruleAttribute ) ) (this_COMMA_5= RULE_COMMA ( (lv_attributes_6_0= ruleAttribute ) ) )* )? - int alt3=2; - int LA3_0 = input.LA(1); - - if ( (LA3_0==RULE_DIGIT_NONZERO) ) { - alt3=1; - } - switch (alt3) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:137:2: ( (lv_attributes_4_0= ruleAttribute ) ) (this_COMMA_5= RULE_COMMA ( (lv_attributes_6_0= ruleAttribute ) ) )* - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:137:2: ( (lv_attributes_4_0= ruleAttribute ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:138:1: (lv_attributes_4_0= ruleAttribute ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:138:1: (lv_attributes_4_0= ruleAttribute ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:139:3: lv_attributes_4_0= ruleAttribute - { - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getExpressionAccess().getAttributesAttributeParserRuleCall_2_1_0_0()); - - } - pushFollow(FOLLOW_ruleAttribute_in_ruleExpression214); - lv_attributes_4_0=ruleAttribute(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - if (current==null) { - current = createModelElementForParent(grammarAccess.getExpressionRule()); - } - add( - current, - "attributes", - lv_attributes_4_0, - "Attribute"); - afterParserOrEnumRuleCall(); - - } - - } - - - } - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:155:2: (this_COMMA_5= RULE_COMMA ( (lv_attributes_6_0= ruleAttribute ) ) )* - loop2: - do { - int alt2=2; - int LA2_0 = input.LA(1); - - if ( (LA2_0==RULE_COMMA) ) { - alt2=1; - } - - - switch (alt2) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:155:3: this_COMMA_5= RULE_COMMA ( (lv_attributes_6_0= ruleAttribute ) ) - { - this_COMMA_5=(Token)match(input,RULE_COMMA,FOLLOW_RULE_COMMA_in_ruleExpression226); if (state.failed) return current; - if ( state.backtracking==0 ) { - - newLeafNode(this_COMMA_5, grammarAccess.getExpressionAccess().getCOMMATerminalRuleCall_2_1_1_0()); - - } - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:159:1: ( (lv_attributes_6_0= ruleAttribute ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:160:1: (lv_attributes_6_0= ruleAttribute ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:160:1: (lv_attributes_6_0= ruleAttribute ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:161:3: lv_attributes_6_0= ruleAttribute - { - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getExpressionAccess().getAttributesAttributeParserRuleCall_2_1_1_1_0()); - - } - pushFollow(FOLLOW_ruleAttribute_in_ruleExpression246); - lv_attributes_6_0=ruleAttribute(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - if (current==null) { - current = createModelElementForParent(grammarAccess.getExpressionRule()); - } - add( - current, - "attributes", - lv_attributes_6_0, - "Attribute"); - afterParserOrEnumRuleCall(); - - } - - } - - - } - - - } - break; - - default : - break loop2; - } - } while (true); - - - } - break; - - } - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:177:6: ( (lv_groups_7_0= ruleGroup ) )* - loop4: - do { - int alt4=2; - int LA4_0 = input.LA(1); - - if ( (LA4_0==RULE_OPENING_CURLY_BRACKET) ) { - alt4=1; - } - - - switch (alt4) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:178:1: (lv_groups_7_0= ruleGroup ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:178:1: (lv_groups_7_0= ruleGroup ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:179:3: lv_groups_7_0= ruleGroup - { - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getExpressionAccess().getGroupsGroupParserRuleCall_2_2_0()); - - } - pushFollow(FOLLOW_ruleGroup_in_ruleExpression271); - lv_groups_7_0=ruleGroup(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - if (current==null) { - current = createModelElementForParent(grammarAccess.getExpressionRule()); - } - add( - current, - "groups", - lv_groups_7_0, - "Group"); - afterParserOrEnumRuleCall(); - - } - - } - - - } - break; - - default : - break loop4; - } - } while (true); - - - } - break; - - } - - - } - - - } - - if ( state.backtracking==0 ) { - leaveRule(); - } - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - - myHiddenTokenState.restore(); - - } - return current; - } - // $ANTLR end "ruleExpression" - - - // $ANTLR start "entryRuleConcept" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:206:1: entryRuleConcept returns [EObject current=null] : iv_ruleConcept= ruleConcept EOF ; - public final EObject entryRuleConcept() throws RecognitionException { - EObject current = null; - - EObject iv_ruleConcept = null; - - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:207:2: (iv_ruleConcept= ruleConcept EOF ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:208:2: iv_ruleConcept= ruleConcept EOF - { - if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getConceptRule()); - } - pushFollow(FOLLOW_ruleConcept_in_entryRuleConcept314); - iv_ruleConcept=ruleConcept(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - current =iv_ruleConcept; - } - match(input,EOF,FOLLOW_EOF_in_entryRuleConcept324); if (state.failed) return current; - - } - - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - } - return current; - } - // $ANTLR end "entryRuleConcept" - - - // $ANTLR start "ruleConcept" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:215:1: ruleConcept returns [EObject current=null] : ( ( (lv_id_0_0= ruleConceptId ) ) (this_PIPE_1= RULE_PIPE (this_WS_2= RULE_WS )* ( (lv_term_3_0= ruleTerm ) ) (this_WS_4= RULE_WS )* this_PIPE_5= RULE_PIPE )? ) ; - public final EObject ruleConcept() throws RecognitionException { - EObject current = null; - - Token this_PIPE_1=null; - Token this_WS_2=null; - Token this_WS_4=null; - Token this_PIPE_5=null; - AntlrDatatypeRuleToken lv_id_0_0 = null; - - AntlrDatatypeRuleToken lv_term_3_0 = null; - - - enterRule(); - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:218:28: ( ( ( (lv_id_0_0= ruleConceptId ) ) (this_PIPE_1= RULE_PIPE (this_WS_2= RULE_WS )* ( (lv_term_3_0= ruleTerm ) ) (this_WS_4= RULE_WS )* this_PIPE_5= RULE_PIPE )? ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:219:1: ( ( (lv_id_0_0= ruleConceptId ) ) (this_PIPE_1= RULE_PIPE (this_WS_2= RULE_WS )* ( (lv_term_3_0= ruleTerm ) ) (this_WS_4= RULE_WS )* this_PIPE_5= RULE_PIPE )? ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:219:1: ( ( (lv_id_0_0= ruleConceptId ) ) (this_PIPE_1= RULE_PIPE (this_WS_2= RULE_WS )* ( (lv_term_3_0= ruleTerm ) ) (this_WS_4= RULE_WS )* this_PIPE_5= RULE_PIPE )? ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:219:2: ( (lv_id_0_0= ruleConceptId ) ) (this_PIPE_1= RULE_PIPE (this_WS_2= RULE_WS )* ( (lv_term_3_0= ruleTerm ) ) (this_WS_4= RULE_WS )* this_PIPE_5= RULE_PIPE )? - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:219:2: ( (lv_id_0_0= ruleConceptId ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:220:1: (lv_id_0_0= ruleConceptId ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:220:1: (lv_id_0_0= ruleConceptId ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:221:3: lv_id_0_0= ruleConceptId - { - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getConceptAccess().getIdConceptIdParserRuleCall_0_0()); - - } - pushFollow(FOLLOW_ruleConceptId_in_ruleConcept370); - lv_id_0_0=ruleConceptId(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - if (current==null) { - current = createModelElementForParent(grammarAccess.getConceptRule()); - } - set( - current, - "id", - lv_id_0_0, - "ConceptId"); - afterParserOrEnumRuleCall(); - - } - - } - - - } - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:237:2: (this_PIPE_1= RULE_PIPE (this_WS_2= RULE_WS )* ( (lv_term_3_0= ruleTerm ) ) (this_WS_4= RULE_WS )* this_PIPE_5= RULE_PIPE )? - int alt8=2; - int LA8_0 = input.LA(1); - - if ( (LA8_0==RULE_PIPE) ) { - alt8=1; - } - switch (alt8) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:237:3: this_PIPE_1= RULE_PIPE (this_WS_2= RULE_WS )* ( (lv_term_3_0= ruleTerm ) ) (this_WS_4= RULE_WS )* this_PIPE_5= RULE_PIPE - { - this_PIPE_1=(Token)match(input,RULE_PIPE,FOLLOW_RULE_PIPE_in_ruleConcept382); if (state.failed) return current; - if ( state.backtracking==0 ) { - - newLeafNode(this_PIPE_1, grammarAccess.getConceptAccess().getPIPETerminalRuleCall_1_0()); - - } - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:241:1: (this_WS_2= RULE_WS )* - loop6: - do { - int alt6=2; - int LA6_0 = input.LA(1); - - if ( (LA6_0==RULE_WS) ) { - alt6=1; - } - - - switch (alt6) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:241:2: this_WS_2= RULE_WS - { - this_WS_2=(Token)match(input,RULE_WS,FOLLOW_RULE_WS_in_ruleConcept393); if (state.failed) return current; - if ( state.backtracking==0 ) { - - newLeafNode(this_WS_2, grammarAccess.getConceptAccess().getWSTerminalRuleCall_1_1()); - - } - - } - break; - - default : - break loop6; - } - } while (true); - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:245:3: ( (lv_term_3_0= ruleTerm ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:246:1: (lv_term_3_0= ruleTerm ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:246:1: (lv_term_3_0= ruleTerm ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:247:3: lv_term_3_0= ruleTerm - { - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getConceptAccess().getTermTermParserRuleCall_1_2_0()); - - } - pushFollow(FOLLOW_ruleTerm_in_ruleConcept415); - lv_term_3_0=ruleTerm(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - if (current==null) { - current = createModelElementForParent(grammarAccess.getConceptRule()); - } - set( - current, - "term", - lv_term_3_0, - "Term"); - afterParserOrEnumRuleCall(); - - } - - } - - - } - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:263:2: (this_WS_4= RULE_WS )* - loop7: - do { - int alt7=2; - int LA7_0 = input.LA(1); - - if ( (LA7_0==RULE_WS) ) { - alt7=1; - } - - - switch (alt7) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:263:3: this_WS_4= RULE_WS - { - this_WS_4=(Token)match(input,RULE_WS,FOLLOW_RULE_WS_in_ruleConcept427); if (state.failed) return current; - if ( state.backtracking==0 ) { - - newLeafNode(this_WS_4, grammarAccess.getConceptAccess().getWSTerminalRuleCall_1_3()); - - } - - } - break; - - default : - break loop7; - } - } while (true); - - this_PIPE_5=(Token)match(input,RULE_PIPE,FOLLOW_RULE_PIPE_in_ruleConcept439); if (state.failed) return current; - if ( state.backtracking==0 ) { - - newLeafNode(this_PIPE_5, grammarAccess.getConceptAccess().getPIPETerminalRuleCall_1_4()); - - } - - } - break; - - } - - - } - - - } - - if ( state.backtracking==0 ) { - leaveRule(); - } - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - } - return current; - } - // $ANTLR end "ruleConcept" - - - // $ANTLR start "entryRuleGroup" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:279:1: entryRuleGroup returns [EObject current=null] : iv_ruleGroup= ruleGroup EOF ; - public final EObject entryRuleGroup() throws RecognitionException { - EObject current = null; - - EObject iv_ruleGroup = null; - - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:280:2: (iv_ruleGroup= ruleGroup EOF ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:281:2: iv_ruleGroup= ruleGroup EOF - { - if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getGroupRule()); - } - pushFollow(FOLLOW_ruleGroup_in_entryRuleGroup476); - iv_ruleGroup=ruleGroup(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - current =iv_ruleGroup; - } - match(input,EOF,FOLLOW_EOF_in_entryRuleGroup486); if (state.failed) return current; - - } - - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - } - return current; - } - // $ANTLR end "entryRuleGroup" - - - // $ANTLR start "ruleGroup" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:288:1: ruleGroup returns [EObject current=null] : (this_OPENING_CURLY_BRACKET_0= RULE_OPENING_CURLY_BRACKET ( (lv_attributes_1_0= ruleAttribute ) ) (this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) )* this_CLOSING_CURLY_BRACKET_4= RULE_CLOSING_CURLY_BRACKET ) ; - public final EObject ruleGroup() throws RecognitionException { - EObject current = null; - - Token this_OPENING_CURLY_BRACKET_0=null; - Token this_COMMA_2=null; - Token this_CLOSING_CURLY_BRACKET_4=null; - EObject lv_attributes_1_0 = null; - - EObject lv_attributes_3_0 = null; - - - enterRule(); - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:291:28: ( (this_OPENING_CURLY_BRACKET_0= RULE_OPENING_CURLY_BRACKET ( (lv_attributes_1_0= ruleAttribute ) ) (this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) )* this_CLOSING_CURLY_BRACKET_4= RULE_CLOSING_CURLY_BRACKET ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:292:1: (this_OPENING_CURLY_BRACKET_0= RULE_OPENING_CURLY_BRACKET ( (lv_attributes_1_0= ruleAttribute ) ) (this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) )* this_CLOSING_CURLY_BRACKET_4= RULE_CLOSING_CURLY_BRACKET ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:292:1: (this_OPENING_CURLY_BRACKET_0= RULE_OPENING_CURLY_BRACKET ( (lv_attributes_1_0= ruleAttribute ) ) (this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) )* this_CLOSING_CURLY_BRACKET_4= RULE_CLOSING_CURLY_BRACKET ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:292:2: this_OPENING_CURLY_BRACKET_0= RULE_OPENING_CURLY_BRACKET ( (lv_attributes_1_0= ruleAttribute ) ) (this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) )* this_CLOSING_CURLY_BRACKET_4= RULE_CLOSING_CURLY_BRACKET - { - this_OPENING_CURLY_BRACKET_0=(Token)match(input,RULE_OPENING_CURLY_BRACKET,FOLLOW_RULE_OPENING_CURLY_BRACKET_in_ruleGroup522); if (state.failed) return current; - if ( state.backtracking==0 ) { - - newLeafNode(this_OPENING_CURLY_BRACKET_0, grammarAccess.getGroupAccess().getOPENING_CURLY_BRACKETTerminalRuleCall_0()); - - } - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:296:1: ( (lv_attributes_1_0= ruleAttribute ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:297:1: (lv_attributes_1_0= ruleAttribute ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:297:1: (lv_attributes_1_0= ruleAttribute ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:298:3: lv_attributes_1_0= ruleAttribute - { - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getGroupAccess().getAttributesAttributeParserRuleCall_1_0()); - - } - pushFollow(FOLLOW_ruleAttribute_in_ruleGroup542); - lv_attributes_1_0=ruleAttribute(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - if (current==null) { - current = createModelElementForParent(grammarAccess.getGroupRule()); - } - add( - current, - "attributes", - lv_attributes_1_0, - "Attribute"); - afterParserOrEnumRuleCall(); - - } - - } - - - } - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:314:2: (this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) )* - loop9: - do { - int alt9=2; - int LA9_0 = input.LA(1); - - if ( (LA9_0==RULE_COMMA) ) { - alt9=1; - } - - - switch (alt9) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:314:3: this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) - { - this_COMMA_2=(Token)match(input,RULE_COMMA,FOLLOW_RULE_COMMA_in_ruleGroup554); if (state.failed) return current; - if ( state.backtracking==0 ) { - - newLeafNode(this_COMMA_2, grammarAccess.getGroupAccess().getCOMMATerminalRuleCall_2_0()); - - } - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:318:1: ( (lv_attributes_3_0= ruleAttribute ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:319:1: (lv_attributes_3_0= ruleAttribute ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:319:1: (lv_attributes_3_0= ruleAttribute ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:320:3: lv_attributes_3_0= ruleAttribute - { - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getGroupAccess().getAttributesAttributeParserRuleCall_2_1_0()); - - } - pushFollow(FOLLOW_ruleAttribute_in_ruleGroup574); - lv_attributes_3_0=ruleAttribute(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - if (current==null) { - current = createModelElementForParent(grammarAccess.getGroupRule()); - } - add( - current, - "attributes", - lv_attributes_3_0, - "Attribute"); - afterParserOrEnumRuleCall(); - - } - - } - - - } - - - } - break; - - default : - break loop9; - } - } while (true); - - this_CLOSING_CURLY_BRACKET_4=(Token)match(input,RULE_CLOSING_CURLY_BRACKET,FOLLOW_RULE_CLOSING_CURLY_BRACKET_in_ruleGroup587); if (state.failed) return current; - if ( state.backtracking==0 ) { - - newLeafNode(this_CLOSING_CURLY_BRACKET_4, grammarAccess.getGroupAccess().getCLOSING_CURLY_BRACKETTerminalRuleCall_3()); - - } - - } - - - } - - if ( state.backtracking==0 ) { - leaveRule(); - } - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - } - return current; - } - // $ANTLR end "ruleGroup" - - - // $ANTLR start "entryRuleAttribute" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:348:1: entryRuleAttribute returns [EObject current=null] : iv_ruleAttribute= ruleAttribute EOF ; - public final EObject entryRuleAttribute() throws RecognitionException { - EObject current = null; - - EObject iv_ruleAttribute = null; - - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:349:2: (iv_ruleAttribute= ruleAttribute EOF ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:350:2: iv_ruleAttribute= ruleAttribute EOF - { - if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAttributeRule()); - } - pushFollow(FOLLOW_ruleAttribute_in_entryRuleAttribute622); - iv_ruleAttribute=ruleAttribute(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - current =iv_ruleAttribute; - } - match(input,EOF,FOLLOW_EOF_in_entryRuleAttribute632); if (state.failed) return current; - - } - - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - } - return current; - } - // $ANTLR end "entryRuleAttribute" - - - // $ANTLR start "ruleAttribute" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:357:1: ruleAttribute returns [EObject current=null] : ( ( (lv_name_0_0= ruleConcept ) ) this_EQUAL_SIGN_1= RULE_EQUAL_SIGN ( (lv_value_2_0= ruleAttributeValue ) ) ) ; - public final EObject ruleAttribute() throws RecognitionException { - EObject current = null; - - Token this_EQUAL_SIGN_1=null; - EObject lv_name_0_0 = null; - - EObject lv_value_2_0 = null; - - - enterRule(); - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:360:28: ( ( ( (lv_name_0_0= ruleConcept ) ) this_EQUAL_SIGN_1= RULE_EQUAL_SIGN ( (lv_value_2_0= ruleAttributeValue ) ) ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:361:1: ( ( (lv_name_0_0= ruleConcept ) ) this_EQUAL_SIGN_1= RULE_EQUAL_SIGN ( (lv_value_2_0= ruleAttributeValue ) ) ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:361:1: ( ( (lv_name_0_0= ruleConcept ) ) this_EQUAL_SIGN_1= RULE_EQUAL_SIGN ( (lv_value_2_0= ruleAttributeValue ) ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:361:2: ( (lv_name_0_0= ruleConcept ) ) this_EQUAL_SIGN_1= RULE_EQUAL_SIGN ( (lv_value_2_0= ruleAttributeValue ) ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:361:2: ( (lv_name_0_0= ruleConcept ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:362:1: (lv_name_0_0= ruleConcept ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:362:1: (lv_name_0_0= ruleConcept ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:363:3: lv_name_0_0= ruleConcept - { - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getAttributeAccess().getNameConceptParserRuleCall_0_0()); - - } - pushFollow(FOLLOW_ruleConcept_in_ruleAttribute678); - lv_name_0_0=ruleConcept(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - if (current==null) { - current = createModelElementForParent(grammarAccess.getAttributeRule()); - } - set( - current, - "name", - lv_name_0_0, - "Concept"); - afterParserOrEnumRuleCall(); - - } - - } - - - } - - this_EQUAL_SIGN_1=(Token)match(input,RULE_EQUAL_SIGN,FOLLOW_RULE_EQUAL_SIGN_in_ruleAttribute689); if (state.failed) return current; - if ( state.backtracking==0 ) { - - newLeafNode(this_EQUAL_SIGN_1, grammarAccess.getAttributeAccess().getEQUAL_SIGNTerminalRuleCall_1()); - - } - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:383:1: ( (lv_value_2_0= ruleAttributeValue ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:384:1: (lv_value_2_0= ruleAttributeValue ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:384:1: (lv_value_2_0= ruleAttributeValue ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:385:3: lv_value_2_0= ruleAttributeValue - { - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getAttributeAccess().getValueAttributeValueParserRuleCall_2_0()); - - } - pushFollow(FOLLOW_ruleAttributeValue_in_ruleAttribute709); - lv_value_2_0=ruleAttributeValue(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - if (current==null) { - current = createModelElementForParent(grammarAccess.getAttributeRule()); - } - set( - current, - "value", - lv_value_2_0, - "AttributeValue"); - afterParserOrEnumRuleCall(); - - } - - } - - - } - - - } - - - } - - if ( state.backtracking==0 ) { - leaveRule(); - } - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - } - return current; - } - // $ANTLR end "ruleAttribute" - - - // $ANTLR start "entryRuleAttributeValue" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:409:1: entryRuleAttributeValue returns [EObject current=null] : iv_ruleAttributeValue= ruleAttributeValue EOF ; - public final EObject entryRuleAttributeValue() throws RecognitionException { - EObject current = null; - - EObject iv_ruleAttributeValue = null; - - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:410:2: (iv_ruleAttributeValue= ruleAttributeValue EOF ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:411:2: iv_ruleAttributeValue= ruleAttributeValue EOF - { - if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getAttributeValueRule()); - } - pushFollow(FOLLOW_ruleAttributeValue_in_entryRuleAttributeValue745); - iv_ruleAttributeValue=ruleAttributeValue(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - current =iv_ruleAttributeValue; - } - match(input,EOF,FOLLOW_EOF_in_entryRuleAttributeValue755); if (state.failed) return current; - - } - - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - } - return current; - } - // $ANTLR end "entryRuleAttributeValue" - - - // $ANTLR start "ruleAttributeValue" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:418:1: ruleAttributeValue returns [EObject current=null] : (this_Concept_0= ruleConcept | (this_OPENING_ROUND_BRACKET_1= RULE_OPENING_ROUND_BRACKET this_Expression_2= ruleExpression this_CLOSING_ROUND_BRACKET_3= RULE_CLOSING_ROUND_BRACKET ) ) ; - public final EObject ruleAttributeValue() throws RecognitionException { - EObject current = null; - - Token this_OPENING_ROUND_BRACKET_1=null; - Token this_CLOSING_ROUND_BRACKET_3=null; - EObject this_Concept_0 = null; - - EObject this_Expression_2 = null; - - - enterRule(); - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:421:28: ( (this_Concept_0= ruleConcept | (this_OPENING_ROUND_BRACKET_1= RULE_OPENING_ROUND_BRACKET this_Expression_2= ruleExpression this_CLOSING_ROUND_BRACKET_3= RULE_CLOSING_ROUND_BRACKET ) ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:422:1: (this_Concept_0= ruleConcept | (this_OPENING_ROUND_BRACKET_1= RULE_OPENING_ROUND_BRACKET this_Expression_2= ruleExpression this_CLOSING_ROUND_BRACKET_3= RULE_CLOSING_ROUND_BRACKET ) ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:422:1: (this_Concept_0= ruleConcept | (this_OPENING_ROUND_BRACKET_1= RULE_OPENING_ROUND_BRACKET this_Expression_2= ruleExpression this_CLOSING_ROUND_BRACKET_3= RULE_CLOSING_ROUND_BRACKET ) ) - int alt10=2; - int LA10_0 = input.LA(1); - - if ( (LA10_0==RULE_DIGIT_NONZERO) ) { - alt10=1; - } - else if ( (LA10_0==RULE_OPENING_ROUND_BRACKET) ) { - alt10=2; - } - else { - if (state.backtracking>0) {state.failed=true; return current;} - NoViableAltException nvae = - new NoViableAltException("", 10, 0, input); - - throw nvae; - } - switch (alt10) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:423:2: this_Concept_0= ruleConcept - { - if ( state.backtracking==0 ) { - - /* */ - - } - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getAttributeValueAccess().getConceptParserRuleCall_0()); - - } - pushFollow(FOLLOW_ruleConcept_in_ruleAttributeValue805); - this_Concept_0=ruleConcept(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - current = this_Concept_0; - afterParserOrEnumRuleCall(); - - } - - } - break; - case 2 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:435:6: (this_OPENING_ROUND_BRACKET_1= RULE_OPENING_ROUND_BRACKET this_Expression_2= ruleExpression this_CLOSING_ROUND_BRACKET_3= RULE_CLOSING_ROUND_BRACKET ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:435:6: (this_OPENING_ROUND_BRACKET_1= RULE_OPENING_ROUND_BRACKET this_Expression_2= ruleExpression this_CLOSING_ROUND_BRACKET_3= RULE_CLOSING_ROUND_BRACKET ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:435:7: this_OPENING_ROUND_BRACKET_1= RULE_OPENING_ROUND_BRACKET this_Expression_2= ruleExpression this_CLOSING_ROUND_BRACKET_3= RULE_CLOSING_ROUND_BRACKET - { - this_OPENING_ROUND_BRACKET_1=(Token)match(input,RULE_OPENING_ROUND_BRACKET,FOLLOW_RULE_OPENING_ROUND_BRACKET_in_ruleAttributeValue822); if (state.failed) return current; - if ( state.backtracking==0 ) { - - newLeafNode(this_OPENING_ROUND_BRACKET_1, grammarAccess.getAttributeValueAccess().getOPENING_ROUND_BRACKETTerminalRuleCall_1_0()); - - } - if ( state.backtracking==0 ) { - - /* */ - - } - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getAttributeValueAccess().getExpressionParserRuleCall_1_1()); - - } - pushFollow(FOLLOW_ruleExpression_in_ruleAttributeValue846); - this_Expression_2=ruleExpression(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - current = this_Expression_2; - afterParserOrEnumRuleCall(); - - } - this_CLOSING_ROUND_BRACKET_3=(Token)match(input,RULE_CLOSING_ROUND_BRACKET,FOLLOW_RULE_CLOSING_ROUND_BRACKET_in_ruleAttributeValue856); if (state.failed) return current; - if ( state.backtracking==0 ) { - - newLeafNode(this_CLOSING_ROUND_BRACKET_3, grammarAccess.getAttributeValueAccess().getCLOSING_ROUND_BRACKETTerminalRuleCall_1_2()); - - } - - } - - - } - break; - - } - - - } - - if ( state.backtracking==0 ) { - leaveRule(); - } - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - } - return current; - } - // $ANTLR end "ruleAttributeValue" - - - // $ANTLR start "entryRuleTerm" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:463:1: entryRuleTerm returns [String current=null] : iv_ruleTerm= ruleTerm EOF ; - public final String entryRuleTerm() throws RecognitionException { - String current = null; - - AntlrDatatypeRuleToken iv_ruleTerm = null; - - - - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:467:2: (iv_ruleTerm= ruleTerm EOF ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:468:2: iv_ruleTerm= ruleTerm EOF - { - if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getTermRule()); - } - pushFollow(FOLLOW_ruleTerm_in_entryRuleTerm899); - iv_ruleTerm=ruleTerm(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - current =iv_ruleTerm.getText(); - } - match(input,EOF,FOLLOW_EOF_in_entryRuleTerm910); if (state.failed) return current; - - } - - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - - myHiddenTokenState.restore(); - - } - return current; - } - // $ANTLR end "entryRuleTerm" - - - // $ANTLR start "ruleTerm" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:478:1: ruleTerm returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : ( (this_TermCharacter_0= ruleTermCharacter )+ ( (this_WS_1= RULE_WS )+ (this_TermCharacter_2= ruleTermCharacter )+ )* ) ; - public final AntlrDatatypeRuleToken ruleTerm() throws RecognitionException { - AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); - - Token this_WS_1=null; - AntlrDatatypeRuleToken this_TermCharacter_0 = null; - - AntlrDatatypeRuleToken this_TermCharacter_2 = null; - - - enterRule(); - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:482:28: ( ( (this_TermCharacter_0= ruleTermCharacter )+ ( (this_WS_1= RULE_WS )+ (this_TermCharacter_2= ruleTermCharacter )+ )* ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:483:1: ( (this_TermCharacter_0= ruleTermCharacter )+ ( (this_WS_1= RULE_WS )+ (this_TermCharacter_2= ruleTermCharacter )+ )* ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:483:1: ( (this_TermCharacter_0= ruleTermCharacter )+ ( (this_WS_1= RULE_WS )+ (this_TermCharacter_2= ruleTermCharacter )+ )* ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:483:2: (this_TermCharacter_0= ruleTermCharacter )+ ( (this_WS_1= RULE_WS )+ (this_TermCharacter_2= ruleTermCharacter )+ )* - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:483:2: (this_TermCharacter_0= ruleTermCharacter )+ - int cnt11=0; - loop11: - do { - int alt11=2; - int LA11_0 = input.LA(1); - - if ( ((LA11_0>=RULE_PLUS_SIGN && LA11_0<=RULE_COMMA)||(LA11_0>=RULE_OPENING_CURLY_BRACKET && LA11_0<=RULE_OTHER_ALLOWED_TERM_CHARACTER)) ) { - alt11=1; - } - - - switch (alt11) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:484:5: this_TermCharacter_0= ruleTermCharacter - { - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getTermAccess().getTermCharacterParserRuleCall_0()); - - } - pushFollow(FOLLOW_ruleTermCharacter_in_ruleTerm962); - this_TermCharacter_0=ruleTermCharacter(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_TermCharacter_0); - - } - if ( state.backtracking==0 ) { - - afterParserOrEnumRuleCall(); - - } - - } - break; - - default : - if ( cnt11 >= 1 ) break loop11; - if (state.backtracking>0) {state.failed=true; return current;} - EarlyExitException eee = - new EarlyExitException(11, input); - throw eee; - } - cnt11++; - } while (true); - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:494:3: ( (this_WS_1= RULE_WS )+ (this_TermCharacter_2= ruleTermCharacter )+ )* - loop14: - do { - int alt14=2; - alt14 = dfa14.predict(input); - switch (alt14) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:494:4: (this_WS_1= RULE_WS )+ (this_TermCharacter_2= ruleTermCharacter )+ - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:494:4: (this_WS_1= RULE_WS )+ - int cnt12=0; - loop12: - do { - int alt12=2; - int LA12_0 = input.LA(1); - - if ( (LA12_0==RULE_WS) ) { - alt12=1; - } - - - switch (alt12) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:494:9: this_WS_1= RULE_WS - { - this_WS_1=(Token)match(input,RULE_WS,FOLLOW_RULE_WS_in_ruleTerm986); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_WS_1); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_WS_1, grammarAccess.getTermAccess().getWSTerminalRuleCall_1_0()); - - } - - } - break; - - default : - if ( cnt12 >= 1 ) break loop12; - if (state.backtracking>0) {state.failed=true; return current;} - EarlyExitException eee = - new EarlyExitException(12, input); - throw eee; - } - cnt12++; - } while (true); - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:501:3: (this_TermCharacter_2= ruleTermCharacter )+ - int cnt13=0; - loop13: - do { - int alt13=2; - int LA13_0 = input.LA(1); - - if ( ((LA13_0>=RULE_PLUS_SIGN && LA13_0<=RULE_COMMA)||(LA13_0>=RULE_OPENING_CURLY_BRACKET && LA13_0<=RULE_OTHER_ALLOWED_TERM_CHARACTER)) ) { - alt13=1; - } - - - switch (alt13) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:502:5: this_TermCharacter_2= ruleTermCharacter - { - if ( state.backtracking==0 ) { - - newCompositeNode(grammarAccess.getTermAccess().getTermCharacterParserRuleCall_1_1()); - - } - pushFollow(FOLLOW_ruleTermCharacter_in_ruleTerm1016); - this_TermCharacter_2=ruleTermCharacter(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_TermCharacter_2); - - } - if ( state.backtracking==0 ) { - - afterParserOrEnumRuleCall(); - - } - - } - break; - - default : - if ( cnt13 >= 1 ) break loop13; - if (state.backtracking>0) {state.failed=true; return current;} - EarlyExitException eee = - new EarlyExitException(13, input); - throw eee; - } - cnt13++; - } while (true); - - - } - break; - - default : - break loop14; - } - } while (true); - - - } - - - } - - if ( state.backtracking==0 ) { - leaveRule(); - } - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - - myHiddenTokenState.restore(); - - } - return current; - } - // $ANTLR end "ruleTerm" - - - // $ANTLR start "entryRuleConceptId" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:523:1: entryRuleConceptId returns [String current=null] : iv_ruleConceptId= ruleConceptId EOF ; - public final String entryRuleConceptId() throws RecognitionException { - String current = null; - - AntlrDatatypeRuleToken iv_ruleConceptId = null; - - - - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:527:2: (iv_ruleConceptId= ruleConceptId EOF ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:528:2: iv_ruleConceptId= ruleConceptId EOF - { - if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getConceptIdRule()); - } - pushFollow(FOLLOW_ruleConceptId_in_entryRuleConceptId1076); - iv_ruleConceptId=ruleConceptId(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - current =iv_ruleConceptId.getText(); - } - match(input,EOF,FOLLOW_EOF_in_entryRuleConceptId1087); if (state.failed) return current; - - } - - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - - myHiddenTokenState.restore(); - - } - return current; - } - // $ANTLR end "entryRuleConceptId" - - - // $ANTLR start "ruleConceptId" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:538:1: ruleConceptId returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ ) ; - public final AntlrDatatypeRuleToken ruleConceptId() throws RecognitionException { - AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); - - Token this_DIGIT_NONZERO_0=null; - Token this_DIGIT_NONZERO_1=null; - Token this_ZERO_2=null; - Token this_DIGIT_NONZERO_3=null; - Token this_ZERO_4=null; - Token this_DIGIT_NONZERO_5=null; - Token this_ZERO_6=null; - Token this_DIGIT_NONZERO_7=null; - Token this_ZERO_8=null; - Token this_DIGIT_NONZERO_9=null; - Token this_ZERO_10=null; - - enterRule(); - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:542:28: ( (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:543:1: (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:543:1: (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:543:6: this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ - { - this_DIGIT_NONZERO_0=(Token)match(input,RULE_DIGIT_NONZERO,FOLLOW_RULE_DIGIT_NONZERO_in_ruleConceptId1131); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_DIGIT_NONZERO_0); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_DIGIT_NONZERO_0, grammarAccess.getConceptIdAccess().getDIGIT_NONZEROTerminalRuleCall_0()); - - } - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:550:1: (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) - int alt15=2; - int LA15_0 = input.LA(1); - - if ( (LA15_0==RULE_DIGIT_NONZERO) ) { - alt15=1; - } - else if ( (LA15_0==RULE_ZERO) ) { - alt15=2; - } - else { - if (state.backtracking>0) {state.failed=true; return current;} - NoViableAltException nvae = - new NoViableAltException("", 15, 0, input); - - throw nvae; - } - switch (alt15) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:550:6: this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO - { - this_DIGIT_NONZERO_1=(Token)match(input,RULE_DIGIT_NONZERO,FOLLOW_RULE_DIGIT_NONZERO_in_ruleConceptId1152); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_DIGIT_NONZERO_1); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_DIGIT_NONZERO_1, grammarAccess.getConceptIdAccess().getDIGIT_NONZEROTerminalRuleCall_1_0()); - - } - - } - break; - case 2 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:558:10: this_ZERO_2= RULE_ZERO - { - this_ZERO_2=(Token)match(input,RULE_ZERO,FOLLOW_RULE_ZERO_in_ruleConceptId1178); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_ZERO_2); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_ZERO_2, grammarAccess.getConceptIdAccess().getZEROTerminalRuleCall_1_1()); - - } - - } - break; - - } - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:565:2: (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) - int alt16=2; - int LA16_0 = input.LA(1); - - if ( (LA16_0==RULE_DIGIT_NONZERO) ) { - alt16=1; - } - else if ( (LA16_0==RULE_ZERO) ) { - alt16=2; - } - else { - if (state.backtracking>0) {state.failed=true; return current;} - NoViableAltException nvae = - new NoViableAltException("", 16, 0, input); - - throw nvae; - } - switch (alt16) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:565:7: this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO - { - this_DIGIT_NONZERO_3=(Token)match(input,RULE_DIGIT_NONZERO,FOLLOW_RULE_DIGIT_NONZERO_in_ruleConceptId1200); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_DIGIT_NONZERO_3); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_DIGIT_NONZERO_3, grammarAccess.getConceptIdAccess().getDIGIT_NONZEROTerminalRuleCall_2_0()); - - } - - } - break; - case 2 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:573:10: this_ZERO_4= RULE_ZERO - { - this_ZERO_4=(Token)match(input,RULE_ZERO,FOLLOW_RULE_ZERO_in_ruleConceptId1226); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_ZERO_4); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_ZERO_4, grammarAccess.getConceptIdAccess().getZEROTerminalRuleCall_2_1()); - - } - - } - break; - - } - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:580:2: (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) - int alt17=2; - int LA17_0 = input.LA(1); - - if ( (LA17_0==RULE_DIGIT_NONZERO) ) { - alt17=1; - } - else if ( (LA17_0==RULE_ZERO) ) { - alt17=2; - } - else { - if (state.backtracking>0) {state.failed=true; return current;} - NoViableAltException nvae = - new NoViableAltException("", 17, 0, input); - - throw nvae; - } - switch (alt17) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:580:7: this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO - { - this_DIGIT_NONZERO_5=(Token)match(input,RULE_DIGIT_NONZERO,FOLLOW_RULE_DIGIT_NONZERO_in_ruleConceptId1248); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_DIGIT_NONZERO_5); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_DIGIT_NONZERO_5, grammarAccess.getConceptIdAccess().getDIGIT_NONZEROTerminalRuleCall_3_0()); - - } - - } - break; - case 2 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:588:10: this_ZERO_6= RULE_ZERO - { - this_ZERO_6=(Token)match(input,RULE_ZERO,FOLLOW_RULE_ZERO_in_ruleConceptId1274); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_ZERO_6); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_ZERO_6, grammarAccess.getConceptIdAccess().getZEROTerminalRuleCall_3_1()); - - } - - } - break; - - } - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:595:2: (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) - int alt18=2; - int LA18_0 = input.LA(1); - - if ( (LA18_0==RULE_DIGIT_NONZERO) ) { - alt18=1; - } - else if ( (LA18_0==RULE_ZERO) ) { - alt18=2; - } - else { - if (state.backtracking>0) {state.failed=true; return current;} - NoViableAltException nvae = - new NoViableAltException("", 18, 0, input); - - throw nvae; - } - switch (alt18) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:595:7: this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO - { - this_DIGIT_NONZERO_7=(Token)match(input,RULE_DIGIT_NONZERO,FOLLOW_RULE_DIGIT_NONZERO_in_ruleConceptId1296); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_DIGIT_NONZERO_7); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_DIGIT_NONZERO_7, grammarAccess.getConceptIdAccess().getDIGIT_NONZEROTerminalRuleCall_4_0()); - - } - - } - break; - case 2 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:603:10: this_ZERO_8= RULE_ZERO - { - this_ZERO_8=(Token)match(input,RULE_ZERO,FOLLOW_RULE_ZERO_in_ruleConceptId1322); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_ZERO_8); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_ZERO_8, grammarAccess.getConceptIdAccess().getZEROTerminalRuleCall_4_1()); - - } - - } - break; - - } - - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:610:2: (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ - int cnt19=0; - loop19: - do { - int alt19=3; - int LA19_0 = input.LA(1); - - if ( (LA19_0==RULE_DIGIT_NONZERO) ) { - alt19=1; - } - else if ( (LA19_0==RULE_ZERO) ) { - alt19=2; - } - - - switch (alt19) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:610:7: this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO - { - this_DIGIT_NONZERO_9=(Token)match(input,RULE_DIGIT_NONZERO,FOLLOW_RULE_DIGIT_NONZERO_in_ruleConceptId1344); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_DIGIT_NONZERO_9); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_DIGIT_NONZERO_9, grammarAccess.getConceptIdAccess().getDIGIT_NONZEROTerminalRuleCall_5_0()); - - } - - } - break; - case 2 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:618:10: this_ZERO_10= RULE_ZERO - { - this_ZERO_10=(Token)match(input,RULE_ZERO,FOLLOW_RULE_ZERO_in_ruleConceptId1370); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_ZERO_10); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_ZERO_10, grammarAccess.getConceptIdAccess().getZEROTerminalRuleCall_5_1()); - - } - - } - break; - - default : - if ( cnt19 >= 1 ) break loop19; - if (state.backtracking>0) {state.failed=true; return current;} - EarlyExitException eee = - new EarlyExitException(19, input); - throw eee; - } - cnt19++; - } while (true); - - - } - - - } - - if ( state.backtracking==0 ) { - leaveRule(); - } - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - - myHiddenTokenState.restore(); - - } - return current; - } - // $ANTLR end "ruleConceptId" - - - // $ANTLR start "entryRuleTermCharacter" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:636:1: entryRuleTermCharacter returns [String current=null] : iv_ruleTermCharacter= ruleTermCharacter EOF ; - public final String entryRuleTermCharacter() throws RecognitionException { - String current = null; - - AntlrDatatypeRuleToken iv_ruleTermCharacter = null; - - - - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:640:2: (iv_ruleTermCharacter= ruleTermCharacter EOF ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:641:2: iv_ruleTermCharacter= ruleTermCharacter EOF - { - if ( state.backtracking==0 ) { - newCompositeNode(grammarAccess.getTermCharacterRule()); - } - pushFollow(FOLLOW_ruleTermCharacter_in_entryRuleTermCharacter1428); - iv_ruleTermCharacter=ruleTermCharacter(); - - state._fsp--; - if (state.failed) return current; - if ( state.backtracking==0 ) { - current =iv_ruleTermCharacter.getText(); - } - match(input,EOF,FOLLOW_EOF_in_entryRuleTermCharacter1439); if (state.failed) return current; - - } - - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - - myHiddenTokenState.restore(); - - } - return current; - } - // $ANTLR end "entryRuleTermCharacter" - - - // $ANTLR start "ruleTermCharacter" - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:651:1: ruleTermCharacter returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO | this_ZERO_1= RULE_ZERO | this_LETTER_2= RULE_LETTER | this_COMMA_3= RULE_COMMA | this_OPENING_CURLY_BRACKET_4= RULE_OPENING_CURLY_BRACKET | this_CLOSING_CURLY_BRACKET_5= RULE_CLOSING_CURLY_BRACKET | this_EQUAL_SIGN_6= RULE_EQUAL_SIGN | this_OPENING_ROUND_BRACKET_7= RULE_OPENING_ROUND_BRACKET | this_CLOSING_ROUND_BRACKET_8= RULE_CLOSING_ROUND_BRACKET | this_PLUS_SIGN_9= RULE_PLUS_SIGN | this_COLON_10= RULE_COLON | this_OTHER_ALLOWED_TERM_CHARACTER_11= RULE_OTHER_ALLOWED_TERM_CHARACTER ) ; - public final AntlrDatatypeRuleToken ruleTermCharacter() throws RecognitionException { - AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); - - Token this_DIGIT_NONZERO_0=null; - Token this_ZERO_1=null; - Token this_LETTER_2=null; - Token this_COMMA_3=null; - Token this_OPENING_CURLY_BRACKET_4=null; - Token this_CLOSING_CURLY_BRACKET_5=null; - Token this_EQUAL_SIGN_6=null; - Token this_OPENING_ROUND_BRACKET_7=null; - Token this_CLOSING_ROUND_BRACKET_8=null; - Token this_PLUS_SIGN_9=null; - Token this_COLON_10=null; - Token this_OTHER_ALLOWED_TERM_CHARACTER_11=null; - - enterRule(); - HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); - - try { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:655:28: ( (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO | this_ZERO_1= RULE_ZERO | this_LETTER_2= RULE_LETTER | this_COMMA_3= RULE_COMMA | this_OPENING_CURLY_BRACKET_4= RULE_OPENING_CURLY_BRACKET | this_CLOSING_CURLY_BRACKET_5= RULE_CLOSING_CURLY_BRACKET | this_EQUAL_SIGN_6= RULE_EQUAL_SIGN | this_OPENING_ROUND_BRACKET_7= RULE_OPENING_ROUND_BRACKET | this_CLOSING_ROUND_BRACKET_8= RULE_CLOSING_ROUND_BRACKET | this_PLUS_SIGN_9= RULE_PLUS_SIGN | this_COLON_10= RULE_COLON | this_OTHER_ALLOWED_TERM_CHARACTER_11= RULE_OTHER_ALLOWED_TERM_CHARACTER ) ) - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:656:1: (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO | this_ZERO_1= RULE_ZERO | this_LETTER_2= RULE_LETTER | this_COMMA_3= RULE_COMMA | this_OPENING_CURLY_BRACKET_4= RULE_OPENING_CURLY_BRACKET | this_CLOSING_CURLY_BRACKET_5= RULE_CLOSING_CURLY_BRACKET | this_EQUAL_SIGN_6= RULE_EQUAL_SIGN | this_OPENING_ROUND_BRACKET_7= RULE_OPENING_ROUND_BRACKET | this_CLOSING_ROUND_BRACKET_8= RULE_CLOSING_ROUND_BRACKET | this_PLUS_SIGN_9= RULE_PLUS_SIGN | this_COLON_10= RULE_COLON | this_OTHER_ALLOWED_TERM_CHARACTER_11= RULE_OTHER_ALLOWED_TERM_CHARACTER ) - { - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:656:1: (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO | this_ZERO_1= RULE_ZERO | this_LETTER_2= RULE_LETTER | this_COMMA_3= RULE_COMMA | this_OPENING_CURLY_BRACKET_4= RULE_OPENING_CURLY_BRACKET | this_CLOSING_CURLY_BRACKET_5= RULE_CLOSING_CURLY_BRACKET | this_EQUAL_SIGN_6= RULE_EQUAL_SIGN | this_OPENING_ROUND_BRACKET_7= RULE_OPENING_ROUND_BRACKET | this_CLOSING_ROUND_BRACKET_8= RULE_CLOSING_ROUND_BRACKET | this_PLUS_SIGN_9= RULE_PLUS_SIGN | this_COLON_10= RULE_COLON | this_OTHER_ALLOWED_TERM_CHARACTER_11= RULE_OTHER_ALLOWED_TERM_CHARACTER ) - int alt20=12; - switch ( input.LA(1) ) { - case RULE_DIGIT_NONZERO: - { - alt20=1; - } - break; - case RULE_ZERO: - { - alt20=2; - } - break; - case RULE_LETTER: - { - alt20=3; - } - break; - case RULE_COMMA: - { - alt20=4; - } - break; - case RULE_OPENING_CURLY_BRACKET: - { - alt20=5; - } - break; - case RULE_CLOSING_CURLY_BRACKET: - { - alt20=6; - } - break; - case RULE_EQUAL_SIGN: - { - alt20=7; - } - break; - case RULE_OPENING_ROUND_BRACKET: - { - alt20=8; - } - break; - case RULE_CLOSING_ROUND_BRACKET: - { - alt20=9; - } - break; - case RULE_PLUS_SIGN: - { - alt20=10; - } - break; - case RULE_COLON: - { - alt20=11; - } - break; - case RULE_OTHER_ALLOWED_TERM_CHARACTER: - { - alt20=12; - } - break; - default: - if (state.backtracking>0) {state.failed=true; return current;} - NoViableAltException nvae = - new NoViableAltException("", 20, 0, input); - - throw nvae; - } - - switch (alt20) { - case 1 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:656:6: this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO - { - this_DIGIT_NONZERO_0=(Token)match(input,RULE_DIGIT_NONZERO,FOLLOW_RULE_DIGIT_NONZERO_in_ruleTermCharacter1483); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_DIGIT_NONZERO_0); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_DIGIT_NONZERO_0, grammarAccess.getTermCharacterAccess().getDIGIT_NONZEROTerminalRuleCall_0()); - - } - - } - break; - case 2 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:664:10: this_ZERO_1= RULE_ZERO - { - this_ZERO_1=(Token)match(input,RULE_ZERO,FOLLOW_RULE_ZERO_in_ruleTermCharacter1509); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_ZERO_1); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_ZERO_1, grammarAccess.getTermCharacterAccess().getZEROTerminalRuleCall_1()); - - } - - } - break; - case 3 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:672:10: this_LETTER_2= RULE_LETTER - { - this_LETTER_2=(Token)match(input,RULE_LETTER,FOLLOW_RULE_LETTER_in_ruleTermCharacter1535); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_LETTER_2); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_LETTER_2, grammarAccess.getTermCharacterAccess().getLETTERTerminalRuleCall_2()); - - } - - } - break; - case 4 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:680:10: this_COMMA_3= RULE_COMMA - { - this_COMMA_3=(Token)match(input,RULE_COMMA,FOLLOW_RULE_COMMA_in_ruleTermCharacter1561); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_COMMA_3); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_COMMA_3, grammarAccess.getTermCharacterAccess().getCOMMATerminalRuleCall_3()); - - } - - } - break; - case 5 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:688:10: this_OPENING_CURLY_BRACKET_4= RULE_OPENING_CURLY_BRACKET - { - this_OPENING_CURLY_BRACKET_4=(Token)match(input,RULE_OPENING_CURLY_BRACKET,FOLLOW_RULE_OPENING_CURLY_BRACKET_in_ruleTermCharacter1587); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_OPENING_CURLY_BRACKET_4); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_OPENING_CURLY_BRACKET_4, grammarAccess.getTermCharacterAccess().getOPENING_CURLY_BRACKETTerminalRuleCall_4()); - - } - - } - break; - case 6 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:696:10: this_CLOSING_CURLY_BRACKET_5= RULE_CLOSING_CURLY_BRACKET - { - this_CLOSING_CURLY_BRACKET_5=(Token)match(input,RULE_CLOSING_CURLY_BRACKET,FOLLOW_RULE_CLOSING_CURLY_BRACKET_in_ruleTermCharacter1613); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_CLOSING_CURLY_BRACKET_5); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_CLOSING_CURLY_BRACKET_5, grammarAccess.getTermCharacterAccess().getCLOSING_CURLY_BRACKETTerminalRuleCall_5()); - - } - - } - break; - case 7 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:704:10: this_EQUAL_SIGN_6= RULE_EQUAL_SIGN - { - this_EQUAL_SIGN_6=(Token)match(input,RULE_EQUAL_SIGN,FOLLOW_RULE_EQUAL_SIGN_in_ruleTermCharacter1639); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_EQUAL_SIGN_6); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_EQUAL_SIGN_6, grammarAccess.getTermCharacterAccess().getEQUAL_SIGNTerminalRuleCall_6()); - - } - - } - break; - case 8 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:712:10: this_OPENING_ROUND_BRACKET_7= RULE_OPENING_ROUND_BRACKET - { - this_OPENING_ROUND_BRACKET_7=(Token)match(input,RULE_OPENING_ROUND_BRACKET,FOLLOW_RULE_OPENING_ROUND_BRACKET_in_ruleTermCharacter1665); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_OPENING_ROUND_BRACKET_7); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_OPENING_ROUND_BRACKET_7, grammarAccess.getTermCharacterAccess().getOPENING_ROUND_BRACKETTerminalRuleCall_7()); - - } - - } - break; - case 9 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:720:10: this_CLOSING_ROUND_BRACKET_8= RULE_CLOSING_ROUND_BRACKET - { - this_CLOSING_ROUND_BRACKET_8=(Token)match(input,RULE_CLOSING_ROUND_BRACKET,FOLLOW_RULE_CLOSING_ROUND_BRACKET_in_ruleTermCharacter1691); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_CLOSING_ROUND_BRACKET_8); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_CLOSING_ROUND_BRACKET_8, grammarAccess.getTermCharacterAccess().getCLOSING_ROUND_BRACKETTerminalRuleCall_8()); - - } - - } - break; - case 10 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:728:10: this_PLUS_SIGN_9= RULE_PLUS_SIGN - { - this_PLUS_SIGN_9=(Token)match(input,RULE_PLUS_SIGN,FOLLOW_RULE_PLUS_SIGN_in_ruleTermCharacter1717); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_PLUS_SIGN_9); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_PLUS_SIGN_9, grammarAccess.getTermCharacterAccess().getPLUS_SIGNTerminalRuleCall_9()); - - } - - } - break; - case 11 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:736:10: this_COLON_10= RULE_COLON - { - this_COLON_10=(Token)match(input,RULE_COLON,FOLLOW_RULE_COLON_in_ruleTermCharacter1743); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_COLON_10); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_COLON_10, grammarAccess.getTermCharacterAccess().getCOLONTerminalRuleCall_10()); - - } - - } - break; - case 12 : - // ../com.b2international.snowowl.dsl.scg/src-gen/com/b2international/snowowl/dsl/parser/antlr/internal/InternalSCG.g:744:10: this_OTHER_ALLOWED_TERM_CHARACTER_11= RULE_OTHER_ALLOWED_TERM_CHARACTER - { - this_OTHER_ALLOWED_TERM_CHARACTER_11=(Token)match(input,RULE_OTHER_ALLOWED_TERM_CHARACTER,FOLLOW_RULE_OTHER_ALLOWED_TERM_CHARACTER_in_ruleTermCharacter1769); if (state.failed) return current; - if ( state.backtracking==0 ) { - - current.merge(this_OTHER_ALLOWED_TERM_CHARACTER_11); - - } - if ( state.backtracking==0 ) { - - newLeafNode(this_OTHER_ALLOWED_TERM_CHARACTER_11, grammarAccess.getTermCharacterAccess().getOTHER_ALLOWED_TERM_CHARACTERTerminalRuleCall_11()); - - } - - } - break; - - } - - - } - - if ( state.backtracking==0 ) { - leaveRule(); - } - } - - catch (RecognitionException re) { - recover(input,re); - appendSkippedTokens(); - } - finally { - - myHiddenTokenState.restore(); - - } - return current; - } - // $ANTLR end "ruleTermCharacter" - - // Delegated rules - - - protected DFA14 dfa14 = new DFA14(this); - static final String DFA14_eotS = - "\4\uffff"; - static final String DFA14_eofS = - "\1\2\3\uffff"; - static final String DFA14_minS = - "\1\7\1\4\2\uffff"; - static final String DFA14_maxS = - "\1\10\1\21\2\uffff"; - static final String DFA14_acceptS = - "\2\uffff\1\2\1\1"; - static final String DFA14_specialS = - "\4\uffff}>"; - static final String[] DFA14_transitionS = { - "\1\2\1\1", - "\3\3\1\2\1\1\11\3", - "", - "" - }; - - static final short[] DFA14_eot = DFA.unpackEncodedString(DFA14_eotS); - static final short[] DFA14_eof = DFA.unpackEncodedString(DFA14_eofS); - static final char[] DFA14_min = DFA.unpackEncodedStringToUnsignedChars(DFA14_minS); - static final char[] DFA14_max = DFA.unpackEncodedStringToUnsignedChars(DFA14_maxS); - static final short[] DFA14_accept = DFA.unpackEncodedString(DFA14_acceptS); - static final short[] DFA14_special = DFA.unpackEncodedString(DFA14_specialS); - static final short[][] DFA14_transition; - - static { - int numStates = DFA14_transitionS.length; - DFA14_transition = new short[numStates][]; - for (int i=0; i - * A representation of the model object 'Concept'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.b2international.snowowl.dsl.scg.Concept#getId Id}
      • - *
      • {@link com.b2international.snowowl.dsl.scg.Concept#getTerm Term}
      • - *
      • {@link com.b2international.snowowl.dsl.scg.Concept#getSuperTypes Super Types}
      • - *
      - *

      - * - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getConcept() - * @model - * @generated - */ -public interface Concept extends AttributeValue -{ - /** - * Returns the value of the 'Id' attribute. - * - *

      - * If the meaning of the 'Id' attribute isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Id' attribute. - * @see #setId(String) - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getConcept_Id() - * @model - * @generated - */ - String getId(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.dsl.scg.Concept#getId Id}' attribute. - * - * - * @param value the new value of the 'Id' attribute. - * @see #getId() - * @generated - */ - void setId(String value); - - /** - * Returns the value of the 'Term' attribute. - * - *

      - * If the meaning of the 'Term' attribute isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Term' attribute. - * @see #setTerm(String) - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getConcept_Term() - * @model - * @generated - */ - String getTerm(); - - /** - * Sets the value of the '{@link com.b2international.snowowl.dsl.scg.Concept#getTerm Term}' attribute. - * - * - * @param value the new value of the 'Term' attribute. - * @see #getTerm() - * @generated - */ - void setTerm(String value); - - /** - * Returns the value of the 'Super Types' attribute list. - * The list contents are of type {@link java.lang.Long}. - * - *

      - * If the meaning of the 'Super Types' attribute list isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Super Types' attribute list. - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getConcept_SuperTypes() - * @model - * @generated - */ - EList getSuperTypes(); - -} // Concept \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/Expression.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/Expression.java deleted file mode 100644 index f0981ee2e95..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/Expression.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.scg; - -import org.eclipse.emf.common.util.EList; - -/** - * - * A representation of the model object 'Expression'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.b2international.snowowl.dsl.scg.Expression#getConcepts Concepts}
      • - *
      • {@link com.b2international.snowowl.dsl.scg.Expression#getAttributes Attributes}
      • - *
      • {@link com.b2international.snowowl.dsl.scg.Expression#getGroups Groups}
      • - *
      - *

      - * - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getExpression() - * @model - * @generated - */ -public interface Expression extends AttributeValue -{ - /** - * Returns the value of the 'Concepts' containment reference list. - * The list contents are of type {@link com.b2international.snowowl.dsl.scg.Concept}. - * - *

      - * If the meaning of the 'Concepts' containment reference list isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Concepts' containment reference list. - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getExpression_Concepts() - * @model containment="true" - * @generated - */ - EList getConcepts(); - - /** - * Returns the value of the 'Attributes' containment reference list. - * The list contents are of type {@link com.b2international.snowowl.dsl.scg.Attribute}. - * - *

      - * If the meaning of the 'Attributes' containment reference list isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Attributes' containment reference list. - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getExpression_Attributes() - * @model containment="true" - * @generated - */ - EList getAttributes(); - - /** - * Returns the value of the 'Groups' containment reference list. - * The list contents are of type {@link com.b2international.snowowl.dsl.scg.Group}. - * - *

      - * If the meaning of the 'Groups' containment reference list isn't clear, - * there really should be more of a description here... - *

      - * - * @return the value of the 'Groups' containment reference list. - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getExpression_Groups() - * @model containment="true" - * @generated - */ - EList getGroups(); - -} // Expression \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/ScgPackage.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/ScgPackage.java deleted file mode 100644 index daaf4381d49..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/ScgPackage.java +++ /dev/null @@ -1,545 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.scg; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -/** - * - * The Package for the model. - * It contains accessors for the meta objects to represent - *
        - *
      • each class,
      • - *
      • each feature of each class,
      • - *
      • each enum,
      • - *
      • and each data type
      • - *
      - * - * @see com.b2international.snowowl.dsl.scg.ScgFactory - * @model kind="package" - * @generated - */ -public interface ScgPackage extends EPackage -{ - /** - * The package name. - * - * - * @generated - */ - String eNAME = "scg"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://www.b2international.com/snowowl/SCG"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "scg"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - ScgPackage eINSTANCE = com.b2international.snowowl.dsl.scg.impl.ScgPackageImpl.init(); - - /** - * The meta object id for the '{@link com.b2international.snowowl.dsl.scg.impl.AttributeValueImpl Attribute Value}' class. - * - * - * @see com.b2international.snowowl.dsl.scg.impl.AttributeValueImpl - * @see com.b2international.snowowl.dsl.scg.impl.ScgPackageImpl#getAttributeValue() - * @generated - */ - int ATTRIBUTE_VALUE = 4; - - /** - * The number of structural features of the 'Attribute Value' class. - * - * - * @generated - * @ordered - */ - int ATTRIBUTE_VALUE_FEATURE_COUNT = 0; - - /** - * The meta object id for the '{@link com.b2international.snowowl.dsl.scg.impl.ExpressionImpl Expression}' class. - * - * - * @see com.b2international.snowowl.dsl.scg.impl.ExpressionImpl - * @see com.b2international.snowowl.dsl.scg.impl.ScgPackageImpl#getExpression() - * @generated - */ - int EXPRESSION = 0; - - /** - * The feature id for the 'Concepts' containment reference list. - * - * - * @generated - * @ordered - */ - int EXPRESSION__CONCEPTS = ATTRIBUTE_VALUE_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Attributes' containment reference list. - * - * - * @generated - * @ordered - */ - int EXPRESSION__ATTRIBUTES = ATTRIBUTE_VALUE_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Groups' containment reference list. - * - * - * @generated - * @ordered - */ - int EXPRESSION__GROUPS = ATTRIBUTE_VALUE_FEATURE_COUNT + 2; - - /** - * The number of structural features of the 'Expression' class. - * - * - * @generated - * @ordered - */ - int EXPRESSION_FEATURE_COUNT = ATTRIBUTE_VALUE_FEATURE_COUNT + 3; - - /** - * The meta object id for the '{@link com.b2international.snowowl.dsl.scg.impl.ConceptImpl Concept}' class. - * - * - * @see com.b2international.snowowl.dsl.scg.impl.ConceptImpl - * @see com.b2international.snowowl.dsl.scg.impl.ScgPackageImpl#getConcept() - * @generated - */ - int CONCEPT = 1; - - /** - * The feature id for the 'Id' attribute. - * - * - * @generated - * @ordered - */ - int CONCEPT__ID = ATTRIBUTE_VALUE_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Term' attribute. - * - * - * @generated - * @ordered - */ - int CONCEPT__TERM = ATTRIBUTE_VALUE_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Super Types' attribute list. - * - * - * @generated - * @ordered - */ - int CONCEPT__SUPER_TYPES = ATTRIBUTE_VALUE_FEATURE_COUNT + 2; - - /** - * The number of structural features of the 'Concept' class. - * - * - * @generated - * @ordered - */ - int CONCEPT_FEATURE_COUNT = ATTRIBUTE_VALUE_FEATURE_COUNT + 3; - - /** - * The meta object id for the '{@link com.b2international.snowowl.dsl.scg.impl.GroupImpl Group}' class. - * - * - * @see com.b2international.snowowl.dsl.scg.impl.GroupImpl - * @see com.b2international.snowowl.dsl.scg.impl.ScgPackageImpl#getGroup() - * @generated - */ - int GROUP = 2; - - /** - * The feature id for the 'Attributes' containment reference list. - * - * - * @generated - * @ordered - */ - int GROUP__ATTRIBUTES = 0; - - /** - * The number of structural features of the 'Group' class. - * - * - * @generated - * @ordered - */ - int GROUP_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link com.b2international.snowowl.dsl.scg.impl.AttributeImpl Attribute}' class. - * - * - * @see com.b2international.snowowl.dsl.scg.impl.AttributeImpl - * @see com.b2international.snowowl.dsl.scg.impl.ScgPackageImpl#getAttribute() - * @generated - */ - int ATTRIBUTE = 3; - - /** - * The feature id for the 'Name' containment reference. - * - * - * @generated - * @ordered - */ - int ATTRIBUTE__NAME = 0; - - /** - * The feature id for the 'Value' containment reference. - * - * - * @generated - * @ordered - */ - int ATTRIBUTE__VALUE = 1; - - /** - * The number of structural features of the 'Attribute' class. - * - * - * @generated - * @ordered - */ - int ATTRIBUTE_FEATURE_COUNT = 2; - - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.dsl.scg.Expression Expression}'. - * - * - * @return the meta object for class 'Expression'. - * @see com.b2international.snowowl.dsl.scg.Expression - * @generated - */ - EClass getExpression(); - - /** - * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.dsl.scg.Expression#getConcepts Concepts}'. - * - * - * @return the meta object for the containment reference list 'Concepts'. - * @see com.b2international.snowowl.dsl.scg.Expression#getConcepts() - * @see #getExpression() - * @generated - */ - EReference getExpression_Concepts(); - - /** - * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.dsl.scg.Expression#getAttributes Attributes}'. - * - * - * @return the meta object for the containment reference list 'Attributes'. - * @see com.b2international.snowowl.dsl.scg.Expression#getAttributes() - * @see #getExpression() - * @generated - */ - EReference getExpression_Attributes(); - - /** - * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.dsl.scg.Expression#getGroups Groups}'. - * - * - * @return the meta object for the containment reference list 'Groups'. - * @see com.b2international.snowowl.dsl.scg.Expression#getGroups() - * @see #getExpression() - * @generated - */ - EReference getExpression_Groups(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.dsl.scg.Concept Concept}'. - * - * - * @return the meta object for class 'Concept'. - * @see com.b2international.snowowl.dsl.scg.Concept - * @generated - */ - EClass getConcept(); - - /** - * Returns the meta object for the attribute '{@link com.b2international.snowowl.dsl.scg.Concept#getId Id}'. - * - * - * @return the meta object for the attribute 'Id'. - * @see com.b2international.snowowl.dsl.scg.Concept#getId() - * @see #getConcept() - * @generated - */ - EAttribute getConcept_Id(); - - /** - * Returns the meta object for the attribute '{@link com.b2international.snowowl.dsl.scg.Concept#getTerm Term}'. - * - * - * @return the meta object for the attribute 'Term'. - * @see com.b2international.snowowl.dsl.scg.Concept#getTerm() - * @see #getConcept() - * @generated - */ - EAttribute getConcept_Term(); - - /** - * Returns the meta object for the attribute list '{@link com.b2international.snowowl.dsl.scg.Concept#getSuperTypes Super Types}'. - * - * - * @return the meta object for the attribute list 'Super Types'. - * @see com.b2international.snowowl.dsl.scg.Concept#getSuperTypes() - * @see #getConcept() - * @generated - */ - EAttribute getConcept_SuperTypes(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.dsl.scg.Group Group}'. - * - * - * @return the meta object for class 'Group'. - * @see com.b2international.snowowl.dsl.scg.Group - * @generated - */ - EClass getGroup(); - - /** - * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.dsl.scg.Group#getAttributes Attributes}'. - * - * - * @return the meta object for the containment reference list 'Attributes'. - * @see com.b2international.snowowl.dsl.scg.Group#getAttributes() - * @see #getGroup() - * @generated - */ - EReference getGroup_Attributes(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.dsl.scg.Attribute Attribute}'. - * - * - * @return the meta object for class 'Attribute'. - * @see com.b2international.snowowl.dsl.scg.Attribute - * @generated - */ - EClass getAttribute(); - - /** - * Returns the meta object for the containment reference '{@link com.b2international.snowowl.dsl.scg.Attribute#getName Name}'. - * - * - * @return the meta object for the containment reference 'Name'. - * @see com.b2international.snowowl.dsl.scg.Attribute#getName() - * @see #getAttribute() - * @generated - */ - EReference getAttribute_Name(); - - /** - * Returns the meta object for the containment reference '{@link com.b2international.snowowl.dsl.scg.Attribute#getValue Value}'. - * - * - * @return the meta object for the containment reference 'Value'. - * @see com.b2international.snowowl.dsl.scg.Attribute#getValue() - * @see #getAttribute() - * @generated - */ - EReference getAttribute_Value(); - - /** - * Returns the meta object for class '{@link com.b2international.snowowl.dsl.scg.AttributeValue Attribute Value}'. - * - * - * @return the meta object for class 'Attribute Value'. - * @see com.b2international.snowowl.dsl.scg.AttributeValue - * @generated - */ - EClass getAttributeValue(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - ScgFactory getScgFactory(); - - /** - * - * Defines literals for the meta objects that represent - *
        - *
      • each class,
      • - *
      • each feature of each class,
      • - *
      • each enum,
      • - *
      • and each data type
      • - *
      - * - * @generated - */ - interface Literals - { - /** - * The meta object literal for the '{@link com.b2international.snowowl.dsl.scg.impl.ExpressionImpl Expression}' class. - * - * - * @see com.b2international.snowowl.dsl.scg.impl.ExpressionImpl - * @see com.b2international.snowowl.dsl.scg.impl.ScgPackageImpl#getExpression() - * @generated - */ - EClass EXPRESSION = eINSTANCE.getExpression(); - - /** - * The meta object literal for the 'Concepts' containment reference list feature. - * - * - * @generated - */ - EReference EXPRESSION__CONCEPTS = eINSTANCE.getExpression_Concepts(); - - /** - * The meta object literal for the 'Attributes' containment reference list feature. - * - * - * @generated - */ - EReference EXPRESSION__ATTRIBUTES = eINSTANCE.getExpression_Attributes(); - - /** - * The meta object literal for the 'Groups' containment reference list feature. - * - * - * @generated - */ - EReference EXPRESSION__GROUPS = eINSTANCE.getExpression_Groups(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.dsl.scg.impl.ConceptImpl Concept}' class. - * - * - * @see com.b2international.snowowl.dsl.scg.impl.ConceptImpl - * @see com.b2international.snowowl.dsl.scg.impl.ScgPackageImpl#getConcept() - * @generated - */ - EClass CONCEPT = eINSTANCE.getConcept(); - - /** - * The meta object literal for the 'Id' attribute feature. - * - * - * @generated - */ - EAttribute CONCEPT__ID = eINSTANCE.getConcept_Id(); - - /** - * The meta object literal for the 'Term' attribute feature. - * - * - * @generated - */ - EAttribute CONCEPT__TERM = eINSTANCE.getConcept_Term(); - - /** - * The meta object literal for the 'Super Types' attribute list feature. - * - * - * @generated - */ - EAttribute CONCEPT__SUPER_TYPES = eINSTANCE.getConcept_SuperTypes(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.dsl.scg.impl.GroupImpl Group}' class. - * - * - * @see com.b2international.snowowl.dsl.scg.impl.GroupImpl - * @see com.b2international.snowowl.dsl.scg.impl.ScgPackageImpl#getGroup() - * @generated - */ - EClass GROUP = eINSTANCE.getGroup(); - - /** - * The meta object literal for the 'Attributes' containment reference list feature. - * - * - * @generated - */ - EReference GROUP__ATTRIBUTES = eINSTANCE.getGroup_Attributes(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.dsl.scg.impl.AttributeImpl Attribute}' class. - * - * - * @see com.b2international.snowowl.dsl.scg.impl.AttributeImpl - * @see com.b2international.snowowl.dsl.scg.impl.ScgPackageImpl#getAttribute() - * @generated - */ - EClass ATTRIBUTE = eINSTANCE.getAttribute(); - - /** - * The meta object literal for the 'Name' containment reference feature. - * - * - * @generated - */ - EReference ATTRIBUTE__NAME = eINSTANCE.getAttribute_Name(); - - /** - * The meta object literal for the 'Value' containment reference feature. - * - * - * @generated - */ - EReference ATTRIBUTE__VALUE = eINSTANCE.getAttribute_Value(); - - /** - * The meta object literal for the '{@link com.b2international.snowowl.dsl.scg.impl.AttributeValueImpl Attribute Value}' class. - * - * - * @see com.b2international.snowowl.dsl.scg.impl.AttributeValueImpl - * @see com.b2international.snowowl.dsl.scg.impl.ScgPackageImpl#getAttributeValue() - * @generated - */ - EClass ATTRIBUTE_VALUE = eINSTANCE.getAttributeValue(); - - } - -} //ScgPackage \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ExpressionImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ExpressionImpl.java deleted file mode 100644 index 5c094c7a78b..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ExpressionImpl.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.scg.impl; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - -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.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.dsl.scg.ScgPackage; - -/** - * - * An implementation of the model object 'Expression'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link com.b2international.snowowl.dsl.scg.impl.ExpressionImpl#getConcepts Concepts}
      • - *
      • {@link com.b2international.snowowl.dsl.scg.impl.ExpressionImpl#getAttributes Attributes}
      • - *
      • {@link com.b2international.snowowl.dsl.scg.impl.ExpressionImpl#getGroups Groups}
      • - *
      - *

      - * - * @generated - */ -public class ExpressionImpl extends AttributeValueImpl implements Expression -{ - /** - * The cached value of the '{@link #getConcepts() Concepts}' containment reference list. - * - * - * @see #getConcepts() - * @generated - * @ordered - */ - protected EList concepts; - - /** - * The cached value of the '{@link #getAttributes() Attributes}' containment reference list. - * - * - * @see #getAttributes() - * @generated - * @ordered - */ - protected EList attributes; - - /** - * The cached value of the '{@link #getGroups() Groups}' containment reference list. - * - * - * @see #getGroups() - * @generated - * @ordered - */ - protected EList groups; - - /** - * - * - * @generated - */ - protected ExpressionImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return ScgPackage.Literals.EXPRESSION; - } - - /** - * - * - * @generated - */ - public EList getConcepts() - { - if (concepts == null) - { - concepts = new EObjectContainmentEList(Concept.class, this, ScgPackage.EXPRESSION__CONCEPTS); - } - return concepts; - } - - /** - * - * - * @generated - */ - public EList getAttributes() - { - if (attributes == null) - { - attributes = new EObjectContainmentEList(Attribute.class, this, ScgPackage.EXPRESSION__ATTRIBUTES); - } - return attributes; - } - - /** - * - * - * @generated - */ - public EList getGroups() - { - if (groups == null) - { - groups = new EObjectContainmentEList(Group.class, this, ScgPackage.EXPRESSION__GROUPS); - } - return groups; - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case ScgPackage.EXPRESSION__CONCEPTS: - return ((InternalEList)getConcepts()).basicRemove(otherEnd, msgs); - case ScgPackage.EXPRESSION__ATTRIBUTES: - return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); - case ScgPackage.EXPRESSION__GROUPS: - return ((InternalEList)getGroups()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case ScgPackage.EXPRESSION__CONCEPTS: - return getConcepts(); - case ScgPackage.EXPRESSION__ATTRIBUTES: - return getAttributes(); - case ScgPackage.EXPRESSION__GROUPS: - return getGroups(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case ScgPackage.EXPRESSION__CONCEPTS: - getConcepts().clear(); - getConcepts().addAll((Collection)newValue); - return; - case ScgPackage.EXPRESSION__ATTRIBUTES: - getAttributes().clear(); - getAttributes().addAll((Collection)newValue); - return; - case ScgPackage.EXPRESSION__GROUPS: - getGroups().clear(); - getGroups().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case ScgPackage.EXPRESSION__CONCEPTS: - getConcepts().clear(); - return; - case ScgPackage.EXPRESSION__ATTRIBUTES: - getAttributes().clear(); - return; - case ScgPackage.EXPRESSION__GROUPS: - getGroups().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case ScgPackage.EXPRESSION__CONCEPTS: - return concepts != null && !concepts.isEmpty(); - case ScgPackage.EXPRESSION__ATTRIBUTES: - return attributes != null && !attributes.isEmpty(); - case ScgPackage.EXPRESSION__GROUPS: - return groups != null && !groups.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated NOT - */ - @Override - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(); - - // get all LValue labels - List lValueLabels = new ArrayList(); - for (Concept lValue : getConcepts()) { - lValueLabels.add(lValue.toString()); - } - // sort LValue labels - Collections.sort(lValueLabels); - - for (Iterator iterator = lValueLabels.iterator(); iterator.hasNext();) { - result.append(iterator.next()); - if (iterator.hasNext()) - result.append('+'); - } - // return if no refinements - if (getAttributes().isEmpty() && getGroups().isEmpty()) { - return result.toString(); - } - result.append(':'); - result.append(refinementsToString()); - return result.toString(); - } - - /** - * - * - * @generated NOT - */ - private String refinementsToString() - { - StringBuffer result = new StringBuffer(); - // ungrouped attributes - // get all attribute labels - List ungroupedAttributeLabels = new ArrayList(); - for (Attribute ungroupedAttribute : getAttributes()) { - ungroupedAttributeLabels.add(ungroupedAttribute.toString()); - } - - // sort attribute labels alphabetically - Collections.sort(ungroupedAttributeLabels); - - for (Iterator iterator = ungroupedAttributeLabels.iterator(); iterator.hasNext();) { - String attributeLabel = (String) iterator.next(); - result.append(attributeLabel); - if (iterator.hasNext()) - result.append(','); - } - // attribute groups - List attributeGroupLabels = new ArrayList(); - // get all attribute groups labels - for (Group attributeGroup : getGroups()) { - attributeGroupLabels.add(attributeGroup.toString()); - } - - // sort attribute group labels - Collections.sort(attributeGroupLabels); - - for (Iterator iterator = attributeGroupLabels.iterator(); iterator.hasNext();) { - result.append(iterator.next()); - } - - return result.toString(); - } - -} //ExpressionImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ScgPackageImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ScgPackageImpl.java deleted file mode 100644 index 693986237f5..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ScgPackageImpl.java +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.scg.impl; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.AttributeValue; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.dsl.scg.ScgFactory; -import com.b2international.snowowl.dsl.scg.ScgPackage; - -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; - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class ScgPackageImpl extends EPackageImpl implements ScgPackage -{ - /** - * - * - * @generated - */ - private EClass expressionEClass = null; - - /** - * - * - * @generated - */ - private EClass conceptEClass = null; - - /** - * - * - * @generated - */ - private EClass groupEClass = null; - - /** - * - * - * @generated - */ - private EClass attributeEClass = null; - - /** - * - * - * @generated - */ - private EClass attributeValueEClass = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

      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. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see com.b2international.snowowl.dsl.scg.ScgPackage#eNS_URI - * @see #init() - * @generated - */ - private ScgPackageImpl() - { - super(eNS_URI, ScgFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * - *

      This method is used to initialize {@link ScgPackage#eINSTANCE} when that field is accessed. - * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static ScgPackage init() - { - if (isInited) return (ScgPackage)EPackage.Registry.INSTANCE.getEPackage(ScgPackage.eNS_URI); - - // Obtain or create and register package - ScgPackageImpl theScgPackage = (ScgPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ScgPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ScgPackageImpl()); - - isInited = true; - - // Create package meta-data objects - theScgPackage.createPackageContents(); - - // Initialize created meta-data - theScgPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theScgPackage.freeze(); - - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(ScgPackage.eNS_URI, theScgPackage); - return theScgPackage; - } - - /** - * - * - * @generated - */ - public EClass getExpression() - { - return expressionEClass; - } - - /** - * - * - * @generated - */ - public EReference getExpression_Concepts() - { - return (EReference)expressionEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getExpression_Attributes() - { - return (EReference)expressionEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getExpression_Groups() - { - return (EReference)expressionEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getConcept() - { - return conceptEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getConcept_Id() - { - return (EAttribute)conceptEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getConcept_Term() - { - return (EAttribute)conceptEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getConcept_SuperTypes() - { - return (EAttribute)conceptEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getGroup() - { - return groupEClass; - } - - /** - * - * - * @generated - */ - public EReference getGroup_Attributes() - { - return (EReference)groupEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getAttribute() - { - return attributeEClass; - } - - /** - * - * - * @generated - */ - public EReference getAttribute_Name() - { - return (EReference)attributeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getAttribute_Value() - { - return (EReference)attributeEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getAttributeValue() - { - return attributeValueEClass; - } - - /** - * - * - * @generated - */ - public ScgFactory getScgFactory() - { - return (ScgFactory)getEFactoryInstance(); - } - - /** - * - * - * @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. - * - * - * @generated - */ - public void createPackageContents() - { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - expressionEClass = createEClass(EXPRESSION); - createEReference(expressionEClass, EXPRESSION__CONCEPTS); - createEReference(expressionEClass, EXPRESSION__ATTRIBUTES); - createEReference(expressionEClass, EXPRESSION__GROUPS); - - conceptEClass = createEClass(CONCEPT); - createEAttribute(conceptEClass, CONCEPT__ID); - createEAttribute(conceptEClass, CONCEPT__TERM); - createEAttribute(conceptEClass, CONCEPT__SUPER_TYPES); - - groupEClass = createEClass(GROUP); - createEReference(groupEClass, GROUP__ATTRIBUTES); - - attributeEClass = createEClass(ATTRIBUTE); - createEReference(attributeEClass, ATTRIBUTE__NAME); - createEReference(attributeEClass, ATTRIBUTE__VALUE); - - attributeValueEClass = createEClass(ATTRIBUTE_VALUE); - } - - /** - * - * - * @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. - * - * - * @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 - expressionEClass.getESuperTypes().add(this.getAttributeValue()); - conceptEClass.getESuperTypes().add(this.getAttributeValue()); - - // Initialize classes and features; add operations and parameters - initEClass(expressionEClass, Expression.class, "Expression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getExpression_Concepts(), this.getConcept(), null, "concepts", null, 0, -1, Expression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getExpression_Attributes(), this.getAttribute(), null, "attributes", null, 0, -1, Expression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getExpression_Groups(), this.getGroup(), null, "groups", null, 0, -1, Expression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(conceptEClass, Concept.class, "Concept", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getConcept_Id(), ecorePackage.getEString(), "id", null, 0, 1, Concept.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getConcept_Term(), ecorePackage.getEString(), "term", null, 0, 1, Concept.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getConcept_SuperTypes(), ecorePackage.getELong(), "superTypes", null, 0, -1, Concept.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(groupEClass, Group.class, "Group", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getGroup_Attributes(), this.getAttribute(), null, "attributes", null, 0, -1, Group.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(attributeEClass, Attribute.class, "Attribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getAttribute_Name(), this.getConcept(), null, "name", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getAttribute_Value(), this.getAttributeValue(), null, "value", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(attributeValueEClass, AttributeValue.class, "AttributeValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - // Create resource - createResource(eNS_URI); - } - -} //ScgPackageImpl \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/services/SCGGrammarAccess.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/services/SCGGrammarAccess.java deleted file mode 100644 index cd07802fddd..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/services/SCGGrammarAccess.java +++ /dev/null @@ -1,755 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.services; - -import com.google.inject.Singleton; -import com.google.inject.Inject; - -import java.util.List; - -import org.eclipse.xtext.*; -import org.eclipse.xtext.service.GrammarProvider; -import org.eclipse.xtext.service.AbstractElementFinder.*; - - -@Singleton -public class SCGGrammarAccess extends AbstractGrammarElementFinder { - - - public class ExpressionElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Expression"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final Assignment cConceptsAssignment_0 = (Assignment)cGroup.eContents().get(0); - private final RuleCall cConceptsConceptParserRuleCall_0_0 = (RuleCall)cConceptsAssignment_0.eContents().get(0); - private final Group cGroup_1 = (Group)cGroup.eContents().get(1); - private final RuleCall cPLUS_SIGNTerminalRuleCall_1_0 = (RuleCall)cGroup_1.eContents().get(0); - private final Assignment cConceptsAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); - private final RuleCall cConceptsConceptParserRuleCall_1_1_0 = (RuleCall)cConceptsAssignment_1_1.eContents().get(0); - private final Group cGroup_2 = (Group)cGroup.eContents().get(2); - private final RuleCall cCOLONTerminalRuleCall_2_0 = (RuleCall)cGroup_2.eContents().get(0); - private final Group cGroup_2_1 = (Group)cGroup_2.eContents().get(1); - private final Assignment cAttributesAssignment_2_1_0 = (Assignment)cGroup_2_1.eContents().get(0); - private final RuleCall cAttributesAttributeParserRuleCall_2_1_0_0 = (RuleCall)cAttributesAssignment_2_1_0.eContents().get(0); - private final Group cGroup_2_1_1 = (Group)cGroup_2_1.eContents().get(1); - private final RuleCall cCOMMATerminalRuleCall_2_1_1_0 = (RuleCall)cGroup_2_1_1.eContents().get(0); - private final Assignment cAttributesAssignment_2_1_1_1 = (Assignment)cGroup_2_1_1.eContents().get(1); - private final RuleCall cAttributesAttributeParserRuleCall_2_1_1_1_0 = (RuleCall)cAttributesAssignment_2_1_1_1.eContents().get(0); - private final Assignment cGroupsAssignment_2_2 = (Assignment)cGroup_2.eContents().get(2); - private final RuleCall cGroupsGroupParserRuleCall_2_2_0 = (RuleCall)cGroupsAssignment_2_2.eContents().get(0); - - //Expression hidden(WS, SL_COMMENT, ML_COMMENT): - // - // concepts+=Concept (PLUS_SIGN concepts+=Concept)* (COLON (attributes+=Attribute (COMMA attributes+=Attribute)*)? - // - // groups+=Group*)?; - public ParserRule getRule() { return rule; } - - //concepts+=Concept (PLUS_SIGN concepts+=Concept)* (COLON (attributes+=Attribute (COMMA attributes+=Attribute)*)? - // - //groups+=Group*)? - public Group getGroup() { return cGroup; } - - //concepts+=Concept - public Assignment getConceptsAssignment_0() { return cConceptsAssignment_0; } - - //Concept - public RuleCall getConceptsConceptParserRuleCall_0_0() { return cConceptsConceptParserRuleCall_0_0; } - - //(PLUS_SIGN concepts+=Concept)* - public Group getGroup_1() { return cGroup_1; } - - //PLUS_SIGN - public RuleCall getPLUS_SIGNTerminalRuleCall_1_0() { return cPLUS_SIGNTerminalRuleCall_1_0; } - - //concepts+=Concept - public Assignment getConceptsAssignment_1_1() { return cConceptsAssignment_1_1; } - - //Concept - public RuleCall getConceptsConceptParserRuleCall_1_1_0() { return cConceptsConceptParserRuleCall_1_1_0; } - - //(COLON (attributes+=Attribute (COMMA attributes+=Attribute)*)? groups+=Group*)? - public Group getGroup_2() { return cGroup_2; } - - //COLON - public RuleCall getCOLONTerminalRuleCall_2_0() { return cCOLONTerminalRuleCall_2_0; } - - //(attributes+=Attribute (COMMA attributes+=Attribute)*)? - public Group getGroup_2_1() { return cGroup_2_1; } - - //attributes+=Attribute - public Assignment getAttributesAssignment_2_1_0() { return cAttributesAssignment_2_1_0; } - - //Attribute - public RuleCall getAttributesAttributeParserRuleCall_2_1_0_0() { return cAttributesAttributeParserRuleCall_2_1_0_0; } - - //(COMMA attributes+=Attribute)* - public Group getGroup_2_1_1() { return cGroup_2_1_1; } - - //COMMA - public RuleCall getCOMMATerminalRuleCall_2_1_1_0() { return cCOMMATerminalRuleCall_2_1_1_0; } - - //attributes+=Attribute - public Assignment getAttributesAssignment_2_1_1_1() { return cAttributesAssignment_2_1_1_1; } - - //Attribute - public RuleCall getAttributesAttributeParserRuleCall_2_1_1_1_0() { return cAttributesAttributeParserRuleCall_2_1_1_1_0; } - - //groups+=Group* - public Assignment getGroupsAssignment_2_2() { return cGroupsAssignment_2_2; } - - //Group - public RuleCall getGroupsGroupParserRuleCall_2_2_0() { return cGroupsGroupParserRuleCall_2_2_0; } - } - - public class ConceptElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Concept"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final Assignment cIdAssignment_0 = (Assignment)cGroup.eContents().get(0); - private final RuleCall cIdConceptIdParserRuleCall_0_0 = (RuleCall)cIdAssignment_0.eContents().get(0); - private final Group cGroup_1 = (Group)cGroup.eContents().get(1); - private final RuleCall cPIPETerminalRuleCall_1_0 = (RuleCall)cGroup_1.eContents().get(0); - private final RuleCall cWSTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); - private final Assignment cTermAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2); - private final RuleCall cTermTermParserRuleCall_1_2_0 = (RuleCall)cTermAssignment_1_2.eContents().get(0); - private final RuleCall cWSTerminalRuleCall_1_3 = (RuleCall)cGroup_1.eContents().get(3); - private final RuleCall cPIPETerminalRuleCall_1_4 = (RuleCall)cGroup_1.eContents().get(4); - - //Concept: - // - // id=ConceptId (PIPE WS* term=Term WS* PIPE)?; - public ParserRule getRule() { return rule; } - - //id=ConceptId (PIPE WS* term=Term WS* PIPE)? - public Group getGroup() { return cGroup; } - - //id=ConceptId - public Assignment getIdAssignment_0() { return cIdAssignment_0; } - - //ConceptId - public RuleCall getIdConceptIdParserRuleCall_0_0() { return cIdConceptIdParserRuleCall_0_0; } - - //(PIPE WS* term=Term WS* PIPE)? - public Group getGroup_1() { return cGroup_1; } - - //PIPE - public RuleCall getPIPETerminalRuleCall_1_0() { return cPIPETerminalRuleCall_1_0; } - - //WS* - public RuleCall getWSTerminalRuleCall_1_1() { return cWSTerminalRuleCall_1_1; } - - //term=Term - public Assignment getTermAssignment_1_2() { return cTermAssignment_1_2; } - - //Term - public RuleCall getTermTermParserRuleCall_1_2_0() { return cTermTermParserRuleCall_1_2_0; } - - //WS* - public RuleCall getWSTerminalRuleCall_1_3() { return cWSTerminalRuleCall_1_3; } - - //PIPE - public RuleCall getPIPETerminalRuleCall_1_4() { return cPIPETerminalRuleCall_1_4; } - } - - public class GroupElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Group"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final RuleCall cOPENING_CURLY_BRACKETTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); - private final Assignment cAttributesAssignment_1 = (Assignment)cGroup.eContents().get(1); - private final RuleCall cAttributesAttributeParserRuleCall_1_0 = (RuleCall)cAttributesAssignment_1.eContents().get(0); - private final Group cGroup_2 = (Group)cGroup.eContents().get(2); - private final RuleCall cCOMMATerminalRuleCall_2_0 = (RuleCall)cGroup_2.eContents().get(0); - private final Assignment cAttributesAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1); - private final RuleCall cAttributesAttributeParserRuleCall_2_1_0 = (RuleCall)cAttributesAssignment_2_1.eContents().get(0); - private final RuleCall cCLOSING_CURLY_BRACKETTerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3); - - //Group: - // - // OPENING_CURLY_BRACKET attributes+=Attribute (COMMA attributes+=Attribute)* CLOSING_CURLY_BRACKET; - public ParserRule getRule() { return rule; } - - //OPENING_CURLY_BRACKET attributes+=Attribute (COMMA attributes+=Attribute)* CLOSING_CURLY_BRACKET - public Group getGroup() { return cGroup; } - - //OPENING_CURLY_BRACKET - public RuleCall getOPENING_CURLY_BRACKETTerminalRuleCall_0() { return cOPENING_CURLY_BRACKETTerminalRuleCall_0; } - - //attributes+=Attribute - public Assignment getAttributesAssignment_1() { return cAttributesAssignment_1; } - - //Attribute - public RuleCall getAttributesAttributeParserRuleCall_1_0() { return cAttributesAttributeParserRuleCall_1_0; } - - //(COMMA attributes+=Attribute)* - public Group getGroup_2() { return cGroup_2; } - - //COMMA - public RuleCall getCOMMATerminalRuleCall_2_0() { return cCOMMATerminalRuleCall_2_0; } - - //attributes+=Attribute - public Assignment getAttributesAssignment_2_1() { return cAttributesAssignment_2_1; } - - //Attribute - public RuleCall getAttributesAttributeParserRuleCall_2_1_0() { return cAttributesAttributeParserRuleCall_2_1_0; } - - //CLOSING_CURLY_BRACKET - public RuleCall getCLOSING_CURLY_BRACKETTerminalRuleCall_3() { return cCLOSING_CURLY_BRACKETTerminalRuleCall_3; } - } - - public class AttributeElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Attribute"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final Assignment cNameAssignment_0 = (Assignment)cGroup.eContents().get(0); - private final RuleCall cNameConceptParserRuleCall_0_0 = (RuleCall)cNameAssignment_0.eContents().get(0); - private final RuleCall cEQUAL_SIGNTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); - private final Assignment cValueAssignment_2 = (Assignment)cGroup.eContents().get(2); - private final RuleCall cValueAttributeValueParserRuleCall_2_0 = (RuleCall)cValueAssignment_2.eContents().get(0); - - //Attribute: - // - // name=Concept EQUAL_SIGN value=AttributeValue; - public ParserRule getRule() { return rule; } - - //name=Concept EQUAL_SIGN value=AttributeValue - public Group getGroup() { return cGroup; } - - //name=Concept - public Assignment getNameAssignment_0() { return cNameAssignment_0; } - - //Concept - public RuleCall getNameConceptParserRuleCall_0_0() { return cNameConceptParserRuleCall_0_0; } - - //EQUAL_SIGN - public RuleCall getEQUAL_SIGNTerminalRuleCall_1() { return cEQUAL_SIGNTerminalRuleCall_1; } - - //value=AttributeValue - public Assignment getValueAssignment_2() { return cValueAssignment_2; } - - //AttributeValue - public RuleCall getValueAttributeValueParserRuleCall_2_0() { return cValueAttributeValueParserRuleCall_2_0; } - } - - public class AttributeValueElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "AttributeValue"); - private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); - private final RuleCall cConceptParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); - private final Group cGroup_1 = (Group)cAlternatives.eContents().get(1); - private final RuleCall cOPENING_ROUND_BRACKETTerminalRuleCall_1_0 = (RuleCall)cGroup_1.eContents().get(0); - private final RuleCall cExpressionParserRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); - private final RuleCall cCLOSING_ROUND_BRACKETTerminalRuleCall_1_2 = (RuleCall)cGroup_1.eContents().get(2); - - //AttributeValue: - // - // Concept | OPENING_ROUND_BRACKET Expression CLOSING_ROUND_BRACKET; - public ParserRule getRule() { return rule; } - - //Concept | OPENING_ROUND_BRACKET Expression CLOSING_ROUND_BRACKET - public Alternatives getAlternatives() { return cAlternatives; } - - //Concept - public RuleCall getConceptParserRuleCall_0() { return cConceptParserRuleCall_0; } - - //OPENING_ROUND_BRACKET Expression CLOSING_ROUND_BRACKET - public Group getGroup_1() { return cGroup_1; } - - //OPENING_ROUND_BRACKET - public RuleCall getOPENING_ROUND_BRACKETTerminalRuleCall_1_0() { return cOPENING_ROUND_BRACKETTerminalRuleCall_1_0; } - - //Expression - public RuleCall getExpressionParserRuleCall_1_1() { return cExpressionParserRuleCall_1_1; } - - //CLOSING_ROUND_BRACKET - public RuleCall getCLOSING_ROUND_BRACKETTerminalRuleCall_1_2() { return cCLOSING_ROUND_BRACKETTerminalRuleCall_1_2; } - } - - public class TermElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Term"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final RuleCall cTermCharacterParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); - private final Group cGroup_1 = (Group)cGroup.eContents().get(1); - private final RuleCall cWSTerminalRuleCall_1_0 = (RuleCall)cGroup_1.eContents().get(0); - private final RuleCall cTermCharacterParserRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); - - //Term hidden(): - // - // TermCharacter+ (WS+ TermCharacter+)*; - public ParserRule getRule() { return rule; } - - //TermCharacter+ (WS+ TermCharacter+)* - public Group getGroup() { return cGroup; } - - //TermCharacter+ - public RuleCall getTermCharacterParserRuleCall_0() { return cTermCharacterParserRuleCall_0; } - - //(WS+ TermCharacter+)* - public Group getGroup_1() { return cGroup_1; } - - //WS+ - public RuleCall getWSTerminalRuleCall_1_0() { return cWSTerminalRuleCall_1_0; } - - //TermCharacter+ - public RuleCall getTermCharacterParserRuleCall_1_1() { return cTermCharacterParserRuleCall_1_1; } - } - - public class ConceptIdElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "ConceptId"); - private final Group cGroup = (Group)rule.eContents().get(1); - private final RuleCall cDIGIT_NONZEROTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); - private final Alternatives cAlternatives_1 = (Alternatives)cGroup.eContents().get(1); - private final RuleCall cDIGIT_NONZEROTerminalRuleCall_1_0 = (RuleCall)cAlternatives_1.eContents().get(0); - private final RuleCall cZEROTerminalRuleCall_1_1 = (RuleCall)cAlternatives_1.eContents().get(1); - private final Alternatives cAlternatives_2 = (Alternatives)cGroup.eContents().get(2); - private final RuleCall cDIGIT_NONZEROTerminalRuleCall_2_0 = (RuleCall)cAlternatives_2.eContents().get(0); - private final RuleCall cZEROTerminalRuleCall_2_1 = (RuleCall)cAlternatives_2.eContents().get(1); - private final Alternatives cAlternatives_3 = (Alternatives)cGroup.eContents().get(3); - private final RuleCall cDIGIT_NONZEROTerminalRuleCall_3_0 = (RuleCall)cAlternatives_3.eContents().get(0); - private final RuleCall cZEROTerminalRuleCall_3_1 = (RuleCall)cAlternatives_3.eContents().get(1); - private final Alternatives cAlternatives_4 = (Alternatives)cGroup.eContents().get(4); - private final RuleCall cDIGIT_NONZEROTerminalRuleCall_4_0 = (RuleCall)cAlternatives_4.eContents().get(0); - private final RuleCall cZEROTerminalRuleCall_4_1 = (RuleCall)cAlternatives_4.eContents().get(1); - private final Alternatives cAlternatives_5 = (Alternatives)cGroup.eContents().get(5); - private final RuleCall cDIGIT_NONZEROTerminalRuleCall_5_0 = (RuleCall)cAlternatives_5.eContents().get(0); - private final RuleCall cZEROTerminalRuleCall_5_1 = (RuleCall)cAlternatives_5.eContents().get(1); - - //ConceptId hidden(): - // - // DIGIT_NONZERO (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) - // - // (DIGIT_NONZERO | ZERO)+; - public ParserRule getRule() { return rule; } - - //DIGIT_NONZERO (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO - // - //| ZERO)+ - public Group getGroup() { return cGroup; } - - //DIGIT_NONZERO - public RuleCall getDIGIT_NONZEROTerminalRuleCall_0() { return cDIGIT_NONZEROTerminalRuleCall_0; } - - //DIGIT_NONZERO | ZERO - public Alternatives getAlternatives_1() { return cAlternatives_1; } - - //DIGIT_NONZERO - public RuleCall getDIGIT_NONZEROTerminalRuleCall_1_0() { return cDIGIT_NONZEROTerminalRuleCall_1_0; } - - //ZERO - public RuleCall getZEROTerminalRuleCall_1_1() { return cZEROTerminalRuleCall_1_1; } - - //DIGIT_NONZERO | ZERO - public Alternatives getAlternatives_2() { return cAlternatives_2; } - - //DIGIT_NONZERO - public RuleCall getDIGIT_NONZEROTerminalRuleCall_2_0() { return cDIGIT_NONZEROTerminalRuleCall_2_0; } - - //ZERO - public RuleCall getZEROTerminalRuleCall_2_1() { return cZEROTerminalRuleCall_2_1; } - - //DIGIT_NONZERO | ZERO - public Alternatives getAlternatives_3() { return cAlternatives_3; } - - //DIGIT_NONZERO - public RuleCall getDIGIT_NONZEROTerminalRuleCall_3_0() { return cDIGIT_NONZEROTerminalRuleCall_3_0; } - - //ZERO - public RuleCall getZEROTerminalRuleCall_3_1() { return cZEROTerminalRuleCall_3_1; } - - //DIGIT_NONZERO | ZERO - public Alternatives getAlternatives_4() { return cAlternatives_4; } - - //DIGIT_NONZERO - public RuleCall getDIGIT_NONZEROTerminalRuleCall_4_0() { return cDIGIT_NONZEROTerminalRuleCall_4_0; } - - //ZERO - public RuleCall getZEROTerminalRuleCall_4_1() { return cZEROTerminalRuleCall_4_1; } - - //(DIGIT_NONZERO | ZERO)+ - public Alternatives getAlternatives_5() { return cAlternatives_5; } - - //DIGIT_NONZERO - public RuleCall getDIGIT_NONZEROTerminalRuleCall_5_0() { return cDIGIT_NONZEROTerminalRuleCall_5_0; } - - //ZERO - public RuleCall getZEROTerminalRuleCall_5_1() { return cZEROTerminalRuleCall_5_1; } - } - - public class TermCharacterElements extends AbstractParserRuleElementFinder { - private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "TermCharacter"); - private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); - private final RuleCall cDIGIT_NONZEROTerminalRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); - private final RuleCall cZEROTerminalRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1); - private final RuleCall cLETTERTerminalRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); - private final RuleCall cCOMMATerminalRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3); - private final RuleCall cOPENING_CURLY_BRACKETTerminalRuleCall_4 = (RuleCall)cAlternatives.eContents().get(4); - private final RuleCall cCLOSING_CURLY_BRACKETTerminalRuleCall_5 = (RuleCall)cAlternatives.eContents().get(5); - private final RuleCall cEQUAL_SIGNTerminalRuleCall_6 = (RuleCall)cAlternatives.eContents().get(6); - private final RuleCall cOPENING_ROUND_BRACKETTerminalRuleCall_7 = (RuleCall)cAlternatives.eContents().get(7); - private final RuleCall cCLOSING_ROUND_BRACKETTerminalRuleCall_8 = (RuleCall)cAlternatives.eContents().get(8); - private final RuleCall cPLUS_SIGNTerminalRuleCall_9 = (RuleCall)cAlternatives.eContents().get(9); - private final RuleCall cCOLONTerminalRuleCall_10 = (RuleCall)cAlternatives.eContents().get(10); - private final RuleCall cOTHER_ALLOWED_TERM_CHARACTERTerminalRuleCall_11 = (RuleCall)cAlternatives.eContents().get(11); - - //TermCharacter hidden(): - // - // DIGIT_NONZERO | ZERO | LETTER | COMMA | OPENING_CURLY_BRACKET | CLOSING_CURLY_BRACKET | EQUAL_SIGN | - // - // OPENING_ROUND_BRACKET | CLOSING_ROUND_BRACKET | PLUS_SIGN | COLON | OTHER_ALLOWED_TERM_CHARACTER; - public ParserRule getRule() { return rule; } - - //DIGIT_NONZERO | ZERO | LETTER | COMMA | OPENING_CURLY_BRACKET | CLOSING_CURLY_BRACKET | EQUAL_SIGN | - // - //OPENING_ROUND_BRACKET | CLOSING_ROUND_BRACKET | PLUS_SIGN | COLON | OTHER_ALLOWED_TERM_CHARACTER - public Alternatives getAlternatives() { return cAlternatives; } - - //DIGIT_NONZERO - public RuleCall getDIGIT_NONZEROTerminalRuleCall_0() { return cDIGIT_NONZEROTerminalRuleCall_0; } - - //ZERO - public RuleCall getZEROTerminalRuleCall_1() { return cZEROTerminalRuleCall_1; } - - //LETTER - public RuleCall getLETTERTerminalRuleCall_2() { return cLETTERTerminalRuleCall_2; } - - //COMMA - public RuleCall getCOMMATerminalRuleCall_3() { return cCOMMATerminalRuleCall_3; } - - //OPENING_CURLY_BRACKET - public RuleCall getOPENING_CURLY_BRACKETTerminalRuleCall_4() { return cOPENING_CURLY_BRACKETTerminalRuleCall_4; } - - //CLOSING_CURLY_BRACKET - public RuleCall getCLOSING_CURLY_BRACKETTerminalRuleCall_5() { return cCLOSING_CURLY_BRACKETTerminalRuleCall_5; } - - //EQUAL_SIGN - public RuleCall getEQUAL_SIGNTerminalRuleCall_6() { return cEQUAL_SIGNTerminalRuleCall_6; } - - //OPENING_ROUND_BRACKET - public RuleCall getOPENING_ROUND_BRACKETTerminalRuleCall_7() { return cOPENING_ROUND_BRACKETTerminalRuleCall_7; } - - //CLOSING_ROUND_BRACKET - public RuleCall getCLOSING_ROUND_BRACKETTerminalRuleCall_8() { return cCLOSING_ROUND_BRACKETTerminalRuleCall_8; } - - //PLUS_SIGN - public RuleCall getPLUS_SIGNTerminalRuleCall_9() { return cPLUS_SIGNTerminalRuleCall_9; } - - //COLON - public RuleCall getCOLONTerminalRuleCall_10() { return cCOLONTerminalRuleCall_10; } - - //OTHER_ALLOWED_TERM_CHARACTER - public RuleCall getOTHER_ALLOWED_TERM_CHARACTERTerminalRuleCall_11() { return cOTHER_ALLOWED_TERM_CHARACTERTerminalRuleCall_11; } - } - - - private ExpressionElements pExpression; - private ConceptElements pConcept; - private GroupElements pGroup; - private AttributeElements pAttribute; - private AttributeValueElements pAttributeValue; - private TermElements pTerm; - private ConceptIdElements pConceptId; - private TermCharacterElements pTermCharacter; - private TerminalRule tZERO; - private TerminalRule tDIGIT_NONZERO; - private TerminalRule tLETTER; - private TerminalRule tWS; - private TerminalRule tML_COMMENT; - private TerminalRule tSL_COMMENT; - private TerminalRule tPIPE; - private TerminalRule tCOLON; - private TerminalRule tOPENING_CURLY_BRACKET; - private TerminalRule tCLOSING_CURLY_BRACKET; - private TerminalRule tEQUAL_SIGN; - private TerminalRule tCOMMA; - private TerminalRule tOPENING_ROUND_BRACKET; - private TerminalRule tCLOSING_ROUND_BRACKET; - private TerminalRule tPLUS_SIGN; - private TerminalRule tOTHER_ALLOWED_TERM_CHARACTER; - - private final Grammar grammar; - - @Inject - public SCGGrammarAccess(GrammarProvider grammarProvider) { - this.grammar = internalFindGrammar(grammarProvider); - } - - protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { - Grammar grammar = grammarProvider.getGrammar(this); - while (grammar != null) { - if ("com.b2international.snowowl.dsl.SCG".equals(grammar.getName())) { - return grammar; - } - List grammars = grammar.getUsedGrammars(); - if (!grammars.isEmpty()) { - grammar = grammars.iterator().next(); - } else { - return null; - } - } - return grammar; - } - - - public Grammar getGrammar() { - return grammar; - } - - - - //Expression hidden(WS, SL_COMMENT, ML_COMMENT): - // - // concepts+=Concept (PLUS_SIGN concepts+=Concept)* (COLON (attributes+=Attribute (COMMA attributes+=Attribute)*)? - // - // groups+=Group*)?; - public ExpressionElements getExpressionAccess() { - return (pExpression != null) ? pExpression : (pExpression = new ExpressionElements()); - } - - public ParserRule getExpressionRule() { - return getExpressionAccess().getRule(); - } - - //Concept: - // - // id=ConceptId (PIPE WS* term=Term WS* PIPE)?; - public ConceptElements getConceptAccess() { - return (pConcept != null) ? pConcept : (pConcept = new ConceptElements()); - } - - public ParserRule getConceptRule() { - return getConceptAccess().getRule(); - } - - //Group: - // - // OPENING_CURLY_BRACKET attributes+=Attribute (COMMA attributes+=Attribute)* CLOSING_CURLY_BRACKET; - public GroupElements getGroupAccess() { - return (pGroup != null) ? pGroup : (pGroup = new GroupElements()); - } - - public ParserRule getGroupRule() { - return getGroupAccess().getRule(); - } - - //Attribute: - // - // name=Concept EQUAL_SIGN value=AttributeValue; - public AttributeElements getAttributeAccess() { - return (pAttribute != null) ? pAttribute : (pAttribute = new AttributeElements()); - } - - public ParserRule getAttributeRule() { - return getAttributeAccess().getRule(); - } - - //AttributeValue: - // - // Concept | OPENING_ROUND_BRACKET Expression CLOSING_ROUND_BRACKET; - public AttributeValueElements getAttributeValueAccess() { - return (pAttributeValue != null) ? pAttributeValue : (pAttributeValue = new AttributeValueElements()); - } - - public ParserRule getAttributeValueRule() { - return getAttributeValueAccess().getRule(); - } - - //Term hidden(): - // - // TermCharacter+ (WS+ TermCharacter+)*; - public TermElements getTermAccess() { - return (pTerm != null) ? pTerm : (pTerm = new TermElements()); - } - - public ParserRule getTermRule() { - return getTermAccess().getRule(); - } - - //ConceptId hidden(): - // - // DIGIT_NONZERO (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) - // - // (DIGIT_NONZERO | ZERO)+; - public ConceptIdElements getConceptIdAccess() { - return (pConceptId != null) ? pConceptId : (pConceptId = new ConceptIdElements()); - } - - public ParserRule getConceptIdRule() { - return getConceptIdAccess().getRule(); - } - - //TermCharacter hidden(): - // - // DIGIT_NONZERO | ZERO | LETTER | COMMA | OPENING_CURLY_BRACKET | CLOSING_CURLY_BRACKET | EQUAL_SIGN | - // - // OPENING_ROUND_BRACKET | CLOSING_ROUND_BRACKET | PLUS_SIGN | COLON | OTHER_ALLOWED_TERM_CHARACTER; - public TermCharacterElements getTermCharacterAccess() { - return (pTermCharacter != null) ? pTermCharacter : (pTermCharacter = new TermCharacterElements()); - } - - public ParserRule getTermCharacterRule() { - return getTermCharacterAccess().getRule(); - } - - //terminal ZERO: - // - // "0"; - public TerminalRule getZERORule() { - return (tZERO != null) ? tZERO : (tZERO = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "ZERO")); - } - - //terminal DIGIT_NONZERO: - // - // "1".."9"; - public TerminalRule getDIGIT_NONZERORule() { - return (tDIGIT_NONZERO != null) ? tDIGIT_NONZERO : (tDIGIT_NONZERO = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "DIGIT_NONZERO")); - } - - //terminal LETTER: - // - // "a".."z" | "A".."Z"; - public TerminalRule getLETTERRule() { - return (tLETTER != null) ? tLETTER : (tLETTER = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "LETTER")); - } - - //terminal WS: - // - // " " | "\t" | "\n" | "\r"; - public TerminalRule getWSRule() { - return (tWS != null) ? tWS : (tWS = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "WS")); - } - - //terminal ML_COMMENT: - // - // "/ *"->"* /"; - public TerminalRule getML_COMMENTRule() { - return (tML_COMMENT != null) ? tML_COMMENT : (tML_COMMENT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "ML_COMMENT")); - } - - //terminal SL_COMMENT: - // - // "//" !("\n" | "\r")* ("\r"? "\n")?; - public TerminalRule getSL_COMMENTRule() { - return (tSL_COMMENT != null) ? tSL_COMMENT : (tSL_COMMENT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "SL_COMMENT")); - } - - //terminal PIPE: - // - // "|"; - public TerminalRule getPIPERule() { - return (tPIPE != null) ? tPIPE : (tPIPE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "PIPE")); - } - - //terminal COLON: - // - // ":"; - public TerminalRule getCOLONRule() { - return (tCOLON != null) ? tCOLON : (tCOLON = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "COLON")); - } - - //terminal OPENING_CURLY_BRACKET: - // - // "{"; - public TerminalRule getOPENING_CURLY_BRACKETRule() { - return (tOPENING_CURLY_BRACKET != null) ? tOPENING_CURLY_BRACKET : (tOPENING_CURLY_BRACKET = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "OPENING_CURLY_BRACKET")); - } - - //terminal CLOSING_CURLY_BRACKET: - // - // "}"; - public TerminalRule getCLOSING_CURLY_BRACKETRule() { - return (tCLOSING_CURLY_BRACKET != null) ? tCLOSING_CURLY_BRACKET : (tCLOSING_CURLY_BRACKET = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "CLOSING_CURLY_BRACKET")); - } - - //terminal EQUAL_SIGN: - // - // "="; - public TerminalRule getEQUAL_SIGNRule() { - return (tEQUAL_SIGN != null) ? tEQUAL_SIGN : (tEQUAL_SIGN = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "EQUAL_SIGN")); - } - - //terminal COMMA: - // - // ","; - public TerminalRule getCOMMARule() { - return (tCOMMA != null) ? tCOMMA : (tCOMMA = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "COMMA")); - } - - //terminal OPENING_ROUND_BRACKET: - // - // "("; - public TerminalRule getOPENING_ROUND_BRACKETRule() { - return (tOPENING_ROUND_BRACKET != null) ? tOPENING_ROUND_BRACKET : (tOPENING_ROUND_BRACKET = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "OPENING_ROUND_BRACKET")); - } - - //terminal CLOSING_ROUND_BRACKET: - // - // ")"; - public TerminalRule getCLOSING_ROUND_BRACKETRule() { - return (tCLOSING_ROUND_BRACKET != null) ? tCLOSING_ROUND_BRACKET : (tCLOSING_ROUND_BRACKET = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "CLOSING_ROUND_BRACKET")); - } - - //terminal PLUS_SIGN: - // - // "+"; - public TerminalRule getPLUS_SIGNRule() { - return (tPLUS_SIGN != null) ? tPLUS_SIGN : (tPLUS_SIGN = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "PLUS_SIGN")); - } - - ////terminal OTHER_ALLOWED_TERM_CHARACTER : '-'|'/'|'\\'|';'|'.'|'?'|'_'|'<'|'>'|'['|']'; - // - // - //// ------ Original Snomed Composition Grammar (2008-12-23) ------ - // - // - ////expression = concept *("+" concept) [":" ws refinements ] - // //concept = ws conceptId ws ["|" ws term ws "|" ws] - // - // - ////conceptId = sctId - // //term = 1*nonwsnonpipe *( 1*SP 1*nonwsnonpipe ) - // - // - ////refinements = ( attributeSet *attributeGroup ) / 1*attributeGroup - // //attributeGroup = "{" attributeSet "}" ws - // - // - ////attributeSet = attribute *("," attribute) - // //attribute = attributeName "=" attributeValue - // - // - ////attributeName = ws attributeNameId ws ["|" ws term ws "|" ws] - // - // - ////attributeValue = concept / (ws "(" expression ")" ws) - // //attributeNameId = sctId - // - // - ////sctId = digitNonZero 5*17( digit ) - // //ws =*(SP/HTAB/CR/LF) ;whitespace - // //SP = %x20 - // //HTAB = %x09 - // //CR = %x0D - // - // - ////LF = %x0A - // //digit = %x30-39 - // //digitNonZero = %x31-39 ; digits 1 through 9, but excluding 0 - // - // - ////nonwsnonpipe = %x21-7B / %x7D-7E / UTF8-2 / UTF8-3 / UTF8-4 - // terminal OTHER_ALLOWED_TERM_CHARACTER: - // - // .; - public TerminalRule getOTHER_ALLOWED_TERM_CHARACTERRule() { - return (tOTHER_ALLOWED_TERM_CHARACTER != null) ? tOTHER_ALLOWED_TERM_CHARACTER : (tOTHER_ALLOWED_TERM_CHARACTER = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "OTHER_ALLOWED_TERM_CHARACTER")); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/AbstractScgRuntimeModule.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/AbstractScgRuntimeModule.java new file mode 100644 index 00000000000..83c7c2c7a60 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/AbstractScgRuntimeModule.java @@ -0,0 +1,226 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg; + +import com.b2international.snowowl.snomed.scg.generator.ScgGenerator; +import com.b2international.snowowl.snomed.scg.parser.antlr.ScgAntlrTokenFileProvider; +import com.b2international.snowowl.snomed.scg.parser.antlr.ScgParser; +import com.b2international.snowowl.snomed.scg.parser.antlr.lexer.InternalScgLexer; +import com.b2international.snowowl.snomed.scg.scoping.ScgScopeProvider; +import com.b2international.snowowl.snomed.scg.serializer.ScgSemanticSequencer; +import com.b2international.snowowl.snomed.scg.serializer.ScgSyntacticSequencer; +import com.b2international.snowowl.snomed.scg.services.ScgGrammarAccess; +import com.b2international.snowowl.snomed.scg.validation.ScgValidator; +import com.google.inject.Binder; +import com.google.inject.Provider; +import com.google.inject.name.Names; +import java.util.Properties; +import org.eclipse.xtext.Constants; +import org.eclipse.xtext.IGrammarAccess; +import org.eclipse.xtext.conversion.impl.AbstractIDValueConverter; +import org.eclipse.xtext.conversion.impl.IgnoreCaseIDValueConverter; +import org.eclipse.xtext.generator.IGenerator2; +import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; +import org.eclipse.xtext.naming.IQualifiedNameProvider; +import org.eclipse.xtext.parser.IParser; +import org.eclipse.xtext.parser.ITokenToStringConverter; +import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider; +import org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter; +import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; +import org.eclipse.xtext.parser.antlr.ITokenDefProvider; +import org.eclipse.xtext.parser.antlr.Lexer; +import org.eclipse.xtext.parser.antlr.LexerBindings; +import org.eclipse.xtext.parser.antlr.LexerProvider; +import org.eclipse.xtext.parsetree.reconstr.ITokenSerializer; +import org.eclipse.xtext.parsetree.reconstr.impl.IgnoreCaseKeywordSerializer; +import org.eclipse.xtext.resource.IContainer; +import org.eclipse.xtext.resource.IResourceDescriptions; +import org.eclipse.xtext.resource.containers.IAllContainersState; +import org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider; +import org.eclipse.xtext.resource.containers.StateBasedContainerManager; +import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider; +import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions; +import org.eclipse.xtext.scoping.IGlobalScopeProvider; +import org.eclipse.xtext.scoping.IScopeProvider; +import org.eclipse.xtext.scoping.IgnoreCaseLinking; +import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; +import org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider; +import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider; +import org.eclipse.xtext.serializer.ISerializer; +import org.eclipse.xtext.serializer.impl.Serializer; +import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer; +import org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer; +import org.eclipse.xtext.serializer.tokens.IKeywordSerializer; +import org.eclipse.xtext.service.DefaultRuntimeModule; +import org.eclipse.xtext.service.SingletonBinding; + +/** + * Manual modifications go to {@link ScgRuntimeModule}. + */ +@SuppressWarnings("all") +public abstract class AbstractScgRuntimeModule extends DefaultRuntimeModule { + + protected Properties properties = null; + + @Override + public void configure(Binder binder) { + properties = tryBindProperties(binder, "com/b2international/snowowl/snomed/scg/Scg.properties"); + super.configure(binder); + } + + public void configureLanguageName(Binder binder) { + binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("com.b2international.snowowl.snomed.scg.Scg"); + } + + public void configureFileExtensions(Binder binder) { + if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null) + binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("scg"); + } + + // contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2 + public ClassLoader bindClassLoaderToInstance() { + return getClass().getClassLoader(); + } + + // contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2 + public Class bindIGrammarAccess() { + return ScgGrammarAccess.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISemanticSequencer() { + return ScgSemanticSequencer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISyntacticSequencer() { + return ScgSyntacticSequencer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 + public Class bindISerializer() { + return Serializer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIParser() { + return ScgParser.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindITokenToStringConverter() { + return AntlrTokenToStringConverter.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIAntlrTokenFileProvider() { + return ScgAntlrTokenFileProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindLexer() { + return InternalScgLexer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindITokenDefProvider() { + return AntlrTokenDefProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Provider provideInternalScgLexer() { + return LexerProvider.create(InternalScgLexer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public void configureRuntimeLexer(Binder binder) { + binder.bind(Lexer.class) + .annotatedWith(Names.named(LexerBindings.RUNTIME)) + .to(InternalScgLexer.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindITokenSerializer$IKeywordSerializer() { + return IgnoreCaseKeywordSerializer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindIKeywordSerializer() { + return org.eclipse.xtext.serializer.tokens.IgnoreCaseKeywordSerializer.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 + public Class bindAbstractIDValueConverter() { + return IgnoreCaseIDValueConverter.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2 + @SingletonBinding(eager=true) + public Class bindScgValidator() { + return ScgValidator.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public Class bindIScopeProvider() { + return ScgScopeProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public void configureIScopeProviderDelegate(Binder binder) { + binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(ImportedNamespaceAwareLocalScopeProvider.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public Class bindIGlobalScopeProvider() { + return DefaultGlobalScopeProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 + public void configureIgnoreCaseLinking(Binder binder) { + binder.bindConstant().annotatedWith(IgnoreCaseLinking.class).to(false); + } + + // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 + public Class bindIQualifiedNameProvider() { + return DefaultDeclarativeQualifiedNameProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public Class bindIContainer$Manager() { + return StateBasedContainerManager.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public Class bindIAllContainersState$Provider() { + return ResourceSetBasedAllContainersStateProvider.class; + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public void configureIResourceDescriptions(Binder binder) { + binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 + public void configureIResourceDescriptionsPersisted(Binder binder) { + binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class); + } + + // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 + public Class bindIGenerator2() { + return ScgGenerator.class; + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/Scg.xtextbin b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/Scg.xtextbin new file mode 100644 index 0000000000000000000000000000000000000000..4671b42e7db94c250cac45536e143bbe8e373470 GIT binary patch literal 3644 zcma)8cYGXI5!US6-P1M6j!l4oAvht4rC93-2#&GhS)DGj9O+KEJK1p(5bL|A)8cFF ztt^=&gc3>!B|s>l_ufM>B~$~ZL#UzG&`mWZ)S0(M1@Zgk{_V=Fp*Gx8+N(<@j#96x0A%8xm|!%6pODa*>2ea~&xLC-pkkh3GQn;;(S74Jq;He^$_{I1apX78o) z=wjQe8RikEu^_cGAql3TB_YK_3er4e0U!gKmY$lN%@wDn@`Z}Xg3xqfg5C!SbKGk$ zbe4fdKY0mj05(8xdZy*O4YeailCo0tZ{+m>i(uh2#w{=7Zi;X>L&DJSp@1wn9g^9C ztUJD}DJU&db-Wtyr0XBm29}ZU35Fr=#Yv~&-aK&bXFy`L!yZH22h6o|WP9JhlYGq6 zV-1XvrX5cyuq(DeYSXxENqS#b5BJlcM_jl<5^EJqsBGew^%_&@0@h}1y80rp4)VN_lPu; z?GAI(_Qal%M7-hWL0^*7&pC~TVQ^vF)V|M*Rt`?*XN#AJfoR_cX$$n-yLYoV&WAo@ zI~n%nFPoXzZ%>l&W-CQ86xmvAJ2EoDwmTqeq-9*Psf{EqAopQNYklQ~L(61{2dPRQ ztcf16!LnAZf&LJd-GzkJH`lH%baQPw_Z`1$ioub@LkVvu;cX0Og0)8zH2N8L6xkFhNbrSEpL+iE2Y6p9I=uiKEQH*u?lmWwuZ(T#+vo z1?FPIG3f8l&67f_biPVXi<*+rkaIrfSvkU}2_S1u1%z+AV5 zbFK#=yH#7lm$}r4f-9HgLnEgpXph!-Qt$ zij&2Hz(x$$WVl^y-C_lM>LTOQrRr<5V~3QICb7{C#|r`W0$3d zzT$sDJs)9Q$EVBT(1I@mDdQpoFA;Fcj#dO74R9aBxEafeR|xiM#p5*urFxV~?%JSE zd@N&K$JNm}wI>BWF0StJTpgcJd;+-!myGg#BKurV@%!T_`}qbE_@p3-Cvy@TS0tg9 zDU+vAX(m2Z#l{;{T2EuJ8!3TwsW?*@n=MY~iQ}ioSv-TYIFGYtjy+qaVQjWS6@MU~VScNZF8~6&Iz6$V_upxQCZPfVgqr_eXNdsT4++Pz~ zyfy&fv|krK;_DUk8~F8Hz&A$FZ&J{24jtb@cQxQ!8S!lj@$KQlI|4sOd}sWqczG8W zbu00bouE&&y7WR~-W?G09ww&WvQ{qA?!8xqeINTCBSMV5c6qPB_s4X6fPq)%_Z=-zgpaBSALBad7Q>ITUk&gRJRaweV=Ck)zn5EE5 z;J1UUzr!q%Q1hd1JzOKO?<%nGMPz-S-HEIp@OYe3{2@R5XbmAT^p8Vm0{RI7>G)GN zKLPkN9`7Ww^|4|_;LnvEeJtWHnCl@f{+AI;zhYaW?bkf+i};C1qIdPf-$b4Hw`_Nk zu&I|$P1yo}7o-24(a$G)`~%VQKRxe{?775n_$OLV)cLbD?1z8mwNq5+az9dEwF3V_ z@U$C$<=t4>kJK`i^f#*9z`wKqU6fTiH&dEC7`C8)#Hsz0Q@ff&|7*R}{vD=<{|U>q zdwAv~*szYdt%c@b3wpA3ikk`I2A#|{qQJJvfv@GF`DZ60{9fo=d#!S~D68GUK-ev1}60gI", "", "", "", "RULE_EQUIVALENT_TO", "RULE_SUBTYPE_OF", "RULE_TERM_STRING", "RULE_ZERO", "RULE_DIGIT_NONZERO", "RULE_CURLY_OPEN", "RULE_CURLY_CLOSE", "RULE_COMMA", "RULE_EQUAL", "RULE_COLON", "RULE_PLUS", "RULE_DASH", "RULE_DOT", "RULE_ROUND_OPEN", "RULE_ROUND_CLOSE", "RULE_HASH", "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_STRING" + }; + public static final int RULE_DIGIT_NONZERO=8; + public static final int RULE_CURLY_OPEN=9; + public static final int RULE_ROUND_CLOSE=18; + public static final int RULE_STRING=23; + public static final int RULE_SL_COMMENT=22; + public static final int RULE_HASH=19; + public static final int RULE_EQUIVALENT_TO=4; + public static final int RULE_DASH=15; + public static final int RULE_ROUND_OPEN=17; + public static final int RULE_PLUS=14; + public static final int RULE_DOT=16; + public static final int EOF=-1; + public static final int RULE_EQUAL=12; + public static final int RULE_SUBTYPE_OF=5; + public static final int RULE_COMMA=11; + public static final int RULE_WS=20; + public static final int RULE_CURLY_CLOSE=10; + public static final int RULE_ZERO=7; + public static final int RULE_COLON=13; + public static final int RULE_ML_COMMENT=21; + public static final int RULE_TERM_STRING=6; + + // delegates + // delegators + + + public InternalScgParser(TokenStream input) { + this(input, new RecognizerSharedState()); + } + public InternalScgParser(TokenStream input, RecognizerSharedState state) { + super(input, state); + + } + + + public String[] getTokenNames() { return InternalScgParser.tokenNames; } + public String getGrammarFileName() { return "InternalScgParser.g"; } + + + + /* + This grammar contains a lot of empty actions to work around a bug in ANTLR. + Otherwise the ANTLR tool will create synpreds that cannot be compiled in some rare cases. + */ + + private ScgGrammarAccess grammarAccess; + + public InternalScgParser(TokenStream input, ScgGrammarAccess grammarAccess) { + this(input); + this.grammarAccess = grammarAccess; + registerRules(grammarAccess.getGrammar()); + } + + @Override + protected String getFirstRuleName() { + return "Expression"; + } + + @Override + protected ScgGrammarAccess getGrammarAccess() { + return grammarAccess; + } + + + + + // $ANTLR start "entryRuleExpression" + // InternalScgParser.g:75:1: entryRuleExpression returns [EObject current=null] : iv_ruleExpression= ruleExpression EOF ; + public final EObject entryRuleExpression() throws RecognitionException { + EObject current = null; + + EObject iv_ruleExpression = null; + + + try { + // InternalScgParser.g:75:51: (iv_ruleExpression= ruleExpression EOF ) + // InternalScgParser.g:76:2: iv_ruleExpression= ruleExpression EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getExpressionRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleExpression=ruleExpression(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleExpression; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleExpression" + + + // $ANTLR start "ruleExpression" + // InternalScgParser.g:82:1: ruleExpression returns [EObject current=null] : ( () ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO )? ( (lv_expression_3_0= ruleSubExpression ) ) )? ) ; + public final EObject ruleExpression() throws RecognitionException { + EObject current = null; + + Token lv_primitive_1_0=null; + Token this_EQUIVALENT_TO_2=null; + EObject lv_expression_3_0 = null; + + + + enterRule(); + + try { + // InternalScgParser.g:88:2: ( ( () ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO )? ( (lv_expression_3_0= ruleSubExpression ) ) )? ) ) + // InternalScgParser.g:89:2: ( () ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO )? ( (lv_expression_3_0= ruleSubExpression ) ) )? ) + { + // InternalScgParser.g:89:2: ( () ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO )? ( (lv_expression_3_0= ruleSubExpression ) ) )? ) + // InternalScgParser.g:90:3: () ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO )? ( (lv_expression_3_0= ruleSubExpression ) ) )? + { + // InternalScgParser.g:90:3: () + // InternalScgParser.g:91:4: + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + current = forceCreateModelElement( + grammarAccess.getExpressionAccess().getExpressionAction_0(), + current); + + } + + } + + // InternalScgParser.g:100:3: ( ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO )? ( (lv_expression_3_0= ruleSubExpression ) ) )? + int alt2=2; + int LA2_0 = input.LA(1); + + if ( ((LA2_0>=RULE_EQUIVALENT_TO && LA2_0<=RULE_SUBTYPE_OF)||LA2_0==RULE_DIGIT_NONZERO) ) { + alt2=1; + } + switch (alt2) { + case 1 : + // InternalScgParser.g:101:4: ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO )? ( (lv_expression_3_0= ruleSubExpression ) ) + { + // InternalScgParser.g:101:4: ( ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) | this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO )? + int alt1=3; + int LA1_0 = input.LA(1); + + if ( (LA1_0==RULE_SUBTYPE_OF) ) { + alt1=1; + } + else if ( (LA1_0==RULE_EQUIVALENT_TO) ) { + alt1=2; + } + switch (alt1) { + case 1 : + // InternalScgParser.g:102:5: ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) + { + // InternalScgParser.g:102:5: ( (lv_primitive_1_0= RULE_SUBTYPE_OF ) ) + // InternalScgParser.g:103:6: (lv_primitive_1_0= RULE_SUBTYPE_OF ) + { + // InternalScgParser.g:103:6: (lv_primitive_1_0= RULE_SUBTYPE_OF ) + // InternalScgParser.g:104:7: lv_primitive_1_0= RULE_SUBTYPE_OF + { + lv_primitive_1_0=(Token)match(input,RULE_SUBTYPE_OF,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_primitive_1_0, grammarAccess.getExpressionAccess().getPrimitiveSUBTYPE_OFTerminalRuleCall_1_0_0_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getExpressionRule()); + } + setWithLastConsumed( + current, + "primitive", + true, + "com.b2international.snowowl.snomed.scg.Scg.SUBTYPE_OF"); + + } + + } + + + } + + + } + break; + case 2 : + // InternalScgParser.g:121:5: this_EQUIVALENT_TO_2= RULE_EQUIVALENT_TO + { + this_EQUIVALENT_TO_2=(Token)match(input,RULE_EQUIVALENT_TO,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_EQUIVALENT_TO_2, grammarAccess.getExpressionAccess().getEQUIVALENT_TOTerminalRuleCall_1_0_1()); + + } + + } + break; + + } + + // InternalScgParser.g:126:4: ( (lv_expression_3_0= ruleSubExpression ) ) + // InternalScgParser.g:127:5: (lv_expression_3_0= ruleSubExpression ) + { + // InternalScgParser.g:127:5: (lv_expression_3_0= ruleSubExpression ) + // InternalScgParser.g:128:6: lv_expression_3_0= ruleSubExpression + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getExpressionAccess().getExpressionSubExpressionParserRuleCall_1_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_expression_3_0=ruleSubExpression(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getExpressionRule()); + } + set( + current, + "expression", + lv_expression_3_0, + "com.b2international.snowowl.snomed.scg.Scg.SubExpression"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleExpression" + + + // $ANTLR start "entryRuleSubExpression" + // InternalScgParser.g:150:1: entryRuleSubExpression returns [EObject current=null] : iv_ruleSubExpression= ruleSubExpression EOF ; + public final EObject entryRuleSubExpression() throws RecognitionException { + EObject current = null; + + EObject iv_ruleSubExpression = null; + + + try { + // InternalScgParser.g:150:54: (iv_ruleSubExpression= ruleSubExpression EOF ) + // InternalScgParser.g:151:2: iv_ruleSubExpression= ruleSubExpression EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSubExpressionRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSubExpression=ruleSubExpression(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSubExpression; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleSubExpression" + + + // $ANTLR start "ruleSubExpression" + // InternalScgParser.g:157:1: ruleSubExpression returns [EObject current=null] : ( ( (lv_focusConcepts_0_0= ruleConceptReference ) ) (this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleConceptReference ) ) )* (this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) )? ) ; + public final EObject ruleSubExpression() throws RecognitionException { + EObject current = null; + + Token this_PLUS_1=null; + Token this_COLON_3=null; + EObject lv_focusConcepts_0_0 = null; + + EObject lv_focusConcepts_2_0 = null; + + EObject lv_refinement_4_0 = null; + + + + enterRule(); + + try { + // InternalScgParser.g:163:2: ( ( ( (lv_focusConcepts_0_0= ruleConceptReference ) ) (this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleConceptReference ) ) )* (this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) )? ) ) + // InternalScgParser.g:164:2: ( ( (lv_focusConcepts_0_0= ruleConceptReference ) ) (this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleConceptReference ) ) )* (this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) )? ) + { + // InternalScgParser.g:164:2: ( ( (lv_focusConcepts_0_0= ruleConceptReference ) ) (this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleConceptReference ) ) )* (this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) )? ) + // InternalScgParser.g:165:3: ( (lv_focusConcepts_0_0= ruleConceptReference ) ) (this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleConceptReference ) ) )* (this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) )? + { + // InternalScgParser.g:165:3: ( (lv_focusConcepts_0_0= ruleConceptReference ) ) + // InternalScgParser.g:166:4: (lv_focusConcepts_0_0= ruleConceptReference ) + { + // InternalScgParser.g:166:4: (lv_focusConcepts_0_0= ruleConceptReference ) + // InternalScgParser.g:167:5: lv_focusConcepts_0_0= ruleConceptReference + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubExpressionAccess().getFocusConceptsConceptReferenceParserRuleCall_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_4); + lv_focusConcepts_0_0=ruleConceptReference(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSubExpressionRule()); + } + add( + current, + "focusConcepts", + lv_focusConcepts_0_0, + "com.b2international.snowowl.snomed.scg.Scg.ConceptReference"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + // InternalScgParser.g:184:3: (this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleConceptReference ) ) )* + loop3: + do { + int alt3=2; + int LA3_0 = input.LA(1); + + if ( (LA3_0==RULE_PLUS) ) { + alt3=1; + } + + + switch (alt3) { + case 1 : + // InternalScgParser.g:185:4: this_PLUS_1= RULE_PLUS ( (lv_focusConcepts_2_0= ruleConceptReference ) ) + { + this_PLUS_1=(Token)match(input,RULE_PLUS,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_PLUS_1, grammarAccess.getSubExpressionAccess().getPLUSTerminalRuleCall_1_0()); + + } + // InternalScgParser.g:189:4: ( (lv_focusConcepts_2_0= ruleConceptReference ) ) + // InternalScgParser.g:190:5: (lv_focusConcepts_2_0= ruleConceptReference ) + { + // InternalScgParser.g:190:5: (lv_focusConcepts_2_0= ruleConceptReference ) + // InternalScgParser.g:191:6: lv_focusConcepts_2_0= ruleConceptReference + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubExpressionAccess().getFocusConceptsConceptReferenceParserRuleCall_1_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_4); + lv_focusConcepts_2_0=ruleConceptReference(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSubExpressionRule()); + } + add( + current, + "focusConcepts", + lv_focusConcepts_2_0, + "com.b2international.snowowl.snomed.scg.Scg.ConceptReference"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + default : + break loop3; + } + } while (true); + + // InternalScgParser.g:209:3: (this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) )? + int alt4=2; + int LA4_0 = input.LA(1); + + if ( (LA4_0==RULE_COLON) ) { + alt4=1; + } + switch (alt4) { + case 1 : + // InternalScgParser.g:210:4: this_COLON_3= RULE_COLON ( (lv_refinement_4_0= ruleRefinement ) ) + { + this_COLON_3=(Token)match(input,RULE_COLON,FollowSets000.FOLLOW_5); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_COLON_3, grammarAccess.getSubExpressionAccess().getCOLONTerminalRuleCall_2_0()); + + } + // InternalScgParser.g:214:4: ( (lv_refinement_4_0= ruleRefinement ) ) + // InternalScgParser.g:215:5: (lv_refinement_4_0= ruleRefinement ) + { + // InternalScgParser.g:215:5: (lv_refinement_4_0= ruleRefinement ) + // InternalScgParser.g:216:6: lv_refinement_4_0= ruleRefinement + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getSubExpressionAccess().getRefinementRefinementParserRuleCall_2_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_refinement_4_0=ruleRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getSubExpressionRule()); + } + set( + current, + "refinement", + lv_refinement_4_0, + "com.b2international.snowowl.snomed.scg.Scg.Refinement"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleSubExpression" + + + // $ANTLR start "entryRuleRefinement" + // InternalScgParser.g:238:1: entryRuleRefinement returns [EObject current=null] : iv_ruleRefinement= ruleRefinement EOF ; + public final EObject entryRuleRefinement() throws RecognitionException { + EObject current = null; + + EObject iv_ruleRefinement = null; + + + try { + // InternalScgParser.g:238:51: (iv_ruleRefinement= ruleRefinement EOF ) + // InternalScgParser.g:239:2: iv_ruleRefinement= ruleRefinement EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getRefinementRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleRefinement=ruleRefinement(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleRefinement; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleRefinement" + + + // $ANTLR start "ruleRefinement" + // InternalScgParser.g:245:1: ruleRefinement returns [EObject current=null] : ( ( ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) | ( (lv_groups_3_0= ruleAttributeGroup ) ) ) ( (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) )* ) ; + public final EObject ruleRefinement() throws RecognitionException { + EObject current = null; + + Token this_COMMA_1=null; + Token this_COMMA_4=null; + EObject lv_attributes_0_0 = null; + + EObject lv_attributes_2_0 = null; + + EObject lv_groups_3_0 = null; + + EObject lv_groups_5_0 = null; + + + + enterRule(); + + try { + // InternalScgParser.g:251:2: ( ( ( ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) | ( (lv_groups_3_0= ruleAttributeGroup ) ) ) ( (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) )* ) ) + // InternalScgParser.g:252:2: ( ( ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) | ( (lv_groups_3_0= ruleAttributeGroup ) ) ) ( (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) )* ) + { + // InternalScgParser.g:252:2: ( ( ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) | ( (lv_groups_3_0= ruleAttributeGroup ) ) ) ( (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) )* ) + // InternalScgParser.g:253:3: ( ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) | ( (lv_groups_3_0= ruleAttributeGroup ) ) ) ( (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) )* + { + // InternalScgParser.g:253:3: ( ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) | ( (lv_groups_3_0= ruleAttributeGroup ) ) ) + int alt6=2; + int LA6_0 = input.LA(1); + + if ( (LA6_0==RULE_DIGIT_NONZERO) ) { + alt6=1; + } + else if ( (LA6_0==RULE_CURLY_OPEN) ) { + alt6=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 6, 0, input); + + throw nvae; + } + switch (alt6) { + case 1 : + // InternalScgParser.g:254:4: ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) + { + // InternalScgParser.g:254:4: ( ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* ) + // InternalScgParser.g:255:5: ( (lv_attributes_0_0= ruleAttribute ) ) (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* + { + // InternalScgParser.g:255:5: ( (lv_attributes_0_0= ruleAttribute ) ) + // InternalScgParser.g:256:6: (lv_attributes_0_0= ruleAttribute ) + { + // InternalScgParser.g:256:6: (lv_attributes_0_0= ruleAttribute ) + // InternalScgParser.g:257:7: lv_attributes_0_0= ruleAttribute + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getRefinementAccess().getAttributesAttributeParserRuleCall_0_0_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_6); + lv_attributes_0_0=ruleAttribute(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getRefinementRule()); + } + add( + current, + "attributes", + lv_attributes_0_0, + "com.b2international.snowowl.snomed.scg.Scg.Attribute"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + // InternalScgParser.g:274:5: (this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) )* + loop5: + do { + int alt5=2; + int LA5_0 = input.LA(1); + + if ( (LA5_0==RULE_COMMA) ) { + int LA5_1 = input.LA(2); + + if ( (LA5_1==RULE_DIGIT_NONZERO) ) { + alt5=1; + } + + + } + + + switch (alt5) { + case 1 : + // InternalScgParser.g:275:6: this_COMMA_1= RULE_COMMA ( (lv_attributes_2_0= ruleAttribute ) ) + { + this_COMMA_1=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_COMMA_1, grammarAccess.getRefinementAccess().getCOMMATerminalRuleCall_0_0_1_0()); + + } + // InternalScgParser.g:279:6: ( (lv_attributes_2_0= ruleAttribute ) ) + // InternalScgParser.g:280:7: (lv_attributes_2_0= ruleAttribute ) + { + // InternalScgParser.g:280:7: (lv_attributes_2_0= ruleAttribute ) + // InternalScgParser.g:281:8: lv_attributes_2_0= ruleAttribute + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getRefinementAccess().getAttributesAttributeParserRuleCall_0_0_1_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_6); + lv_attributes_2_0=ruleAttribute(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getRefinementRule()); + } + add( + current, + "attributes", + lv_attributes_2_0, + "com.b2international.snowowl.snomed.scg.Scg.Attribute"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + default : + break loop5; + } + } while (true); + + + } + + + } + break; + case 2 : + // InternalScgParser.g:301:4: ( (lv_groups_3_0= ruleAttributeGroup ) ) + { + // InternalScgParser.g:301:4: ( (lv_groups_3_0= ruleAttributeGroup ) ) + // InternalScgParser.g:302:5: (lv_groups_3_0= ruleAttributeGroup ) + { + // InternalScgParser.g:302:5: (lv_groups_3_0= ruleAttributeGroup ) + // InternalScgParser.g:303:6: lv_groups_3_0= ruleAttributeGroup + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getRefinementAccess().getGroupsAttributeGroupParserRuleCall_0_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_6); + lv_groups_3_0=ruleAttributeGroup(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getRefinementRule()); + } + add( + current, + "groups", + lv_groups_3_0, + "com.b2international.snowowl.snomed.scg.Scg.AttributeGroup"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + } + + // InternalScgParser.g:321:3: ( (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) )* + loop8: + do { + int alt8=2; + int LA8_0 = input.LA(1); + + if ( (LA8_0==RULE_CURLY_OPEN||LA8_0==RULE_COMMA) ) { + alt8=1; + } + + + switch (alt8) { + case 1 : + // InternalScgParser.g:322:4: (this_COMMA_4= RULE_COMMA )? ( (lv_groups_5_0= ruleAttributeGroup ) ) + { + // InternalScgParser.g:322:4: (this_COMMA_4= RULE_COMMA )? + int alt7=2; + int LA7_0 = input.LA(1); + + if ( (LA7_0==RULE_COMMA) ) { + alt7=1; + } + switch (alt7) { + case 1 : + // InternalScgParser.g:323:5: this_COMMA_4= RULE_COMMA + { + this_COMMA_4=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_5); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_COMMA_4, grammarAccess.getRefinementAccess().getCOMMATerminalRuleCall_1_0()); + + } + + } + break; + + } + + // InternalScgParser.g:328:4: ( (lv_groups_5_0= ruleAttributeGroup ) ) + // InternalScgParser.g:329:5: (lv_groups_5_0= ruleAttributeGroup ) + { + // InternalScgParser.g:329:5: (lv_groups_5_0= ruleAttributeGroup ) + // InternalScgParser.g:330:6: lv_groups_5_0= ruleAttributeGroup + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getRefinementAccess().getGroupsAttributeGroupParserRuleCall_1_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_6); + lv_groups_5_0=ruleAttributeGroup(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getRefinementRule()); + } + add( + current, + "groups", + lv_groups_5_0, + "com.b2international.snowowl.snomed.scg.Scg.AttributeGroup"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + default : + break loop8; + } + } while (true); + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleRefinement" + + + // $ANTLR start "entryRuleAttributeGroup" + // InternalScgParser.g:352:1: entryRuleAttributeGroup returns [EObject current=null] : iv_ruleAttributeGroup= ruleAttributeGroup EOF ; + public final EObject entryRuleAttributeGroup() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAttributeGroup = null; + + + try { + // InternalScgParser.g:352:55: (iv_ruleAttributeGroup= ruleAttributeGroup EOF ) + // InternalScgParser.g:353:2: iv_ruleAttributeGroup= ruleAttributeGroup EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAttributeGroupRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAttributeGroup=ruleAttributeGroup(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAttributeGroup; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAttributeGroup" + + + // $ANTLR start "ruleAttributeGroup" + // InternalScgParser.g:359:1: ruleAttributeGroup returns [EObject current=null] : (this_CURLY_OPEN_0= RULE_CURLY_OPEN ( (lv_attributes_1_0= ruleAttribute ) ) (this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) )* this_CURLY_CLOSE_4= RULE_CURLY_CLOSE ) ; + public final EObject ruleAttributeGroup() throws RecognitionException { + EObject current = null; + + Token this_CURLY_OPEN_0=null; + Token this_COMMA_2=null; + Token this_CURLY_CLOSE_4=null; + EObject lv_attributes_1_0 = null; + + EObject lv_attributes_3_0 = null; + + + + enterRule(); + + try { + // InternalScgParser.g:365:2: ( (this_CURLY_OPEN_0= RULE_CURLY_OPEN ( (lv_attributes_1_0= ruleAttribute ) ) (this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) )* this_CURLY_CLOSE_4= RULE_CURLY_CLOSE ) ) + // InternalScgParser.g:366:2: (this_CURLY_OPEN_0= RULE_CURLY_OPEN ( (lv_attributes_1_0= ruleAttribute ) ) (this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) )* this_CURLY_CLOSE_4= RULE_CURLY_CLOSE ) + { + // InternalScgParser.g:366:2: (this_CURLY_OPEN_0= RULE_CURLY_OPEN ( (lv_attributes_1_0= ruleAttribute ) ) (this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) )* this_CURLY_CLOSE_4= RULE_CURLY_CLOSE ) + // InternalScgParser.g:367:3: this_CURLY_OPEN_0= RULE_CURLY_OPEN ( (lv_attributes_1_0= ruleAttribute ) ) (this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) )* this_CURLY_CLOSE_4= RULE_CURLY_CLOSE + { + this_CURLY_OPEN_0=(Token)match(input,RULE_CURLY_OPEN,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_CURLY_OPEN_0, grammarAccess.getAttributeGroupAccess().getCURLY_OPENTerminalRuleCall_0()); + + } + // InternalScgParser.g:371:3: ( (lv_attributes_1_0= ruleAttribute ) ) + // InternalScgParser.g:372:4: (lv_attributes_1_0= ruleAttribute ) + { + // InternalScgParser.g:372:4: (lv_attributes_1_0= ruleAttribute ) + // InternalScgParser.g:373:5: lv_attributes_1_0= ruleAttribute + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeGroupAccess().getAttributesAttributeParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_7); + lv_attributes_1_0=ruleAttribute(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + } + add( + current, + "attributes", + lv_attributes_1_0, + "com.b2international.snowowl.snomed.scg.Scg.Attribute"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + // InternalScgParser.g:390:3: (this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) )* + loop9: + do { + int alt9=2; + int LA9_0 = input.LA(1); + + if ( (LA9_0==RULE_COMMA) ) { + alt9=1; + } + + + switch (alt9) { + case 1 : + // InternalScgParser.g:391:4: this_COMMA_2= RULE_COMMA ( (lv_attributes_3_0= ruleAttribute ) ) + { + this_COMMA_2=(Token)match(input,RULE_COMMA,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_COMMA_2, grammarAccess.getAttributeGroupAccess().getCOMMATerminalRuleCall_2_0()); + + } + // InternalScgParser.g:395:4: ( (lv_attributes_3_0= ruleAttribute ) ) + // InternalScgParser.g:396:5: (lv_attributes_3_0= ruleAttribute ) + { + // InternalScgParser.g:396:5: (lv_attributes_3_0= ruleAttribute ) + // InternalScgParser.g:397:6: lv_attributes_3_0= ruleAttribute + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeGroupAccess().getAttributesAttributeParserRuleCall_2_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_7); + lv_attributes_3_0=ruleAttribute(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeGroupRule()); + } + add( + current, + "attributes", + lv_attributes_3_0, + "com.b2international.snowowl.snomed.scg.Scg.Attribute"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + break; + + default : + break loop9; + } + } while (true); + + this_CURLY_CLOSE_4=(Token)match(input,RULE_CURLY_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_CURLY_CLOSE_4, grammarAccess.getAttributeGroupAccess().getCURLY_CLOSETerminalRuleCall_3()); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAttributeGroup" + + + // $ANTLR start "entryRuleAttribute" + // InternalScgParser.g:423:1: entryRuleAttribute returns [EObject current=null] : iv_ruleAttribute= ruleAttribute EOF ; + public final EObject entryRuleAttribute() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAttribute = null; + + + try { + // InternalScgParser.g:423:50: (iv_ruleAttribute= ruleAttribute EOF ) + // InternalScgParser.g:424:2: iv_ruleAttribute= ruleAttribute EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAttributeRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAttribute=ruleAttribute(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAttribute; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAttribute" + + + // $ANTLR start "ruleAttribute" + // InternalScgParser.g:430:1: ruleAttribute returns [EObject current=null] : ( ( (lv_name_0_0= ruleConceptReference ) ) this_EQUAL_1= RULE_EQUAL ( (lv_value_2_0= ruleAttributeValue ) ) ) ; + public final EObject ruleAttribute() throws RecognitionException { + EObject current = null; + + Token this_EQUAL_1=null; + EObject lv_name_0_0 = null; + + EObject lv_value_2_0 = null; + + + + enterRule(); + + try { + // InternalScgParser.g:436:2: ( ( ( (lv_name_0_0= ruleConceptReference ) ) this_EQUAL_1= RULE_EQUAL ( (lv_value_2_0= ruleAttributeValue ) ) ) ) + // InternalScgParser.g:437:2: ( ( (lv_name_0_0= ruleConceptReference ) ) this_EQUAL_1= RULE_EQUAL ( (lv_value_2_0= ruleAttributeValue ) ) ) + { + // InternalScgParser.g:437:2: ( ( (lv_name_0_0= ruleConceptReference ) ) this_EQUAL_1= RULE_EQUAL ( (lv_value_2_0= ruleAttributeValue ) ) ) + // InternalScgParser.g:438:3: ( (lv_name_0_0= ruleConceptReference ) ) this_EQUAL_1= RULE_EQUAL ( (lv_value_2_0= ruleAttributeValue ) ) + { + // InternalScgParser.g:438:3: ( (lv_name_0_0= ruleConceptReference ) ) + // InternalScgParser.g:439:4: (lv_name_0_0= ruleConceptReference ) + { + // InternalScgParser.g:439:4: (lv_name_0_0= ruleConceptReference ) + // InternalScgParser.g:440:5: lv_name_0_0= ruleConceptReference + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeAccess().getNameConceptReferenceParserRuleCall_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_8); + lv_name_0_0=ruleConceptReference(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeRule()); + } + set( + current, + "name", + lv_name_0_0, + "com.b2international.snowowl.snomed.scg.Scg.ConceptReference"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + this_EQUAL_1=(Token)match(input,RULE_EQUAL,FollowSets000.FOLLOW_9); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_EQUAL_1, grammarAccess.getAttributeAccess().getEQUALTerminalRuleCall_1()); + + } + // InternalScgParser.g:461:3: ( (lv_value_2_0= ruleAttributeValue ) ) + // InternalScgParser.g:462:4: (lv_value_2_0= ruleAttributeValue ) + { + // InternalScgParser.g:462:4: (lv_value_2_0= ruleAttributeValue ) + // InternalScgParser.g:463:5: lv_value_2_0= ruleAttributeValue + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeAccess().getValueAttributeValueParserRuleCall_2_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_2_0=ruleAttributeValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getAttributeRule()); + } + set( + current, + "value", + lv_value_2_0, + "com.b2international.snowowl.snomed.scg.Scg.AttributeValue"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAttribute" + + + // $ANTLR start "entryRuleAttributeValue" + // InternalScgParser.g:484:1: entryRuleAttributeValue returns [EObject current=null] : iv_ruleAttributeValue= ruleAttributeValue EOF ; + public final EObject entryRuleAttributeValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleAttributeValue = null; + + + try { + // InternalScgParser.g:484:55: (iv_ruleAttributeValue= ruleAttributeValue EOF ) + // InternalScgParser.g:485:2: iv_ruleAttributeValue= ruleAttributeValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getAttributeValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleAttributeValue=ruleAttributeValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleAttributeValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleAttributeValue" + + + // $ANTLR start "ruleAttributeValue" + // InternalScgParser.g:491:1: ruleAttributeValue returns [EObject current=null] : (this_ConceptReference_0= ruleConceptReference | (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) | this_StringValue_4= ruleStringValue | this_IntegerValue_5= ruleIntegerValue | this_DecimalValue_6= ruleDecimalValue ) ; + public final EObject ruleAttributeValue() throws RecognitionException { + EObject current = null; + + Token this_ROUND_OPEN_1=null; + Token this_ROUND_CLOSE_3=null; + EObject this_ConceptReference_0 = null; + + EObject this_SubExpression_2 = null; + + EObject this_StringValue_4 = null; + + EObject this_IntegerValue_5 = null; + + EObject this_DecimalValue_6 = null; + + + + enterRule(); + + try { + // InternalScgParser.g:497:2: ( (this_ConceptReference_0= ruleConceptReference | (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) | this_StringValue_4= ruleStringValue | this_IntegerValue_5= ruleIntegerValue | this_DecimalValue_6= ruleDecimalValue ) ) + // InternalScgParser.g:498:2: (this_ConceptReference_0= ruleConceptReference | (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) | this_StringValue_4= ruleStringValue | this_IntegerValue_5= ruleIntegerValue | this_DecimalValue_6= ruleDecimalValue ) + { + // InternalScgParser.g:498:2: (this_ConceptReference_0= ruleConceptReference | (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) | this_StringValue_4= ruleStringValue | this_IntegerValue_5= ruleIntegerValue | this_DecimalValue_6= ruleDecimalValue ) + int alt10=5; + alt10 = dfa10.predict(input); + switch (alt10) { + case 1 : + // InternalScgParser.g:499:3: this_ConceptReference_0= ruleConceptReference + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeValueAccess().getConceptReferenceParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_ConceptReference_0=ruleConceptReference(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_ConceptReference_0; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 2 : + // InternalScgParser.g:511:3: (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) + { + // InternalScgParser.g:511:3: (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) + // InternalScgParser.g:512:4: this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE + { + this_ROUND_OPEN_1=(Token)match(input,RULE_ROUND_OPEN,FollowSets000.FOLLOW_3); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_OPEN_1, grammarAccess.getAttributeValueAccess().getROUND_OPENTerminalRuleCall_1_0()); + + } + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeValueAccess().getSubExpressionParserRuleCall_1_1()); + + } + pushFollow(FollowSets000.FOLLOW_10); + this_SubExpression_2=ruleSubExpression(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_SubExpression_2; + afterParserOrEnumRuleCall(); + + } + this_ROUND_CLOSE_3=(Token)match(input,RULE_ROUND_CLOSE,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_ROUND_CLOSE_3, grammarAccess.getAttributeValueAccess().getROUND_CLOSETerminalRuleCall_1_2()); + + } + + } + + + } + break; + case 3 : + // InternalScgParser.g:533:3: this_StringValue_4= ruleStringValue + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeValueAccess().getStringValueParserRuleCall_2()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_StringValue_4=ruleStringValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_StringValue_4; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 4 : + // InternalScgParser.g:545:3: this_IntegerValue_5= ruleIntegerValue + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeValueAccess().getIntegerValueParserRuleCall_3()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_IntegerValue_5=ruleIntegerValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_IntegerValue_5; + afterParserOrEnumRuleCall(); + + } + + } + break; + case 5 : + // InternalScgParser.g:557:3: this_DecimalValue_6= ruleDecimalValue + { + if ( state.backtracking==0 ) { + + /* */ + + } + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getAttributeValueAccess().getDecimalValueParserRuleCall_4()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_DecimalValue_6=ruleDecimalValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current = this_DecimalValue_6; + afterParserOrEnumRuleCall(); + + } + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleAttributeValue" + + + // $ANTLR start "entryRuleStringValue" + // InternalScgParser.g:572:1: entryRuleStringValue returns [EObject current=null] : iv_ruleStringValue= ruleStringValue EOF ; + public final EObject entryRuleStringValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleStringValue = null; + + + try { + // InternalScgParser.g:572:52: (iv_ruleStringValue= ruleStringValue EOF ) + // InternalScgParser.g:573:2: iv_ruleStringValue= ruleStringValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getStringValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleStringValue=ruleStringValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleStringValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleStringValue" + + + // $ANTLR start "ruleStringValue" + // InternalScgParser.g:579:1: ruleStringValue returns [EObject current=null] : ( (lv_value_0_0= RULE_STRING ) ) ; + public final EObject ruleStringValue() throws RecognitionException { + EObject current = null; + + Token lv_value_0_0=null; + + + enterRule(); + + try { + // InternalScgParser.g:585:2: ( ( (lv_value_0_0= RULE_STRING ) ) ) + // InternalScgParser.g:586:2: ( (lv_value_0_0= RULE_STRING ) ) + { + // InternalScgParser.g:586:2: ( (lv_value_0_0= RULE_STRING ) ) + // InternalScgParser.g:587:3: (lv_value_0_0= RULE_STRING ) + { + // InternalScgParser.g:587:3: (lv_value_0_0= RULE_STRING ) + // InternalScgParser.g:588:4: lv_value_0_0= RULE_STRING + { + lv_value_0_0=(Token)match(input,RULE_STRING,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_value_0_0, grammarAccess.getStringValueAccess().getValueSTRINGTerminalRuleCall_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getStringValueRule()); + } + setWithLastConsumed( + current, + "value", + lv_value_0_0, + "com.b2international.snowowl.snomed.scg.Scg.STRING"); + + } + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleStringValue" + + + // $ANTLR start "entryRuleIntegerValue" + // InternalScgParser.g:607:1: entryRuleIntegerValue returns [EObject current=null] : iv_ruleIntegerValue= ruleIntegerValue EOF ; + public final EObject entryRuleIntegerValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleIntegerValue = null; + + + try { + // InternalScgParser.g:607:53: (iv_ruleIntegerValue= ruleIntegerValue EOF ) + // InternalScgParser.g:608:2: iv_ruleIntegerValue= ruleIntegerValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getIntegerValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleIntegerValue=ruleIntegerValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleIntegerValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleIntegerValue" + + + // $ANTLR start "ruleIntegerValue" + // InternalScgParser.g:614:1: ruleIntegerValue returns [EObject current=null] : (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleInteger ) ) ) ; + public final EObject ruleIntegerValue() throws RecognitionException { + EObject current = null; + + Token this_HASH_0=null; + AntlrDatatypeRuleToken lv_value_1_0 = null; + + + + enterRule(); + + try { + // InternalScgParser.g:620:2: ( (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleInteger ) ) ) ) + // InternalScgParser.g:621:2: (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleInteger ) ) ) + { + // InternalScgParser.g:621:2: (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleInteger ) ) ) + // InternalScgParser.g:622:3: this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleInteger ) ) + { + this_HASH_0=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_11); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_0, grammarAccess.getIntegerValueAccess().getHASHTerminalRuleCall_0()); + + } + // InternalScgParser.g:626:3: ( (lv_value_1_0= ruleInteger ) ) + // InternalScgParser.g:627:4: (lv_value_1_0= ruleInteger ) + { + // InternalScgParser.g:627:4: (lv_value_1_0= ruleInteger ) + // InternalScgParser.g:628:5: lv_value_1_0= ruleInteger + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getIntegerValueAccess().getValueIntegerParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_1_0=ruleInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getIntegerValueRule()); + } + set( + current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.scg.Scg.Integer"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleIntegerValue" + + + // $ANTLR start "entryRuleDecimalValue" + // InternalScgParser.g:649:1: entryRuleDecimalValue returns [EObject current=null] : iv_ruleDecimalValue= ruleDecimalValue EOF ; + public final EObject entryRuleDecimalValue() throws RecognitionException { + EObject current = null; + + EObject iv_ruleDecimalValue = null; + + + try { + // InternalScgParser.g:649:53: (iv_ruleDecimalValue= ruleDecimalValue EOF ) + // InternalScgParser.g:650:2: iv_ruleDecimalValue= ruleDecimalValue EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDecimalValueRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDecimalValue=ruleDecimalValue(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDecimalValue; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleDecimalValue" + + + // $ANTLR start "ruleDecimalValue" + // InternalScgParser.g:656:1: ruleDecimalValue returns [EObject current=null] : (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleDecimal ) ) ) ; + public final EObject ruleDecimalValue() throws RecognitionException { + EObject current = null; + + Token this_HASH_0=null; + AntlrDatatypeRuleToken lv_value_1_0 = null; + + + + enterRule(); + + try { + // InternalScgParser.g:662:2: ( (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleDecimal ) ) ) ) + // InternalScgParser.g:663:2: (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleDecimal ) ) ) + { + // InternalScgParser.g:663:2: (this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleDecimal ) ) ) + // InternalScgParser.g:664:3: this_HASH_0= RULE_HASH ( (lv_value_1_0= ruleDecimal ) ) + { + this_HASH_0=(Token)match(input,RULE_HASH,FollowSets000.FOLLOW_11); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(this_HASH_0, grammarAccess.getDecimalValueAccess().getHASHTerminalRuleCall_0()); + + } + // InternalScgParser.g:668:3: ( (lv_value_1_0= ruleDecimal ) ) + // InternalScgParser.g:669:4: (lv_value_1_0= ruleDecimal ) + { + // InternalScgParser.g:669:4: (lv_value_1_0= ruleDecimal ) + // InternalScgParser.g:670:5: lv_value_1_0= ruleDecimal + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDecimalValueAccess().getValueDecimalParserRuleCall_1_0()); + + } + pushFollow(FollowSets000.FOLLOW_2); + lv_value_1_0=ruleDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getDecimalValueRule()); + } + set( + current, + "value", + lv_value_1_0, + "com.b2international.snowowl.snomed.scg.Scg.Decimal"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleDecimalValue" + + + // $ANTLR start "entryRuleConceptReference" + // InternalScgParser.g:691:1: entryRuleConceptReference returns [EObject current=null] : iv_ruleConceptReference= ruleConceptReference EOF ; + public final EObject entryRuleConceptReference() throws RecognitionException { + EObject current = null; + + EObject iv_ruleConceptReference = null; + + + try { + // InternalScgParser.g:691:57: (iv_ruleConceptReference= ruleConceptReference EOF ) + // InternalScgParser.g:692:2: iv_ruleConceptReference= ruleConceptReference EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getConceptReferenceRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleConceptReference=ruleConceptReference(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleConceptReference; + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "entryRuleConceptReference" + + + // $ANTLR start "ruleConceptReference" + // InternalScgParser.g:698:1: ruleConceptReference returns [EObject current=null] : ( ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? ) ; + public final EObject ruleConceptReference() throws RecognitionException { + EObject current = null; + + Token lv_term_1_0=null; + AntlrDatatypeRuleToken lv_id_0_0 = null; + + + + enterRule(); + + try { + // InternalScgParser.g:704:2: ( ( ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? ) ) + // InternalScgParser.g:705:2: ( ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? ) + { + // InternalScgParser.g:705:2: ( ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? ) + // InternalScgParser.g:706:3: ( (lv_id_0_0= ruleSnomedIdentifier ) ) ( (lv_term_1_0= RULE_TERM_STRING ) )? + { + // InternalScgParser.g:706:3: ( (lv_id_0_0= ruleSnomedIdentifier ) ) + // InternalScgParser.g:707:4: (lv_id_0_0= ruleSnomedIdentifier ) + { + // InternalScgParser.g:707:4: (lv_id_0_0= ruleSnomedIdentifier ) + // InternalScgParser.g:708:5: lv_id_0_0= ruleSnomedIdentifier + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getConceptReferenceAccess().getIdSnomedIdentifierParserRuleCall_0_0()); + + } + pushFollow(FollowSets000.FOLLOW_12); + lv_id_0_0=ruleSnomedIdentifier(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElementForParent(grammarAccess.getConceptReferenceRule()); + } + set( + current, + "id", + lv_id_0_0, + "com.b2international.snowowl.snomed.scg.Scg.SnomedIdentifier"); + afterParserOrEnumRuleCall(); + + } + + } + + + } + + // InternalScgParser.g:725:3: ( (lv_term_1_0= RULE_TERM_STRING ) )? + int alt11=2; + int LA11_0 = input.LA(1); + + if ( (LA11_0==RULE_TERM_STRING) ) { + alt11=1; + } + switch (alt11) { + case 1 : + // InternalScgParser.g:726:4: (lv_term_1_0= RULE_TERM_STRING ) + { + // InternalScgParser.g:726:4: (lv_term_1_0= RULE_TERM_STRING ) + // InternalScgParser.g:727:5: lv_term_1_0= RULE_TERM_STRING + { + lv_term_1_0=(Token)match(input,RULE_TERM_STRING,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + newLeafNode(lv_term_1_0, grammarAccess.getConceptReferenceAccess().getTermTERM_STRINGTerminalRuleCall_1_0()); + + } + if ( state.backtracking==0 ) { + + if (current==null) { + current = createModelElement(grammarAccess.getConceptReferenceRule()); + } + setWithLastConsumed( + current, + "term", + lv_term_1_0, + "com.b2international.snowowl.snomed.scg.Scg.TERM_STRING"); + + } + + } + + + } + break; + + } + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + } + return current; + } + // $ANTLR end "ruleConceptReference" + + + // $ANTLR start "entryRuleSnomedIdentifier" + // InternalScgParser.g:747:1: entryRuleSnomedIdentifier returns [String current=null] : iv_ruleSnomedIdentifier= ruleSnomedIdentifier EOF ; + public final String entryRuleSnomedIdentifier() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleSnomedIdentifier = null; + + + + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalScgParser.g:749:2: (iv_ruleSnomedIdentifier= ruleSnomedIdentifier EOF ) + // InternalScgParser.g:750:2: iv_ruleSnomedIdentifier= ruleSnomedIdentifier EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getSnomedIdentifierRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleSnomedIdentifier=ruleSnomedIdentifier(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleSnomedIdentifier.getText(); + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "entryRuleSnomedIdentifier" + + + // $ANTLR start "ruleSnomedIdentifier" + // InternalScgParser.g:759:1: ruleSnomedIdentifier returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ ) ; + public final AntlrDatatypeRuleToken ruleSnomedIdentifier() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_DIGIT_NONZERO_0=null; + Token this_DIGIT_NONZERO_1=null; + Token this_ZERO_2=null; + Token this_DIGIT_NONZERO_3=null; + Token this_ZERO_4=null; + Token this_DIGIT_NONZERO_5=null; + Token this_ZERO_6=null; + Token this_DIGIT_NONZERO_7=null; + Token this_ZERO_8=null; + Token this_DIGIT_NONZERO_9=null; + Token this_ZERO_10=null; + + + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalScgParser.g:766:2: ( (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ ) ) + // InternalScgParser.g:767:2: (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ ) + { + // InternalScgParser.g:767:2: (this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ ) + // InternalScgParser.g:768:3: this_DIGIT_NONZERO_0= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ + { + this_DIGIT_NONZERO_0=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_13); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_0); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_0, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_0()); + + } + // InternalScgParser.g:775:3: (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO | this_ZERO_2= RULE_ZERO ) + int alt12=2; + int LA12_0 = input.LA(1); + + if ( (LA12_0==RULE_DIGIT_NONZERO) ) { + alt12=1; + } + else if ( (LA12_0==RULE_ZERO) ) { + alt12=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 12, 0, input); + + throw nvae; + } + switch (alt12) { + case 1 : + // InternalScgParser.g:776:4: this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_1=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_13); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_1); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_1, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_1_0()); + + } + + } + break; + case 2 : + // InternalScgParser.g:784:4: this_ZERO_2= RULE_ZERO + { + this_ZERO_2=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_13); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_2); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_2, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_1_1()); + + } + + } + break; + + } + + // InternalScgParser.g:792:3: (this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO | this_ZERO_4= RULE_ZERO ) + int alt13=2; + int LA13_0 = input.LA(1); + + if ( (LA13_0==RULE_DIGIT_NONZERO) ) { + alt13=1; + } + else if ( (LA13_0==RULE_ZERO) ) { + alt13=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 13, 0, input); + + throw nvae; + } + switch (alt13) { + case 1 : + // InternalScgParser.g:793:4: this_DIGIT_NONZERO_3= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_3=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_13); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_3); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_3, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_2_0()); + + } + + } + break; + case 2 : + // InternalScgParser.g:801:4: this_ZERO_4= RULE_ZERO + { + this_ZERO_4=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_13); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_4); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_4, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_2_1()); + + } + + } + break; + + } + + // InternalScgParser.g:809:3: (this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO | this_ZERO_6= RULE_ZERO ) + int alt14=2; + int LA14_0 = input.LA(1); + + if ( (LA14_0==RULE_DIGIT_NONZERO) ) { + alt14=1; + } + else if ( (LA14_0==RULE_ZERO) ) { + alt14=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 14, 0, input); + + throw nvae; + } + switch (alt14) { + case 1 : + // InternalScgParser.g:810:4: this_DIGIT_NONZERO_5= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_5=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_13); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_5); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_5, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_3_0()); + + } + + } + break; + case 2 : + // InternalScgParser.g:818:4: this_ZERO_6= RULE_ZERO + { + this_ZERO_6=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_13); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_6); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_6, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_3_1()); + + } + + } + break; + + } + + // InternalScgParser.g:826:3: (this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO | this_ZERO_8= RULE_ZERO ) + int alt15=2; + int LA15_0 = input.LA(1); + + if ( (LA15_0==RULE_DIGIT_NONZERO) ) { + alt15=1; + } + else if ( (LA15_0==RULE_ZERO) ) { + alt15=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 15, 0, input); + + throw nvae; + } + switch (alt15) { + case 1 : + // InternalScgParser.g:827:4: this_DIGIT_NONZERO_7= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_7=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_13); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_7); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_7, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_4_0()); + + } + + } + break; + case 2 : + // InternalScgParser.g:835:4: this_ZERO_8= RULE_ZERO + { + this_ZERO_8=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_13); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_8); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_8, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_4_1()); + + } + + } + break; + + } + + // InternalScgParser.g:843:3: (this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO | this_ZERO_10= RULE_ZERO )+ + int cnt16=0; + loop16: + do { + int alt16=3; + int LA16_0 = input.LA(1); + + if ( (LA16_0==RULE_DIGIT_NONZERO) ) { + alt16=1; + } + else if ( (LA16_0==RULE_ZERO) ) { + alt16=2; + } + + + switch (alt16) { + case 1 : + // InternalScgParser.g:844:4: this_DIGIT_NONZERO_9= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_9=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_9); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_9, grammarAccess.getSnomedIdentifierAccess().getDIGIT_NONZEROTerminalRuleCall_5_0()); + + } + + } + break; + case 2 : + // InternalScgParser.g:852:4: this_ZERO_10= RULE_ZERO + { + this_ZERO_10=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_10); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_10, grammarAccess.getSnomedIdentifierAccess().getZEROTerminalRuleCall_5_1()); + + } + + } + break; + + default : + if ( cnt16 >= 1 ) break loop16; + if (state.backtracking>0) {state.failed=true; return current;} + EarlyExitException eee = + new EarlyExitException(16, input); + throw eee; + } + cnt16++; + } while (true); + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "ruleSnomedIdentifier" + + + // $ANTLR start "entryRuleNonNegativeInteger" + // InternalScgParser.g:867:1: entryRuleNonNegativeInteger returns [String current=null] : iv_ruleNonNegativeInteger= ruleNonNegativeInteger EOF ; + public final String entryRuleNonNegativeInteger() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleNonNegativeInteger = null; + + + + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalScgParser.g:869:2: (iv_ruleNonNegativeInteger= ruleNonNegativeInteger EOF ) + // InternalScgParser.g:870:2: iv_ruleNonNegativeInteger= ruleNonNegativeInteger EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getNonNegativeIntegerRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleNonNegativeInteger=ruleNonNegativeInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleNonNegativeInteger.getText(); + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "entryRuleNonNegativeInteger" + + + // $ANTLR start "ruleNonNegativeInteger" + // InternalScgParser.g:879:1: ruleNonNegativeInteger returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ZERO_0= RULE_ZERO | (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) ) ; + public final AntlrDatatypeRuleToken ruleNonNegativeInteger() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_ZERO_0=null; + Token this_DIGIT_NONZERO_1=null; + Token this_DIGIT_NONZERO_2=null; + Token this_ZERO_3=null; + + + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalScgParser.g:886:2: ( (this_ZERO_0= RULE_ZERO | (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) ) ) + // InternalScgParser.g:887:2: (this_ZERO_0= RULE_ZERO | (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) ) + { + // InternalScgParser.g:887:2: (this_ZERO_0= RULE_ZERO | (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) ) + int alt18=2; + int LA18_0 = input.LA(1); + + if ( (LA18_0==RULE_ZERO) ) { + alt18=1; + } + else if ( (LA18_0==RULE_DIGIT_NONZERO) ) { + alt18=2; + } + else { + if (state.backtracking>0) {state.failed=true; return current;} + NoViableAltException nvae = + new NoViableAltException("", 18, 0, input); + + throw nvae; + } + switch (alt18) { + case 1 : + // InternalScgParser.g:888:3: this_ZERO_0= RULE_ZERO + { + this_ZERO_0=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_2); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_0); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_0, grammarAccess.getNonNegativeIntegerAccess().getZEROTerminalRuleCall_0()); + + } + + } + break; + case 2 : + // InternalScgParser.g:896:3: (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) + { + // InternalScgParser.g:896:3: (this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) + // InternalScgParser.g:897:4: this_DIGIT_NONZERO_1= RULE_DIGIT_NONZERO (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* + { + this_DIGIT_NONZERO_1=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_1); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_1, grammarAccess.getNonNegativeIntegerAccess().getDIGIT_NONZEROTerminalRuleCall_1_0()); + + } + // InternalScgParser.g:904:4: (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* + loop17: + do { + int alt17=3; + int LA17_0 = input.LA(1); + + if ( (LA17_0==RULE_DIGIT_NONZERO) ) { + alt17=1; + } + else if ( (LA17_0==RULE_ZERO) ) { + alt17=2; + } + + + switch (alt17) { + case 1 : + // InternalScgParser.g:905:5: this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_2=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_2); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_2, grammarAccess.getNonNegativeIntegerAccess().getDIGIT_NONZEROTerminalRuleCall_1_1_0()); + + } + + } + break; + case 2 : + // InternalScgParser.g:913:5: this_ZERO_3= RULE_ZERO + { + this_ZERO_3=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_3); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_3, grammarAccess.getNonNegativeIntegerAccess().getZEROTerminalRuleCall_1_1_1()); + + } + + } + break; + + default : + break loop17; + } + } while (true); + + + } + + + } + break; + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "ruleNonNegativeInteger" + + + // $ANTLR start "entryRuleInteger" + // InternalScgParser.g:929:1: entryRuleInteger returns [String current=null] : iv_ruleInteger= ruleInteger EOF ; + public final String entryRuleInteger() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleInteger = null; + + + + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalScgParser.g:931:2: (iv_ruleInteger= ruleInteger EOF ) + // InternalScgParser.g:932:2: iv_ruleInteger= ruleInteger EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getIntegerRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleInteger=ruleInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleInteger.getText(); + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "entryRuleInteger" + + + // $ANTLR start "ruleInteger" + // InternalScgParser.g:941:1: ruleInteger returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeInteger_2= ruleNonNegativeInteger ) ; + public final AntlrDatatypeRuleToken ruleInteger() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_PLUS_0=null; + Token this_DASH_1=null; + AntlrDatatypeRuleToken this_NonNegativeInteger_2 = null; + + + + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalScgParser.g:948:2: ( ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeInteger_2= ruleNonNegativeInteger ) ) + // InternalScgParser.g:949:2: ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeInteger_2= ruleNonNegativeInteger ) + { + // InternalScgParser.g:949:2: ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeInteger_2= ruleNonNegativeInteger ) + // InternalScgParser.g:950:3: (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeInteger_2= ruleNonNegativeInteger + { + // InternalScgParser.g:950:3: (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? + int alt19=3; + int LA19_0 = input.LA(1); + + if ( (LA19_0==RULE_PLUS) ) { + alt19=1; + } + else if ( (LA19_0==RULE_DASH) ) { + alt19=2; + } + switch (alt19) { + case 1 : + // InternalScgParser.g:951:4: this_PLUS_0= RULE_PLUS + { + this_PLUS_0=(Token)match(input,RULE_PLUS,FollowSets000.FOLLOW_11); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_PLUS_0); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_PLUS_0, grammarAccess.getIntegerAccess().getPLUSTerminalRuleCall_0_0()); + + } + + } + break; + case 2 : + // InternalScgParser.g:959:4: this_DASH_1= RULE_DASH + { + this_DASH_1=(Token)match(input,RULE_DASH,FollowSets000.FOLLOW_11); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DASH_1); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DASH_1, grammarAccess.getIntegerAccess().getDASHTerminalRuleCall_0_1()); + + } + + } + break; + + } + + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getIntegerAccess().getNonNegativeIntegerParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_NonNegativeInteger_2=ruleNonNegativeInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_NonNegativeInteger_2); + + } + if ( state.backtracking==0 ) { + + afterParserOrEnumRuleCall(); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "ruleInteger" + + + // $ANTLR start "entryRuleDecimal" + // InternalScgParser.g:984:1: entryRuleDecimal returns [String current=null] : iv_ruleDecimal= ruleDecimal EOF ; + public final String entryRuleDecimal() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleDecimal = null; + + + + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalScgParser.g:986:2: (iv_ruleDecimal= ruleDecimal EOF ) + // InternalScgParser.g:987:2: iv_ruleDecimal= ruleDecimal EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getDecimalRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleDecimal=ruleDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleDecimal.getText(); + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "entryRuleDecimal" + + + // $ANTLR start "ruleDecimal" + // InternalScgParser.g:996:1: ruleDecimal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeDecimal_2= ruleNonNegativeDecimal ) ; + public final AntlrDatatypeRuleToken ruleDecimal() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_PLUS_0=null; + Token this_DASH_1=null; + AntlrDatatypeRuleToken this_NonNegativeDecimal_2 = null; + + + + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalScgParser.g:1003:2: ( ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeDecimal_2= ruleNonNegativeDecimal ) ) + // InternalScgParser.g:1004:2: ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeDecimal_2= ruleNonNegativeDecimal ) + { + // InternalScgParser.g:1004:2: ( (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeDecimal_2= ruleNonNegativeDecimal ) + // InternalScgParser.g:1005:3: (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? this_NonNegativeDecimal_2= ruleNonNegativeDecimal + { + // InternalScgParser.g:1005:3: (this_PLUS_0= RULE_PLUS | this_DASH_1= RULE_DASH )? + int alt20=3; + int LA20_0 = input.LA(1); + + if ( (LA20_0==RULE_PLUS) ) { + alt20=1; + } + else if ( (LA20_0==RULE_DASH) ) { + alt20=2; + } + switch (alt20) { + case 1 : + // InternalScgParser.g:1006:4: this_PLUS_0= RULE_PLUS + { + this_PLUS_0=(Token)match(input,RULE_PLUS,FollowSets000.FOLLOW_11); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_PLUS_0); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_PLUS_0, grammarAccess.getDecimalAccess().getPLUSTerminalRuleCall_0_0()); + + } + + } + break; + case 2 : + // InternalScgParser.g:1014:4: this_DASH_1= RULE_DASH + { + this_DASH_1=(Token)match(input,RULE_DASH,FollowSets000.FOLLOW_11); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DASH_1); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DASH_1, grammarAccess.getDecimalAccess().getDASHTerminalRuleCall_0_1()); + + } + + } + break; + + } + + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getDecimalAccess().getNonNegativeDecimalParserRuleCall_1()); + + } + pushFollow(FollowSets000.FOLLOW_2); + this_NonNegativeDecimal_2=ruleNonNegativeDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_NonNegativeDecimal_2); + + } + if ( state.backtracking==0 ) { + + afterParserOrEnumRuleCall(); + + } + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "ruleDecimal" + + + // $ANTLR start "entryRuleNonNegativeDecimal" + // InternalScgParser.g:1039:1: entryRuleNonNegativeDecimal returns [String current=null] : iv_ruleNonNegativeDecimal= ruleNonNegativeDecimal EOF ; + public final String entryRuleNonNegativeDecimal() throws RecognitionException { + String current = null; + + AntlrDatatypeRuleToken iv_ruleNonNegativeDecimal = null; + + + + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalScgParser.g:1041:2: (iv_ruleNonNegativeDecimal= ruleNonNegativeDecimal EOF ) + // InternalScgParser.g:1042:2: iv_ruleNonNegativeDecimal= ruleNonNegativeDecimal EOF + { + if ( state.backtracking==0 ) { + newCompositeNode(grammarAccess.getNonNegativeDecimalRule()); + } + pushFollow(FollowSets000.FOLLOW_1); + iv_ruleNonNegativeDecimal=ruleNonNegativeDecimal(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + current =iv_ruleNonNegativeDecimal.getText(); + } + match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current; + + } + + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "entryRuleNonNegativeDecimal" + + + // $ANTLR start "ruleNonNegativeDecimal" + // InternalScgParser.g:1051:1: ruleNonNegativeDecimal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_NonNegativeInteger_0= ruleNonNegativeInteger this_DOT_1= RULE_DOT (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) ; + public final AntlrDatatypeRuleToken ruleNonNegativeDecimal() throws RecognitionException { + AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); + + Token this_DOT_1=null; + Token this_DIGIT_NONZERO_2=null; + Token this_ZERO_3=null; + AntlrDatatypeRuleToken this_NonNegativeInteger_0 = null; + + + + enterRule(); + HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(); + + try { + // InternalScgParser.g:1058:2: ( (this_NonNegativeInteger_0= ruleNonNegativeInteger this_DOT_1= RULE_DOT (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) ) + // InternalScgParser.g:1059:2: (this_NonNegativeInteger_0= ruleNonNegativeInteger this_DOT_1= RULE_DOT (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) + { + // InternalScgParser.g:1059:2: (this_NonNegativeInteger_0= ruleNonNegativeInteger this_DOT_1= RULE_DOT (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* ) + // InternalScgParser.g:1060:3: this_NonNegativeInteger_0= ruleNonNegativeInteger this_DOT_1= RULE_DOT (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* + { + if ( state.backtracking==0 ) { + + newCompositeNode(grammarAccess.getNonNegativeDecimalAccess().getNonNegativeIntegerParserRuleCall_0()); + + } + pushFollow(FollowSets000.FOLLOW_15); + this_NonNegativeInteger_0=ruleNonNegativeInteger(); + + state._fsp--; + if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_NonNegativeInteger_0); + + } + if ( state.backtracking==0 ) { + + afterParserOrEnumRuleCall(); + + } + this_DOT_1=(Token)match(input,RULE_DOT,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DOT_1); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DOT_1, grammarAccess.getNonNegativeDecimalAccess().getDOTTerminalRuleCall_1()); + + } + // InternalScgParser.g:1077:3: (this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO | this_ZERO_3= RULE_ZERO )* + loop21: + do { + int alt21=3; + int LA21_0 = input.LA(1); + + if ( (LA21_0==RULE_DIGIT_NONZERO) ) { + alt21=1; + } + else if ( (LA21_0==RULE_ZERO) ) { + alt21=2; + } + + + switch (alt21) { + case 1 : + // InternalScgParser.g:1078:4: this_DIGIT_NONZERO_2= RULE_DIGIT_NONZERO + { + this_DIGIT_NONZERO_2=(Token)match(input,RULE_DIGIT_NONZERO,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_DIGIT_NONZERO_2); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_DIGIT_NONZERO_2, grammarAccess.getNonNegativeDecimalAccess().getDIGIT_NONZEROTerminalRuleCall_2_0()); + + } + + } + break; + case 2 : + // InternalScgParser.g:1086:4: this_ZERO_3= RULE_ZERO + { + this_ZERO_3=(Token)match(input,RULE_ZERO,FollowSets000.FOLLOW_14); if (state.failed) return current; + if ( state.backtracking==0 ) { + + current.merge(this_ZERO_3); + + } + if ( state.backtracking==0 ) { + + newLeafNode(this_ZERO_3, grammarAccess.getNonNegativeDecimalAccess().getZEROTerminalRuleCall_2_1()); + + } + + } + break; + + default : + break loop21; + } + } while (true); + + + } + + + } + + if ( state.backtracking==0 ) { + + leaveRule(); + + } + } + + catch (RecognitionException re) { + recover(input,re); + appendSkippedTokens(); + } + finally { + + myHiddenTokenState.restore(); + + } + return current; + } + // $ANTLR end "ruleNonNegativeDecimal" + + // Delegated rules + + + protected DFA10 dfa10 = new DFA10(this); + static final String dfa_1s = "\15\uffff"; + static final String dfa_2s = "\7\uffff\2\11\2\uffff\2\11"; + static final String dfa_3s = "\1\10\3\uffff\3\7\1\11\1\7\2\uffff\2\7"; + static final String dfa_4s = "\1\27\3\uffff\1\17\2\10\2\22\2\uffff\2\22"; + static final String dfa_5s = "\1\uffff\1\1\1\2\1\3\5\uffff\1\4\1\5\2\uffff"; + static final String dfa_6s = "\15\uffff}>"; + static final String[] dfa_7s = { + "\1\1\10\uffff\1\2\1\uffff\1\4\3\uffff\1\3", + "", + "", + "", + "\1\7\1\10\5\uffff\1\5\1\6", + "\1\7\1\10", + "\1\7\1\10", + "\3\11\4\uffff\1\12\1\uffff\1\11", + "\1\14\1\13\3\11\4\uffff\1\12\1\uffff\1\11", + "", + "", + "\1\14\1\13\3\11\4\uffff\1\12\1\uffff\1\11", + "\1\14\1\13\3\11\4\uffff\1\12\1\uffff\1\11" + }; + + static final short[] dfa_1 = DFA.unpackEncodedString(dfa_1s); + static final short[] dfa_2 = DFA.unpackEncodedString(dfa_2s); + static final char[] dfa_3 = DFA.unpackEncodedStringToUnsignedChars(dfa_3s); + static final char[] dfa_4 = DFA.unpackEncodedStringToUnsignedChars(dfa_4s); + static final short[] dfa_5 = DFA.unpackEncodedString(dfa_5s); + static final short[] dfa_6 = DFA.unpackEncodedString(dfa_6s); + static final short[][] dfa_7 = unpackEncodedStringArray(dfa_7s); + + class DFA10 extends DFA { + + public DFA10(BaseRecognizer recognizer) { + this.recognizer = recognizer; + this.decisionNumber = 10; + this.eot = dfa_1; + this.eof = dfa_2; + this.min = dfa_3; + this.max = dfa_4; + this.accept = dfa_5; + this.special = dfa_6; + this.transition = dfa_7; + } + public String getDescription() { + return "498:2: (this_ConceptReference_0= ruleConceptReference | (this_ROUND_OPEN_1= RULE_ROUND_OPEN this_SubExpression_2= ruleSubExpression this_ROUND_CLOSE_3= RULE_ROUND_CLOSE ) | this_StringValue_4= ruleStringValue | this_IntegerValue_5= ruleIntegerValue | this_DecimalValue_6= ruleDecimalValue )"; + } + } + + + + private static class FollowSets000 { + public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L}); + public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L}); + public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000000000000100L}); + public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000000006002L}); + public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000000300L}); + public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000000B02L}); + public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000000C00L}); + public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000001000L}); + public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x00000000008A0100L}); + public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000040000L}); + public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x000000000000C180L}); + public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000000000000042L}); + public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000000000180L}); + public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000000000182L}); + public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0000000000010000L}); + } + + +} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/internal/InternalScgParser.tokens b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/internal/InternalScgParser.tokens new file mode 100644 index 00000000000..0ca6537e405 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/internal/InternalScgParser.tokens @@ -0,0 +1,20 @@ +RULE_COLON=13 +RULE_COMMA=11 +RULE_CURLY_CLOSE=10 +RULE_CURLY_OPEN=9 +RULE_DASH=15 +RULE_DIGIT_NONZERO=8 +RULE_DOT=16 +RULE_EQUAL=12 +RULE_EQUIVALENT_TO=4 +RULE_HASH=19 +RULE_ML_COMMENT=21 +RULE_PLUS=14 +RULE_ROUND_CLOSE=18 +RULE_ROUND_OPEN=17 +RULE_SL_COMMENT=22 +RULE_STRING=23 +RULE_SUBTYPE_OF=5 +RULE_TERM_STRING=6 +RULE_WS=20 +RULE_ZERO=7 diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/lexer/InternalScgLexer.g b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/lexer/InternalScgLexer.g new file mode 100644 index 00000000000..51924fb7481 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/lexer/InternalScgLexer.g @@ -0,0 +1,64 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +lexer grammar InternalScgLexer; + +@header { +package com.b2international.snowowl.snomed.scg.parser.antlr.lexer; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.parser.antlr.Lexer; +} + +RULE_EQUIVALENT_TO : '==='; + +RULE_SUBTYPE_OF : '<<<'; + +RULE_TERM_STRING : '|' ~('|')* '|'; + +RULE_ZERO : '0'; + +RULE_DIGIT_NONZERO : '1'..'9'; + +RULE_CURLY_OPEN : '{'; + +RULE_CURLY_CLOSE : '}'; + +RULE_COMMA : ','; + +RULE_EQUAL : '='; + +RULE_COLON : ':'; + +RULE_PLUS : '+'; + +RULE_DASH : '-'; + +RULE_DOT : '.'; + +RULE_ROUND_OPEN : '('; + +RULE_ROUND_CLOSE : ')'; + +RULE_HASH : '#'; + +RULE_WS : (' '|'\t'|'\n'|'\r'); + +RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; + +RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; + +RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\''); diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/lexer/InternalScgLexer.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/lexer/InternalScgLexer.java new file mode 100644 index 00000000000..a49732ca169 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/parser/antlr/lexer/InternalScgLexer.java @@ -0,0 +1,955 @@ +package com.b2international.snowowl.snomed.scg.parser.antlr.lexer; + +// Hack: Use our own Lexer superclass by means of import. +// Currently there is no other way to specify the superclass for the lexer. +import org.eclipse.xtext.parser.antlr.Lexer; + + +import org.antlr.runtime.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; + +@SuppressWarnings("all") +public class InternalScgLexer extends Lexer { + public static final int RULE_DIGIT_NONZERO=8; + public static final int RULE_CURLY_OPEN=9; + public static final int RULE_ROUND_CLOSE=18; + public static final int RULE_STRING=23; + public static final int RULE_SL_COMMENT=22; + public static final int RULE_HASH=19; + public static final int RULE_EQUIVALENT_TO=4; + public static final int RULE_DASH=15; + public static final int RULE_ROUND_OPEN=17; + public static final int RULE_PLUS=14; + public static final int RULE_DOT=16; + public static final int EOF=-1; + public static final int RULE_EQUAL=12; + public static final int RULE_SUBTYPE_OF=5; + public static final int RULE_COMMA=11; + public static final int RULE_WS=20; + public static final int RULE_CURLY_CLOSE=10; + public static final int RULE_ZERO=7; + public static final int RULE_COLON=13; + public static final int RULE_ML_COMMENT=21; + public static final int RULE_TERM_STRING=6; + + // delegates + // delegators + + public InternalScgLexer() {;} + public InternalScgLexer(CharStream input) { + this(input, new RecognizerSharedState()); + } + public InternalScgLexer(CharStream input, RecognizerSharedState state) { + super(input,state); + + } + public String getGrammarFileName() { return "InternalScgLexer.g"; } + + // $ANTLR start "RULE_EQUIVALENT_TO" + public final void mRULE_EQUIVALENT_TO() throws RecognitionException { + try { + int _type = RULE_EQUIVALENT_TO; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:26:20: ( '===' ) + // InternalScgLexer.g:26:22: '===' + { + match("==="); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_EQUIVALENT_TO" + + // $ANTLR start "RULE_SUBTYPE_OF" + public final void mRULE_SUBTYPE_OF() throws RecognitionException { + try { + int _type = RULE_SUBTYPE_OF; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:28:17: ( '<<<' ) + // InternalScgLexer.g:28:19: '<<<' + { + match("<<<"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SUBTYPE_OF" + + // $ANTLR start "RULE_TERM_STRING" + public final void mRULE_TERM_STRING() throws RecognitionException { + try { + int _type = RULE_TERM_STRING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:30:18: ( '|' (~ ( '|' ) )* '|' ) + // InternalScgLexer.g:30:20: '|' (~ ( '|' ) )* '|' + { + match('|'); + // InternalScgLexer.g:30:24: (~ ( '|' ) )* + loop1: + do { + int alt1=2; + int LA1_0 = input.LA(1); + + if ( ((LA1_0>='\u0000' && LA1_0<='{')||(LA1_0>='}' && LA1_0<='\uFFFF')) ) { + alt1=1; + } + + + switch (alt1) { + case 1 : + // InternalScgLexer.g:30:24: ~ ( '|' ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='{')||(input.LA(1)>='}' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop1; + } + } while (true); + + match('|'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_TERM_STRING" + + // $ANTLR start "RULE_ZERO" + public final void mRULE_ZERO() throws RecognitionException { + try { + int _type = RULE_ZERO; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:32:11: ( '0' ) + // InternalScgLexer.g:32:13: '0' + { + match('0'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ZERO" + + // $ANTLR start "RULE_DIGIT_NONZERO" + public final void mRULE_DIGIT_NONZERO() throws RecognitionException { + try { + int _type = RULE_DIGIT_NONZERO; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:34:20: ( '1' .. '9' ) + // InternalScgLexer.g:34:22: '1' .. '9' + { + matchRange('1','9'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DIGIT_NONZERO" + + // $ANTLR start "RULE_CURLY_OPEN" + public final void mRULE_CURLY_OPEN() throws RecognitionException { + try { + int _type = RULE_CURLY_OPEN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:36:17: ( '{' ) + // InternalScgLexer.g:36:19: '{' + { + match('{'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_CURLY_OPEN" + + // $ANTLR start "RULE_CURLY_CLOSE" + public final void mRULE_CURLY_CLOSE() throws RecognitionException { + try { + int _type = RULE_CURLY_CLOSE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:38:18: ( '}' ) + // InternalScgLexer.g:38:20: '}' + { + match('}'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_CURLY_CLOSE" + + // $ANTLR start "RULE_COMMA" + public final void mRULE_COMMA() throws RecognitionException { + try { + int _type = RULE_COMMA; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:40:12: ( ',' ) + // InternalScgLexer.g:40:14: ',' + { + match(','); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_COMMA" + + // $ANTLR start "RULE_EQUAL" + public final void mRULE_EQUAL() throws RecognitionException { + try { + int _type = RULE_EQUAL; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:42:12: ( '=' ) + // InternalScgLexer.g:42:14: '=' + { + match('='); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_EQUAL" + + // $ANTLR start "RULE_COLON" + public final void mRULE_COLON() throws RecognitionException { + try { + int _type = RULE_COLON; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:44:12: ( ':' ) + // InternalScgLexer.g:44:14: ':' + { + match(':'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_COLON" + + // $ANTLR start "RULE_PLUS" + public final void mRULE_PLUS() throws RecognitionException { + try { + int _type = RULE_PLUS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:46:11: ( '+' ) + // InternalScgLexer.g:46:13: '+' + { + match('+'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_PLUS" + + // $ANTLR start "RULE_DASH" + public final void mRULE_DASH() throws RecognitionException { + try { + int _type = RULE_DASH; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:48:11: ( '-' ) + // InternalScgLexer.g:48:13: '-' + { + match('-'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DASH" + + // $ANTLR start "RULE_DOT" + public final void mRULE_DOT() throws RecognitionException { + try { + int _type = RULE_DOT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:50:10: ( '.' ) + // InternalScgLexer.g:50:12: '.' + { + match('.'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_DOT" + + // $ANTLR start "RULE_ROUND_OPEN" + public final void mRULE_ROUND_OPEN() throws RecognitionException { + try { + int _type = RULE_ROUND_OPEN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:52:17: ( '(' ) + // InternalScgLexer.g:52:19: '(' + { + match('('); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ROUND_OPEN" + + // $ANTLR start "RULE_ROUND_CLOSE" + public final void mRULE_ROUND_CLOSE() throws RecognitionException { + try { + int _type = RULE_ROUND_CLOSE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:54:18: ( ')' ) + // InternalScgLexer.g:54:20: ')' + { + match(')'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ROUND_CLOSE" + + // $ANTLR start "RULE_HASH" + public final void mRULE_HASH() throws RecognitionException { + try { + int _type = RULE_HASH; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:56:11: ( '#' ) + // InternalScgLexer.g:56:13: '#' + { + match('#'); + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_HASH" + + // $ANTLR start "RULE_WS" + public final void mRULE_WS() throws RecognitionException { + try { + int _type = RULE_WS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:58:9: ( ( ' ' | '\\t' | '\\n' | '\\r' ) ) + // InternalScgLexer.g:58:11: ( ' ' | '\\t' | '\\n' | '\\r' ) + { + if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_WS" + + // $ANTLR start "RULE_ML_COMMENT" + public final void mRULE_ML_COMMENT() throws RecognitionException { + try { + int _type = RULE_ML_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:60:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) + // InternalScgLexer.g:60:19: '/*' ( options {greedy=false; } : . )* '*/' + { + match("/*"); + + // InternalScgLexer.g:60:24: ( options {greedy=false; } : . )* + loop2: + do { + int alt2=2; + int LA2_0 = input.LA(1); + + if ( (LA2_0=='*') ) { + int LA2_1 = input.LA(2); + + if ( (LA2_1=='/') ) { + alt2=2; + } + else if ( ((LA2_1>='\u0000' && LA2_1<='.')||(LA2_1>='0' && LA2_1<='\uFFFF')) ) { + alt2=1; + } + + + } + else if ( ((LA2_0>='\u0000' && LA2_0<=')')||(LA2_0>='+' && LA2_0<='\uFFFF')) ) { + alt2=1; + } + + + switch (alt2) { + case 1 : + // InternalScgLexer.g:60:52: . + { + matchAny(); + + } + break; + + default : + break loop2; + } + } while (true); + + match("*/"); + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_ML_COMMENT" + + // $ANTLR start "RULE_SL_COMMENT" + public final void mRULE_SL_COMMENT() throws RecognitionException { + try { + int _type = RULE_SL_COMMENT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:62:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) + // InternalScgLexer.g:62:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? + { + match("//"); + + // InternalScgLexer.g:62:24: (~ ( ( '\\n' | '\\r' ) ) )* + loop3: + do { + int alt3=2; + int LA3_0 = input.LA(1); + + if ( ((LA3_0>='\u0000' && LA3_0<='\t')||(LA3_0>='\u000B' && LA3_0<='\f')||(LA3_0>='\u000E' && LA3_0<='\uFFFF')) ) { + alt3=1; + } + + + switch (alt3) { + case 1 : + // InternalScgLexer.g:62:24: ~ ( ( '\\n' | '\\r' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop3; + } + } while (true); + + // InternalScgLexer.g:62:40: ( ( '\\r' )? '\\n' )? + int alt5=2; + int LA5_0 = input.LA(1); + + if ( (LA5_0=='\n'||LA5_0=='\r') ) { + alt5=1; + } + switch (alt5) { + case 1 : + // InternalScgLexer.g:62:41: ( '\\r' )? '\\n' + { + // InternalScgLexer.g:62:41: ( '\\r' )? + int alt4=2; + int LA4_0 = input.LA(1); + + if ( (LA4_0=='\r') ) { + alt4=1; + } + switch (alt4) { + case 1 : + // InternalScgLexer.g:62:41: '\\r' + { + match('\r'); + + } + break; + + } + + match('\n'); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_SL_COMMENT" + + // $ANTLR start "RULE_STRING" + public final void mRULE_STRING() throws RecognitionException { + try { + int _type = RULE_STRING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // InternalScgLexer.g:64:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) + // InternalScgLexer.g:64:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + { + // InternalScgLexer.g:64:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) + int alt8=2; + int LA8_0 = input.LA(1); + + if ( (LA8_0=='\"') ) { + alt8=1; + } + else if ( (LA8_0=='\'') ) { + alt8=2; + } + else { + NoViableAltException nvae = + new NoViableAltException("", 8, 0, input); + + throw nvae; + } + switch (alt8) { + case 1 : + // InternalScgLexer.g:64:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' + { + match('\"'); + // InternalScgLexer.g:64:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* + loop6: + do { + int alt6=3; + int LA6_0 = input.LA(1); + + if ( (LA6_0=='\\') ) { + alt6=1; + } + else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>=']' && LA6_0<='\uFFFF')) ) { + alt6=2; + } + + + switch (alt6) { + case 1 : + // InternalScgLexer.g:64:21: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalScgLexer.g:64:28: ~ ( ( '\\\\' | '\"' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop6; + } + } while (true); + + match('\"'); + + } + break; + case 2 : + // InternalScgLexer.g:64:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' + { + match('\''); + // InternalScgLexer.g:64:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* + loop7: + do { + int alt7=3; + int LA7_0 = input.LA(1); + + if ( (LA7_0=='\\') ) { + alt7=1; + } + else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>=']' && LA7_0<='\uFFFF')) ) { + alt7=2; + } + + + switch (alt7) { + case 1 : + // InternalScgLexer.g:64:54: '\\\\' . + { + match('\\'); + matchAny(); + + } + break; + case 2 : + // InternalScgLexer.g:64:61: ~ ( ( '\\\\' | '\\'' ) ) + { + if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { + input.consume(); + + } + else { + MismatchedSetException mse = new MismatchedSetException(null,input); + recover(mse); + throw mse;} + + + } + break; + + default : + break loop7; + } + } while (true); + + match('\''); + + } + break; + + } + + + } + + state.type = _type; + state.channel = _channel; + } + finally { + } + } + // $ANTLR end "RULE_STRING" + + public void mTokens() throws RecognitionException { + // InternalScgLexer.g:1:8: ( RULE_EQUIVALENT_TO | RULE_SUBTYPE_OF | RULE_TERM_STRING | RULE_ZERO | RULE_DIGIT_NONZERO | RULE_CURLY_OPEN | RULE_CURLY_CLOSE | RULE_COMMA | RULE_EQUAL | RULE_COLON | RULE_PLUS | RULE_DASH | RULE_DOT | RULE_ROUND_OPEN | RULE_ROUND_CLOSE | RULE_HASH | RULE_WS | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_STRING ) + int alt9=20; + alt9 = dfa9.predict(input); + switch (alt9) { + case 1 : + // InternalScgLexer.g:1:10: RULE_EQUIVALENT_TO + { + mRULE_EQUIVALENT_TO(); + + } + break; + case 2 : + // InternalScgLexer.g:1:29: RULE_SUBTYPE_OF + { + mRULE_SUBTYPE_OF(); + + } + break; + case 3 : + // InternalScgLexer.g:1:45: RULE_TERM_STRING + { + mRULE_TERM_STRING(); + + } + break; + case 4 : + // InternalScgLexer.g:1:62: RULE_ZERO + { + mRULE_ZERO(); + + } + break; + case 5 : + // InternalScgLexer.g:1:72: RULE_DIGIT_NONZERO + { + mRULE_DIGIT_NONZERO(); + + } + break; + case 6 : + // InternalScgLexer.g:1:91: RULE_CURLY_OPEN + { + mRULE_CURLY_OPEN(); + + } + break; + case 7 : + // InternalScgLexer.g:1:107: RULE_CURLY_CLOSE + { + mRULE_CURLY_CLOSE(); + + } + break; + case 8 : + // InternalScgLexer.g:1:124: RULE_COMMA + { + mRULE_COMMA(); + + } + break; + case 9 : + // InternalScgLexer.g:1:135: RULE_EQUAL + { + mRULE_EQUAL(); + + } + break; + case 10 : + // InternalScgLexer.g:1:146: RULE_COLON + { + mRULE_COLON(); + + } + break; + case 11 : + // InternalScgLexer.g:1:157: RULE_PLUS + { + mRULE_PLUS(); + + } + break; + case 12 : + // InternalScgLexer.g:1:167: RULE_DASH + { + mRULE_DASH(); + + } + break; + case 13 : + // InternalScgLexer.g:1:177: RULE_DOT + { + mRULE_DOT(); + + } + break; + case 14 : + // InternalScgLexer.g:1:186: RULE_ROUND_OPEN + { + mRULE_ROUND_OPEN(); + + } + break; + case 15 : + // InternalScgLexer.g:1:202: RULE_ROUND_CLOSE + { + mRULE_ROUND_CLOSE(); + + } + break; + case 16 : + // InternalScgLexer.g:1:219: RULE_HASH + { + mRULE_HASH(); + + } + break; + case 17 : + // InternalScgLexer.g:1:229: RULE_WS + { + mRULE_WS(); + + } + break; + case 18 : + // InternalScgLexer.g:1:237: RULE_ML_COMMENT + { + mRULE_ML_COMMENT(); + + } + break; + case 19 : + // InternalScgLexer.g:1:253: RULE_SL_COMMENT + { + mRULE_SL_COMMENT(); + + } + break; + case 20 : + // InternalScgLexer.g:1:269: RULE_STRING + { + mRULE_STRING(); + + } + break; + + } + + } + + + protected DFA9 dfa9 = new DFA9(this); + static final String DFA9_eotS = + "\1\uffff\1\24\25\uffff"; + static final String DFA9_eofS = + "\27\uffff"; + static final String DFA9_minS = + "\1\11\1\75\17\uffff\1\52\5\uffff"; + static final String DFA9_maxS = + "\1\175\1\75\17\uffff\1\57\5\uffff"; + static final String DFA9_acceptS = + "\2\uffff\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\12\1\13\1\14\1\15\1\16\1\17\1\20\1\21\1\uffff\1\24\1\1\1\11\1\22\1\23"; + static final String DFA9_specialS = + "\27\uffff}>"; + static final String[] DFA9_transitionS = DFA9_transitionS_.DFA9_transitionS; + private static final class DFA9_transitionS_ { + static final String[] DFA9_transitionS = { + "\2\20\2\uffff\1\20\22\uffff\1\20\1\uffff\1\22\1\17\3\uffff\1\22\1\15\1\16\1\uffff\1\12\1\10\1\13\1\14\1\21\1\4\11\5\1\11\1\uffff\1\2\1\1\75\uffff\1\6\1\3\1\7", + "\1\23", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\1\25\4\uffff\1\26", + "", + "", + "", + "", + "" + }; + } + + static final short[] DFA9_eot = DFA.unpackEncodedString(DFA9_eotS); + static final short[] DFA9_eof = DFA.unpackEncodedString(DFA9_eofS); + static final char[] DFA9_min = DFA.unpackEncodedStringToUnsignedChars(DFA9_minS); + static final char[] DFA9_max = DFA.unpackEncodedStringToUnsignedChars(DFA9_maxS); + static final short[] DFA9_accept = DFA.unpackEncodedString(DFA9_acceptS); + static final short[] DFA9_special = DFA.unpackEncodedString(DFA9_specialS); + static final short[][] DFA9_transition; + + static { + int numStates = DFA9_transitionS.length; + DFA9_transition = new short[numStates][]; + for (int i=0; i * The following features are supported: + *

      *
        - *
      • {@link com.b2international.snowowl.dsl.scg.Attribute#getName Name}
      • - *
      • {@link com.b2international.snowowl.dsl.scg.Attribute#getValue Value}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.Attribute#getName Name}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.Attribute#getValue Value}
      • *
      - *

      * - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getAttribute() + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getAttribute() * @model * @generated */ @@ -39,47 +39,39 @@ public interface Attribute extends EObject /** * Returns the value of the 'Name' containment reference. * - *

      - * If the meaning of the 'Name' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Name' containment reference. - * @see #setName(Concept) - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getAttribute_Name() + * @see #setName(ConceptReference) + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getAttribute_Name() * @model containment="true" * @generated */ - Concept getName(); + ConceptReference getName(); /** - * Sets the value of the '{@link com.b2international.snowowl.dsl.scg.Attribute#getName Name}' containment reference. + * Sets the value of the '{@link com.b2international.snowowl.snomed.scg.scg.Attribute#getName Name}' containment reference. * * * @param value the new value of the 'Name' containment reference. * @see #getName() * @generated */ - void setName(Concept value); + void setName(ConceptReference value); /** * Returns the value of the 'Value' containment reference. * - *

      - * If the meaning of the 'Value' containment reference isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Value' containment reference. * @see #setValue(AttributeValue) - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getAttribute_Value() + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getAttribute_Value() * @model containment="true" * @generated */ AttributeValue getValue(); /** - * Sets the value of the '{@link com.b2international.snowowl.dsl.scg.Attribute#getValue Value}' containment reference. + * Sets the value of the '{@link com.b2international.snowowl.snomed.scg.scg.Attribute#getValue Value}' containment reference. * * * @param value the new value of the 'Value' containment reference. @@ -88,4 +80,4 @@ public interface Attribute extends EObject */ void setValue(AttributeValue value); -} // Attribute \ No newline at end of file +} // Attribute diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/Group.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/AttributeGroup.java similarity index 64% rename from snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/Group.java rename to snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/AttributeGroup.java index 3d98e83ebef..9626bc8150c 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/Group.java +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/AttributeGroup.java @@ -1,19 +1,19 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl.scg; +package com.b2international.snowowl.snomed.scg.scg; import org.eclipse.emf.common.util.EList; @@ -21,36 +21,32 @@ /** * - * A representation of the model object 'Group'. + * A representation of the model object 'Attribute Group'. * * *

      * The following features are supported: + *

      *
        - *
      • {@link com.b2international.snowowl.dsl.scg.Group#getAttributes Attributes}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.AttributeGroup#getAttributes Attributes}
      • *
      - *

      * - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getGroup() + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getAttributeGroup() * @model * @generated */ -public interface Group extends EObject +public interface AttributeGroup extends EObject { /** * Returns the value of the 'Attributes' containment reference list. - * The list contents are of type {@link com.b2international.snowowl.dsl.scg.Attribute}. + * The list contents are of type {@link com.b2international.snowowl.snomed.scg.scg.Attribute}. * - *

      - * If the meaning of the 'Attributes' containment reference list isn't clear, - * there really should be more of a description here... - *

      * * @return the value of the 'Attributes' containment reference list. - * @see com.b2international.snowowl.dsl.scg.ScgPackage#getGroup_Attributes() + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getAttributeGroup_Attributes() * @model containment="true" * @generated */ EList getAttributes(); -} // Group \ No newline at end of file +} // AttributeGroup diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/AttributeValue.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/AttributeValue.java new file mode 100644 index 00000000000..87dd147e5bb --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/AttributeValue.java @@ -0,0 +1,32 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Attribute Value'. + * + * + * + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getAttributeValue() + * @model + * @generated + */ +public interface AttributeValue extends EObject +{ +} // AttributeValue diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/ConceptReference.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/ConceptReference.java new file mode 100644 index 00000000000..f7c7ff15729 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/ConceptReference.java @@ -0,0 +1,82 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg; + + +/** + * + * A representation of the model object 'Concept Reference'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.scg.scg.ConceptReference#getId Id}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.ConceptReference#getTerm Term}
      • + *
      + * + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getConceptReference() + * @model + * @generated + */ +public interface ConceptReference extends AttributeValue +{ + /** + * Returns the value of the 'Id' attribute. + * + * + * @return the value of the 'Id' attribute. + * @see #setId(String) + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getConceptReference_Id() + * @model + * @generated + */ + String getId(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.scg.scg.ConceptReference#getId Id}' attribute. + * + * + * @param value the new value of the 'Id' attribute. + * @see #getId() + * @generated + */ + void setId(String value); + + /** + * Returns the value of the 'Term' attribute. + * + * + * @return the value of the 'Term' attribute. + * @see #setTerm(String) + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getConceptReference_Term() + * @model + * @generated + */ + String getTerm(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.scg.scg.ConceptReference#getTerm Term}' attribute. + * + * + * @param value the new value of the 'Term' attribute. + * @see #getTerm() + * @generated + */ + void setTerm(String value); + +} // ConceptReference diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/DecimalValue.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/DecimalValue.java new file mode 100644 index 00000000000..384351b3dfc --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/DecimalValue.java @@ -0,0 +1,60 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg; + +import java.math.BigDecimal; + +/** + * + * A representation of the model object 'Decimal Value'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.scg.scg.DecimalValue#getValue Value}
      • + *
      + * + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getDecimalValue() + * @model + * @generated + */ +public interface DecimalValue extends AttributeValue +{ + /** + * Returns the value of the 'Value' attribute. + * + * + * @return the value of the 'Value' attribute. + * @see #setValue(BigDecimal) + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getDecimalValue_Value() + * @model + * @generated + */ + BigDecimal getValue(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.scg.scg.DecimalValue#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(BigDecimal value); + +} // DecimalValue diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/Expression.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/Expression.java new file mode 100644 index 00000000000..fc8bce698bf --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/Expression.java @@ -0,0 +1,83 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Expression'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.scg.scg.Expression#isPrimitive Primitive}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.Expression#getExpression Expression}
      • + *
      + * + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getExpression() + * @model + * @generated + */ +public interface Expression extends EObject +{ + /** + * Returns the value of the 'Primitive' attribute. + * + * + * @return the value of the 'Primitive' attribute. + * @see #setPrimitive(boolean) + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getExpression_Primitive() + * @model + * @generated + */ + boolean isPrimitive(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.scg.scg.Expression#isPrimitive Primitive}' attribute. + * + * + * @param value the new value of the 'Primitive' attribute. + * @see #isPrimitive() + * @generated + */ + void setPrimitive(boolean value); + + /** + * Returns the value of the 'Expression' containment reference. + * + * + * @return the value of the 'Expression' containment reference. + * @see #setExpression(SubExpression) + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getExpression_Expression() + * @model containment="true" + * @generated + */ + SubExpression getExpression(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.scg.scg.Expression#getExpression Expression}' containment reference. + * + * + * @param value the new value of the 'Expression' containment reference. + * @see #getExpression() + * @generated + */ + void setExpression(SubExpression value); + +} // Expression diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/IntegerValue.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/IntegerValue.java new file mode 100644 index 00000000000..ea32a8c6971 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/IntegerValue.java @@ -0,0 +1,59 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg; + + +/** + * + * A representation of the model object 'Integer Value'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.scg.scg.IntegerValue#getValue Value}
      • + *
      + * + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getIntegerValue() + * @model + * @generated + */ +public interface IntegerValue extends AttributeValue +{ + /** + * Returns the value of the 'Value' attribute. + * + * + * @return the value of the 'Value' attribute. + * @see #setValue(int) + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getIntegerValue_Value() + * @model + * @generated + */ + int getValue(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.scg.scg.IntegerValue#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(int value); + +} // IntegerValue diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/Refinement.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/Refinement.java new file mode 100644 index 00000000000..fa07da42e17 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/Refinement.java @@ -0,0 +1,65 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Refinement'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.scg.scg.Refinement#getAttributes Attributes}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.Refinement#getGroups Groups}
      • + *
      + * + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getRefinement() + * @model + * @generated + */ +public interface Refinement extends EObject +{ + /** + * Returns the value of the 'Attributes' containment reference list. + * The list contents are of type {@link com.b2international.snowowl.snomed.scg.scg.Attribute}. + * + * + * @return the value of the 'Attributes' containment reference list. + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getRefinement_Attributes() + * @model containment="true" + * @generated + */ + EList getAttributes(); + + /** + * Returns the value of the 'Groups' containment reference list. + * The list contents are of type {@link com.b2international.snowowl.snomed.scg.scg.AttributeGroup}. + * + * + * @return the value of the 'Groups' containment reference list. + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getRefinement_Groups() + * @model containment="true" + * @generated + */ + EList getGroups(); + +} // Refinement diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/ScgFactory.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/ScgFactory.java similarity index 52% rename from snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/ScgFactory.java rename to snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/ScgFactory.java index ec17a52d6f0..473025a7792 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/ScgFactory.java +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/ScgFactory.java @@ -1,19 +1,19 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl.scg; +package com.b2international.snowowl.snomed.scg.scg; import org.eclipse.emf.ecore.EFactory; @@ -22,7 +22,7 @@ * The Factory for the model. * It provides a create method for each non-abstract class of the model. * - * @see com.b2international.snowowl.dsl.scg.ScgPackage + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage * @generated */ public interface ScgFactory extends EFactory @@ -33,7 +33,7 @@ public interface ScgFactory extends EFactory * * @generated */ - ScgFactory eINSTANCE = com.b2international.snowowl.dsl.scg.impl.ScgFactoryImpl.init(); + ScgFactory eINSTANCE = com.b2international.snowowl.snomed.scg.scg.impl.ScgFactoryImpl.init(); /** * Returns a new object of class 'Expression'. @@ -45,22 +45,31 @@ public interface ScgFactory extends EFactory Expression createExpression(); /** - * Returns a new object of class 'Concept'. + * Returns a new object of class 'Sub Expression'. + * + * + * @return a new object of class 'Sub Expression'. + * @generated + */ + SubExpression createSubExpression(); + + /** + * Returns a new object of class 'Refinement'. * * - * @return a new object of class 'Concept'. + * @return a new object of class 'Refinement'. * @generated */ - Concept createConcept(); + Refinement createRefinement(); /** - * Returns a new object of class 'Group'. + * Returns a new object of class 'Attribute Group'. * * - * @return a new object of class 'Group'. + * @return a new object of class 'Attribute Group'. * @generated */ - Group createGroup(); + AttributeGroup createAttributeGroup(); /** * Returns a new object of class 'Attribute'. @@ -80,6 +89,42 @@ public interface ScgFactory extends EFactory */ AttributeValue createAttributeValue(); + /** + * Returns a new object of class 'String Value'. + * + * + * @return a new object of class 'String Value'. + * @generated + */ + StringValue createStringValue(); + + /** + * Returns a new object of class 'Integer Value'. + * + * + * @return a new object of class 'Integer Value'. + * @generated + */ + IntegerValue createIntegerValue(); + + /** + * Returns a new object of class 'Decimal Value'. + * + * + * @return a new object of class 'Decimal Value'. + * @generated + */ + DecimalValue createDecimalValue(); + + /** + * Returns a new object of class 'Concept Reference'. + * + * + * @return a new object of class 'Concept Reference'. + * @generated + */ + ConceptReference createConceptReference(); + /** * Returns the package supported by this factory. * @@ -89,4 +134,4 @@ public interface ScgFactory extends EFactory */ ScgPackage getScgPackage(); -} //ScgFactory \ No newline at end of file +} //ScgFactory diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/ScgPackage.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/ScgPackage.java new file mode 100644 index 00000000000..91f5426b9c0 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/ScgPackage.java @@ -0,0 +1,880 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
        + *
      • each class,
      • + *
      • each feature of each class,
      • + *
      • each enum,
      • + *
      • and each data type
      • + *
      + * + * @see com.b2international.snowowl.snomed.scg.scg.ScgFactory + * @model kind="package" + * @generated + */ +public interface ScgPackage extends EPackage +{ + /** + * The package name. + * + * + * @generated + */ + String eNAME = "scg"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.b2international.com/snowowl/snomed/scg/Scg"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "scg"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ScgPackage eINSTANCE = com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl.init(); + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.ExpressionImpl Expression}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.ExpressionImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getExpression() + * @generated + */ + int EXPRESSION = 0; + + /** + * The feature id for the 'Primitive' attribute. + * + * + * @generated + * @ordered + */ + int EXPRESSION__PRIMITIVE = 0; + + /** + * The feature id for the 'Expression' containment reference. + * + * + * @generated + * @ordered + */ + int EXPRESSION__EXPRESSION = 1; + + /** + * The number of structural features of the 'Expression' class. + * + * + * @generated + * @ordered + */ + int EXPRESSION_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.AttributeValueImpl Attribute Value}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.AttributeValueImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getAttributeValue() + * @generated + */ + int ATTRIBUTE_VALUE = 5; + + /** + * The number of structural features of the 'Attribute Value' class. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE_VALUE_FEATURE_COUNT = 0; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.SubExpressionImpl Sub Expression}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.SubExpressionImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getSubExpression() + * @generated + */ + int SUB_EXPRESSION = 1; + + /** + * The feature id for the 'Focus Concepts' containment reference list. + * + * + * @generated + * @ordered + */ + int SUB_EXPRESSION__FOCUS_CONCEPTS = ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Refinement' containment reference. + * + * + * @generated + * @ordered + */ + int SUB_EXPRESSION__REFINEMENT = ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Sub Expression' class. + * + * + * @generated + * @ordered + */ + int SUB_EXPRESSION_FEATURE_COUNT = ATTRIBUTE_VALUE_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.RefinementImpl Refinement}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.RefinementImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getRefinement() + * @generated + */ + int REFINEMENT = 2; + + /** + * The feature id for the 'Attributes' containment reference list. + * + * + * @generated + * @ordered + */ + int REFINEMENT__ATTRIBUTES = 0; + + /** + * The feature id for the 'Groups' containment reference list. + * + * + * @generated + * @ordered + */ + int REFINEMENT__GROUPS = 1; + + /** + * The number of structural features of the 'Refinement' class. + * + * + * @generated + * @ordered + */ + int REFINEMENT_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.AttributeGroupImpl Attribute Group}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.AttributeGroupImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getAttributeGroup() + * @generated + */ + int ATTRIBUTE_GROUP = 3; + + /** + * The feature id for the 'Attributes' containment reference list. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE_GROUP__ATTRIBUTES = 0; + + /** + * The number of structural features of the 'Attribute Group' class. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE_GROUP_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.AttributeImpl Attribute}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.AttributeImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getAttribute() + * @generated + */ + int ATTRIBUTE = 4; + + /** + * The feature id for the 'Name' containment reference. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE__NAME = 0; + + /** + * The feature id for the 'Value' containment reference. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE__VALUE = 1; + + /** + * The number of structural features of the 'Attribute' class. + * + * + * @generated + * @ordered + */ + int ATTRIBUTE_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.StringValueImpl String Value}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.StringValueImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getStringValue() + * @generated + */ + int STRING_VALUE = 6; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int STRING_VALUE__VALUE = ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'String Value' class. + * + * + * @generated + * @ordered + */ + int STRING_VALUE_FEATURE_COUNT = ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.IntegerValueImpl Integer Value}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.IntegerValueImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getIntegerValue() + * @generated + */ + int INTEGER_VALUE = 7; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int INTEGER_VALUE__VALUE = ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Integer Value' class. + * + * + * @generated + * @ordered + */ + int INTEGER_VALUE_FEATURE_COUNT = ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.DecimalValueImpl Decimal Value}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.DecimalValueImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getDecimalValue() + * @generated + */ + int DECIMAL_VALUE = 8; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int DECIMAL_VALUE__VALUE = ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Decimal Value' class. + * + * + * @generated + * @ordered + */ + int DECIMAL_VALUE_FEATURE_COUNT = ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.ConceptReferenceImpl Concept Reference}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.ConceptReferenceImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getConceptReference() + * @generated + */ + int CONCEPT_REFERENCE = 9; + + /** + * The feature id for the 'Id' attribute. + * + * + * @generated + * @ordered + */ + int CONCEPT_REFERENCE__ID = ATTRIBUTE_VALUE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Term' attribute. + * + * + * @generated + * @ordered + */ + int CONCEPT_REFERENCE__TERM = ATTRIBUTE_VALUE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Concept Reference' class. + * + * + * @generated + * @ordered + */ + int CONCEPT_REFERENCE_FEATURE_COUNT = ATTRIBUTE_VALUE_FEATURE_COUNT + 2; + + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.scg.scg.Expression Expression}'. + * + * + * @return the meta object for class 'Expression'. + * @see com.b2international.snowowl.snomed.scg.scg.Expression + * @generated + */ + EClass getExpression(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.scg.scg.Expression#isPrimitive Primitive}'. + * + * + * @return the meta object for the attribute 'Primitive'. + * @see com.b2international.snowowl.snomed.scg.scg.Expression#isPrimitive() + * @see #getExpression() + * @generated + */ + EAttribute getExpression_Primitive(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.scg.scg.Expression#getExpression Expression}'. + * + * + * @return the meta object for the containment reference 'Expression'. + * @see com.b2international.snowowl.snomed.scg.scg.Expression#getExpression() + * @see #getExpression() + * @generated + */ + EReference getExpression_Expression(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.scg.scg.SubExpression Sub Expression}'. + * + * + * @return the meta object for class 'Sub Expression'. + * @see com.b2international.snowowl.snomed.scg.scg.SubExpression + * @generated + */ + EClass getSubExpression(); + + /** + * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.snomed.scg.scg.SubExpression#getFocusConcepts Focus Concepts}'. + * + * + * @return the meta object for the containment reference list 'Focus Concepts'. + * @see com.b2international.snowowl.snomed.scg.scg.SubExpression#getFocusConcepts() + * @see #getSubExpression() + * @generated + */ + EReference getSubExpression_FocusConcepts(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.scg.scg.SubExpression#getRefinement Refinement}'. + * + * + * @return the meta object for the containment reference 'Refinement'. + * @see com.b2international.snowowl.snomed.scg.scg.SubExpression#getRefinement() + * @see #getSubExpression() + * @generated + */ + EReference getSubExpression_Refinement(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.scg.scg.Refinement Refinement}'. + * + * + * @return the meta object for class 'Refinement'. + * @see com.b2international.snowowl.snomed.scg.scg.Refinement + * @generated + */ + EClass getRefinement(); + + /** + * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.snomed.scg.scg.Refinement#getAttributes Attributes}'. + * + * + * @return the meta object for the containment reference list 'Attributes'. + * @see com.b2international.snowowl.snomed.scg.scg.Refinement#getAttributes() + * @see #getRefinement() + * @generated + */ + EReference getRefinement_Attributes(); + + /** + * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.snomed.scg.scg.Refinement#getGroups Groups}'. + * + * + * @return the meta object for the containment reference list 'Groups'. + * @see com.b2international.snowowl.snomed.scg.scg.Refinement#getGroups() + * @see #getRefinement() + * @generated + */ + EReference getRefinement_Groups(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.scg.scg.AttributeGroup Attribute Group}'. + * + * + * @return the meta object for class 'Attribute Group'. + * @see com.b2international.snowowl.snomed.scg.scg.AttributeGroup + * @generated + */ + EClass getAttributeGroup(); + + /** + * Returns the meta object for the containment reference list '{@link com.b2international.snowowl.snomed.scg.scg.AttributeGroup#getAttributes Attributes}'. + * + * + * @return the meta object for the containment reference list 'Attributes'. + * @see com.b2international.snowowl.snomed.scg.scg.AttributeGroup#getAttributes() + * @see #getAttributeGroup() + * @generated + */ + EReference getAttributeGroup_Attributes(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.scg.scg.Attribute Attribute}'. + * + * + * @return the meta object for class 'Attribute'. + * @see com.b2international.snowowl.snomed.scg.scg.Attribute + * @generated + */ + EClass getAttribute(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.scg.scg.Attribute#getName Name}'. + * + * + * @return the meta object for the containment reference 'Name'. + * @see com.b2international.snowowl.snomed.scg.scg.Attribute#getName() + * @see #getAttribute() + * @generated + */ + EReference getAttribute_Name(); + + /** + * Returns the meta object for the containment reference '{@link com.b2international.snowowl.snomed.scg.scg.Attribute#getValue Value}'. + * + * + * @return the meta object for the containment reference 'Value'. + * @see com.b2international.snowowl.snomed.scg.scg.Attribute#getValue() + * @see #getAttribute() + * @generated + */ + EReference getAttribute_Value(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.scg.scg.AttributeValue Attribute Value}'. + * + * + * @return the meta object for class 'Attribute Value'. + * @see com.b2international.snowowl.snomed.scg.scg.AttributeValue + * @generated + */ + EClass getAttributeValue(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.scg.scg.StringValue String Value}'. + * + * + * @return the meta object for class 'String Value'. + * @see com.b2international.snowowl.snomed.scg.scg.StringValue + * @generated + */ + EClass getStringValue(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.scg.scg.StringValue#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see com.b2international.snowowl.snomed.scg.scg.StringValue#getValue() + * @see #getStringValue() + * @generated + */ + EAttribute getStringValue_Value(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.scg.scg.IntegerValue Integer Value}'. + * + * + * @return the meta object for class 'Integer Value'. + * @see com.b2international.snowowl.snomed.scg.scg.IntegerValue + * @generated + */ + EClass getIntegerValue(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.scg.scg.IntegerValue#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see com.b2international.snowowl.snomed.scg.scg.IntegerValue#getValue() + * @see #getIntegerValue() + * @generated + */ + EAttribute getIntegerValue_Value(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.scg.scg.DecimalValue Decimal Value}'. + * + * + * @return the meta object for class 'Decimal Value'. + * @see com.b2international.snowowl.snomed.scg.scg.DecimalValue + * @generated + */ + EClass getDecimalValue(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.scg.scg.DecimalValue#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see com.b2international.snowowl.snomed.scg.scg.DecimalValue#getValue() + * @see #getDecimalValue() + * @generated + */ + EAttribute getDecimalValue_Value(); + + /** + * Returns the meta object for class '{@link com.b2international.snowowl.snomed.scg.scg.ConceptReference Concept Reference}'. + * + * + * @return the meta object for class 'Concept Reference'. + * @see com.b2international.snowowl.snomed.scg.scg.ConceptReference + * @generated + */ + EClass getConceptReference(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.scg.scg.ConceptReference#getId Id}'. + * + * + * @return the meta object for the attribute 'Id'. + * @see com.b2international.snowowl.snomed.scg.scg.ConceptReference#getId() + * @see #getConceptReference() + * @generated + */ + EAttribute getConceptReference_Id(); + + /** + * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.scg.scg.ConceptReference#getTerm Term}'. + * + * + * @return the meta object for the attribute 'Term'. + * @see com.b2international.snowowl.snomed.scg.scg.ConceptReference#getTerm() + * @see #getConceptReference() + * @generated + */ + EAttribute getConceptReference_Term(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ScgFactory getScgFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
        + *
      • each class,
      • + *
      • each feature of each class,
      • + *
      • each enum,
      • + *
      • and each data type
      • + *
      + * + * @generated + */ + interface Literals + { + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.ExpressionImpl Expression}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.ExpressionImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getExpression() + * @generated + */ + EClass EXPRESSION = eINSTANCE.getExpression(); + + /** + * The meta object literal for the 'Primitive' attribute feature. + * + * + * @generated + */ + EAttribute EXPRESSION__PRIMITIVE = eINSTANCE.getExpression_Primitive(); + + /** + * The meta object literal for the 'Expression' containment reference feature. + * + * + * @generated + */ + EReference EXPRESSION__EXPRESSION = eINSTANCE.getExpression_Expression(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.SubExpressionImpl Sub Expression}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.SubExpressionImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getSubExpression() + * @generated + */ + EClass SUB_EXPRESSION = eINSTANCE.getSubExpression(); + + /** + * The meta object literal for the 'Focus Concepts' containment reference list feature. + * + * + * @generated + */ + EReference SUB_EXPRESSION__FOCUS_CONCEPTS = eINSTANCE.getSubExpression_FocusConcepts(); + + /** + * The meta object literal for the 'Refinement' containment reference feature. + * + * + * @generated + */ + EReference SUB_EXPRESSION__REFINEMENT = eINSTANCE.getSubExpression_Refinement(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.RefinementImpl Refinement}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.RefinementImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getRefinement() + * @generated + */ + EClass REFINEMENT = eINSTANCE.getRefinement(); + + /** + * The meta object literal for the 'Attributes' containment reference list feature. + * + * + * @generated + */ + EReference REFINEMENT__ATTRIBUTES = eINSTANCE.getRefinement_Attributes(); + + /** + * The meta object literal for the 'Groups' containment reference list feature. + * + * + * @generated + */ + EReference REFINEMENT__GROUPS = eINSTANCE.getRefinement_Groups(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.AttributeGroupImpl Attribute Group}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.AttributeGroupImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getAttributeGroup() + * @generated + */ + EClass ATTRIBUTE_GROUP = eINSTANCE.getAttributeGroup(); + + /** + * The meta object literal for the 'Attributes' containment reference list feature. + * + * + * @generated + */ + EReference ATTRIBUTE_GROUP__ATTRIBUTES = eINSTANCE.getAttributeGroup_Attributes(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.AttributeImpl Attribute}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.AttributeImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getAttribute() + * @generated + */ + EClass ATTRIBUTE = eINSTANCE.getAttribute(); + + /** + * The meta object literal for the 'Name' containment reference feature. + * + * + * @generated + */ + EReference ATTRIBUTE__NAME = eINSTANCE.getAttribute_Name(); + + /** + * The meta object literal for the 'Value' containment reference feature. + * + * + * @generated + */ + EReference ATTRIBUTE__VALUE = eINSTANCE.getAttribute_Value(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.AttributeValueImpl Attribute Value}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.AttributeValueImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getAttributeValue() + * @generated + */ + EClass ATTRIBUTE_VALUE = eINSTANCE.getAttributeValue(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.StringValueImpl String Value}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.StringValueImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getStringValue() + * @generated + */ + EClass STRING_VALUE = eINSTANCE.getStringValue(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute STRING_VALUE__VALUE = eINSTANCE.getStringValue_Value(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.IntegerValueImpl Integer Value}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.IntegerValueImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getIntegerValue() + * @generated + */ + EClass INTEGER_VALUE = eINSTANCE.getIntegerValue(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute INTEGER_VALUE__VALUE = eINSTANCE.getIntegerValue_Value(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.DecimalValueImpl Decimal Value}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.DecimalValueImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getDecimalValue() + * @generated + */ + EClass DECIMAL_VALUE = eINSTANCE.getDecimalValue(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute DECIMAL_VALUE__VALUE = eINSTANCE.getDecimalValue_Value(); + + /** + * The meta object literal for the '{@link com.b2international.snowowl.snomed.scg.scg.impl.ConceptReferenceImpl Concept Reference}' class. + * + * + * @see com.b2international.snowowl.snomed.scg.scg.impl.ConceptReferenceImpl + * @see com.b2international.snowowl.snomed.scg.scg.impl.ScgPackageImpl#getConceptReference() + * @generated + */ + EClass CONCEPT_REFERENCE = eINSTANCE.getConceptReference(); + + /** + * The meta object literal for the 'Id' attribute feature. + * + * + * @generated + */ + EAttribute CONCEPT_REFERENCE__ID = eINSTANCE.getConceptReference_Id(); + + /** + * The meta object literal for the 'Term' attribute feature. + * + * + * @generated + */ + EAttribute CONCEPT_REFERENCE__TERM = eINSTANCE.getConceptReference_Term(); + + } + +} //ScgPackage diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/StringValue.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/StringValue.java new file mode 100644 index 00000000000..f971de8afc6 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/StringValue.java @@ -0,0 +1,59 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg; + + +/** + * + * A representation of the model object 'String Value'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.scg.scg.StringValue#getValue Value}
      • + *
      + * + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getStringValue() + * @model + * @generated + */ +public interface StringValue extends AttributeValue +{ + /** + * Returns the value of the 'Value' attribute. + * + * + * @return the value of the 'Value' attribute. + * @see #setValue(String) + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getStringValue_Value() + * @model + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.scg.scg.StringValue#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // StringValue diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/SubExpression.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/SubExpression.java new file mode 100644 index 00000000000..7dc2afe280e --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/SubExpression.java @@ -0,0 +1,73 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Sub Expression'. + * + * + *

      + * The following features are supported: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.scg.scg.SubExpression#getFocusConcepts Focus Concepts}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.SubExpression#getRefinement Refinement}
      • + *
      + * + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getSubExpression() + * @model + * @generated + */ +public interface SubExpression extends AttributeValue +{ + /** + * Returns the value of the 'Focus Concepts' containment reference list. + * The list contents are of type {@link com.b2international.snowowl.snomed.scg.scg.ConceptReference}. + * + * + * @return the value of the 'Focus Concepts' containment reference list. + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getSubExpression_FocusConcepts() + * @model containment="true" + * @generated + */ + EList getFocusConcepts(); + + /** + * Returns the value of the 'Refinement' containment reference. + * + * + * @return the value of the 'Refinement' containment reference. + * @see #setRefinement(Refinement) + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#getSubExpression_Refinement() + * @model containment="true" + * @generated + */ + Refinement getRefinement(); + + /** + * Sets the value of the '{@link com.b2international.snowowl.snomed.scg.scg.SubExpression#getRefinement Refinement}' containment reference. + * + * + * @param value the new value of the 'Refinement' containment reference. + * @see #getRefinement() + * @generated + */ + void setRefinement(Refinement value); + +} // SubExpression diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/GroupImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/AttributeGroupImpl.java similarity index 67% rename from snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/GroupImpl.java rename to snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/AttributeGroupImpl.java index 82f32b60755..4369342d695 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/GroupImpl.java +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/AttributeGroupImpl.java @@ -1,52 +1,52 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl.scg.impl; +package com.b2international.snowowl.snomed.scg.scg.impl; + +import com.b2international.snowowl.snomed.scg.scg.Attribute; +import com.b2international.snowowl.snomed.scg.scg.AttributeGroup; +import com.b2international.snowowl.snomed.scg.scg.ScgPackage; -import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; 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; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.dsl.scg.ScgPackage; - /** * - * An implementation of the model object 'Group'. + * An implementation of the model object 'Attribute Group'. * *

      * The following features are implemented: + *

      *
        - *
      • {@link com.b2international.snowowl.dsl.scg.impl.GroupImpl#getAttributes Attributes}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.AttributeGroupImpl#getAttributes Attributes}
      • *
      - *

      * * @generated */ -public class GroupImpl extends MinimalEObjectImpl.Container implements Group +public class AttributeGroupImpl extends MinimalEObjectImpl.Container implements AttributeGroup { /** * The cached value of the '{@link #getAttributes() Attributes}' containment reference list. @@ -63,7 +63,7 @@ public class GroupImpl extends MinimalEObjectImpl.Container implements Group * * @generated */ - protected GroupImpl() + protected AttributeGroupImpl() { super(); } @@ -76,7 +76,7 @@ protected GroupImpl() @Override protected EClass eStaticClass() { - return ScgPackage.Literals.GROUP; + return ScgPackage.Literals.ATTRIBUTE_GROUP; } /** @@ -84,11 +84,12 @@ protected EClass eStaticClass() * * @generated */ + @Override public EList getAttributes() { if (attributes == null) { - attributes = new EObjectContainmentEList(Attribute.class, this, ScgPackage.GROUP__ATTRIBUTES); + attributes = new EObjectContainmentEList(Attribute.class, this, ScgPackage.ATTRIBUTE_GROUP__ATTRIBUTES); } return attributes; } @@ -103,7 +104,7 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, { switch (featureID) { - case ScgPackage.GROUP__ATTRIBUTES: + case ScgPackage.ATTRIBUTE_GROUP__ATTRIBUTES: return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); @@ -119,7 +120,7 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case ScgPackage.GROUP__ATTRIBUTES: + case ScgPackage.ATTRIBUTE_GROUP__ATTRIBUTES: return getAttributes(); } return super.eGet(featureID, resolve, coreType); @@ -136,7 +137,7 @@ public void eSet(int featureID, Object newValue) { switch (featureID) { - case ScgPackage.GROUP__ATTRIBUTES: + case ScgPackage.ATTRIBUTE_GROUP__ATTRIBUTES: getAttributes().clear(); getAttributes().addAll((Collection)newValue); return; @@ -154,7 +155,7 @@ public void eUnset(int featureID) { switch (featureID) { - case ScgPackage.GROUP__ATTRIBUTES: + case ScgPackage.ATTRIBUTE_GROUP__ATTRIBUTES: getAttributes().clear(); return; } @@ -171,39 +172,10 @@ public boolean eIsSet(int featureID) { switch (featureID) { - case ScgPackage.GROUP__ATTRIBUTES: + case ScgPackage.ATTRIBUTE_GROUP__ATTRIBUTES: return attributes != null && !attributes.isEmpty(); } return super.eIsSet(featureID); } - - /** - * - * - * @generated NOT - */ - @Override - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(); - result.append('{'); - // get all attribute labels - List attributeLabels = new ArrayList(); - for (Attribute attribute : getAttributes()) { - attributeLabels.add(attribute.toString()); - } - // sort attribute labels - Collections.sort(attributeLabels); - - for (Iterator iterator = attributeLabels.iterator(); iterator.hasNext();) { - result.append(iterator.next()); - if (iterator.hasNext()) - result.append(','); - } - result.append('}'); - return result.toString(); - } -} //GroupImpl \ No newline at end of file +} //AttributeGroupImpl diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/AttributeImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/AttributeImpl.java similarity index 81% rename from snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/AttributeImpl.java rename to snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/AttributeImpl.java index 24be653d856..885c30c3932 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/AttributeImpl.java +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/AttributeImpl.java @@ -1,44 +1,45 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl.scg.impl; +package com.b2international.snowowl.snomed.scg.scg.impl; + +import com.b2international.snowowl.snomed.scg.scg.Attribute; +import com.b2international.snowowl.snomed.scg.scg.AttributeValue; +import com.b2international.snowowl.snomed.scg.scg.ConceptReference; +import com.b2international.snowowl.snomed.scg.scg.ScgPackage; 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.InternalEObject; + import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.AttributeValue; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.ScgPackage; - /** * * An implementation of the model object 'Attribute'. * *

      * The following features are implemented: + *

      *
        - *
      • {@link com.b2international.snowowl.dsl.scg.impl.AttributeImpl#getName Name}
      • - *
      • {@link com.b2international.snowowl.dsl.scg.impl.AttributeImpl#getValue Value}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.AttributeImpl#getName Name}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.AttributeImpl#getValue Value}
      • *
      - *

      * * @generated */ @@ -52,7 +53,7 @@ public class AttributeImpl extends MinimalEObjectImpl.Container implements Attri * @generated * @ordered */ - protected Concept name; + protected ConceptReference name; /** * The cached value of the '{@link #getValue() Value}' containment reference. @@ -90,7 +91,8 @@ protected EClass eStaticClass() * * @generated */ - public Concept getName() + @Override + public ConceptReference getName() { return name; } @@ -100,9 +102,9 @@ public Concept getName() * * @generated */ - public NotificationChain basicSetName(Concept newName, NotificationChain msgs) + public NotificationChain basicSetName(ConceptReference newName, NotificationChain msgs) { - Concept oldName = name; + ConceptReference oldName = name; name = newName; if (eNotificationRequired()) { @@ -117,7 +119,8 @@ public NotificationChain basicSetName(Concept newName, NotificationChain msgs) * * @generated */ - public void setName(Concept newName) + @Override + public void setName(ConceptReference newName) { if (newName != name) { @@ -138,6 +141,7 @@ else if (eNotificationRequired()) * * @generated */ + @Override public AttributeValue getValue() { return value; @@ -165,6 +169,7 @@ public NotificationChain basicSetValue(AttributeValue newValue, NotificationChai * * @generated */ + @Override public void setValue(AttributeValue newValue) { if (newValue != value) @@ -228,7 +233,7 @@ public void eSet(int featureID, Object newValue) switch (featureID) { case ScgPackage.ATTRIBUTE__NAME: - setName((Concept)newValue); + setName((ConceptReference)newValue); return; case ScgPackage.ATTRIBUTE__VALUE: setValue((AttributeValue)newValue); @@ -248,7 +253,7 @@ public void eUnset(int featureID) switch (featureID) { case ScgPackage.ATTRIBUTE__NAME: - setName((Concept)null); + setName((ConceptReference)null); return; case ScgPackage.ATTRIBUTE__VALUE: setValue((AttributeValue)null); @@ -274,35 +279,5 @@ public boolean eIsSet(int featureID) } return super.eIsSet(featureID); } - - /** - * - * - * @generated NOT - */ - @Override - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(); - result.append(name); - result.append('='); - - if (value instanceof Expression) { - /* - * 5.5.2 Canonical representations - * If a value contains nested refinements, the value is enclosed in - * round brackets (which may influence the sort order) - */ - result.append('('); - result.append(value); - result.append(')'); - } else { - result.append(value); - } - - return result.toString(); - } -} //AttributeImpl \ No newline at end of file +} //AttributeImpl diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/AttributeValueImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/AttributeValueImpl.java similarity index 81% rename from snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/AttributeValueImpl.java rename to snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/AttributeValueImpl.java index 1843051572f..28941c763ca 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/AttributeValueImpl.java +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/AttributeValueImpl.java @@ -1,22 +1,22 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl.scg.impl; +package com.b2international.snowowl.snomed.scg.scg.impl; -import com.b2international.snowowl.dsl.scg.AttributeValue; -import com.b2international.snowowl.dsl.scg.ScgPackage; +import com.b2international.snowowl.snomed.scg.scg.AttributeValue; +import com.b2international.snowowl.snomed.scg.scg.ScgPackage; import org.eclipse.emf.ecore.EClass; @@ -26,8 +26,6 @@ * * An implementation of the model object 'Attribute Value'. * - *

      - *

      * * @generated */ @@ -54,4 +52,4 @@ protected EClass eStaticClass() return ScgPackage.Literals.ATTRIBUTE_VALUE; } -} //AttributeValueImpl \ No newline at end of file +} //AttributeValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ConceptImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ConceptReferenceImpl.java similarity index 64% rename from snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ConceptImpl.java rename to snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ConceptReferenceImpl.java index 3aa657536c4..bf12e784e08 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ConceptImpl.java +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ConceptReferenceImpl.java @@ -1,51 +1,44 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl.scg.impl; +package com.b2international.snowowl.snomed.scg.scg.impl; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.ScgPackage; - -import java.util.Collection; +import com.b2international.snowowl.snomed.scg.scg.ConceptReference; +import com.b2international.snowowl.snomed.scg.scg.ScgPackage; 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; -import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; - /** * - * An implementation of the model object 'Concept'. + * An implementation of the model object 'Concept Reference'. * *

      * The following features are implemented: + *

      *
        - *
      • {@link com.b2international.snowowl.dsl.scg.impl.ConceptImpl#getId Id}
      • - *
      • {@link com.b2international.snowowl.dsl.scg.impl.ConceptImpl#getTerm Term}
      • - *
      • {@link com.b2international.snowowl.dsl.scg.impl.ConceptImpl#getSuperTypes Super Types}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.ConceptReferenceImpl#getId Id}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.ConceptReferenceImpl#getTerm Term}
      • *
      - *

      * * @generated */ -public class ConceptImpl extends AttributeValueImpl implements Concept +public class ConceptReferenceImpl extends AttributeValueImpl implements ConceptReference { /** * The default value of the '{@link #getId() Id}' attribute. @@ -88,21 +81,11 @@ public class ConceptImpl extends AttributeValueImpl implements Concept protected String term = TERM_EDEFAULT; /** - * The cached value of the '{@link #getSuperTypes() Super Types}' attribute list. * * - * @see #getSuperTypes() * @generated - * @ordered */ - protected EList superTypes; - - /** - * - * - * @generated - */ - protected ConceptImpl() + protected ConceptReferenceImpl() { super(); } @@ -115,7 +98,7 @@ protected ConceptImpl() @Override protected EClass eStaticClass() { - return ScgPackage.Literals.CONCEPT; + return ScgPackage.Literals.CONCEPT_REFERENCE; } /** @@ -123,6 +106,7 @@ protected EClass eStaticClass() * * @generated */ + @Override public String getId() { return id; @@ -133,12 +117,13 @@ public String getId() * * @generated */ + @Override public void setId(String newId) { String oldId = id; id = newId; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ScgPackage.CONCEPT__ID, oldId, id)); + eNotify(new ENotificationImpl(this, Notification.SET, ScgPackage.CONCEPT_REFERENCE__ID, oldId, id)); } /** @@ -146,6 +131,7 @@ public void setId(String newId) * * @generated */ + @Override public String getTerm() { return term; @@ -156,26 +142,13 @@ public String getTerm() * * @generated */ + @Override public void setTerm(String newTerm) { String oldTerm = term; term = newTerm; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ScgPackage.CONCEPT__TERM, oldTerm, term)); - } - - /** - * - * - * @generated - */ - public EList getSuperTypes() - { - if (superTypes == null) - { - superTypes = new EDataTypeUniqueEList(Long.class, this, ScgPackage.CONCEPT__SUPER_TYPES); - } - return superTypes; + eNotify(new ENotificationImpl(this, Notification.SET, ScgPackage.CONCEPT_REFERENCE__TERM, oldTerm, term)); } /** @@ -188,12 +161,10 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case ScgPackage.CONCEPT__ID: + case ScgPackage.CONCEPT_REFERENCE__ID: return getId(); - case ScgPackage.CONCEPT__TERM: + case ScgPackage.CONCEPT_REFERENCE__TERM: return getTerm(); - case ScgPackage.CONCEPT__SUPER_TYPES: - return getSuperTypes(); } return super.eGet(featureID, resolve, coreType); } @@ -203,22 +174,17 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) * * @generated */ - @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case ScgPackage.CONCEPT__ID: + case ScgPackage.CONCEPT_REFERENCE__ID: setId((String)newValue); return; - case ScgPackage.CONCEPT__TERM: + case ScgPackage.CONCEPT_REFERENCE__TERM: setTerm((String)newValue); return; - case ScgPackage.CONCEPT__SUPER_TYPES: - getSuperTypes().clear(); - getSuperTypes().addAll((Collection)newValue); - return; } super.eSet(featureID, newValue); } @@ -233,15 +199,12 @@ public void eUnset(int featureID) { switch (featureID) { - case ScgPackage.CONCEPT__ID: + case ScgPackage.CONCEPT_REFERENCE__ID: setId(ID_EDEFAULT); return; - case ScgPackage.CONCEPT__TERM: + case ScgPackage.CONCEPT_REFERENCE__TERM: setTerm(TERM_EDEFAULT); return; - case ScgPackage.CONCEPT__SUPER_TYPES: - getSuperTypes().clear(); - return; } super.eUnset(featureID); } @@ -256,12 +219,10 @@ public boolean eIsSet(int featureID) { switch (featureID) { - case ScgPackage.CONCEPT__ID: + case ScgPackage.CONCEPT_REFERENCE__ID: return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); - case ScgPackage.CONCEPT__TERM: + case ScgPackage.CONCEPT_REFERENCE__TERM: return TERM_EDEFAULT == null ? term != null : !TERM_EDEFAULT.equals(term); - case ScgPackage.CONCEPT__SUPER_TYPES: - return superTypes != null && !superTypes.isEmpty(); } return super.eIsSet(featureID); } @@ -269,21 +230,20 @@ public boolean eIsSet(int featureID) /** * * - * @generated NOT + * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (id: "); result.append(id); - - if (term != null && term.length() > 0) { - result.append("|" + term + "|"); - } - + result.append(", term: "); + result.append(term); + result.append(')'); return result.toString(); } - -} //ConceptImpl \ No newline at end of file + +} //ConceptReferenceImpl diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/DecimalValueImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/DecimalValueImpl.java new file mode 100644 index 00000000000..0a6fbd69a11 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/DecimalValueImpl.java @@ -0,0 +1,193 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg.impl; + +import com.b2international.snowowl.snomed.scg.scg.DecimalValue; +import com.b2international.snowowl.snomed.scg.scg.ScgPackage; + +import java.math.BigDecimal; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Decimal Value'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.DecimalValueImpl#getValue Value}
      • + *
      + * + * @generated + */ +public class DecimalValueImpl extends AttributeValueImpl implements DecimalValue +{ + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final BigDecimal VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected BigDecimal value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected DecimalValueImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ScgPackage.Literals.DECIMAL_VALUE; + } + + /** + * + * + * @generated + */ + @Override + public BigDecimal getValue() + { + return value; + } + + /** + * + * + * @generated + */ + @Override + public void setValue(BigDecimal newValue) + { + BigDecimal oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScgPackage.DECIMAL_VALUE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case ScgPackage.DECIMAL_VALUE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case ScgPackage.DECIMAL_VALUE__VALUE: + setValue((BigDecimal)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ScgPackage.DECIMAL_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ScgPackage.DECIMAL_VALUE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //DecimalValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ExpressionImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ExpressionImpl.java new file mode 100644 index 00000000000..ba31683a124 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ExpressionImpl.java @@ -0,0 +1,282 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg.impl; + +import com.b2international.snowowl.snomed.scg.scg.Expression; +import com.b2international.snowowl.snomed.scg.scg.ScgPackage; +import com.b2international.snowowl.snomed.scg.scg.SubExpression; + +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.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Expression'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.ExpressionImpl#isPrimitive Primitive}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.ExpressionImpl#getExpression Expression}
      • + *
      + * + * @generated + */ +public class ExpressionImpl extends MinimalEObjectImpl.Container implements Expression +{ + /** + * The default value of the '{@link #isPrimitive() Primitive}' attribute. + * + * + * @see #isPrimitive() + * @generated + * @ordered + */ + protected static final boolean PRIMITIVE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isPrimitive() Primitive}' attribute. + * + * + * @see #isPrimitive() + * @generated + * @ordered + */ + protected boolean primitive = PRIMITIVE_EDEFAULT; + + /** + * The cached value of the '{@link #getExpression() Expression}' containment reference. + * + * + * @see #getExpression() + * @generated + * @ordered + */ + protected SubExpression expression; + + /** + * + * + * @generated + */ + protected ExpressionImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ScgPackage.Literals.EXPRESSION; + } + + /** + * + * + * @generated + */ + @Override + public boolean isPrimitive() + { + return primitive; + } + + /** + * + * + * @generated + */ + @Override + public void setPrimitive(boolean newPrimitive) + { + boolean oldPrimitive = primitive; + primitive = newPrimitive; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScgPackage.EXPRESSION__PRIMITIVE, oldPrimitive, primitive)); + } + + /** + * + * + * @generated + */ + @Override + public SubExpression getExpression() + { + return expression; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetExpression(SubExpression newExpression, NotificationChain msgs) + { + SubExpression oldExpression = expression; + expression = newExpression; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ScgPackage.EXPRESSION__EXPRESSION, oldExpression, newExpression); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setExpression(SubExpression newExpression) + { + if (newExpression != expression) + { + NotificationChain msgs = null; + if (expression != null) + msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ScgPackage.EXPRESSION__EXPRESSION, null, msgs); + if (newExpression != null) + msgs = ((InternalEObject)newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ScgPackage.EXPRESSION__EXPRESSION, null, msgs); + msgs = basicSetExpression(newExpression, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScgPackage.EXPRESSION__EXPRESSION, newExpression, newExpression)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case ScgPackage.EXPRESSION__EXPRESSION: + return basicSetExpression(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case ScgPackage.EXPRESSION__PRIMITIVE: + return isPrimitive(); + case ScgPackage.EXPRESSION__EXPRESSION: + return getExpression(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case ScgPackage.EXPRESSION__PRIMITIVE: + setPrimitive((Boolean)newValue); + return; + case ScgPackage.EXPRESSION__EXPRESSION: + setExpression((SubExpression)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ScgPackage.EXPRESSION__PRIMITIVE: + setPrimitive(PRIMITIVE_EDEFAULT); + return; + case ScgPackage.EXPRESSION__EXPRESSION: + setExpression((SubExpression)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ScgPackage.EXPRESSION__PRIMITIVE: + return primitive != PRIMITIVE_EDEFAULT; + case ScgPackage.EXPRESSION__EXPRESSION: + return expression != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (primitive: "); + result.append(primitive); + result.append(')'); + return result.toString(); + } + +} //ExpressionImpl diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/IntegerValueImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/IntegerValueImpl.java new file mode 100644 index 00000000000..2e28fa4918a --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/IntegerValueImpl.java @@ -0,0 +1,191 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg.impl; + +import com.b2international.snowowl.snomed.scg.scg.IntegerValue; +import com.b2international.snowowl.snomed.scg.scg.ScgPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Integer Value'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.IntegerValueImpl#getValue Value}
      • + *
      + * + * @generated + */ +public class IntegerValueImpl extends AttributeValueImpl implements IntegerValue +{ + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final int VALUE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected int value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected IntegerValueImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ScgPackage.Literals.INTEGER_VALUE; + } + + /** + * + * + * @generated + */ + @Override + public int getValue() + { + return value; + } + + /** + * + * + * @generated + */ + @Override + public void setValue(int newValue) + { + int oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScgPackage.INTEGER_VALUE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case ScgPackage.INTEGER_VALUE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case ScgPackage.INTEGER_VALUE__VALUE: + setValue((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ScgPackage.INTEGER_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ScgPackage.INTEGER_VALUE__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //IntegerValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/RefinementImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/RefinementImpl.java new file mode 100644 index 00000000000..7d674cec0f9 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/RefinementImpl.java @@ -0,0 +1,221 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg.impl; + +import com.b2international.snowowl.snomed.scg.scg.Attribute; +import com.b2international.snowowl.snomed.scg.scg.AttributeGroup; +import com.b2international.snowowl.snomed.scg.scg.Refinement; +import com.b2international.snowowl.snomed.scg.scg.ScgPackage; + +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; + +/** + * + * An implementation of the model object 'Refinement'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.RefinementImpl#getAttributes Attributes}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.RefinementImpl#getGroups Groups}
      • + *
      + * + * @generated + */ +public class RefinementImpl extends MinimalEObjectImpl.Container implements Refinement +{ + /** + * The cached value of the '{@link #getAttributes() Attributes}' containment reference list. + * + * + * @see #getAttributes() + * @generated + * @ordered + */ + protected EList attributes; + + /** + * The cached value of the '{@link #getGroups() Groups}' containment reference list. + * + * + * @see #getGroups() + * @generated + * @ordered + */ + protected EList groups; + + /** + * + * + * @generated + */ + protected RefinementImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ScgPackage.Literals.REFINEMENT; + } + + /** + * + * + * @generated + */ + @Override + public EList getAttributes() + { + if (attributes == null) + { + attributes = new EObjectContainmentEList(Attribute.class, this, ScgPackage.REFINEMENT__ATTRIBUTES); + } + return attributes; + } + + /** + * + * + * @generated + */ + @Override + public EList getGroups() + { + if (groups == null) + { + groups = new EObjectContainmentEList(AttributeGroup.class, this, ScgPackage.REFINEMENT__GROUPS); + } + return groups; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case ScgPackage.REFINEMENT__ATTRIBUTES: + return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); + case ScgPackage.REFINEMENT__GROUPS: + return ((InternalEList)getGroups()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case ScgPackage.REFINEMENT__ATTRIBUTES: + return getAttributes(); + case ScgPackage.REFINEMENT__GROUPS: + return getGroups(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case ScgPackage.REFINEMENT__ATTRIBUTES: + getAttributes().clear(); + getAttributes().addAll((Collection)newValue); + return; + case ScgPackage.REFINEMENT__GROUPS: + getGroups().clear(); + getGroups().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ScgPackage.REFINEMENT__ATTRIBUTES: + getAttributes().clear(); + return; + case ScgPackage.REFINEMENT__GROUPS: + getGroups().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ScgPackage.REFINEMENT__ATTRIBUTES: + return attributes != null && !attributes.isEmpty(); + case ScgPackage.REFINEMENT__GROUPS: + return groups != null && !groups.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //RefinementImpl diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ScgFactoryImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ScgFactoryImpl.java similarity index 59% rename from snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ScgFactoryImpl.java rename to snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ScgFactoryImpl.java index 132e3b1e506..48ae9d02945 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/impl/ScgFactoryImpl.java +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ScgFactoryImpl.java @@ -1,21 +1,21 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl.scg.impl; +package com.b2international.snowowl.snomed.scg.scg.impl; -import com.b2international.snowowl.dsl.scg.*; +import com.b2international.snowowl.snomed.scg.scg.*; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; @@ -43,7 +43,7 @@ public static ScgFactory init() { try { - ScgFactory theScgFactory = (ScgFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.b2international.com/snowowl/SCG"); + ScgFactory theScgFactory = (ScgFactory)EPackage.Registry.INSTANCE.getEFactory(ScgPackage.eNS_URI); if (theScgFactory != null) { return theScgFactory; @@ -78,10 +78,15 @@ public EObject create(EClass eClass) switch (eClass.getClassifierID()) { case ScgPackage.EXPRESSION: return createExpression(); - case ScgPackage.CONCEPT: return createConcept(); - case ScgPackage.GROUP: return createGroup(); + case ScgPackage.SUB_EXPRESSION: return createSubExpression(); + case ScgPackage.REFINEMENT: return createRefinement(); + case ScgPackage.ATTRIBUTE_GROUP: return createAttributeGroup(); case ScgPackage.ATTRIBUTE: return createAttribute(); case ScgPackage.ATTRIBUTE_VALUE: return createAttributeValue(); + case ScgPackage.STRING_VALUE: return createStringValue(); + case ScgPackage.INTEGER_VALUE: return createIntegerValue(); + case ScgPackage.DECIMAL_VALUE: return createDecimalValue(); + case ScgPackage.CONCEPT_REFERENCE: return createConceptReference(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -92,6 +97,7 @@ public EObject create(EClass eClass) * * @generated */ + @Override public Expression createExpression() { ExpressionImpl expression = new ExpressionImpl(); @@ -103,10 +109,11 @@ public Expression createExpression() * * @generated */ - public Concept createConcept() + @Override + public SubExpression createSubExpression() { - ConceptImpl concept = new ConceptImpl(); - return concept; + SubExpressionImpl subExpression = new SubExpressionImpl(); + return subExpression; } /** @@ -114,10 +121,23 @@ public Concept createConcept() * * @generated */ - public Group createGroup() + @Override + public Refinement createRefinement() + { + RefinementImpl refinement = new RefinementImpl(); + return refinement; + } + + /** + * + * + * @generated + */ + @Override + public AttributeGroup createAttributeGroup() { - GroupImpl group = new GroupImpl(); - return group; + AttributeGroupImpl attributeGroup = new AttributeGroupImpl(); + return attributeGroup; } /** @@ -125,6 +145,7 @@ public Group createGroup() * * @generated */ + @Override public Attribute createAttribute() { AttributeImpl attribute = new AttributeImpl(); @@ -136,6 +157,7 @@ public Attribute createAttribute() * * @generated */ + @Override public AttributeValue createAttributeValue() { AttributeValueImpl attributeValue = new AttributeValueImpl(); @@ -147,6 +169,55 @@ public AttributeValue createAttributeValue() * * @generated */ + @Override + public StringValue createStringValue() + { + StringValueImpl stringValue = new StringValueImpl(); + return stringValue; + } + + /** + * + * + * @generated + */ + @Override + public IntegerValue createIntegerValue() + { + IntegerValueImpl integerValue = new IntegerValueImpl(); + return integerValue; + } + + /** + * + * + * @generated + */ + @Override + public DecimalValue createDecimalValue() + { + DecimalValueImpl decimalValue = new DecimalValueImpl(); + return decimalValue; + } + + /** + * + * + * @generated + */ + @Override + public ConceptReference createConceptReference() + { + ConceptReferenceImpl conceptReference = new ConceptReferenceImpl(); + return conceptReference; + } + + /** + * + * + * @generated + */ + @Override public ScgPackage getScgPackage() { return (ScgPackage)getEPackage(); @@ -164,4 +235,4 @@ public static ScgPackage getPackage() return ScgPackage.eINSTANCE; } -} //ScgFactoryImpl \ No newline at end of file +} //ScgFactoryImpl diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ScgPackageImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ScgPackageImpl.java new file mode 100644 index 00000000000..7c35cddee46 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/ScgPackageImpl.java @@ -0,0 +1,583 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg.impl; + +import com.b2international.snowowl.snomed.scg.scg.Attribute; +import com.b2international.snowowl.snomed.scg.scg.AttributeGroup; +import com.b2international.snowowl.snomed.scg.scg.AttributeValue; +import com.b2international.snowowl.snomed.scg.scg.ConceptReference; +import com.b2international.snowowl.snomed.scg.scg.DecimalValue; +import com.b2international.snowowl.snomed.scg.scg.Expression; +import com.b2international.snowowl.snomed.scg.scg.IntegerValue; +import com.b2international.snowowl.snomed.scg.scg.Refinement; +import com.b2international.snowowl.snomed.scg.scg.ScgFactory; +import com.b2international.snowowl.snomed.scg.scg.ScgPackage; +import com.b2international.snowowl.snomed.scg.scg.StringValue; +import com.b2international.snowowl.snomed.scg.scg.SubExpression; + +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; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ScgPackageImpl extends EPackageImpl implements ScgPackage +{ + /** + * + * + * @generated + */ + private EClass expressionEClass = null; + + /** + * + * + * @generated + */ + private EClass subExpressionEClass = null; + + /** + * + * + * @generated + */ + private EClass refinementEClass = null; + + /** + * + * + * @generated + */ + private EClass attributeGroupEClass = null; + + /** + * + * + * @generated + */ + private EClass attributeEClass = null; + + /** + * + * + * @generated + */ + private EClass attributeValueEClass = null; + + /** + * + * + * @generated + */ + private EClass stringValueEClass = null; + + /** + * + * + * @generated + */ + private EClass integerValueEClass = null; + + /** + * + * + * @generated + */ + private EClass decimalValueEClass = null; + + /** + * + * + * @generated + */ + private EClass conceptReferenceEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

      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. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage#eNS_URI + * @see #init() + * @generated + */ + private ScgPackageImpl() + { + super(eNS_URI, ScgFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

      This method is used to initialize {@link ScgPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ScgPackage init() + { + if (isInited) return (ScgPackage)EPackage.Registry.INSTANCE.getEPackage(ScgPackage.eNS_URI); + + // Obtain or create and register package + Object registeredScgPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + ScgPackageImpl theScgPackage = registeredScgPackage instanceof ScgPackageImpl ? (ScgPackageImpl)registeredScgPackage : new ScgPackageImpl(); + + isInited = true; + + // Create package meta-data objects + theScgPackage.createPackageContents(); + + // Initialize created meta-data + theScgPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theScgPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ScgPackage.eNS_URI, theScgPackage); + return theScgPackage; + } + + /** + * + * + * @generated + */ + @Override + public EClass getExpression() + { + return expressionEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getExpression_Primitive() + { + return (EAttribute)expressionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getExpression_Expression() + { + return (EReference)expressionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getSubExpression() + { + return subExpressionEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getSubExpression_FocusConcepts() + { + return (EReference)subExpressionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getSubExpression_Refinement() + { + return (EReference)subExpressionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getRefinement() + { + return refinementEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getRefinement_Attributes() + { + return (EReference)refinementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getRefinement_Groups() + { + return (EReference)refinementEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getAttributeGroup() + { + return attributeGroupEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getAttributeGroup_Attributes() + { + return (EReference)attributeGroupEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getAttribute() + { + return attributeEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getAttribute_Name() + { + return (EReference)attributeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getAttribute_Value() + { + return (EReference)attributeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getAttributeValue() + { + return attributeValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EClass getStringValue() + { + return stringValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getStringValue_Value() + { + return (EAttribute)stringValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getIntegerValue() + { + return integerValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getIntegerValue_Value() + { + return (EAttribute)integerValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getDecimalValue() + { + return decimalValueEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getDecimalValue_Value() + { + return (EAttribute)decimalValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getConceptReference() + { + return conceptReferenceEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getConceptReference_Id() + { + return (EAttribute)conceptReferenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getConceptReference_Term() + { + return (EAttribute)conceptReferenceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public ScgFactory getScgFactory() + { + return (ScgFactory)getEFactoryInstance(); + } + + /** + * + * + * @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. + * + * + * @generated + */ + public void createPackageContents() + { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + expressionEClass = createEClass(EXPRESSION); + createEAttribute(expressionEClass, EXPRESSION__PRIMITIVE); + createEReference(expressionEClass, EXPRESSION__EXPRESSION); + + subExpressionEClass = createEClass(SUB_EXPRESSION); + createEReference(subExpressionEClass, SUB_EXPRESSION__FOCUS_CONCEPTS); + createEReference(subExpressionEClass, SUB_EXPRESSION__REFINEMENT); + + refinementEClass = createEClass(REFINEMENT); + createEReference(refinementEClass, REFINEMENT__ATTRIBUTES); + createEReference(refinementEClass, REFINEMENT__GROUPS); + + attributeGroupEClass = createEClass(ATTRIBUTE_GROUP); + createEReference(attributeGroupEClass, ATTRIBUTE_GROUP__ATTRIBUTES); + + attributeEClass = createEClass(ATTRIBUTE); + createEReference(attributeEClass, ATTRIBUTE__NAME); + createEReference(attributeEClass, ATTRIBUTE__VALUE); + + attributeValueEClass = createEClass(ATTRIBUTE_VALUE); + + stringValueEClass = createEClass(STRING_VALUE); + createEAttribute(stringValueEClass, STRING_VALUE__VALUE); + + integerValueEClass = createEClass(INTEGER_VALUE); + createEAttribute(integerValueEClass, INTEGER_VALUE__VALUE); + + decimalValueEClass = createEClass(DECIMAL_VALUE); + createEAttribute(decimalValueEClass, DECIMAL_VALUE__VALUE); + + conceptReferenceEClass = createEClass(CONCEPT_REFERENCE); + createEAttribute(conceptReferenceEClass, CONCEPT_REFERENCE__ID); + createEAttribute(conceptReferenceEClass, CONCEPT_REFERENCE__TERM); + } + + /** + * + * + * @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. + * + * + * @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 + subExpressionEClass.getESuperTypes().add(this.getAttributeValue()); + stringValueEClass.getESuperTypes().add(this.getAttributeValue()); + integerValueEClass.getESuperTypes().add(this.getAttributeValue()); + decimalValueEClass.getESuperTypes().add(this.getAttributeValue()); + conceptReferenceEClass.getESuperTypes().add(this.getAttributeValue()); + + // Initialize classes and features; add operations and parameters + initEClass(expressionEClass, Expression.class, "Expression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getExpression_Primitive(), ecorePackage.getEBoolean(), "primitive", null, 0, 1, Expression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getExpression_Expression(), this.getSubExpression(), null, "expression", null, 0, 1, Expression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(subExpressionEClass, SubExpression.class, "SubExpression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSubExpression_FocusConcepts(), this.getConceptReference(), null, "focusConcepts", null, 0, -1, SubExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSubExpression_Refinement(), this.getRefinement(), null, "refinement", null, 0, 1, SubExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(refinementEClass, Refinement.class, "Refinement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getRefinement_Attributes(), this.getAttribute(), null, "attributes", null, 0, -1, Refinement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getRefinement_Groups(), this.getAttributeGroup(), null, "groups", null, 0, -1, Refinement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(attributeGroupEClass, AttributeGroup.class, "AttributeGroup", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAttributeGroup_Attributes(), this.getAttribute(), null, "attributes", null, 0, -1, AttributeGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(attributeEClass, Attribute.class, "Attribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAttribute_Name(), this.getConceptReference(), null, "name", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAttribute_Value(), this.getAttributeValue(), null, "value", null, 0, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(attributeValueEClass, AttributeValue.class, "AttributeValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(stringValueEClass, StringValue.class, "StringValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getStringValue_Value(), ecorePackage.getEString(), "value", null, 0, 1, StringValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(integerValueEClass, IntegerValue.class, "IntegerValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getIntegerValue_Value(), ecorePackage.getEInt(), "value", null, 0, 1, IntegerValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(decimalValueEClass, DecimalValue.class, "DecimalValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDecimalValue_Value(), ecorePackage.getEBigDecimal(), "value", null, 0, 1, DecimalValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(conceptReferenceEClass, ConceptReference.class, "ConceptReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getConceptReference_Id(), ecorePackage.getEString(), "id", null, 0, 1, ConceptReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getConceptReference_Term(), ecorePackage.getEString(), "term", null, 0, 1, ConceptReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //ScgPackageImpl diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/StringValueImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/StringValueImpl.java new file mode 100644 index 00000000000..93eb8f9979c --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/StringValueImpl.java @@ -0,0 +1,191 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg.impl; + +import com.b2international.snowowl.snomed.scg.scg.ScgPackage; +import com.b2international.snowowl.snomed.scg.scg.StringValue; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'String Value'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.StringValueImpl#getValue Value}
      • + *
      + * + * @generated + */ +public class StringValueImpl extends AttributeValueImpl implements StringValue +{ + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected StringValueImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ScgPackage.Literals.STRING_VALUE; + } + + /** + * + * + * @generated + */ + @Override + public String getValue() + { + return value; + } + + /** + * + * + * @generated + */ + @Override + public void setValue(String newValue) + { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScgPackage.STRING_VALUE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case ScgPackage.STRING_VALUE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case ScgPackage.STRING_VALUE__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ScgPackage.STRING_VALUE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ScgPackage.STRING_VALUE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //StringValueImpl diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/SubExpressionImpl.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/SubExpressionImpl.java new file mode 100644 index 00000000000..c44c8c20336 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/impl/SubExpressionImpl.java @@ -0,0 +1,256 @@ +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * * + * http://www.apache.org/licenses/LICENSE-2.0 + * * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scg.impl; + +import com.b2international.snowowl.snomed.scg.scg.ConceptReference; +import com.b2international.snowowl.snomed.scg.scg.Refinement; +import com.b2international.snowowl.snomed.scg.scg.ScgPackage; +import com.b2international.snowowl.snomed.scg.scg.SubExpression; + +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; + +/** + * + * An implementation of the model object 'Sub Expression'. + * + *

      + * The following features are implemented: + *

      + *
        + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.SubExpressionImpl#getFocusConcepts Focus Concepts}
      • + *
      • {@link com.b2international.snowowl.snomed.scg.scg.impl.SubExpressionImpl#getRefinement Refinement}
      • + *
      + * + * @generated + */ +public class SubExpressionImpl extends AttributeValueImpl implements SubExpression +{ + /** + * The cached value of the '{@link #getFocusConcepts() Focus Concepts}' containment reference list. + * + * + * @see #getFocusConcepts() + * @generated + * @ordered + */ + protected EList focusConcepts; + + /** + * The cached value of the '{@link #getRefinement() Refinement}' containment reference. + * + * + * @see #getRefinement() + * @generated + * @ordered + */ + protected Refinement refinement; + + /** + * + * + * @generated + */ + protected SubExpressionImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ScgPackage.Literals.SUB_EXPRESSION; + } + + /** + * + * + * @generated + */ + @Override + public EList getFocusConcepts() + { + if (focusConcepts == null) + { + focusConcepts = new EObjectContainmentEList(ConceptReference.class, this, ScgPackage.SUB_EXPRESSION__FOCUS_CONCEPTS); + } + return focusConcepts; + } + + /** + * + * + * @generated + */ + @Override + public Refinement getRefinement() + { + return refinement; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetRefinement(Refinement newRefinement, NotificationChain msgs) + { + Refinement oldRefinement = refinement; + refinement = newRefinement; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ScgPackage.SUB_EXPRESSION__REFINEMENT, oldRefinement, newRefinement); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setRefinement(Refinement newRefinement) + { + if (newRefinement != refinement) + { + NotificationChain msgs = null; + if (refinement != null) + msgs = ((InternalEObject)refinement).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ScgPackage.SUB_EXPRESSION__REFINEMENT, null, msgs); + if (newRefinement != null) + msgs = ((InternalEObject)newRefinement).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ScgPackage.SUB_EXPRESSION__REFINEMENT, null, msgs); + msgs = basicSetRefinement(newRefinement, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ScgPackage.SUB_EXPRESSION__REFINEMENT, newRefinement, newRefinement)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case ScgPackage.SUB_EXPRESSION__FOCUS_CONCEPTS: + return ((InternalEList)getFocusConcepts()).basicRemove(otherEnd, msgs); + case ScgPackage.SUB_EXPRESSION__REFINEMENT: + return basicSetRefinement(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case ScgPackage.SUB_EXPRESSION__FOCUS_CONCEPTS: + return getFocusConcepts(); + case ScgPackage.SUB_EXPRESSION__REFINEMENT: + return getRefinement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case ScgPackage.SUB_EXPRESSION__FOCUS_CONCEPTS: + getFocusConcepts().clear(); + getFocusConcepts().addAll((Collection)newValue); + return; + case ScgPackage.SUB_EXPRESSION__REFINEMENT: + setRefinement((Refinement)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ScgPackage.SUB_EXPRESSION__FOCUS_CONCEPTS: + getFocusConcepts().clear(); + return; + case ScgPackage.SUB_EXPRESSION__REFINEMENT: + setRefinement((Refinement)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ScgPackage.SUB_EXPRESSION__FOCUS_CONCEPTS: + return focusConcepts != null && !focusConcepts.isEmpty(); + case ScgPackage.SUB_EXPRESSION__REFINEMENT: + return refinement != null; + } + return super.eIsSet(featureID); + } + +} //SubExpressionImpl diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/util/ScgAdapterFactory.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/util/ScgAdapterFactory.java similarity index 53% rename from snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/util/ScgAdapterFactory.java rename to snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/util/ScgAdapterFactory.java index 42b62b76d9a..df2c35f518c 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/util/ScgAdapterFactory.java +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/util/ScgAdapterFactory.java @@ -1,21 +1,21 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl.scg.util; +package com.b2international.snowowl.snomed.scg.scg.util; -import com.b2international.snowowl.dsl.scg.*; +import com.b2international.snowowl.snomed.scg.scg.*; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; @@ -29,7 +29,7 @@ * The Adapter Factory for the model. * It provides an adapter createXXX method for each class of the model. * - * @see com.b2international.snowowl.dsl.scg.ScgPackage + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage * @generated */ public class ScgAdapterFactory extends AdapterFactoryImpl @@ -93,14 +93,19 @@ public Adapter caseExpression(Expression object) return createExpressionAdapter(); } @Override - public Adapter caseConcept(Concept object) + public Adapter caseSubExpression(SubExpression object) { - return createConceptAdapter(); + return createSubExpressionAdapter(); } @Override - public Adapter caseGroup(Group object) + public Adapter caseRefinement(Refinement object) { - return createGroupAdapter(); + return createRefinementAdapter(); + } + @Override + public Adapter caseAttributeGroup(AttributeGroup object) + { + return createAttributeGroupAdapter(); } @Override public Adapter caseAttribute(Attribute object) @@ -113,6 +118,26 @@ public Adapter caseAttributeValue(AttributeValue object) return createAttributeValueAdapter(); } @Override + public Adapter caseStringValue(StringValue object) + { + return createStringValueAdapter(); + } + @Override + public Adapter caseIntegerValue(IntegerValue object) + { + return createIntegerValueAdapter(); + } + @Override + public Adapter caseDecimalValue(DecimalValue object) + { + return createDecimalValueAdapter(); + } + @Override + public Adapter caseConceptReference(ConceptReference object) + { + return createConceptReferenceAdapter(); + } + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); @@ -135,13 +160,13 @@ public Adapter createAdapter(Notifier target) /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.dsl.scg.Expression Expression}'. + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.scg.scg.Expression Expression}'. * * 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. * * @return the new adapter. - * @see com.b2international.snowowl.dsl.scg.Expression + * @see com.b2international.snowowl.snomed.scg.scg.Expression * @generated */ public Adapter createExpressionAdapter() @@ -150,43 +175,58 @@ public Adapter createExpressionAdapter() } /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.dsl.scg.Concept Concept}'. + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.scg.scg.SubExpression Sub Expression}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.scg.scg.SubExpression + * @generated + */ + public Adapter createSubExpressionAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.scg.scg.Refinement Refinement}'. * * 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. * * @return the new adapter. - * @see com.b2international.snowowl.dsl.scg.Concept + * @see com.b2international.snowowl.snomed.scg.scg.Refinement * @generated */ - public Adapter createConceptAdapter() + public Adapter createRefinementAdapter() { return null; } /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.dsl.scg.Group Group}'. + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.scg.scg.AttributeGroup Attribute Group}'. * * 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. * * @return the new adapter. - * @see com.b2international.snowowl.dsl.scg.Group + * @see com.b2international.snowowl.snomed.scg.scg.AttributeGroup * @generated */ - public Adapter createGroupAdapter() + public Adapter createAttributeGroupAdapter() { return null; } /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.dsl.scg.Attribute Attribute}'. + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.scg.scg.Attribute Attribute}'. * * 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. * * @return the new adapter. - * @see com.b2international.snowowl.dsl.scg.Attribute + * @see com.b2international.snowowl.snomed.scg.scg.Attribute * @generated */ public Adapter createAttributeAdapter() @@ -195,13 +235,13 @@ public Adapter createAttributeAdapter() } /** - * Creates a new adapter for an object of class '{@link com.b2international.snowowl.dsl.scg.AttributeValue Attribute Value}'. + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.scg.scg.AttributeValue Attribute Value}'. * * 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. * * @return the new adapter. - * @see com.b2international.snowowl.dsl.scg.AttributeValue + * @see com.b2international.snowowl.snomed.scg.scg.AttributeValue * @generated */ public Adapter createAttributeValueAdapter() @@ -209,6 +249,66 @@ public Adapter createAttributeValueAdapter() return null; } + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.scg.scg.StringValue String Value}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.scg.scg.StringValue + * @generated + */ + public Adapter createStringValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.scg.scg.IntegerValue Integer Value}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.scg.scg.IntegerValue + * @generated + */ + public Adapter createIntegerValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.scg.scg.DecimalValue Decimal Value}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.scg.scg.DecimalValue + * @generated + */ + public Adapter createDecimalValueAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link com.b2international.snowowl.snomed.scg.scg.ConceptReference Concept Reference}'. + * + * 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. + * + * @return the new adapter. + * @see com.b2international.snowowl.snomed.scg.scg.ConceptReference + * @generated + */ + public Adapter createConceptReferenceAdapter() + { + return null; + } + /** * Creates a new adapter for the default case. * @@ -222,4 +322,4 @@ public Adapter createEObjectAdapter() return null; } -} //ScgAdapterFactory \ No newline at end of file +} //ScgAdapterFactory diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/util/ScgSwitch.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/util/ScgSwitch.java similarity index 54% rename from snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/util/ScgSwitch.java rename to snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/util/ScgSwitch.java index 080becef877..39713920cc6 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/dsl/scg/util/ScgSwitch.java +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scg/util/ScgSwitch.java @@ -1,21 +1,21 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg +/** + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl.scg.util; +package com.b2international.snowowl.snomed.scg.scg.util; -import com.b2international.snowowl.dsl.scg.*; +import com.b2international.snowowl.snomed.scg.scg.*; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; @@ -32,7 +32,7 @@ * until a non-null result is returned, * which is the result of the switch. * - * @see com.b2international.snowowl.dsl.scg.ScgPackage + * @see com.b2international.snowowl.snomed.scg.scg.ScgPackage * @generated */ public class ScgSwitch extends Switch @@ -63,7 +63,7 @@ public ScgSwitch() * Checks whether this is a switch for the given package. * * - * @parameter ePackage the package in question. + * @param ePackage the package in question. * @return whether this is a switch for the given package. * @generated */ @@ -89,22 +89,28 @@ protected T doSwitch(int classifierID, EObject theEObject) { Expression expression = (Expression)theEObject; T result = caseExpression(expression); - if (result == null) result = caseAttributeValue(expression); if (result == null) result = defaultCase(theEObject); return result; } - case ScgPackage.CONCEPT: + case ScgPackage.SUB_EXPRESSION: + { + SubExpression subExpression = (SubExpression)theEObject; + T result = caseSubExpression(subExpression); + if (result == null) result = caseAttributeValue(subExpression); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScgPackage.REFINEMENT: { - Concept concept = (Concept)theEObject; - T result = caseConcept(concept); - if (result == null) result = caseAttributeValue(concept); + Refinement refinement = (Refinement)theEObject; + T result = caseRefinement(refinement); if (result == null) result = defaultCase(theEObject); return result; } - case ScgPackage.GROUP: + case ScgPackage.ATTRIBUTE_GROUP: { - Group group = (Group)theEObject; - T result = caseGroup(group); + AttributeGroup attributeGroup = (AttributeGroup)theEObject; + T result = caseAttributeGroup(attributeGroup); if (result == null) result = defaultCase(theEObject); return result; } @@ -122,6 +128,38 @@ protected T doSwitch(int classifierID, EObject theEObject) if (result == null) result = defaultCase(theEObject); return result; } + case ScgPackage.STRING_VALUE: + { + StringValue stringValue = (StringValue)theEObject; + T result = caseStringValue(stringValue); + if (result == null) result = caseAttributeValue(stringValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScgPackage.INTEGER_VALUE: + { + IntegerValue integerValue = (IntegerValue)theEObject; + T result = caseIntegerValue(integerValue); + if (result == null) result = caseAttributeValue(integerValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScgPackage.DECIMAL_VALUE: + { + DecimalValue decimalValue = (DecimalValue)theEObject; + T result = caseDecimalValue(decimalValue); + if (result == null) result = caseAttributeValue(decimalValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ScgPackage.CONCEPT_REFERENCE: + { + ConceptReference conceptReference = (ConceptReference)theEObject; + T result = caseConceptReference(conceptReference); + if (result == null) result = caseAttributeValue(conceptReference); + if (result == null) result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } } @@ -143,33 +181,49 @@ public T caseExpression(Expression object) } /** - * Returns the result of interpreting the object as an instance of 'Concept'. + * Returns the result of interpreting the object as an instance of 'Sub Expression'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Concept'. + * @return the result of interpreting the object as an instance of 'Sub Expression'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseConcept(Concept object) + public T caseSubExpression(SubExpression object) { return null; } /** - * Returns the result of interpreting the object as an instance of 'Group'. + * Returns the result of interpreting the object as an instance of 'Refinement'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Group'. + * @return the result of interpreting the object as an instance of 'Refinement'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseGroup(Group object) + public T caseRefinement(Refinement object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Attribute Group'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Attribute Group'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAttributeGroup(AttributeGroup object) { return null; } @@ -206,6 +260,70 @@ public T caseAttributeValue(AttributeValue object) return null; } + /** + * Returns the result of interpreting the object as an instance of 'String Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'String Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseStringValue(StringValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Integer Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Integer Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseIntegerValue(IntegerValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Decimal Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Decimal Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDecimalValue(DecimalValue object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Concept Reference'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Concept Reference'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConceptReference(ConceptReference object) + { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'EObject'. * @@ -223,4 +341,4 @@ public T defaultCase(EObject object) return null; } -} //ScgSwitch \ No newline at end of file +} //ScgSwitch diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scoping/AbstractScgScopeProvider.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scoping/AbstractScgScopeProvider.java new file mode 100644 index 00000000000..5ff4bd03d17 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/scoping/AbstractScgScopeProvider.java @@ -0,0 +1,21 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.scoping; + +import org.eclipse.xtext.scoping.impl.DelegatingScopeProvider; + +public abstract class AbstractScgScopeProvider extends DelegatingScopeProvider { +} diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/serializer/ScgSemanticSequencer.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/serializer/ScgSemanticSequencer.java new file mode 100644 index 00000000000..c0510bdbe79 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/serializer/ScgSemanticSequencer.java @@ -0,0 +1,227 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.serializer; + +import com.b2international.snowowl.snomed.scg.scg.Attribute; +import com.b2international.snowowl.snomed.scg.scg.AttributeGroup; +import com.b2international.snowowl.snomed.scg.scg.ConceptReference; +import com.b2international.snowowl.snomed.scg.scg.DecimalValue; +import com.b2international.snowowl.snomed.scg.scg.Expression; +import com.b2international.snowowl.snomed.scg.scg.IntegerValue; +import com.b2international.snowowl.snomed.scg.scg.Refinement; +import com.b2international.snowowl.snomed.scg.scg.ScgPackage; +import com.b2international.snowowl.snomed.scg.scg.StringValue; +import com.b2international.snowowl.snomed.scg.scg.SubExpression; +import com.b2international.snowowl.snomed.scg.services.ScgGrammarAccess; +import com.google.inject.Inject; +import java.util.Set; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.xtext.Action; +import org.eclipse.xtext.Parameter; +import org.eclipse.xtext.ParserRule; +import org.eclipse.xtext.serializer.ISerializationContext; +import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; +import org.eclipse.xtext.serializer.sequencer.AbstractDelegatingSemanticSequencer; +import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient; + +@SuppressWarnings("all") +public class ScgSemanticSequencer extends AbstractDelegatingSemanticSequencer { + + @Inject + private ScgGrammarAccess grammarAccess; + + @Override + public void sequence(ISerializationContext context, EObject semanticObject) { + EPackage epackage = semanticObject.eClass().getEPackage(); + ParserRule rule = context.getParserRule(); + Action action = context.getAssignedAction(); + Set parameters = context.getEnabledBooleanParameters(); + if (epackage == ScgPackage.eINSTANCE) + switch (semanticObject.eClass().getClassifierID()) { + case ScgPackage.ATTRIBUTE: + sequence_Attribute(context, (Attribute) semanticObject); + return; + case ScgPackage.ATTRIBUTE_GROUP: + sequence_AttributeGroup(context, (AttributeGroup) semanticObject); + return; + case ScgPackage.CONCEPT_REFERENCE: + sequence_ConceptReference(context, (ConceptReference) semanticObject); + return; + case ScgPackage.DECIMAL_VALUE: + sequence_DecimalValue(context, (DecimalValue) semanticObject); + return; + case ScgPackage.EXPRESSION: + sequence_Expression(context, (Expression) semanticObject); + return; + case ScgPackage.INTEGER_VALUE: + sequence_IntegerValue(context, (IntegerValue) semanticObject); + return; + case ScgPackage.REFINEMENT: + sequence_Refinement(context, (Refinement) semanticObject); + return; + case ScgPackage.STRING_VALUE: + sequence_StringValue(context, (StringValue) semanticObject); + return; + case ScgPackage.SUB_EXPRESSION: + sequence_SubExpression(context, (SubExpression) semanticObject); + return; + } + if (errorAcceptor != null) + errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context)); + } + + /** + * Contexts: + * AttributeGroup returns AttributeGroup + * + * Constraint: + * (attributes+=Attribute attributes+=Attribute*) + */ + protected void sequence_AttributeGroup(ISerializationContext context, AttributeGroup semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * Attribute returns Attribute + * + * Constraint: + * (name=ConceptReference value=AttributeValue) + */ + protected void sequence_Attribute(ISerializationContext context, Attribute semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, ScgPackage.Literals.ATTRIBUTE__NAME) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ScgPackage.Literals.ATTRIBUTE__NAME)); + if (transientValues.isValueTransient(semanticObject, ScgPackage.Literals.ATTRIBUTE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ScgPackage.Literals.ATTRIBUTE__VALUE)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getAttributeAccess().getNameConceptReferenceParserRuleCall_0_0(), semanticObject.getName()); + feeder.accept(grammarAccess.getAttributeAccess().getValueAttributeValueParserRuleCall_2_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Contexts: + * AttributeValue returns ConceptReference + * ConceptReference returns ConceptReference + * + * Constraint: + * (id=SnomedIdentifier term=TERM_STRING?) + */ + protected void sequence_ConceptReference(ISerializationContext context, ConceptReference semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * AttributeValue returns DecimalValue + * DecimalValue returns DecimalValue + * + * Constraint: + * value=Decimal + */ + protected void sequence_DecimalValue(ISerializationContext context, DecimalValue semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, ScgPackage.Literals.DECIMAL_VALUE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ScgPackage.Literals.DECIMAL_VALUE__VALUE)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getDecimalValueAccess().getValueDecimalParserRuleCall_1_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Contexts: + * Expression returns Expression + * + * Constraint: + * (primitive?=SUBTYPE_OF? expression=SubExpression)? + */ + protected void sequence_Expression(ISerializationContext context, Expression semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * AttributeValue returns IntegerValue + * IntegerValue returns IntegerValue + * + * Constraint: + * value=Integer + */ + protected void sequence_IntegerValue(ISerializationContext context, IntegerValue semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, ScgPackage.Literals.INTEGER_VALUE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ScgPackage.Literals.INTEGER_VALUE__VALUE)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getIntegerValueAccess().getValueIntegerParserRuleCall_1_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Contexts: + * Refinement returns Refinement + * + * Constraint: + * (((attributes+=Attribute attributes+=Attribute*) | groups+=AttributeGroup) groups+=AttributeGroup*) + */ + protected void sequence_Refinement(ISerializationContext context, Refinement semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + + /** + * Contexts: + * AttributeValue returns StringValue + * StringValue returns StringValue + * + * Constraint: + * value=STRING + */ + protected void sequence_StringValue(ISerializationContext context, StringValue semanticObject) { + if (errorAcceptor != null) { + if (transientValues.isValueTransient(semanticObject, ScgPackage.Literals.STRING_VALUE__VALUE) == ValueTransient.YES) + errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ScgPackage.Literals.STRING_VALUE__VALUE)); + } + SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); + feeder.accept(grammarAccess.getStringValueAccess().getValueSTRINGTerminalRuleCall_0(), semanticObject.getValue()); + feeder.finish(); + } + + + /** + * Contexts: + * SubExpression returns SubExpression + * AttributeValue returns SubExpression + * + * Constraint: + * (focusConcepts+=ConceptReference focusConcepts+=ConceptReference* refinement=Refinement?) + */ + protected void sequence_SubExpression(ISerializationContext context, SubExpression semanticObject) { + genericSequencer.createSequence(context, semanticObject); + } + + +} diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/serializer/ScgSyntacticSequencer.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/serializer/ScgSyntacticSequencer.java new file mode 100644 index 00000000000..28267536af6 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/serializer/ScgSyntacticSequencer.java @@ -0,0 +1,219 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.serializer; + +import com.b2international.snowowl.snomed.scg.services.ScgGrammarAccess; +import com.google.inject.Inject; +import java.util.List; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.IGrammarAccess; +import org.eclipse.xtext.RuleCall; +import org.eclipse.xtext.nodemodel.INode; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; +import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias; +import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable; +import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; +import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; + +@SuppressWarnings("all") +public class ScgSyntacticSequencer extends AbstractSyntacticSequencer { + + protected ScgGrammarAccess grammarAccess; + protected AbstractElementAlias match_Expression_EQUIVALENT_TOTerminalRuleCall_1_0_1_q; + protected AbstractElementAlias match_Refinement_COMMATerminalRuleCall_1_0_q; + + @Inject + protected void init(IGrammarAccess access) { + grammarAccess = (ScgGrammarAccess) access; + match_Expression_EQUIVALENT_TOTerminalRuleCall_1_0_1_q = new TokenAlias(false, true, grammarAccess.getExpressionAccess().getEQUIVALENT_TOTerminalRuleCall_1_0_1()); + match_Refinement_COMMATerminalRuleCall_1_0_q = new TokenAlias(false, true, grammarAccess.getRefinementAccess().getCOMMATerminalRuleCall_1_0()); + } + + @Override + protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (ruleCall.getRule() == grammarAccess.getCOLONRule()) + return getCOLONToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getCOMMARule()) + return getCOMMAToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getCURLY_CLOSERule()) + return getCURLY_CLOSEToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getCURLY_OPENRule()) + return getCURLY_OPENToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getEQUALRule()) + return getEQUALToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getEQUIVALENT_TORule()) + return getEQUIVALENT_TOToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getHASHRule()) + return getHASHToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getPLUSRule()) + return getPLUSToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getROUND_CLOSERule()) + return getROUND_CLOSEToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getROUND_OPENRule()) + return getROUND_OPENToken(semanticObject, ruleCall, node); + else if (ruleCall.getRule() == grammarAccess.getSUBTYPE_OFRule()) + return getSUBTYPE_OFToken(semanticObject, ruleCall, node); + return ""; + } + + /** + * terminal COLON: + * ':'; + */ + protected String getCOLONToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return ":"; + } + + /** + * terminal COMMA: + * ','; + */ + protected String getCOMMAToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return ","; + } + + /** + * terminal CURLY_CLOSE: + * '}'; + */ + protected String getCURLY_CLOSEToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "}"; + } + + /** + * terminal CURLY_OPEN: + * '{'; + */ + protected String getCURLY_OPENToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "{"; + } + + /** + * terminal EQUAL: + * '='; + */ + protected String getEQUALToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "="; + } + + /** + * terminal EQUIVALENT_TO: + * '==='; + */ + protected String getEQUIVALENT_TOToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "==="; + } + + /** + * terminal HASH: + * '#'; + */ + protected String getHASHToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "#"; + } + + /** + * terminal PLUS: + * '+'; + */ + protected String getPLUSToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "+"; + } + + /** + * terminal ROUND_CLOSE: + * ')'; + */ + protected String getROUND_CLOSEToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return ")"; + } + + /** + * terminal ROUND_OPEN: + * '('; + */ + protected String getROUND_OPENToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "("; + } + + /** + * terminal SUBTYPE_OF: + * '<<<'; + */ + protected String getSUBTYPE_OFToken(EObject semanticObject, RuleCall ruleCall, INode node) { + if (node != null) + return getTokenText(node); + return "<<<"; + } + + @Override + protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) { + if (transition.getAmbiguousSyntaxes().isEmpty()) return; + List transitionNodes = collectNodes(fromNode, toNode); + for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { + List syntaxNodes = getNodesFor(transitionNodes, syntax); + if (match_Expression_EQUIVALENT_TOTerminalRuleCall_1_0_1_q.equals(syntax)) + emit_Expression_EQUIVALENT_TOTerminalRuleCall_1_0_1_q(semanticObject, getLastNavigableState(), syntaxNodes); + else if (match_Refinement_COMMATerminalRuleCall_1_0_q.equals(syntax)) + emit_Refinement_COMMATerminalRuleCall_1_0_q(semanticObject, getLastNavigableState(), syntaxNodes); + else acceptNodes(getLastNavigableState(), syntaxNodes); + } + } + + /** + * Ambiguous syntax: + * EQUIVALENT_TO? + * + * This ambiguous syntax occurs at: + * (rule start) (ambiguity) expression=SubExpression + */ + protected void emit_Expression_EQUIVALENT_TOTerminalRuleCall_1_0_1_q(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + + /** + * Ambiguous syntax: + * COMMA? + * + * This ambiguous syntax occurs at: + * attributes+=Attribute (ambiguity) groups+=AttributeGroup + * groups+=AttributeGroup (ambiguity) groups+=AttributeGroup + */ + protected void emit_Refinement_COMMATerminalRuleCall_1_0_q(EObject semanticObject, ISynNavigable transition, List nodes) { + acceptNodes(transition, nodes); + } + +} diff --git a/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/services/ScgGrammarAccess.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/services/ScgGrammarAccess.java new file mode 100644 index 00000000000..c92f813488a --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/services/ScgGrammarAccess.java @@ -0,0 +1,973 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.services; + +import com.google.inject.Inject; +import com.google.inject.Singleton; +import java.util.List; +import org.eclipse.xtext.Action; +import org.eclipse.xtext.Alternatives; +import org.eclipse.xtext.Assignment; +import org.eclipse.xtext.Grammar; +import org.eclipse.xtext.GrammarUtil; +import org.eclipse.xtext.Group; +import org.eclipse.xtext.ParserRule; +import org.eclipse.xtext.RuleCall; +import org.eclipse.xtext.TerminalRule; +import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder; +import org.eclipse.xtext.service.GrammarProvider; + +@Singleton +public class ScgGrammarAccess extends AbstractGrammarElementFinder { + + public class ExpressionElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.Expression"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Action cExpressionAction_0 = (Action)cGroup.eContents().get(0); + private final Group cGroup_1 = (Group)cGroup.eContents().get(1); + private final Alternatives cAlternatives_1_0 = (Alternatives)cGroup_1.eContents().get(0); + private final Assignment cPrimitiveAssignment_1_0_0 = (Assignment)cAlternatives_1_0.eContents().get(0); + private final RuleCall cPrimitiveSUBTYPE_OFTerminalRuleCall_1_0_0_0 = (RuleCall)cPrimitiveAssignment_1_0_0.eContents().get(0); + private final RuleCall cEQUIVALENT_TOTerminalRuleCall_1_0_1 = (RuleCall)cAlternatives_1_0.eContents().get(1); + private final Assignment cExpressionAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); + private final RuleCall cExpressionSubExpressionParserRuleCall_1_1_0 = (RuleCall)cExpressionAssignment_1_1.eContents().get(0); + + //Expression: + // {Expression} ((primitive?=SUBTYPE_OF | EQUIVALENT_TO)? expression=SubExpression)?; + @Override public ParserRule getRule() { return rule; } + + //{Expression} ((primitive?=SUBTYPE_OF | EQUIVALENT_TO)? expression=SubExpression)? + public Group getGroup() { return cGroup; } + + //{Expression} + public Action getExpressionAction_0() { return cExpressionAction_0; } + + //((primitive?=SUBTYPE_OF | EQUIVALENT_TO)? expression=SubExpression)? + public Group getGroup_1() { return cGroup_1; } + + //(primitive?=SUBTYPE_OF | EQUIVALENT_TO)? + public Alternatives getAlternatives_1_0() { return cAlternatives_1_0; } + + //primitive?=SUBTYPE_OF + public Assignment getPrimitiveAssignment_1_0_0() { return cPrimitiveAssignment_1_0_0; } + + //SUBTYPE_OF + public RuleCall getPrimitiveSUBTYPE_OFTerminalRuleCall_1_0_0_0() { return cPrimitiveSUBTYPE_OFTerminalRuleCall_1_0_0_0; } + + //EQUIVALENT_TO + public RuleCall getEQUIVALENT_TOTerminalRuleCall_1_0_1() { return cEQUIVALENT_TOTerminalRuleCall_1_0_1; } + + //expression=SubExpression + public Assignment getExpressionAssignment_1_1() { return cExpressionAssignment_1_1; } + + //SubExpression + public RuleCall getExpressionSubExpressionParserRuleCall_1_1_0() { return cExpressionSubExpressionParserRuleCall_1_1_0; } + } + public class SubExpressionElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.SubExpression"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cFocusConceptsAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cFocusConceptsConceptReferenceParserRuleCall_0_0 = (RuleCall)cFocusConceptsAssignment_0.eContents().get(0); + private final Group cGroup_1 = (Group)cGroup.eContents().get(1); + private final RuleCall cPLUSTerminalRuleCall_1_0 = (RuleCall)cGroup_1.eContents().get(0); + private final Assignment cFocusConceptsAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); + private final RuleCall cFocusConceptsConceptReferenceParserRuleCall_1_1_0 = (RuleCall)cFocusConceptsAssignment_1_1.eContents().get(0); + private final Group cGroup_2 = (Group)cGroup.eContents().get(2); + private final RuleCall cCOLONTerminalRuleCall_2_0 = (RuleCall)cGroup_2.eContents().get(0); + private final Assignment cRefinementAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1); + private final RuleCall cRefinementRefinementParserRuleCall_2_1_0 = (RuleCall)cRefinementAssignment_2_1.eContents().get(0); + + //SubExpression: + // focusConcepts+=ConceptReference (PLUS focusConcepts+=ConceptReference)* (COLON refinement=Refinement)?; + @Override public ParserRule getRule() { return rule; } + + //focusConcepts+=ConceptReference (PLUS focusConcepts+=ConceptReference)* (COLON refinement=Refinement)? + public Group getGroup() { return cGroup; } + + //focusConcepts+=ConceptReference + public Assignment getFocusConceptsAssignment_0() { return cFocusConceptsAssignment_0; } + + //ConceptReference + public RuleCall getFocusConceptsConceptReferenceParserRuleCall_0_0() { return cFocusConceptsConceptReferenceParserRuleCall_0_0; } + + //(PLUS focusConcepts+=ConceptReference)* + public Group getGroup_1() { return cGroup_1; } + + //PLUS + public RuleCall getPLUSTerminalRuleCall_1_0() { return cPLUSTerminalRuleCall_1_0; } + + //focusConcepts+=ConceptReference + public Assignment getFocusConceptsAssignment_1_1() { return cFocusConceptsAssignment_1_1; } + + //ConceptReference + public RuleCall getFocusConceptsConceptReferenceParserRuleCall_1_1_0() { return cFocusConceptsConceptReferenceParserRuleCall_1_1_0; } + + //(COLON refinement=Refinement)? + public Group getGroup_2() { return cGroup_2; } + + //COLON + public RuleCall getCOLONTerminalRuleCall_2_0() { return cCOLONTerminalRuleCall_2_0; } + + //refinement=Refinement + public Assignment getRefinementAssignment_2_1() { return cRefinementAssignment_2_1; } + + //Refinement + public RuleCall getRefinementRefinementParserRuleCall_2_1_0() { return cRefinementRefinementParserRuleCall_2_1_0; } + } + public class RefinementElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.Refinement"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0); + private final Group cGroup_0_0 = (Group)cAlternatives_0.eContents().get(0); + private final Assignment cAttributesAssignment_0_0_0 = (Assignment)cGroup_0_0.eContents().get(0); + private final RuleCall cAttributesAttributeParserRuleCall_0_0_0_0 = (RuleCall)cAttributesAssignment_0_0_0.eContents().get(0); + private final Group cGroup_0_0_1 = (Group)cGroup_0_0.eContents().get(1); + private final RuleCall cCOMMATerminalRuleCall_0_0_1_0 = (RuleCall)cGroup_0_0_1.eContents().get(0); + private final Assignment cAttributesAssignment_0_0_1_1 = (Assignment)cGroup_0_0_1.eContents().get(1); + private final RuleCall cAttributesAttributeParserRuleCall_0_0_1_1_0 = (RuleCall)cAttributesAssignment_0_0_1_1.eContents().get(0); + private final Assignment cGroupsAssignment_0_1 = (Assignment)cAlternatives_0.eContents().get(1); + private final RuleCall cGroupsAttributeGroupParserRuleCall_0_1_0 = (RuleCall)cGroupsAssignment_0_1.eContents().get(0); + private final Group cGroup_1 = (Group)cGroup.eContents().get(1); + private final RuleCall cCOMMATerminalRuleCall_1_0 = (RuleCall)cGroup_1.eContents().get(0); + private final Assignment cGroupsAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1); + private final RuleCall cGroupsAttributeGroupParserRuleCall_1_1_0 = (RuleCall)cGroupsAssignment_1_1.eContents().get(0); + + //Refinement: + // (attributes+=Attribute (COMMA attributes+=Attribute)* | groups+=AttributeGroup) (COMMA? groups+=AttributeGroup)*; + @Override public ParserRule getRule() { return rule; } + + //(attributes+=Attribute (COMMA attributes+=Attribute)* | groups+=AttributeGroup) (COMMA? groups+=AttributeGroup)* + public Group getGroup() { return cGroup; } + + //attributes+=Attribute (COMMA attributes+=Attribute)* | groups+=AttributeGroup + public Alternatives getAlternatives_0() { return cAlternatives_0; } + + //attributes+=Attribute (COMMA attributes+=Attribute)* + public Group getGroup_0_0() { return cGroup_0_0; } + + //attributes+=Attribute + public Assignment getAttributesAssignment_0_0_0() { return cAttributesAssignment_0_0_0; } + + //Attribute + public RuleCall getAttributesAttributeParserRuleCall_0_0_0_0() { return cAttributesAttributeParserRuleCall_0_0_0_0; } + + //(COMMA attributes+=Attribute)* + public Group getGroup_0_0_1() { return cGroup_0_0_1; } + + //COMMA + public RuleCall getCOMMATerminalRuleCall_0_0_1_0() { return cCOMMATerminalRuleCall_0_0_1_0; } + + //attributes+=Attribute + public Assignment getAttributesAssignment_0_0_1_1() { return cAttributesAssignment_0_0_1_1; } + + //Attribute + public RuleCall getAttributesAttributeParserRuleCall_0_0_1_1_0() { return cAttributesAttributeParserRuleCall_0_0_1_1_0; } + + //groups+=AttributeGroup + public Assignment getGroupsAssignment_0_1() { return cGroupsAssignment_0_1; } + + //AttributeGroup + public RuleCall getGroupsAttributeGroupParserRuleCall_0_1_0() { return cGroupsAttributeGroupParserRuleCall_0_1_0; } + + //(COMMA? groups+=AttributeGroup)* + public Group getGroup_1() { return cGroup_1; } + + //COMMA? + public RuleCall getCOMMATerminalRuleCall_1_0() { return cCOMMATerminalRuleCall_1_0; } + + //groups+=AttributeGroup + public Assignment getGroupsAssignment_1_1() { return cGroupsAssignment_1_1; } + + //AttributeGroup + public RuleCall getGroupsAttributeGroupParserRuleCall_1_1_0() { return cGroupsAttributeGroupParserRuleCall_1_1_0; } + } + public class AttributeGroupElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.AttributeGroup"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final RuleCall cCURLY_OPENTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final Assignment cAttributesAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cAttributesAttributeParserRuleCall_1_0 = (RuleCall)cAttributesAssignment_1.eContents().get(0); + private final Group cGroup_2 = (Group)cGroup.eContents().get(2); + private final RuleCall cCOMMATerminalRuleCall_2_0 = (RuleCall)cGroup_2.eContents().get(0); + private final Assignment cAttributesAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1); + private final RuleCall cAttributesAttributeParserRuleCall_2_1_0 = (RuleCall)cAttributesAssignment_2_1.eContents().get(0); + private final RuleCall cCURLY_CLOSETerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3); + + //AttributeGroup: + // CURLY_OPEN attributes+=Attribute (COMMA attributes+=Attribute)* CURLY_CLOSE; + @Override public ParserRule getRule() { return rule; } + + //CURLY_OPEN attributes+=Attribute (COMMA attributes+=Attribute)* CURLY_CLOSE + public Group getGroup() { return cGroup; } + + //CURLY_OPEN + public RuleCall getCURLY_OPENTerminalRuleCall_0() { return cCURLY_OPENTerminalRuleCall_0; } + + //attributes+=Attribute + public Assignment getAttributesAssignment_1() { return cAttributesAssignment_1; } + + //Attribute + public RuleCall getAttributesAttributeParserRuleCall_1_0() { return cAttributesAttributeParserRuleCall_1_0; } + + //(COMMA attributes+=Attribute)* + public Group getGroup_2() { return cGroup_2; } + + //COMMA + public RuleCall getCOMMATerminalRuleCall_2_0() { return cCOMMATerminalRuleCall_2_0; } + + //attributes+=Attribute + public Assignment getAttributesAssignment_2_1() { return cAttributesAssignment_2_1; } + + //Attribute + public RuleCall getAttributesAttributeParserRuleCall_2_1_0() { return cAttributesAttributeParserRuleCall_2_1_0; } + + //CURLY_CLOSE + public RuleCall getCURLY_CLOSETerminalRuleCall_3() { return cCURLY_CLOSETerminalRuleCall_3; } + } + public class AttributeElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.Attribute"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cNameAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cNameConceptReferenceParserRuleCall_0_0 = (RuleCall)cNameAssignment_0.eContents().get(0); + private final RuleCall cEQUALTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final Assignment cValueAssignment_2 = (Assignment)cGroup.eContents().get(2); + private final RuleCall cValueAttributeValueParserRuleCall_2_0 = (RuleCall)cValueAssignment_2.eContents().get(0); + + //Attribute: + // name=ConceptReference EQUAL value=AttributeValue; + @Override public ParserRule getRule() { return rule; } + + //name=ConceptReference EQUAL value=AttributeValue + public Group getGroup() { return cGroup; } + + //name=ConceptReference + public Assignment getNameAssignment_0() { return cNameAssignment_0; } + + //ConceptReference + public RuleCall getNameConceptReferenceParserRuleCall_0_0() { return cNameConceptReferenceParserRuleCall_0_0; } + + //EQUAL + public RuleCall getEQUALTerminalRuleCall_1() { return cEQUALTerminalRuleCall_1; } + + //value=AttributeValue + public Assignment getValueAssignment_2() { return cValueAssignment_2; } + + //AttributeValue + public RuleCall getValueAttributeValueParserRuleCall_2_0() { return cValueAttributeValueParserRuleCall_2_0; } + } + public class AttributeValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.AttributeValue"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cConceptReferenceParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final Group cGroup_1 = (Group)cAlternatives.eContents().get(1); + private final RuleCall cROUND_OPENTerminalRuleCall_1_0 = (RuleCall)cGroup_1.eContents().get(0); + private final RuleCall cSubExpressionParserRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1); + private final RuleCall cROUND_CLOSETerminalRuleCall_1_2 = (RuleCall)cGroup_1.eContents().get(2); + private final RuleCall cStringValueParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2); + private final RuleCall cIntegerValueParserRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3); + private final RuleCall cDecimalValueParserRuleCall_4 = (RuleCall)cAlternatives.eContents().get(4); + + //AttributeValue: + // ConceptReference | ROUND_OPEN SubExpression ROUND_CLOSE | StringValue | IntegerValue | DecimalValue; + @Override public ParserRule getRule() { return rule; } + + //ConceptReference | ROUND_OPEN SubExpression ROUND_CLOSE | StringValue | IntegerValue | DecimalValue + public Alternatives getAlternatives() { return cAlternatives; } + + //ConceptReference + public RuleCall getConceptReferenceParserRuleCall_0() { return cConceptReferenceParserRuleCall_0; } + + //ROUND_OPEN SubExpression ROUND_CLOSE + public Group getGroup_1() { return cGroup_1; } + + //ROUND_OPEN + public RuleCall getROUND_OPENTerminalRuleCall_1_0() { return cROUND_OPENTerminalRuleCall_1_0; } + + //SubExpression + public RuleCall getSubExpressionParserRuleCall_1_1() { return cSubExpressionParserRuleCall_1_1; } + + //ROUND_CLOSE + public RuleCall getROUND_CLOSETerminalRuleCall_1_2() { return cROUND_CLOSETerminalRuleCall_1_2; } + + //StringValue + public RuleCall getStringValueParserRuleCall_2() { return cStringValueParserRuleCall_2; } + + //IntegerValue + public RuleCall getIntegerValueParserRuleCall_3() { return cIntegerValueParserRuleCall_3; } + + //DecimalValue + public RuleCall getDecimalValueParserRuleCall_4() { return cDecimalValueParserRuleCall_4; } + } + public class StringValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.StringValue"); + private final Assignment cValueAssignment = (Assignment)rule.eContents().get(1); + private final RuleCall cValueSTRINGTerminalRuleCall_0 = (RuleCall)cValueAssignment.eContents().get(0); + + //StringValue: + // value=STRING; + @Override public ParserRule getRule() { return rule; } + + //value=STRING + public Assignment getValueAssignment() { return cValueAssignment; } + + //STRING + public RuleCall getValueSTRINGTerminalRuleCall_0() { return cValueSTRINGTerminalRuleCall_0; } + } + public class IntegerValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.IntegerValue"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final RuleCall cHASHTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cValueIntegerParserRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0); + + //IntegerValue: + // HASH value=Integer; + @Override public ParserRule getRule() { return rule; } + + //HASH value=Integer + public Group getGroup() { return cGroup; } + + //HASH + public RuleCall getHASHTerminalRuleCall_0() { return cHASHTerminalRuleCall_0; } + + //value=Integer + public Assignment getValueAssignment_1() { return cValueAssignment_1; } + + //Integer + public RuleCall getValueIntegerParserRuleCall_1_0() { return cValueIntegerParserRuleCall_1_0; } + } + public class DecimalValueElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.DecimalValue"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final RuleCall cHASHTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cValueDecimalParserRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0); + + //DecimalValue: + // HASH value=Decimal; + @Override public ParserRule getRule() { return rule; } + + //HASH value=Decimal + public Group getGroup() { return cGroup; } + + //HASH + public RuleCall getHASHTerminalRuleCall_0() { return cHASHTerminalRuleCall_0; } + + //value=Decimal + public Assignment getValueAssignment_1() { return cValueAssignment_1; } + + //Decimal + public RuleCall getValueDecimalParserRuleCall_1_0() { return cValueDecimalParserRuleCall_1_0; } + } + public class ConceptReferenceElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.ConceptReference"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Assignment cIdAssignment_0 = (Assignment)cGroup.eContents().get(0); + private final RuleCall cIdSnomedIdentifierParserRuleCall_0_0 = (RuleCall)cIdAssignment_0.eContents().get(0); + private final Assignment cTermAssignment_1 = (Assignment)cGroup.eContents().get(1); + private final RuleCall cTermTERM_STRINGTerminalRuleCall_1_0 = (RuleCall)cTermAssignment_1.eContents().get(0); + + //ConceptReference: + // id=SnomedIdentifier term=TERM_STRING?; + @Override public ParserRule getRule() { return rule; } + + //id=SnomedIdentifier term=TERM_STRING? + public Group getGroup() { return cGroup; } + + //id=SnomedIdentifier + public Assignment getIdAssignment_0() { return cIdAssignment_0; } + + //SnomedIdentifier + public RuleCall getIdSnomedIdentifierParserRuleCall_0_0() { return cIdSnomedIdentifierParserRuleCall_0_0; } + + //term=TERM_STRING? + public Assignment getTermAssignment_1() { return cTermAssignment_1; } + + //TERM_STRING + public RuleCall getTermTERM_STRINGTerminalRuleCall_1_0() { return cTermTERM_STRINGTerminalRuleCall_1_0; } + } + public class SnomedIdentifierElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.SnomedIdentifier"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final RuleCall cDIGIT_NONZEROTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final Alternatives cAlternatives_1 = (Alternatives)cGroup.eContents().get(1); + private final RuleCall cDIGIT_NONZEROTerminalRuleCall_1_0 = (RuleCall)cAlternatives_1.eContents().get(0); + private final RuleCall cZEROTerminalRuleCall_1_1 = (RuleCall)cAlternatives_1.eContents().get(1); + private final Alternatives cAlternatives_2 = (Alternatives)cGroup.eContents().get(2); + private final RuleCall cDIGIT_NONZEROTerminalRuleCall_2_0 = (RuleCall)cAlternatives_2.eContents().get(0); + private final RuleCall cZEROTerminalRuleCall_2_1 = (RuleCall)cAlternatives_2.eContents().get(1); + private final Alternatives cAlternatives_3 = (Alternatives)cGroup.eContents().get(3); + private final RuleCall cDIGIT_NONZEROTerminalRuleCall_3_0 = (RuleCall)cAlternatives_3.eContents().get(0); + private final RuleCall cZEROTerminalRuleCall_3_1 = (RuleCall)cAlternatives_3.eContents().get(1); + private final Alternatives cAlternatives_4 = (Alternatives)cGroup.eContents().get(4); + private final RuleCall cDIGIT_NONZEROTerminalRuleCall_4_0 = (RuleCall)cAlternatives_4.eContents().get(0); + private final RuleCall cZEROTerminalRuleCall_4_1 = (RuleCall)cAlternatives_4.eContents().get(1); + private final Alternatives cAlternatives_5 = (Alternatives)cGroup.eContents().get(5); + private final RuleCall cDIGIT_NONZEROTerminalRuleCall_5_0 = (RuleCall)cAlternatives_5.eContents().get(0); + private final RuleCall cZEROTerminalRuleCall_5_1 = (RuleCall)cAlternatives_5.eContents().get(1); + + //SnomedIdentifier hidden(): + // DIGIT_NONZERO (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) + // (DIGIT_NONZERO | ZERO)+; + @Override public ParserRule getRule() { return rule; } + + //DIGIT_NONZERO (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO + //| ZERO)+ + public Group getGroup() { return cGroup; } + + //DIGIT_NONZERO + public RuleCall getDIGIT_NONZEROTerminalRuleCall_0() { return cDIGIT_NONZEROTerminalRuleCall_0; } + + //DIGIT_NONZERO | ZERO + public Alternatives getAlternatives_1() { return cAlternatives_1; } + + //DIGIT_NONZERO + public RuleCall getDIGIT_NONZEROTerminalRuleCall_1_0() { return cDIGIT_NONZEROTerminalRuleCall_1_0; } + + //ZERO + public RuleCall getZEROTerminalRuleCall_1_1() { return cZEROTerminalRuleCall_1_1; } + + //DIGIT_NONZERO | ZERO + public Alternatives getAlternatives_2() { return cAlternatives_2; } + + //DIGIT_NONZERO + public RuleCall getDIGIT_NONZEROTerminalRuleCall_2_0() { return cDIGIT_NONZEROTerminalRuleCall_2_0; } + + //ZERO + public RuleCall getZEROTerminalRuleCall_2_1() { return cZEROTerminalRuleCall_2_1; } + + //DIGIT_NONZERO | ZERO + public Alternatives getAlternatives_3() { return cAlternatives_3; } + + //DIGIT_NONZERO + public RuleCall getDIGIT_NONZEROTerminalRuleCall_3_0() { return cDIGIT_NONZEROTerminalRuleCall_3_0; } + + //ZERO + public RuleCall getZEROTerminalRuleCall_3_1() { return cZEROTerminalRuleCall_3_1; } + + //DIGIT_NONZERO | ZERO + public Alternatives getAlternatives_4() { return cAlternatives_4; } + + //DIGIT_NONZERO + public RuleCall getDIGIT_NONZEROTerminalRuleCall_4_0() { return cDIGIT_NONZEROTerminalRuleCall_4_0; } + + //ZERO + public RuleCall getZEROTerminalRuleCall_4_1() { return cZEROTerminalRuleCall_4_1; } + + //(DIGIT_NONZERO | ZERO)+ + public Alternatives getAlternatives_5() { return cAlternatives_5; } + + //DIGIT_NONZERO + public RuleCall getDIGIT_NONZEROTerminalRuleCall_5_0() { return cDIGIT_NONZEROTerminalRuleCall_5_0; } + + //ZERO + public RuleCall getZEROTerminalRuleCall_5_1() { return cZEROTerminalRuleCall_5_1; } + } + public class NonNegativeIntegerElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.NonNegativeInteger"); + private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1); + private final RuleCall cZEROTerminalRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0); + private final Group cGroup_1 = (Group)cAlternatives.eContents().get(1); + private final RuleCall cDIGIT_NONZEROTerminalRuleCall_1_0 = (RuleCall)cGroup_1.eContents().get(0); + private final Alternatives cAlternatives_1_1 = (Alternatives)cGroup_1.eContents().get(1); + private final RuleCall cDIGIT_NONZEROTerminalRuleCall_1_1_0 = (RuleCall)cAlternatives_1_1.eContents().get(0); + private final RuleCall cZEROTerminalRuleCall_1_1_1 = (RuleCall)cAlternatives_1_1.eContents().get(1); + + //NonNegativeInteger ecore::EInt hidden(): + // ZERO | DIGIT_NONZERO (DIGIT_NONZERO | ZERO)*; + @Override public ParserRule getRule() { return rule; } + + //ZERO | DIGIT_NONZERO (DIGIT_NONZERO | ZERO)* + public Alternatives getAlternatives() { return cAlternatives; } + + //ZERO + public RuleCall getZEROTerminalRuleCall_0() { return cZEROTerminalRuleCall_0; } + + //DIGIT_NONZERO (DIGIT_NONZERO | ZERO)* + public Group getGroup_1() { return cGroup_1; } + + //DIGIT_NONZERO + public RuleCall getDIGIT_NONZEROTerminalRuleCall_1_0() { return cDIGIT_NONZEROTerminalRuleCall_1_0; } + + //(DIGIT_NONZERO | ZERO)* + public Alternatives getAlternatives_1_1() { return cAlternatives_1_1; } + + //DIGIT_NONZERO + public RuleCall getDIGIT_NONZEROTerminalRuleCall_1_1_0() { return cDIGIT_NONZEROTerminalRuleCall_1_1_0; } + + //ZERO + public RuleCall getZEROTerminalRuleCall_1_1_1() { return cZEROTerminalRuleCall_1_1_1; } + } + public class IntegerElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.Integer"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0); + private final RuleCall cPLUSTerminalRuleCall_0_0 = (RuleCall)cAlternatives_0.eContents().get(0); + private final RuleCall cDASHTerminalRuleCall_0_1 = (RuleCall)cAlternatives_0.eContents().get(1); + private final RuleCall cNonNegativeIntegerParserRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + + //Integer ecore::EInt hidden(): + // (PLUS | DASH)? NonNegativeInteger; + @Override public ParserRule getRule() { return rule; } + + //(PLUS | DASH)? NonNegativeInteger + public Group getGroup() { return cGroup; } + + //(PLUS | DASH)? + public Alternatives getAlternatives_0() { return cAlternatives_0; } + + //PLUS + public RuleCall getPLUSTerminalRuleCall_0_0() { return cPLUSTerminalRuleCall_0_0; } + + //DASH + public RuleCall getDASHTerminalRuleCall_0_1() { return cDASHTerminalRuleCall_0_1; } + + //NonNegativeInteger + public RuleCall getNonNegativeIntegerParserRuleCall_1() { return cNonNegativeIntegerParserRuleCall_1; } + } + public class DecimalElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.Decimal"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0); + private final RuleCall cPLUSTerminalRuleCall_0_0 = (RuleCall)cAlternatives_0.eContents().get(0); + private final RuleCall cDASHTerminalRuleCall_0_1 = (RuleCall)cAlternatives_0.eContents().get(1); + private final RuleCall cNonNegativeDecimalParserRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + + //Decimal ecore::EBigDecimal hidden(): + // (PLUS | DASH)? NonNegativeDecimal; + @Override public ParserRule getRule() { return rule; } + + //(PLUS | DASH)? NonNegativeDecimal + public Group getGroup() { return cGroup; } + + //(PLUS | DASH)? + public Alternatives getAlternatives_0() { return cAlternatives_0; } + + //PLUS + public RuleCall getPLUSTerminalRuleCall_0_0() { return cPLUSTerminalRuleCall_0_0; } + + //DASH + public RuleCall getDASHTerminalRuleCall_0_1() { return cDASHTerminalRuleCall_0_1; } + + //NonNegativeDecimal + public RuleCall getNonNegativeDecimalParserRuleCall_1() { return cNonNegativeDecimalParserRuleCall_1; } + } + public class NonNegativeDecimalElements extends AbstractParserRuleElementFinder { + private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.NonNegativeDecimal"); + private final Group cGroup = (Group)rule.eContents().get(1); + private final RuleCall cNonNegativeIntegerParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0); + private final RuleCall cDOTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1); + private final Alternatives cAlternatives_2 = (Alternatives)cGroup.eContents().get(2); + private final RuleCall cDIGIT_NONZEROTerminalRuleCall_2_0 = (RuleCall)cAlternatives_2.eContents().get(0); + private final RuleCall cZEROTerminalRuleCall_2_1 = (RuleCall)cAlternatives_2.eContents().get(1); + + //NonNegativeDecimal ecore::EBigDecimal hidden(): + // NonNegativeInteger DOT (DIGIT_NONZERO | ZERO)*; + @Override public ParserRule getRule() { return rule; } + + //NonNegativeInteger DOT (DIGIT_NONZERO | ZERO)* + public Group getGroup() { return cGroup; } + + //NonNegativeInteger + public RuleCall getNonNegativeIntegerParserRuleCall_0() { return cNonNegativeIntegerParserRuleCall_0; } + + //DOT + public RuleCall getDOTTerminalRuleCall_1() { return cDOTTerminalRuleCall_1; } + + //(DIGIT_NONZERO | ZERO)* + public Alternatives getAlternatives_2() { return cAlternatives_2; } + + //DIGIT_NONZERO + public RuleCall getDIGIT_NONZEROTerminalRuleCall_2_0() { return cDIGIT_NONZEROTerminalRuleCall_2_0; } + + //ZERO + public RuleCall getZEROTerminalRuleCall_2_1() { return cZEROTerminalRuleCall_2_1; } + } + + + private final ExpressionElements pExpression; + private final SubExpressionElements pSubExpression; + private final RefinementElements pRefinement; + private final AttributeGroupElements pAttributeGroup; + private final AttributeElements pAttribute; + private final AttributeValueElements pAttributeValue; + private final StringValueElements pStringValue; + private final IntegerValueElements pIntegerValue; + private final DecimalValueElements pDecimalValue; + private final ConceptReferenceElements pConceptReference; + private final TerminalRule tEQUIVALENT_TO; + private final TerminalRule tSUBTYPE_OF; + private final TerminalRule tTERM_STRING; + private final TerminalRule tZERO; + private final TerminalRule tDIGIT_NONZERO; + private final TerminalRule tCURLY_OPEN; + private final TerminalRule tCURLY_CLOSE; + private final TerminalRule tCOMMA; + private final TerminalRule tEQUAL; + private final TerminalRule tCOLON; + private final TerminalRule tPLUS; + private final TerminalRule tDASH; + private final TerminalRule tDOT; + private final TerminalRule tROUND_OPEN; + private final TerminalRule tROUND_CLOSE; + private final TerminalRule tHASH; + private final TerminalRule tWS; + private final TerminalRule tML_COMMENT; + private final TerminalRule tSL_COMMENT; + private final TerminalRule tSTRING; + private final SnomedIdentifierElements pSnomedIdentifier; + private final NonNegativeIntegerElements pNonNegativeInteger; + private final IntegerElements pInteger; + private final DecimalElements pDecimal; + private final NonNegativeDecimalElements pNonNegativeDecimal; + + private final Grammar grammar; + + @Inject + public ScgGrammarAccess(GrammarProvider grammarProvider) { + this.grammar = internalFindGrammar(grammarProvider); + this.pExpression = new ExpressionElements(); + this.pSubExpression = new SubExpressionElements(); + this.pRefinement = new RefinementElements(); + this.pAttributeGroup = new AttributeGroupElements(); + this.pAttribute = new AttributeElements(); + this.pAttributeValue = new AttributeValueElements(); + this.pStringValue = new StringValueElements(); + this.pIntegerValue = new IntegerValueElements(); + this.pDecimalValue = new DecimalValueElements(); + this.pConceptReference = new ConceptReferenceElements(); + this.tEQUIVALENT_TO = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.EQUIVALENT_TO"); + this.tSUBTYPE_OF = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.SUBTYPE_OF"); + this.tTERM_STRING = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.TERM_STRING"); + this.tZERO = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.ZERO"); + this.tDIGIT_NONZERO = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.DIGIT_NONZERO"); + this.tCURLY_OPEN = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.CURLY_OPEN"); + this.tCURLY_CLOSE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.CURLY_CLOSE"); + this.tCOMMA = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.COMMA"); + this.tEQUAL = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.EQUAL"); + this.tCOLON = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.COLON"); + this.tPLUS = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.PLUS"); + this.tDASH = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.DASH"); + this.tDOT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.DOT"); + this.tROUND_OPEN = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.ROUND_OPEN"); + this.tROUND_CLOSE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.ROUND_CLOSE"); + this.tHASH = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.HASH"); + this.tWS = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.WS"); + this.tML_COMMENT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.ML_COMMENT"); + this.tSL_COMMENT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.SL_COMMENT"); + this.tSTRING = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.b2international.snowowl.snomed.scg.Scg.STRING"); + this.pSnomedIdentifier = new SnomedIdentifierElements(); + this.pNonNegativeInteger = new NonNegativeIntegerElements(); + this.pInteger = new IntegerElements(); + this.pDecimal = new DecimalElements(); + this.pNonNegativeDecimal = new NonNegativeDecimalElements(); + } + + protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { + Grammar grammar = grammarProvider.getGrammar(this); + while (grammar != null) { + if ("com.b2international.snowowl.snomed.scg.Scg".equals(grammar.getName())) { + return grammar; + } + List grammars = grammar.getUsedGrammars(); + if (!grammars.isEmpty()) { + grammar = grammars.iterator().next(); + } else { + return null; + } + } + return grammar; + } + + @Override + public Grammar getGrammar() { + return grammar; + } + + + + //Expression: + // {Expression} ((primitive?=SUBTYPE_OF | EQUIVALENT_TO)? expression=SubExpression)?; + public ExpressionElements getExpressionAccess() { + return pExpression; + } + + public ParserRule getExpressionRule() { + return getExpressionAccess().getRule(); + } + + //SubExpression: + // focusConcepts+=ConceptReference (PLUS focusConcepts+=ConceptReference)* (COLON refinement=Refinement)?; + public SubExpressionElements getSubExpressionAccess() { + return pSubExpression; + } + + public ParserRule getSubExpressionRule() { + return getSubExpressionAccess().getRule(); + } + + //Refinement: + // (attributes+=Attribute (COMMA attributes+=Attribute)* | groups+=AttributeGroup) (COMMA? groups+=AttributeGroup)*; + public RefinementElements getRefinementAccess() { + return pRefinement; + } + + public ParserRule getRefinementRule() { + return getRefinementAccess().getRule(); + } + + //AttributeGroup: + // CURLY_OPEN attributes+=Attribute (COMMA attributes+=Attribute)* CURLY_CLOSE; + public AttributeGroupElements getAttributeGroupAccess() { + return pAttributeGroup; + } + + public ParserRule getAttributeGroupRule() { + return getAttributeGroupAccess().getRule(); + } + + //Attribute: + // name=ConceptReference EQUAL value=AttributeValue; + public AttributeElements getAttributeAccess() { + return pAttribute; + } + + public ParserRule getAttributeRule() { + return getAttributeAccess().getRule(); + } + + //AttributeValue: + // ConceptReference | ROUND_OPEN SubExpression ROUND_CLOSE | StringValue | IntegerValue | DecimalValue; + public AttributeValueElements getAttributeValueAccess() { + return pAttributeValue; + } + + public ParserRule getAttributeValueRule() { + return getAttributeValueAccess().getRule(); + } + + //StringValue: + // value=STRING; + public StringValueElements getStringValueAccess() { + return pStringValue; + } + + public ParserRule getStringValueRule() { + return getStringValueAccess().getRule(); + } + + //IntegerValue: + // HASH value=Integer; + public IntegerValueElements getIntegerValueAccess() { + return pIntegerValue; + } + + public ParserRule getIntegerValueRule() { + return getIntegerValueAccess().getRule(); + } + + //DecimalValue: + // HASH value=Decimal; + public DecimalValueElements getDecimalValueAccess() { + return pDecimalValue; + } + + public ParserRule getDecimalValueRule() { + return getDecimalValueAccess().getRule(); + } + + //ConceptReference: + // id=SnomedIdentifier term=TERM_STRING?; + public ConceptReferenceElements getConceptReferenceAccess() { + return pConceptReference; + } + + public ParserRule getConceptReferenceRule() { + return getConceptReferenceAccess().getRule(); + } + + //terminal EQUIVALENT_TO: + // '==='; + public TerminalRule getEQUIVALENT_TORule() { + return tEQUIVALENT_TO; + } + + //terminal SUBTYPE_OF: + // '<<<'; + public TerminalRule getSUBTYPE_OFRule() { + return tSUBTYPE_OF; + } + + //terminal TERM_STRING: + // "|" !"|"* "|"; + public TerminalRule getTERM_STRINGRule() { + return tTERM_STRING; + } + + //terminal ZERO: + // '0'; + public TerminalRule getZERORule() { + return tZERO; + } + + //terminal DIGIT_NONZERO: + // '1'..'9'; + public TerminalRule getDIGIT_NONZERORule() { + return tDIGIT_NONZERO; + } + + //terminal CURLY_OPEN: + // '{'; + public TerminalRule getCURLY_OPENRule() { + return tCURLY_OPEN; + } + + //terminal CURLY_CLOSE: + // '}'; + public TerminalRule getCURLY_CLOSERule() { + return tCURLY_CLOSE; + } + + //terminal COMMA: + // ','; + public TerminalRule getCOMMARule() { + return tCOMMA; + } + + //terminal EQUAL: + // '='; + public TerminalRule getEQUALRule() { + return tEQUAL; + } + + //terminal COLON: + // ':'; + public TerminalRule getCOLONRule() { + return tCOLON; + } + + //terminal PLUS: + // '+'; + public TerminalRule getPLUSRule() { + return tPLUS; + } + + //terminal DASH: + // '-'; + public TerminalRule getDASHRule() { + return tDASH; + } + + //terminal DOT: + // '.'; + public TerminalRule getDOTRule() { + return tDOT; + } + + //terminal ROUND_OPEN: + // '('; + public TerminalRule getROUND_OPENRule() { + return tROUND_OPEN; + } + + //terminal ROUND_CLOSE: + // ')'; + public TerminalRule getROUND_CLOSERule() { + return tROUND_CLOSE; + } + + //terminal HASH: + // '#'; + public TerminalRule getHASHRule() { + return tHASH; + } + + //terminal WS: + // ' ' | '\t' | '\n' | '\r'; + public TerminalRule getWSRule() { + return tWS; + } + + //terminal ML_COMMENT: + // '/*'->'*/'; + public TerminalRule getML_COMMENTRule() { + return tML_COMMENT; + } + + //terminal SL_COMMENT: + // '//' !('\n' | '\r')* ('\r'? '\n')?; + public TerminalRule getSL_COMMENTRule() { + return tSL_COMMENT; + } + + //terminal STRING: + // '"' ('\\' . | !('\\' | '"'))* '"' | + // "'" ('\\' . | !('\\' | "'"))* "'"; + public TerminalRule getSTRINGRule() { + return tSTRING; + } + + //SnomedIdentifier hidden(): + // DIGIT_NONZERO (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) + // (DIGIT_NONZERO | ZERO)+; + public SnomedIdentifierElements getSnomedIdentifierAccess() { + return pSnomedIdentifier; + } + + public ParserRule getSnomedIdentifierRule() { + return getSnomedIdentifierAccess().getRule(); + } + + //NonNegativeInteger ecore::EInt hidden(): + // ZERO | DIGIT_NONZERO (DIGIT_NONZERO | ZERO)*; + public NonNegativeIntegerElements getNonNegativeIntegerAccess() { + return pNonNegativeInteger; + } + + public ParserRule getNonNegativeIntegerRule() { + return getNonNegativeIntegerAccess().getRule(); + } + + //Integer ecore::EInt hidden(): + // (PLUS | DASH)? NonNegativeInteger; + public IntegerElements getIntegerAccess() { + return pInteger; + } + + public ParserRule getIntegerRule() { + return getIntegerAccess().getRule(); + } + + //Decimal ecore::EBigDecimal hidden(): + // (PLUS | DASH)? NonNegativeDecimal; + public DecimalElements getDecimalAccess() { + return pDecimal; + } + + public ParserRule getDecimalRule() { + return getDecimalAccess().getRule(); + } + + //NonNegativeDecimal ecore::EBigDecimal hidden(): + // NonNegativeInteger DOT (DIGIT_NONZERO | ZERO)*; + public NonNegativeDecimalElements getNonNegativeDecimalAccess() { + return pNonNegativeDecimal; + } + + public ParserRule getNonNegativeDecimalRule() { + return getNonNegativeDecimalAccess().getRule(); + } +} diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/ParseException.java b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/validation/AbstractScgValidator.java similarity index 55% rename from snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/ParseException.java rename to snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/validation/AbstractScgValidator.java index 9015814f0c7..ef1446baa6c 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/ParseException.java +++ b/snomed/com.b2international.snowowl.snomed.scg/src-gen/com/b2international/snowowl/snomed/scg/validation/AbstractScgValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,22 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.dsl; +package com.b2international.snowowl.snomed.scg.validation; import java.util.ArrayList; import java.util.List; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.xtext.validation.AbstractDeclarativeValidator; -public class ParseException extends RuntimeException { +public abstract class AbstractScgValidator extends AbstractDeclarativeValidator { - private static final long serialVersionUID = 37551435376880349L; - - private List errors = new ArrayList(); - - public ParseException(String message) { - super(message); - } - - public List getErrors() { - return errors; + @Override + protected List getEPackages() { + List result = new ArrayList(); + result.add(com.b2international.snowowl.snomed.scg.scg.ScgPackage.eINSTANCE); + return result; } -} \ No newline at end of file +} diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/GenerateSCG.mwe2 b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/GenerateSCG.mwe2 deleted file mode 100644 index ec4296fc191..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/GenerateSCG.mwe2 +++ /dev/null @@ -1,110 +0,0 @@ -module com.b2international.snowowl.dsl.SCG - -import org.eclipse.emf.mwe.utils.* -import org.eclipse.xtext.generator.* -import org.eclipse.xtext.ui.generator.* - -var grammarURI = "classpath:/com/b2international/snowowl/dsl/SCG.xtext" -var file.extensions = "scg" -var projectName = "com.b2international.snowowl.dsl.scg" -var runtimeProject = "../${projectName}" - -Workflow { - bean = StandaloneSetup { - platformUri = "${runtimeProject}/.." - } - - component = DirectoryCleaner { - directory = "${runtimeProject}/src-gen" - } - - component = DirectoryCleaner { - directory = "${runtimeProject}.ui/src-gen" - } - - component = Generator { - pathRtProject = runtimeProject - pathUiProject = "${runtimeProject}.ui" - projectNameRt = projectName - projectNameUi = "${projectName}.ui" - - language = { - uri = grammarURI - fileExtensions = file.extensions - - // Java API to access grammar elements (required by several other fragments) - fragment = grammarAccess.GrammarAccessFragment {} - - // generates Java API for the generated EPackages - fragment = ecore.EcoreGeneratorFragment { - // referencedGenModels = "uri to genmodel, uri to next genmodel" - } - - // the serialization component - fragment = parseTreeConstructor.ParseTreeConstructorFragment {} - - // a custom ResourceFactory for use with EMF - fragment = resourceFactory.ResourceFactoryFragment { - fileExtensions = file.extensions - } - - // the following fragment tries to use the Antlr Generator fragment which can be installed via update manager from http://download.itemis.com/updates/ - fragment = parser.antlr.XtextAntlrGeneratorFragment { - options = { - backtrack = true - } - } - - // java-based API for validation - fragment = validation.JavaValidatorFragment { - composedCheck = "org.eclipse.xtext.validation.ImportUriValidator" - composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" - // registerForImportedPackages = true - } - - // scoping and exporting API - /* - fragment = scoping.ImportURIScopingFragment {} - fragment = exporting.SimpleNamesFragment {} - */ - - // scoping and exporting API - fragment = scoping.ImportNamespacesScopingFragment {} - fragment = exporting.QualifiedNamesFragment {} - - // formatter API - fragment = formatting.FormatterFragment {} - - // labeling API - fragment = labeling.LabelProviderFragment {} - - // outline API - fragment = outline.OutlineTreeProviderFragment {} - fragment = outline.QuickOutlineFragment {} - - // java-based API for content assistance - fragment = contentAssist.JavaBasedContentAssistFragment {} - - // the following fragment tries to use the Antlr based content assist - // fragment which can be downloaded from http://www.itemis.com - // and will be ignored if it's not available. - fragment = DelegatingGeneratorFragment { - delegate = "org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment" - message="You are generating without ANTLR. It is highly recommended to download and use the plugin \'de.itemis.xtext.antlr\' \n\t using the update site http://download.itemis.com/updates/." - } - - fragment = builder.BuilderIntegrationFragment {} - - // project wizard (optional) - /* - fragment = projectWizard.SimpleProjectWizardFragment { - generatorProjectName = "${projectName}.generator" - modelFileExtension = file.extensions - } - */ - - // quickfix API - fragment = quickfix.QuickfixProviderFragment {} - } - } -} diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCG.properties b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCG.properties deleted file mode 100644 index df442552da4..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCG.properties +++ /dev/null @@ -1,3 +0,0 @@ -grammarURI=classpath:/com/b2international/snowowl/dsl/SCG.xtext -file.extensions=scg -projectName=com.b2international.snowowl.dsl.scg diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCG.xtext b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCG.xtext deleted file mode 100644 index 8870c28a367..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCG.xtext +++ /dev/null @@ -1,64 +0,0 @@ -grammar com.b2international.snowowl.dsl.SCG //hidden (WS, SL_COMMENT, ML_COMMENT) -generate scg "http://www.b2international.com/snowowl/SCG" -import 'http://www.eclipse.org/emf/2002/Ecore' as ecore - -Expression hidden(WS, SL_COMMENT, ML_COMMENT): - concepts+=Concept (PLUS_SIGN concepts+=Concept)* (COLON (attributes+=Attribute (COMMA attributes+=Attribute)*)? (groups+=Group)* )?; - -Concept : - id=ConceptId (PIPE WS* term=Term WS* PIPE)?; - -Group : - OPENING_CURLY_BRACKET attributes+=Attribute (COMMA attributes+=Attribute)* CLOSING_CURLY_BRACKET; - -Attribute : - name=Concept EQUAL_SIGN value=AttributeValue; - -AttributeValue : - Concept | (OPENING_ROUND_BRACKET Expression CLOSING_ROUND_BRACKET); - - -Term hidden() : (TermCharacter)+ (WS+ (TermCharacter)+)*; -ConceptId hidden(): DIGIT_NONZERO (DIGIT_NONZERO|ZERO)(DIGIT_NONZERO|ZERO)(DIGIT_NONZERO|ZERO)(DIGIT_NONZERO|ZERO)(DIGIT_NONZERO|ZERO)+; -TermCharacter hidden() : DIGIT_NONZERO|ZERO|LETTER|COMMA|OPENING_CURLY_BRACKET| - CLOSING_CURLY_BRACKET|EQUAL_SIGN|OPENING_ROUND_BRACKET|CLOSING_ROUND_BRACKET|PLUS_SIGN|COLON|OTHER_ALLOWED_TERM_CHARACTER; - -terminal ZERO : '0'; -terminal DIGIT_NONZERO : '1'..'9'; -terminal LETTER : ('a'..'z' | 'A'..'Z'); -terminal WS : (' '|'\t'|'\n'|'\r'); -terminal ML_COMMENT : '/*' -> '*/'; -terminal SL_COMMENT : '//' !('\n'|'\r')* ('\r'? '\n')?; -terminal PIPE : '|'; -terminal COLON : ':'; -terminal OPENING_CURLY_BRACKET : '{'; -terminal CLOSING_CURLY_BRACKET: '}'; -terminal EQUAL_SIGN: '='; -terminal COMMA: ','; -terminal OPENING_ROUND_BRACKET : '('; -terminal CLOSING_ROUND_BRACKET : ')'; -terminal PLUS_SIGN : '+'; -terminal OTHER_ALLOWED_TERM_CHARACTER : .; -//terminal OTHER_ALLOWED_TERM_CHARACTER : '-'|'/'|'\\'|';'|'.'|'?'|'_'|'<'|'>'|'['|']'; - -// ------ Original Snomed Composition Grammar (2008-12-23) ------ -//expression = concept *("+" concept) [":" ws refinements ] -//concept = ws conceptId ws ["|" ws term ws "|" ws] -//conceptId = sctId -//term = 1*nonwsnonpipe *( 1*SP 1*nonwsnonpipe ) -//refinements = ( attributeSet *attributeGroup ) / 1*attributeGroup -//attributeGroup = "{" attributeSet "}" ws -//attributeSet = attribute *("," attribute) -//attribute = attributeName "=" attributeValue -//attributeName = ws attributeNameId ws ["|" ws term ws "|" ws] -//attributeValue = concept / (ws "(" expression ")" ws) -//attributeNameId = sctId -//sctId = digitNonZero 5*17( digit ) -//ws =*(SP/HTAB/CR/LF) ;whitespace -//SP = %x20 -//HTAB = %x09 -//CR = %x0D -//LF = %x0A -//digit = %x30-39 -//digitNonZero = %x31-39 ; digits 1 through 9, but excluding 0 -//nonwsnonpipe = %x21-7B / %x7D-7E / UTF8-2 / UTF8-3 / UTF8-4 diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGPostProcessor.ext b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGPostProcessor.ext deleted file mode 100644 index eb91fb0248a..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGPostProcessor.ext +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - */ -import ecore; - -// Simple Postprocessor class that delegates to a public static Java method. -process(xtext::GeneratedMetamodel model): -JAVA com.b2international.snowowl.dsl.SCGPostProcessor.process(org.eclipse.xtext.GeneratedMetamodel); \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGPostProcessor.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGPostProcessor.java deleted file mode 100644 index 4d0c1b9e856..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGPostProcessor.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EcoreFactory; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.xtext.GeneratedMetamodel; - -import com.google.common.collect.FluentIterable; - -/** - * Simple PostProcessor class. Changes can be applied to the Ecore model, that - * is inferred from the grammar. - * - * - */ -public class SCGPostProcessor { - - public static final String CONCEPT_ECLASS_NAME = "Concept"; - - public static void process(GeneratedMetamodel generatedMetamodel) { - process(generatedMetamodel.getEPackage()); - } - - public static void process(EPackage ePackage) { - for (EClass eClass : FluentIterable.from(ePackage.getEClassifiers()).filter(EClass.class)) { - if (CONCEPT_ECLASS_NAME.equals(eClass.getName())) { - processConcept(eClass); - } - } - } - - public static void processConcept(EClass eClass) { - eClass.getEStructuralFeatures().add(createSuperTypeAttribute()); - } - - private static EAttribute createSuperTypeAttribute() { - EAttribute superTypesAttribute = EcoreFactory.eINSTANCE.createEAttribute(); - superTypesAttribute.setEType(getEClassifier("ELong")); - superTypesAttribute.setLowerBound(0); - superTypesAttribute.setUpperBound(-1); - superTypesAttribute.setName("superTypes"); - return superTypesAttribute; - } - - public static EClassifier getEClassifier(String name) { - return EcorePackage.eINSTANCE.getEClassifier(name); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGRewriter.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGRewriter.java deleted file mode 100644 index 5ce09632c21..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGRewriter.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl; - -import java.io.Reader; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.xtext.parser.IParseResult; - -import com.b2international.snowowl.dsl.parser.antlr.SCGParser; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.AttributeValue; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.snomed.dsl.query.QueryParser; -import com.b2international.snowowl.snomed.dsl.query.SyntaxErrorException; -import com.b2international.snowowl.snomed.dsl.query.queryast.AndClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastFactory; - - -/** - * Rewrites an SCG parse tree and produces "Query AST" form. Probably broken for now. - * - * - */ -public class SCGRewriter implements QueryParser { - - public RValue rewrite(EObject ast) { - - Expression expression = (Expression) ast; - - if(expression.getConcepts().size() < 1) { - throw new IllegalArgumentException("At least one concept is required"); - } - - RValue rootClause = toConceptRef(expression.getConcepts().get(0)); - - for(int i = 1; i < expression.getConcepts().size(); i++) { - rootClause = createAndClause(rootClause, toConceptRef(expression.getConcepts().get(i))); - } - - for(Attribute attribute: expression.getAttributes()) { - ConceptRef predicate = toConceptRef(attribute.getName()); - rootClause = createAndClause(rootClause, toRValue(predicate, attribute.getValue())); - } - - for(Group group: expression.getGroups()) { - if(group.getAttributes().size() > 0) { - - AttributeClauseGroup acGroup = ecoreastFactory.eINSTANCE.createAttributeClauseGroup(); - RValue groupRoot = toRValue( - toConceptRef(group.getAttributes().get(0).getName()), - group.getAttributes().get(0).getValue()); - for(int i = 1; i < group.getAttributes().size(); i++) { - groupRoot = createAndClause(rootClause, toRValue( - toConceptRef(group.getAttributes().get(i).getName()), - group.getAttributes().get(i).getValue())); - } - rootClause = acGroup; - acGroup.setValue(groupRoot); - } - } - - return rootClause; - } - - protected ConceptRef toConceptRef(Concept concept) { - ConceptRef conceptRef = ecoreastFactory.eINSTANCE.createConceptRef(); - conceptRef.setConceptId(concept.getId()); - conceptRef.setLabel(concept.getTerm()); - return conceptRef; - } - - protected RValue toRValue(ConceptRef predicate, AttributeValue attributeValue) { - - if(attributeValue instanceof Concept) { - Concept concept = (Concept) attributeValue; - AttributeClause attributeClause = ecoreastFactory.eINSTANCE.createAttributeClause(); - attributeClause.setLeft(predicate); - attributeClause.setRight(toConceptRef(concept)); - return attributeClause; - - } else if (attributeValue instanceof Expression) { - Expression expression = (Expression) attributeValue; - - SubExpression subExpression = ecoreastFactory.eINSTANCE.createSubExpression(); - subExpression.setValue(rewrite(expression)); - AttributeClause attributeClause = ecoreastFactory.eINSTANCE.createAttributeClause(); - attributeClause.setLeft(predicate); - attributeClause.setRight(subExpression); - return attributeClause; - } - - throw new UnsupportedOperationException("Unknown attribute value type: " + attributeValue); - } - - public RValue parse(Reader reader) { - SCGParser parser = SCGStandaloneSetup.createSCGParser(); - IParseResult parseResult = parser.parse(reader); - - if (parseResult.hasSyntaxErrors()) { - throw new SyntaxErrorException(parseResult.getSyntaxErrors()); - } - - return rewrite(parseResult.getRootASTElement()); - } - - protected AndClause createAndClause(RValue left, RValue right) { - AndClause clause = ecoreastFactory.eINSTANCE.createAndClause(); - clause.setLeft(left); - clause.setRight(right); - return clause; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGStandaloneSetup.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGStandaloneSetup.java deleted file mode 100644 index 8db90998045..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/SCGStandaloneSetup.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl; - -import java.io.StringReader; -import java.util.Iterator; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.xtext.nodemodel.INode; -import org.eclipse.xtext.parser.IParseResult; - -import com.b2international.snowowl.dsl.parser.antlr.SCGParser; -import com.google.inject.Injector; - -/** - * Initialization support for running Xtext languages - * without equinox extension registry - *

      - * FIXME don't use it: - * http://www.eclipse.org/forums/index.php/t/280252/ - * we debugged for a while, injecting instead of instantiating is not an easy task, might be worth upgrading XText instead of wasting lot of time - * with figuring out how to do that. - *
      - * we use this: http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/ticket/1577 but the exception occurs - */ -public class SCGStandaloneSetup extends SCGStandaloneSetupGenerated{ - - private static SCGParser parser; - - public static void doSetup() { - new SCGStandaloneSetup().createInjectorAndDoEMFRegistration(); - } - - public static SCGParser createSCGParser() { - final Injector injector = new SCGStandaloneSetup().createInjectorAndDoEMFRegistration(); - return injector.getInstance(SCGParser.class); - } - - public static EObject parse(final String expression) { - if (parser == null) { - parser = createSCGParser(); - } - - final IParseResult parseResult = parser.parse(new StringReader(expression)); - if (parseResult.hasSyntaxErrors()) { - final ParseException exception = new ParseException("Error in SCG expression"); - final Iterator itr = parseResult.getSyntaxErrors().iterator(); - while (itr.hasNext()) { - exception.getErrors().add(itr.next().getSyntaxErrorMessage().getMessage()); - } - throw exception; - } - - return parseResult.getRootASTElement(); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/expressionextractor/ExtractedSCGAttributeGroup.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/expressionextractor/ExtractedSCGAttributeGroup.java deleted file mode 100644 index ec9a5f03e5e..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/expressionextractor/ExtractedSCGAttributeGroup.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.expressionextractor; - -import java.util.Map; -import java.util.Map.Entry; - -import com.google.common.collect.Maps; - -/** - * PoJo class for collecting the extracted attribute groups (concept ids actually) from SCG expression. - * Concept id map key is used as relationship type concept, value is the destination concept of the relationship. - * - * - */ -public class ExtractedSCGAttributeGroup { - - // relationship type concept id, relationship destination concept id - private Map attributeConceptIdMap; - - private int groupId; - - public ExtractedSCGAttributeGroup() { - attributeConceptIdMap = Maps.newHashMap(); - } - - public int getGroupId() { - return groupId; - } - - /** - * - * @return Map relationship type concept id, relationship destination concept id - */ - public Map getAttributeConceptIdMap() { - return attributeConceptIdMap; - } - - /** - * Map relationship type concept id, relationship destination concept id - */ - public void setAttributeConceptIdMap(Map attributeConceptIdMap) { - this.attributeConceptIdMap = attributeConceptIdMap; - } - - public void setGroupId(int groupId) { - this.groupId = groupId; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("["); - for (Entry entry : attributeConceptIdMap.entrySet()) { - sb.append(entry.getKey() + ":" + entry.getValue() + " "); - } - sb.append("] = " + groupId); - - return sb.toString(); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/expressionextractor/SCGExpressionExtractor.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/expressionextractor/SCGExpressionExtractor.java deleted file mode 100644 index 0ea191a0373..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/expressionextractor/SCGExpressionExtractor.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.expressionextractor; - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import org.eclipse.emf.common.util.EList; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.AttributeValue; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.google.common.base.Function; -import com.google.common.collect.FluentIterable; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; - -/** - * This class is for extracting concept ids from SCG expression and group them property. - * Focus concept ids are for creating "is a" relationships. - * Ungroupped attributes (key is relationship type, value is the destination of the relationship) have the group id of 0. - * Groupped attributes (key is relationship type, value is the destination of the relationship) group id increased incrementally. - * - * - */ -public class SCGExpressionExtractor { - - private final Expression expression; - - public SCGExpressionExtractor(Expression expression) { - this.expression = expression; - } - - /** - * Returns the concept id list of the focus concepts of the expression. Used for "is a" relationships. - * - * @return List concept id list. - */ - public List getFocusConceptIdList() { - return FluentIterable.from(expression.getConcepts()).transform(new Function() { - @Override public String apply(Concept input) { - return input.getId(); - } - }).toList(); - } - - private Map getUnGroupedAttributePairs() { - EList unGroupedAttributes = expression.getAttributes(); - - return extractAttributeConcepts(unGroupedAttributes); - } - - private Map extractAttributeConcepts(List attributes) { - Map attributeConceptIdMap = Maps.newHashMap(); - for (Attribute attribute : attributes) { - Concept typeConcept = attribute.getName(); - - AttributeValue value = attribute.getValue(); - - if (!(value instanceof Concept)) { - // probably because of invalid syntax - return Collections.emptyMap(); - } - - Concept destination = (Concept) value; - - attributeConceptIdMap.put(typeConcept.getId(), destination.getId()); - } - - return attributeConceptIdMap; - } - - /** - * Returns ungroupped (with group id of 0) and grouped attribute concept id pairs (group id increased incrementally). - * - * @return List - */ - public List getGroupConcepts() { - List attributeGroupList = Lists.newArrayList(); - EList groups = expression.getGroups(); - - Map unGroupedAttributePairs = getUnGroupedAttributePairs(); - - int i = 0; - - if (unGroupedAttributePairs.size() != 0) { - ExtractedSCGAttributeGroup unGrouppedAttributePairs = new ExtractedSCGAttributeGroup(); - - unGrouppedAttributePairs.setAttributeConceptIdMap(unGroupedAttributePairs); - unGrouppedAttributePairs.setGroupId(0); - attributeGroupList.add(unGrouppedAttributePairs); - } - - i++; - - for (Group group : groups) { - EList attributes = group.getAttributes(); - Map extractAttributeConcepts = extractAttributeConcepts(attributes); - - ExtractedSCGAttributeGroup extractedSCGAttributeGroup = new ExtractedSCGAttributeGroup(); - - extractedSCGAttributeGroup.setAttributeConceptIdMap(extractAttributeConcepts); - extractedSCGAttributeGroup.setGroupId(i++); - - attributeGroupList.add(extractedSCGAttributeGroup); - } - - return attributeGroupList; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/formatting/SCGFormatter.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/formatting/SCGFormatter.java deleted file mode 100644 index c71c0722065..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/formatting/SCGFormatter.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.formatting; - -import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter; -import org.eclipse.xtext.formatting.impl.FormattingConfig; - -import com.b2international.snowowl.dsl.services.SCGGrammarAccess; - -/** - * This class contains custom formatting settings for an SCG expression. - * - * see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#formatting - * on how and when to use it - * - * Also see {@link org.eclipse.xtext.xtext.XtextFormatter} as an example - * - */ -public class SCGFormatter extends AbstractDeclarativeFormatter { - - /* - * (non-Javadoc) - * @see org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter#configureFormatting(org.eclipse.xtext.formatting.impl.FormattingConfig) - */ - protected void configureFormatting(FormattingConfig cfg) { - - SCGGrammarAccess ga = (SCGGrammarAccess) getGrammarAccess(); - - //COMMENT - cfg.setLinewrap(0, 1, 2).before(ga.getSL_COMMENTRule()); - cfg.setLinewrap(0, 1, 2).before(ga.getML_COMMENTRule()); - cfg.setLinewrap(0, 1, 1).after(ga.getML_COMMENTRule()); - - //no space between pipe, pipe and concept id, space after closing pipe - cfg.setNoSpace().before(ga.getConceptAccess().getPIPETerminalRuleCall_1_0()); - cfg.setNoSpace().after(ga.getConceptAccess().getPIPETerminalRuleCall_1_0()); - cfg.setNoSpace().before(ga.getConceptAccess().getPIPETerminalRuleCall_1_4()); - - //line wrap before and after {} plus indentation - cfg.setLinewrap().before(ga.getGroupAccess().getOPENING_CURLY_BRACKETTerminalRuleCall_0()); - cfg.setLinewrap().after(ga.getGroupAccess().getOPENING_CURLY_BRACKETTerminalRuleCall_0()); - cfg.setLinewrap().before(ga.getGroupAccess().getCLOSING_CURLY_BRACKETTerminalRuleCall_3()); - cfg.setLinewrap().after(ga.getGroupAccess().getCLOSING_CURLY_BRACKETTerminalRuleCall_3()); - cfg.setIndentation(ga.getGroupAccess().getOPENING_CURLY_BRACKETTerminalRuleCall_0(), ga.getGroupAccess().getCLOSING_CURLY_BRACKETTerminalRuleCall_3()); - - //line wrap before , - cfg.setLinewrap().before(ga.getExpressionAccess().getCOMMATerminalRuleCall_2_1_1_0()); - - //setnospace after ( and before ) - cfg.setNoSpace().after(ga.getAttributeValueAccess().getOPENING_ROUND_BRACKETTerminalRuleCall_1_0()); - cfg.setNoSpace().before(ga.getAttributeValueAccess().getCLOSING_ROUND_BRACKETTerminalRuleCall_1_2()); - - //do not break after | - cfg.setNoLinewrap().after(ga.getConceptAccess().getPIPETerminalRuleCall_1_0()); - - //do not break before | - cfg.setNoLinewrap().before(ga.getConceptAccess().getPIPETerminalRuleCall_1_4()); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/util/ScgAttributeFinderVisitor.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/util/ScgAttributeFinderVisitor.java deleted file mode 100644 index 5b795b41501..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/util/ScgAttributeFinderVisitor.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.util; - -import java.util.Collection; -import java.util.List; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.b2international.commons.tree.TreeVisitor; -import com.b2international.commons.tree.emf.EObjectTreeNode; -import com.b2international.snowowl.core.api.IComponent; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; -import com.google.common.collect.Lists; - -/** - * Extracts all matching attributes. - * - * @param - */ -public class ScgAttributeFinderVisitor> implements TreeVisitor { - - private final Logger logger = LoggerFactory.getLogger(ScgAttributeFinderVisitor.class); - - private final int maxScgExpressionDepth; - private final String nameId; - private final String valueId; - private int scgExpressionDepth = 0; - private List matchingAttributes = Lists.newArrayList(); - private final Collection attributesToIgnore; - - /** - * Class constructor. - * Note: set maxScgExpressionDepth to '2' for stopping at the clinical kernel's top expression level. - * @param maxScgExpressionDepth the maximum depth of SCG subexpressions to recurse into. - * @param attributesToIgnore the attributes to ignore when traversing the expression - */ - public ScgAttributeFinderVisitor(final String nameId, final String valueId, final int maxScgExpressionDepth, final Collection attributesToIgnore) { - this.nameId = nameId; - this.valueId = valueId; - this.maxScgExpressionDepth = maxScgExpressionDepth; - this.attributesToIgnore = attributesToIgnore; - } - - @Override - public boolean visit(final EObjectTreeNode node) { - if (node.getFeature() == null && node.getEObject() instanceof com.b2international.snowowl.dsl.scg.Attribute - && ((Attribute)node.getEObject()).getValue() instanceof Concept) { - final Attribute attribute = (Attribute)node.getEObject(); - if (hasMatchingName(attribute) && hasMatchingValue(attribute) && !attributesToIgnore.contains(attribute)) { - matchingAttributes.add(attribute); - } - } - return true; - } - - private boolean hasMatchingValue(final Attribute attribute) { - return valueId.equals(((Concept) attribute.getValue()).getId()); - } - - private boolean hasMatchingName(final Attribute attribute) { - return nameId.equals(attribute.getName().getId()); - } - - @Override - public boolean entering(final EObjectTreeNode node) { - if (node.getFeature() == null && node.getEObject() instanceof com.b2international.snowowl.dsl.scg.Expression) { - // don't traverse full depth of expression tree - if (scgExpressionDepth > maxScgExpressionDepth) { - return false; - } - scgExpressionDepth++; - logger.debug("Entering (depth=" + scgExpressionDepth +"): " + node.getEObject()); - } - return true; - } - - @Override - public boolean leaving(final EObjectTreeNode node) { - if (node.getFeature() == null && node.getEObject() instanceof com.b2international.snowowl.dsl.scg.Expression) { - scgExpressionDepth--; - logger.debug("Leaving (depth=" + scgExpressionDepth +"): " + node.getEObject()); - } - return true; - } - - /** - * @return all matching attributes - */ - public List getMatchingAttributes() { - return matchingAttributes; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/util/ScgExpressionTermCompleter.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/util/ScgExpressionTermCompleter.java deleted file mode 100644 index 9b66672cad3..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/util/ScgExpressionTermCompleter.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.util; - -import org.eclipse.emf.common.util.EList; - -import com.b2international.commons.http.ExtendedLocale; -import com.b2international.snowowl.core.ApplicationContext; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.AttributeValue; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.eventbus.IEventBus; -import com.b2international.snowowl.snomed.core.domain.SnomedDescription; -import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; -import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; -import com.google.common.collect.ImmutableList; - -public class ScgExpressionTermCompleter { - - private final Expression expression; - private final String branch; - - public ScgExpressionTermCompleter(final String branch, Expression expression) { - this.branch = branch; - this.expression = expression; - } - - public Expression getTermCompletedExpression() { - populateTerm(expression); - - return expression; - } - - private void populateTerm(Expression normalizedExpression) { - EList concepts = normalizedExpression.getConcepts(); - for (Concept concept : concepts) { - addTerm(concept); - } - - EList attributes = normalizedExpression.getAttributes(); - - populateAttributesWithTerm(attributes); - - EList groups = normalizedExpression.getGroups(); - - for (Group group : groups) { - populateAttributesWithTerm(group.getAttributes()); - } - } - - private void populateAttributesWithTerm(EList attributes) { - for (Attribute attribute : attributes) { - AttributeValue attributeValue = attribute.getValue(); - - if (attributeValue instanceof Concept) { - addTerm((Concept) attributeValue); - } - - addTerm(attribute.getName()); - } - } - - private void addTerm(Concept concept) { - final SnomedDescription pt = getPt(concept.getId()); - concept.setTerm(pt == null ? concept.getId() : pt.getTerm()); - } - - private SnomedDescription getPt(String id) { - return SnomedRequests.prepareGetConcept(id) - .setExpand("pt()") - .setLocales(ImmutableList.of(ExtendedLocale.valueOf("en-sg"), ExtendedLocale.valueOf("en-gb"))) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, branch) - .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .getSync().getPt(); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/validation/SCGJavaValidator.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/validation/SCGJavaValidator.java deleted file mode 100644 index 8a549857bdd..00000000000 --- a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/dsl/validation/SCGJavaValidator.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.dsl.validation; - -import static com.google.common.base.Preconditions.checkArgument; - -import java.util.Map; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.xtext.validation.Check; -import org.eclipse.xtext.validation.CheckType; - -import com.b2international.commons.http.ExtendedLocale; -import com.b2international.snowowl.core.ApplicationContext; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.ScgPackage; -import com.b2international.snowowl.eventbus.IEventBus; -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.SnomedConcept; -import com.b2international.snowowl.snomed.core.domain.SnomedDescription; -import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; -import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Iterables; -import com.google.inject.Inject; -import com.google.inject.Provider; - -/** - * Java validator to register custom validation rules to be checked. - * - * - */ -public class SCGJavaValidator extends AbstractSCGJavaValidator { - - public static final String INVALID_CONCEPT_ID_LENGTH = "invalidConceptId"; - public static final String NON_EXISTING_CONCEPT_ID = "nonexistentConcept"; - public static final String NON_MATCHING_TERM = "nomMatchingTerm"; - public static final String INACTIVE_CONCEPT = "inactiveConcept"; - - private final Provider bus; - - @Inject - public SCGJavaValidator(Provider bus) { - this.bus = bus; - } - - @Override - protected boolean isResponsible(Map context, EObject eObject) { - // context must have the associated activeBranch key, otherwise we cannot validate the target - return super.isResponsible(context, eObject) && context.containsKey("activeBranch"); - } - - /** - * Check if the concept id length is between 6 and 18. - * @param concept - */ - @Check(CheckType.NORMAL) - public void checkSnomedConceptId(Concept concept) { - if (concept.getId() == null) { - return; - } - - if (concept.getId().length() < 6 || concept.getId().length() > 18) { - error("Concept ID length should be between 6 and 18 characters", ScgPackage.eINSTANCE.getConcept_Id(), INACTIVE_CONCEPT); - } - } - - /** - * Check if the concept is in the database based on the given concept id - * - * @param concept - */ - @Check(CheckType.NORMAL) - public void checkSnomedConceptValidity(Concept concept) { - if (concept.getId() == null) - return; - - try { - SnomedConcept resolvedConcept = getConcept(concept.getId()); - - // Concept id is not valid if the concept id length is less then 6 or longer then 18 -> should't be existed at all -> don't show 2 error messages - if (concept.getId().length() < 6 || concept.getId().length() > 18) { - return; - } - - if (resolvedConcept == null) { - error("Concept ID does not exist in the database", ScgPackage.eINSTANCE.getConcept_Id(), NON_EXISTING_CONCEPT_ID); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - -// @Check(CheckType.NORMAL) -// public void checkMRCMValidity(Expression expression) { -// if (expression == null || expression.eAllContents().hasNext() == false) -// return; -// -// SCGExpressionExtractor extractor = new SCGExpressionExtractor(expression); -// NormalFormWrapper normalForm = new NormalFormWrapper(extractor.getFocusConceptIdList(), wrapRelationshipGroups(extractor.getGroupConcepts())); -// -// IBranchPath branchPath = BranchPathUtils.createPath(getBranch()); -// try (SnomedEditingContext editingContext = new SnomedEditingContext(branchPath)) { -// com.b2international.snowowl.snomed.Concept concept = editingContext.buildDraftConceptFromNormalForm(normalForm); -// concept.eAdapters().add(new ConceptParentAdapter(extractor.getFocusConceptIdList())); -// IWidgetModelProvider widgetModelProvider = ApplicationContext.getInstance().getService(IWidgetModelProvider.class); -// ConceptWidgetModel conceptWidgetModel = widgetModelProvider.createConceptWidgetModel(branchPath, extractor.getFocusConceptIdList(), null); -// IWidgetBeanProvider widgetBeanProvider = ApplicationContext.getServiceForClass(IWidgetBeanProvider.class); -// ConceptWidgetBean conceptWidgetBean = widgetBeanProvider.createConceptWidgetBean(branchPath, concept.getId(), conceptWidgetModel, null, true, false, new NullProgressMonitor()); -// IDiagnostic diagnostic = new MrcmConceptWidgetBeanValidator().validate(conceptWidgetBean); -// Set markedAttributes = Sets.newHashSet(); -// for (IDiagnostic childDiagnostic : diagnostic.getChildren()) { -// DiagnosticSeverity severity = childDiagnostic.getProblemMarkerSeverity(); -// switch (severity) { -// case ERROR: -// // find exact location for the error -// WidgetBeanValidationDiagnostic widgetBeanDiagnostic = (WidgetBeanValidationDiagnostic) childDiagnostic; -// ModeledWidgetBean widgetBean = widgetBeanDiagnostic.getWidgetBean(); -// if (widgetBean instanceof RelationshipWidgetBean) { -// RelationshipWidgetBean relationshipWidgetBean = (RelationshipWidgetBean) widgetBean; -// ScgAttributeFinderVisitor attributeExtractingVisitor = -// new ScgAttributeFinderVisitor(relationshipWidgetBean.getSelectedType().getId(), -// relationshipWidgetBean.getSelectedValue().getId(), Integer.MAX_VALUE, markedAttributes); -// EObjectWalker extractorWalker = EObjectWalker.createContainmentWalker(attributeExtractingVisitor); -// extractorWalker.walk(expression); -// List matchingAttributes = attributeExtractingVisitor.getMatchingAttributes(); -// if (!CompareUtils.isEmpty(matchingAttributes)) { -// final Attribute matchingAttribute = matchingAttributes.get(0); -// if (matchingAttribute.eContainer() instanceof Expression) { -// Expression containingExpression = (Expression) matchingAttribute.eContainer(); -// int index = containingExpression.getAttributes().indexOf(matchingAttribute); -// error(childDiagnostic.getMessage(), containingExpression, ScgPackage.eINSTANCE.getExpression_Attributes(), index); -// } else if (matchingAttribute.eContainer() instanceof Group) { -// Group containingGroup = (Group) matchingAttribute.eContainer(); -// int index = containingGroup.getAttributes().indexOf(matchingAttribute); -// error(childDiagnostic.getMessage(), containingGroup, ScgPackage.eINSTANCE.getGroup_Attributes(), index); -// } else { -// throw new IllegalStateException("Unexpected attribute container: " + matchingAttribute.eContainer()); -// } -// markedAttributes.add(matchingAttribute); -// } -// } -// break; -// -// default: -// break; -// } -// } -// } -// } -// -// private Collection wrapRelationshipGroups(final Collection groupConcepts) { -// final Set attributeConceptGroupWrappers = Sets.newHashSet(); -// for (ExtractedSCGAttributeGroup group : groupConcepts) { -// attributeConceptGroupWrappers.add(new AttributeConceptGroupWrapper(group.getAttributeConceptIdMap(), group.getGroupId())); -// } -// return attributeConceptGroupWrappers; -// } - - /** - * Check if the concept id matches the subsequent term declaration. - * Shows no error if it matches the preferred term, a warning if the term is a synonym, error otherwise. - * - * @param concept - */ - @Check(CheckType.NORMAL) - public void checkNonMatchingTerm(Concept concept) { - if (concept != null && concept.getId() != null) { - checkNonMatchingTerm(concept.getId(), concept.getTerm(), ScgPackage.Literals.CONCEPT__TERM); - } - } - - private void checkNonMatchingTerm(String id, String term, EAttribute termAttribute) { - - final SnomedConcept concept = SnomedRequests.prepareGetConcept(id) - .setExpand("descriptions(),pt()") - // TODO fix hardcoded locales - .setLocales(ImmutableList.of(ExtendedLocale.valueOf("en-sg"), ExtendedLocale.valueOf("en-gb"))) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, getBranch()) - .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .getSync(); - - if (concept.getPt() != null && concept.getPt().getTerm().equals(term)) { - return; - } - - for (SnomedDescription description : concept.getDescriptions()) { - if (description.getTerm().equals(term)) { - if (Concepts.FULLY_SPECIFIED_NAME.equals(description.getTypeId())) { - warning("This is the fully specified name, not the preferred term.", termAttribute, NON_MATCHING_TERM); - return; - } else if (Concepts.SYNONYM.equals(description.getTypeId())) { - warning("This is a synonym, not the preferred term.", termAttribute, NON_MATCHING_TERM); - return; - } - } - } - - error("This term is not a description for the specified component ID.", termAttribute, NON_MATCHING_TERM); - } - - /** - * Concept should be regarded as inactive if its status is: CURRENT/LIMITED/PENDING_MOVE. - * - * @param concept - */ - @Check(CheckType.NORMAL) - public void checkNonActiveConcepts(Concept concept) { - if (null == concept || concept.getId() == null) { - return; - } - - final SnomedConcept entry = getConcept(concept.getId()); - if (entry != null && !entry.isActive()) { - warning("Concept is inactive", ScgPackage.eINSTANCE.getConcept_Id(), INACTIVE_CONCEPT); - } - } - - private SnomedConcept getConcept(String id) { - return Iterables.getOnlyElement(SnomedRequests.prepareSearchConcept() - .setLimit(1) - .filterById(id) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, getBranch()) - .execute(bus.get()).getSync(), null); - } - - private String getBranch() { - checkArgument(getContext().containsKey("activeBranch"), "Active branch scope is required to execute this validator"); - return (String) getContext().get("activeBranch"); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/GenerateScg.mwe2 b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/GenerateScg.mwe2 new file mode 100644 index 00000000000..1bd8a503b35 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/GenerateScg.mwe2 @@ -0,0 +1,94 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +module com.b2international.snowowl.snomed.scg.GenerateScg + +import org.eclipse.xtext.xtext.generator.* +import org.eclipse.xtext.xtext.generator.model.project.* + +var rootPath = ".." +var header = "/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the \"License\"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an \"AS IS\" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */" + +Workflow { + + component = XtextGenerator { + configuration = { + project = StandardProjectConfig { + baseName = "com.b2international.snowowl.snomed.scg" + rootPath = rootPath + genericIde = { + enabled = true + // Set relative path of IDE project here + root = "../../../snow-owl-ext/snomed-ui/com.b2international.snowowl.snomed.scg.ui" + name = "com.b2international.snowowl.snomed.scg.ui" + } + runtimeTest = { + enabled = true + } + eclipsePlugin = { + enabled = true + // Set relative path of Eclipse plugin project here + root = "../../../snow-owl-ext/snomed-ui/com.b2international.snowowl.snomed.scg.ui" + } + eclipsePluginTest = { + enabled = false + } + createEclipseMetaData = false + } + code = { + encoding = "UTF-8" + lineDelimiter = "\n" + fileHeader = header + preferXtendStubs = false + } + } + language = StandardLanguage { + name = "com.b2international.snowowl.snomed.scg.Scg" + fileExtensions = "scg" + + serializer = { + generateStub = false + } + + parserGenerator = org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 auto-inject { + options = { + backtrack = true + ignoreCase = true + classSplitting = true + } + } + + validator = { + // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" + // Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage + // generateDeprecationValidation = true + } + } + } +} diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/Scg.xtext b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/Scg.xtext new file mode 100644 index 00000000000..e9e7bdcaeb4 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/Scg.xtext @@ -0,0 +1,126 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +grammar com.b2international.snowowl.snomed.scg.Scg hidden(WS, ML_COMMENT, SL_COMMENT) + +generate scg "http://www.b2international.com/snowowl/snomed/scg/Scg" +import 'http://www.eclipse.org/emf/2002/Ecore' as ecore + +Expression: + {Expression} ((primitive?=SUBTYPE_OF | EQUIVALENT_TO)? expression=SubExpression)?; + +SubExpression: + focusConcepts+=ConceptReference (PLUS focusConcepts+=ConceptReference)* (COLON refinement=Refinement)?; + +Refinement: + (attributes+=Attribute (COMMA attributes+=Attribute)* | groups+=AttributeGroup) (COMMA? groups+=AttributeGroup)*; + +AttributeGroup: + CURLY_OPEN attributes+=Attribute (COMMA attributes+=Attribute)* CURLY_CLOSE; + +Attribute: + name=ConceptReference EQUAL value=AttributeValue; + +AttributeValue: + ConceptReference | ROUND_OPEN SubExpression ROUND_CLOSE | StringValue | IntegerValue | + DecimalValue; + +StringValue: + value=STRING; + +IntegerValue: + HASH value=Integer; + +DecimalValue: + HASH value=Decimal; + +ConceptReference: + id=SnomedIdentifier (term=TERM_STRING)?; + +terminal EQUIVALENT_TO: + '==='; + +terminal SUBTYPE_OF: + '<<<'; + +terminal TERM_STRING: + "|" (!("|"))* "|"; + +terminal ZERO: + '0'; + +terminal DIGIT_NONZERO: + '1'..'9'; + +terminal CURLY_OPEN: + '{'; + +terminal CURLY_CLOSE: + '}'; + +terminal COMMA: + ','; + +terminal EQUAL: + '='; + +terminal COLON: + ':'; + +terminal PLUS: + '+'; + +terminal DASH: + '-'; + +terminal DOT: + '.'; + +terminal ROUND_OPEN: + '('; + +terminal ROUND_CLOSE: + ')'; + +terminal HASH: + '#'; + +terminal WS: + (' ' | '\t' | '\n' | '\r'); + +terminal ML_COMMENT: + '/*'->'*/'; + +terminal SL_COMMENT: + '//' !('\n' | '\r')* ('\r'? '\n')?; + +terminal STRING: + '"' ('\\' . /* 'b'|'t'|'n'|'f'|'r'|'u'|'"'|"'"|'\\' */ | !('\\' | '"'))* '"' | + "'" ('\\' . /* 'b'|'t'|'n'|'f'|'r'|'u'|'"'|"'"|'\\' */ | !('\\' | "'"))* "'"; + +SnomedIdentifier hidden(): + DIGIT_NONZERO (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO) (DIGIT_NONZERO | ZERO)+; + +NonNegativeInteger returns ecore::EInt hidden(): + ZERO | DIGIT_NONZERO (DIGIT_NONZERO | ZERO)*; + +Integer returns ecore::EInt hidden(): + (PLUS | DASH)? NonNegativeInteger; + +Decimal returns ecore::EBigDecimal hidden(): + (PLUS | DASH)? NonNegativeDecimal; + +NonNegativeDecimal returns ecore::EBigDecimal hidden(): + NonNegativeInteger DOT (DIGIT_NONZERO | ZERO)*; diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/RefinementsMergerTest.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/ScgRuntimeModule.java similarity index 65% rename from snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/RefinementsMergerTest.java rename to snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/ScgRuntimeModule.java index 937497e143a..e9497c5e37c 100644 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/RefinementsMergerTest.java +++ b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/ScgRuntimeModule.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,15 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.semanticengine.simpleast.normalform.test; +package com.b2international.snowowl.snomed.scg; -import org.junit.Assert; -import org.junit.Test; -public class RefinementsMergerTest { - - @Test - public void test() { - Assert.fail("Test not implemented yet."); - } +/** + * Use this class to register components to be used at runtime / without the Equinox extension registry. + */ +public class ScgRuntimeModule extends AbstractScgRuntimeModule { } diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/ScgStandaloneSetup.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/ScgStandaloneSetup.java new file mode 100644 index 00000000000..2b820896316 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/ScgStandaloneSetup.java @@ -0,0 +1,27 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg; + + +/** + * Initialization support for running Xtext languages without Equinox extension registry. + */ +public class ScgStandaloneSetup extends ScgStandaloneSetupGenerated { + + public static void doSetup() { + new ScgStandaloneSetup().createInjectorAndDoEMFRegistration(); + } +} diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/generator/ScgGenerator.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/generator/ScgGenerator.java new file mode 100644 index 00000000000..1ea3050e788 --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/generator/ScgGenerator.java @@ -0,0 +1,42 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.generator; + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.xtext.generator.AbstractGenerator; +import org.eclipse.xtext.generator.IFileSystemAccess2; +import org.eclipse.xtext.generator.IGeneratorContext; + +/** + * Generates code from your model files on save. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation + */ +public class ScgGenerator extends AbstractGenerator { + + @Override + public void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { +// Iterator filtered = Iterators.filter(resource.getAllContents(), Greeting.class); +// Iterator names = Iterators.transform(filtered, new Function() { +// +// @Override +// public String apply(Greeting greeting) { +// return greeting.getName(); +// } +// }); +// fsa.generateFile("greetings.txt", "People to greet: " + IteratorExtensions.join(names, ", ")); + } +} diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedIdentifierResponse.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/scoping/ScgScopeProvider.java similarity index 61% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedIdentifierResponse.java rename to snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/scoping/ScgScopeProvider.java index ac189f036a0..e9c14808bb3 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedIdentifierResponse.java +++ b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/scoping/ScgScopeProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,25 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.rest.domain; +package com.b2international.snowowl.snomed.scg.scoping; + /** - * @since 1.0 + * This class contains custom scoping description. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping + * on how and when to use it. */ -public class SnomedIdentifierResponse { - - private String id; - - public SnomedIdentifierResponse(String id) { - this.id = id; - } +public class ScgScopeProvider extends AbstractScgScopeProvider { - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - } diff --git a/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/validation/ScgValidator.java b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/validation/ScgValidator.java new file mode 100644 index 00000000000..8c6cfc5727b --- /dev/null +++ b/snomed/com.b2international.snowowl.snomed.scg/src/com/b2international/snowowl/snomed/scg/validation/ScgValidator.java @@ -0,0 +1,37 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.snomed.scg.validation; + + +/** + * This class contains custom validation rules. + * + * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation + */ +public class ScgValidator extends AbstractScgValidator { + +// public static final INVALID_NAME = 'invalidName' +// +// @Check +// public void checkGreetingStartsWithCapital(Greeting greeting) { +// if (!Character.isUpperCase(greeting.getName().charAt(0))) { +// warning("Name should start with a capital", +// ScgPackage.Literals.GREETING__NAME, +// INVALID_NAME); +// } +// } + +} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/META-INF/MANIFEST.MF deleted file mode 100644 index e5aed7ed833..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/META-INF/MANIFEST.MF +++ /dev/null @@ -1,23 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Semantic Engine Test -Bundle-SymbolicName: com.b2international.snowowl.snomed.semanticengine.simpleast.test -Bundle-Version: 7.3.0.qualifier -Bundle-Activator: com.b2international.snowowl.semanticengine.simpleast.test.SemanticEngineTestPlugin -Bundle-Vendor: B2i Healthcare -Require-Bundle: org.junit;bundle-version="4.8.2", - com.b2international.commons, - com.google.inject;bundle-version="2.0.0", - org.eclipse.xtext;bundle-version="[2.18.0,2.19.0)", - com.b2international.snowowl.core, - com.b2international.snowowl.datastore, - com.b2international.snowowl.snomed.dsl, - org.eclipse.core.runtime;bundle-version="3.6.0", - com.b2international.snowowl.snomed.semanticengine.simpleast, - com.b2international.snowowl.snomed.datastore, - com.b2international.snowowl.test.commons, - com.b2international.snowowl.snomed.ecl -Bundle-RequiredExecutionEnvironment: JavaSE-11 -Bundle-ActivationPolicy: lazy -Export-Package: com.b2international.snowowl.semanticengine.simpleast.test, - com.b2international.snowowl.semanticengine.simpleast.test.utils diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/pom.xml b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/pom.xml deleted file mode 100644 index 8d9b45e165b..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 4.0.0 - - com.b2international.snowowl - 7.3.0-SNAPSHOT - snomed-parent - - com.b2international.snowowl.snomed.semanticengine.simpleast.test - eclipse-plugin - diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/AttributeGroupMergerTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/AttributeGroupMergerTest.java deleted file mode 100644 index cda4d9ef684..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/AttributeGroupMergerTest.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform.test; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.junit.Before; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeClauseList; -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeClauseListMerger; -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.simpleast.subsumption.SubsumptionTester; -import com.b2international.snowowl.semanticengine.simpleast.test.SnomedConcepts; -import com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; - -public class AttributeGroupMergerTest { - - private AttributeClauseListMerger attributeGroupMerger; - - @Before - public void beforeTest() { - attributeGroupMerger = new AttributeClauseListMerger(new SubsumptionTester(Branch.MAIN_PATH)); - } - - @Test - public void testIsMergeable1() { - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - AttributeClauseList group1 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { findingSiteLungStructure, causativeAgentDustAllergen })); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause associatedWithDustAllergen = TestUtils.buildAttribute(SnomedConcepts.ASSOCIATED_WITH, SnomedConcepts.DUST_ALLERGEN); - AttributeClauseList group2 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { severitySevere, associatedWithDustAllergen })); - - assertFalse(attributeGroupMerger.isMergeable(group1, group2)); - assertFalse(attributeGroupMerger.isMergeable(group2, group1)); - } - - @Test - public void testIsMergeable2() { - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - AttributeClauseList group1 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { findingSiteLungStructure, causativeAgentDustAllergen })); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentDustAllergen2 = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - AttributeClauseList group2 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { severitySevere, causativeAgentDustAllergen2 })); - - assertTrue(attributeGroupMerger.isMergeable(group1, group2)); - assertTrue(attributeGroupMerger.isMergeable(group2, group1)); - } - - @Test - public void testIsMergeable3() { - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - AttributeClauseList group1 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { findingSiteLungStructure, causativeAgentDustAllergen })); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentSubstance = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - AttributeClauseList group2 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { causativeAgentSubstance, severitySevere })); - - assertTrue(attributeGroupMerger.isMergeable(group1, group2)); - assertTrue(attributeGroupMerger.isMergeable(group2, group1)); - } - - @Test - public void testIsMergeable4() { - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClauseList group1 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { findingSiteLungStructure })); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentSubstance = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - AttributeClauseList group2 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { causativeAgentSubstance, severitySevere })); - - assertFalse(attributeGroupMerger.isMergeable(group1, group2)); - assertFalse(attributeGroupMerger.isMergeable(group2, group1)); - } - - @Test - public void testIsMergeable5() { - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - AttributeClauseList group1 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { causativeAgentDustAllergen })); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentSubstance = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - AttributeClauseList group2 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { causativeAgentSubstance, severitySevere })); - - assertTrue(attributeGroupMerger.isMergeable(group1, group2)); - assertTrue(attributeGroupMerger.isMergeable(group2, group1)); - } - - @Test - public void testMergeSingleConceptDefinition() { - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - AttributeClauseList group1 = TestUtils.buildAttributeClauseList(Arrays.asList(findingSiteLungStructure, causativeAgentDustAllergen)); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(group1); - - Map conceptDefinitionMap = new HashMap(); - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - AttributeClauseList expectedMergedAttributeClauseList = TestUtils.buildAttributeClauseList(Arrays.asList(EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentDustAllergen))); - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(expectedMergedAttributeClauseList); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - attributeGroupMerger.mergeAttributeClauseGroups(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testMergeAttributeGroups1() { - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - AttributeClauseList group1 = TestUtils.buildAttributeClauseList(Arrays.asList(findingSiteLungStructure, causativeAgentDustAllergen)); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentSubstance = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - AttributeClauseList group2 = TestUtils.buildAttributeClauseList(Arrays.asList(causativeAgentSubstance, severitySevere)); - - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(group1); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(group2); - - Map conceptDefinitionMap = new HashMap(); - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - conceptDefinitionMap.put(concept1, conceptDefinition1); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - AttributeClauseList expectedMergedAttributeClauseList = TestUtils.buildAttributeClauseList(Arrays.asList(EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentDustAllergen), EcoreUtil.copy(causativeAgentSubstance), EcoreUtil.copy(severitySevere))); - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(expectedMergedAttributeClauseList); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - attributeGroupMerger.mergeAttributeClauseGroups(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testMergeAttributeGroups2() { - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClauseList group1 = TestUtils.buildAttributeClauseList(Arrays.asList(findingSiteLungStructure)); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentSubstance = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - AttributeClauseList group2 = TestUtils.buildAttributeClauseList(Arrays.asList(causativeAgentSubstance, severitySevere)); - - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(group1); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(group2); - - Map conceptDefinitionMap = new HashMap(); - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - conceptDefinitionMap.put(concept1, conceptDefinition1); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - AttributeClauseList expectedMergedAttributeGroup1 = TestUtils.buildAttributeClauseList(Arrays.asList(EcoreUtil.copy(findingSiteLungStructure))); - AttributeClauseList expectedMergedAttributeGroup2 = TestUtils.buildAttributeClauseList(Arrays.asList(EcoreUtil.copy(causativeAgentSubstance), - EcoreUtil.copy(severitySevere))); - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(Arrays.asList(expectedMergedAttributeGroup1, expectedMergedAttributeGroup2), - Collections.emptySet()); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - attributeGroupMerger.mergeAttributeClauseGroups(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testMergeAttributeGroups3() { - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClauseList group1 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { findingSiteLungStructure })); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentSubstance = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - AttributeClauseList group2 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { causativeAgentSubstance, severitySevere })); - - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(group1); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(group2); - - Map conceptDefinitionMap = new HashMap(); - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - conceptDefinitionMap.put(concept1, conceptDefinition1); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - AttributeClauseList expectedMergedAttributeGroup1 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[]{ EcoreUtil.copy(findingSiteLungStructure) })); - AttributeClauseList expectedMergedAttributeGroup2 = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[]{ EcoreUtil.copy(causativeAgentSubstance), - EcoreUtil.copy(severitySevere) })); - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(Arrays.asList(expectedMergedAttributeGroup1, expectedMergedAttributeGroup2), - Collections.emptySet()); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - attributeGroupMerger.mergeAttributeClauseGroups(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/AttributeNormalizerTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/AttributeNormalizerTest.java deleted file mode 100644 index 0f1d925da7a..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/AttributeNormalizerTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform.test; - -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.assertConceptDefinitionsEqual; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildAttribute; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildAttributeClauseList; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildConceptDefinition; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildExpression; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildUnconstrainedConceptGroup; -import static org.junit.Assert.assertEquals; - -import java.util.Collections; - -import org.junit.Before; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeClauseList; -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeNormalizer; -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.simpleast.test.SnomedConcepts; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; - -public class AttributeNormalizerTest { - - private AttributeNormalizer attributeNormalizer; - - @Before - public void beforeTest() { - attributeNormalizer = new AttributeNormalizer(Branch.MAIN_PATH); - } - - @Test - public void testEmptyInput() { - ConceptDefinition conceptDefinition = attributeNormalizer.normalizeAttributes(Collections.emptyList(), - Collections.emptyList()); - assertEquals(0, conceptDefinition.getAttributeClauseLists().size()); - assertEquals(0, conceptDefinition.getUngroupedAttributes().size()); - } - - @Test - public void testUngroupedAttributeNormalization() { - AttributeClause associatedFindingPain = buildAttribute(SnomedConcepts.ASSOCIATED_FINDING, SnomedConcepts.FOOT_PAIN); - ConceptDefinition normalizedConceptDefinition = attributeNormalizer.normalizeAttributes(Collections.emptyList(), - Collections.singletonList(associatedFindingPain)); - - RValue expectedValueExpression = buildExpression(Collections.singletonList(buildUnconstrainedConceptGroup(SnomedConcepts.PAIN)), Collections.emptyList(), - Collections.singletonList(buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.FOOT_STRUCTURE))); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(buildAttribute(SnomedConcepts.ASSOCIATED_FINDING, expectedValueExpression)); - assertConceptDefinitionsEqual(expectedConceptDefinition, normalizedConceptDefinition); - } - - @Test - public void testGroupedAttributeNormalization() { - AttributeClause associatedFindingPain = buildAttribute(SnomedConcepts.ASSOCIATED_FINDING, SnomedConcepts.FOOT_PAIN); - ConceptDefinition normalizedConceptDefinition = attributeNormalizer.normalizeAttributes(Collections.singletonList( - buildAttributeClauseList(associatedFindingPain)), - Collections.emptyList()); - - RValue expectedValueExpression = buildExpression(Collections.singletonList(buildUnconstrainedConceptGroup(SnomedConcepts.PAIN)), Collections.emptyList(), - Collections.singletonList(buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.FOOT_STRUCTURE))); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(buildAttributeClauseList(buildAttribute(SnomedConcepts.ASSOCIATED_FINDING, expectedValueExpression))); - assertConceptDefinitionsEqual(expectedConceptDefinition, normalizedConceptDefinition); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ConceptDefinitionAttributeRedundancyFilterTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ConceptDefinitionAttributeRedundancyFilterTest.java deleted file mode 100644 index a8c584a3fc5..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ConceptDefinitionAttributeRedundancyFilterTest.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform.test; - -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.assertConceptDefinitionsEqual; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildAttribute; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildAttributeClauseList; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildConceptDefinition; - -import java.util.Collections; - -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.junit.Before; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeClauseList; -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinitionAttributeRedundancyFilter; -import com.b2international.snowowl.semanticengine.simpleast.subsumption.SubsumptionTester; -import com.b2international.snowowl.semanticengine.simpleast.test.SnomedConcepts; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; - -public class ConceptDefinitionAttributeRedundancyFilterTest { - - private SubsumptionTester subsumptionTester; - - @Before - public void beforeTest() { - subsumptionTester = new SubsumptionTester(Branch.MAIN_PATH); - } - - @Test - public void testEmptyConceptDefinition() { - ConceptDefinitionAttributeRedundancyFilter filter = new ConceptDefinitionAttributeRedundancyFilter(subsumptionTester); - ConceptDefinition filteredConceptDefinition = filter.getFilteredConceptDefinition(new ConceptDefinition()); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(Collections.emptySet(), - Collections.emptySet()); - assertConceptDefinitionsEqual(expectedConceptDefinition, filteredConceptDefinition); - } - - @Test - public void testAttributeGroupRedundancyFilter1() { - AttributeClause tigerAttributeClause = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.PANTHERA_TIGRIS); - AttributeClause felidaeAttributeClause = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.FAMILY_FELIDAE); - ConceptDefinition conceptDefinition = buildConceptDefinition(buildAttributeClauseList(tigerAttributeClause, felidaeAttributeClause)); - - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(buildAttributeClauseList(EcoreUtil.copy(felidaeAttributeClause))); - - ConceptDefinitionAttributeRedundancyFilter filter = new ConceptDefinitionAttributeRedundancyFilter(subsumptionTester); - ConceptDefinition filteredConceptDefinition = filter.getFilteredConceptDefinition(conceptDefinition); - - assertConceptDefinitionsEqual(expectedConceptDefinition, filteredConceptDefinition); - } - - @Test - public void testAttributeGroupRedundancyFilter2() { - AttributeClause attributeTiger = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.PANTHERA_TIGRIS); - AttributeClause associatedWithFamilyFelidae = buildAttribute(SnomedConcepts.ASSOCIATED_WITH, SnomedConcepts.FAMILY_FELIDAE); - AttributeClause attributeSubfamilyPantherinae = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.SUBFAMILY_PANTHERINAE); - AttributeClause associatedWithSubstance = buildAttribute(SnomedConcepts.ASSOCIATED_WITH, SnomedConcepts.SUBSTANCE); - ConceptDefinition conceptDefinition = buildConceptDefinition(buildAttributeClauseList(attributeTiger, associatedWithSubstance, - associatedWithFamilyFelidae, attributeSubfamilyPantherinae)); - - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(buildAttributeClauseList(EcoreUtil.copy(associatedWithFamilyFelidae), - EcoreUtil.copy(associatedWithSubstance), EcoreUtil.copy(attributeSubfamilyPantherinae))); - - ConceptDefinitionAttributeRedundancyFilter filter = new ConceptDefinitionAttributeRedundancyFilter(subsumptionTester); - ConceptDefinition filteredConceptDefinition = filter.getFilteredConceptDefinition(conceptDefinition); - - assertConceptDefinitionsEqual(expectedConceptDefinition, filteredConceptDefinition); - } - - @Test - public void testUngroupedAttributeRedundancyFilter1() { - AttributeClause tigerAttributeClause = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.PANTHERA_TIGRIS); - AttributeClause felidaeAttributeClause = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.FAMILY_FELIDAE); - ConceptDefinition conceptDefinition = buildConceptDefinition(tigerAttributeClause, felidaeAttributeClause); - - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(EcoreUtil.copy(felidaeAttributeClause)); - - ConceptDefinitionAttributeRedundancyFilter filter = new ConceptDefinitionAttributeRedundancyFilter(subsumptionTester); - ConceptDefinition filteredConceptDefinition = filter.getFilteredConceptDefinition(conceptDefinition); - - assertConceptDefinitionsEqual(expectedConceptDefinition, filteredConceptDefinition); - } - - @Test - public void testUngroupedAttributeRedundancyFilter2() { - AttributeClause attributeTiger = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.PANTHERA_TIGRIS); - AttributeClause associatedWithFamilyFelidae = buildAttribute(SnomedConcepts.ASSOCIATED_WITH, SnomedConcepts.FAMILY_FELIDAE); - AttributeClause attributeSubfamilyPantherinae = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.SUBFAMILY_PANTHERINAE); - AttributeClause associatedWithSubstance = buildAttribute(SnomedConcepts.ASSOCIATED_WITH, SnomedConcepts.SUBSTANCE); - ConceptDefinition conceptDefinition = buildConceptDefinition(attributeTiger, associatedWithSubstance, - associatedWithFamilyFelidae, attributeSubfamilyPantherinae); - - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(EcoreUtil.copy(associatedWithFamilyFelidae), - EcoreUtil.copy(associatedWithSubstance), EcoreUtil.copy(attributeSubfamilyPantherinae)); - - ConceptDefinitionAttributeRedundancyFilter filter = new ConceptDefinitionAttributeRedundancyFilter(subsumptionTester); - ConceptDefinition filteredConceptDefinition = filter.getFilteredConceptDefinition(conceptDefinition); - - assertConceptDefinitionsEqual(expectedConceptDefinition, filteredConceptDefinition); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ConceptDefinitionMergerTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ConceptDefinitionMergerTest.java deleted file mode 100644 index 5fef25146f1..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ConceptDefinitionMergerTest.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform.test; - -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.assertConceptDefinitionsEqual; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildAttribute; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildAttributeClauseList; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildConcept; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildConceptDefinition; - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.junit.Before; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeClauseList; -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinitionMerger; -import com.b2international.snowowl.semanticengine.simpleast.subsumption.SubsumptionTester; -import com.b2international.snowowl.semanticengine.simpleast.test.SnomedConcepts; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; - -public class ConceptDefinitionMergerTest { - - private ConceptDefinitionMerger conceptDefinitionMerger; - - @Before - public void beforeTest() { - conceptDefinitionMerger = new ConceptDefinitionMerger(new SubsumptionTester(Branch.MAIN_PATH)); - } - - @Test - public void test1() { - /* - * If the value of the grouped attribute is subsumed by the value of the name-matched grouped attribute - * add the ungrouped attribute to the group containing the matching grouped attribute in the target definition - * if this condition is met by multiple groups - * add the ungrouped attribute to all groups that meet this condition - */ - Map conceptDefinitionMap = new HashMap(); - - AttributeClause findingSiteLungStructure = buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentSubstance = buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.SUBSTANCE); - AttributeClauseList group = buildAttributeClauseList(Arrays.asList(findingSiteLungStructure, causativeAgentSubstance)); - - AttributeClause severitySevere = buildAttribute(SnomedConcepts.SEVERITY, - SnomedConcepts.SEVERE); - AttributeClause causativeAgentDustAllergen = buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.DUST_ALLERGEN); - - // build test concept definitions - ConceptRef concept1 = buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - ConceptRef concept2 = buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = buildConceptDefinition(severitySevere, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - AttributeClauseList expectedAttributeClauseList = buildAttributeClauseList(Arrays.asList(EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentSubstance))); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(Collections.singleton(expectedAttributeClauseList), - Collections.singleton(EcoreUtil.copy(severitySevere))); - - ConceptDefinition mergedConceptDefinition = conceptDefinitionMerger.mergeDefinitions(conceptDefinitionMap); - - assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ConceptDefinitionNormalizerTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ConceptDefinitionNormalizerTest.java deleted file mode 100644 index 971fdef6424..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ConceptDefinitionNormalizerTest.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform.test; - -import java.util.Arrays; -import java.util.Collections; -import java.util.Map; - -import org.junit.Before; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeClauseList; -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinitionNormalizer; -import com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; - -public class ConceptDefinitionNormalizerTest { - - private ConceptDefinitionNormalizer conceptDefinitionNormalizer; - - @Before - public void beforeTest() { - conceptDefinitionNormalizer = new ConceptDefinitionNormalizer(Branch.MAIN_PATH); - } - - /** - * The concept "fracture of femur" (Figure 4) is fully defined and its proximal primitive - * supertype is a high-level primitive2. - */ - @Test - public void testFractureOfFemur() { - String focusConceptId = "71620000"; // fracture of femur - ConceptRef focusConceptRef = TestUtils.buildConcept(focusConceptId); - Map normalizedConceptDefinitions = - conceptDefinitionNormalizer.getNormalizedConceptDefinitions(Collections.singleton(focusConceptRef)); - - // associated morphology = fracture - AttributeClause associatedMorphologyAttributeClause = TestUtils.buildAttribute("116676008", "72704001"); - // finding site = bone structure of femur - AttributeClause findingSiteAttributeClause = TestUtils.buildAttribute("363698007", "71341001"); - AttributeClauseList expectedAttributeClauseList = TestUtils.buildAttributeClauseList(Arrays.asList( - new AttributeClause[] { associatedMorphologyAttributeClause, findingSiteAttributeClause })); - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(expectedAttributeClauseList); - - ConceptDefinition actualNormalizedConceptDefinition = normalizedConceptDefinitions.values().iterator().next(); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, actualNormalizedConceptDefinition); - } - - /** - * The concept "neoplasm of right lower lobe of lung" Figure 7) is fully-defined with a high-level proximal primitive ("disease"). - * However, the value of the "finding site" attribute ("structure of right lower lobe of lung") is itself fully defined. - */ - @Test - public void testNeoplasmOfRightLowerLobeOfLung() { - String focusConceptId = "126716006"; // neoplasm of right lower lobe of lung - ConceptRef focusConceptRef = TestUtils.buildConcept(focusConceptId); - Map normalizedConceptDefinitions = - conceptDefinitionNormalizer.getNormalizedConceptDefinitions(Collections.singleton(focusConceptRef)); - - // associated morphology = neoplasm - AttributeClause associatedMorphologyAttributeClause = TestUtils.buildAttribute("116676008", "108369006"); - // finding site = (structure of lower lobe of lung : laterality = right) - ConceptRef structureOfLowerLobeOfLung = TestUtils.buildUnconstrainedConceptGroup("90572001"); - AttributeClause lateralityRightAttributeClause = TestUtils.buildAttribute("272741003", "24028007"); - RValue findingSiteValueExpression = TestUtils.buildExpression(Collections.singletonList(structureOfLowerLobeOfLung), - Collections.emptyList(), - Collections.singletonList(lateralityRightAttributeClause)); - AttributeClause findingSiteAttributeClause = TestUtils.buildAttribute("363698007", findingSiteValueExpression); - AttributeClauseList expectedAttributeClauseList = TestUtils.buildAttributeClauseList(Arrays.asList( - new AttributeClause[] { associatedMorphologyAttributeClause, findingSiteAttributeClause })); - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(expectedAttributeClauseList); - - ConceptDefinition actualNormalizedConceptDefinition = normalizedConceptDefinitions.values().iterator().next(); - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, actualNormalizedConceptDefinition); - } - - /** - * The concept "asthma" (Figure 5) is primitive so it is its own proximal primitive supertype. - */ - @Test - public void testAsthma() { - String focusConceptId = "195967001"; // asthma - ConceptRef focusConceptRef = TestUtils.buildConcept(focusConceptId); - Map normalizedConceptDefinitions = - conceptDefinitionNormalizer.getNormalizedConceptDefinitions(Collections.singleton(focusConceptRef)); - - // finding site = Structure of respiratory system (body structure) - AttributeClause findingSiteAttributeClause = TestUtils.buildAttribute("363698007", "20139000"); - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(findingSiteAttributeClause); - - ConceptDefinition actualNormalizedConceptDefinition = normalizedConceptDefinitions.values().iterator().next(); - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, actualNormalizedConceptDefinition); - } - - /** - * ConceptRef with more complex definition. Some concept definitions include - * multiple instances of the same defining attribute. Usually these are grouped - * separately for example to represent a procedure that examines one body structure and removes another. - */ - @Test - public void testSalpingoOophporectomy() { - String focusConceptId = "116028008"; // salpingo-oophorectomy - ConceptRef focusConceptRef = TestUtils.buildConcept(focusConceptId); - Map normalizedConceptDefinitions = - conceptDefinitionNormalizer.getNormalizedConceptDefinitions(Collections.singleton(focusConceptRef)); - - // TODO: confirm that 'procedure site' and 'procedure site - direct' are both in the normalized definition - // and will be filtered out at a later stage - - // method = excision - action - AttributeClause methodAttribute1 = TestUtils.buildAttribute("260686004", "129304002"); - // procedure site - direct = Fallopian tube structure (body structure) - AttributeClause procedureSiteDirectAttribute1 = TestUtils.buildAttribute("405813007", "31435000"); - // method = excision - action - AttributeClause methodAttribute2 = TestUtils.buildAttribute("260686004", "129304002"); - // procedure site - direct = ovarian structure - AttributeClause procedureSiteDirectAttribute2 = TestUtils.buildAttribute("405813007", "15497006"); - - AttributeClauseList expectedAttributeGroup1 = TestUtils.buildAttributeClauseList(Arrays.asList( - new AttributeClause[] { methodAttribute1, procedureSiteDirectAttribute1 })); - AttributeClauseList expectedAttributeGroup2 = TestUtils.buildAttributeClauseList(Arrays.asList( - new AttributeClause[] { methodAttribute2, procedureSiteDirectAttribute2 })); - - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(Arrays.asList(expectedAttributeGroup1, expectedAttributeGroup2), - Collections.emptySet()); - - ConceptDefinition actualNormalizedConceptDefinition = normalizedConceptDefinitions.values().iterator().next(); - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, actualNormalizedConceptDefinition); - } - -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ExpressionCanonicalRepresentationTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ExpressionCanonicalRepresentationTest.java deleted file mode 100644 index 5ce2b7ea210..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/ExpressionCanonicalRepresentationTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform.test; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -import com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils; -import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint; - -public class ExpressionCanonicalRepresentationTest { - - private static final String EXPRESSION_1 = "64572001:{116676008=72704001,363698007=71341001}"; - private static final String EXPRESSION_1_SHUFFLED = "64572001:{363698007=71341001,116676008=72704001}"; - private static final String EXPRESSION_2 = "71388002:" + - "{260686004=129304002,363704007=(15497006:272741003=7771000)}" + - "{260686004=129304002,363704007=(31435000:272741003=7771000)}"; - private static final String EXPRESSION_2_SHUFFLED = "71388002:" + - "{260686004=129304002,363704007=(31435000:272741003=7771000)}" + - "{260686004=129304002,363704007=(15497006:272741003=7771000)}"; - private static final String EXPRESSION_3 = "195967001 OR 7771000"; - private static final String EXPRESSION_3_SHUFFLED = "7771000 OR 195967001"; - - @Test - public void testGroupedAttributeSorting() { - ExpressionConstraint expression = TestUtils.parseExpression(EXPRESSION_1); - ExpressionConstraint expressionShuffled = TestUtils.parseExpression(EXPRESSION_1_SHUFFLED); - assertEquals(expression.toString(), expressionShuffled.toString()); - } - - @Test - public void testAttributeGroupSorting() { - ExpressionConstraint expression = TestUtils.parseExpression(EXPRESSION_2); - ExpressionConstraint expressionShuffled = TestUtils.parseExpression(EXPRESSION_2_SHUFFLED); - assertEquals(expression.toString(), expressionShuffled.toString()); - } - - @Test - public void testFocusConceptSorting() { - ExpressionConstraint expression = TestUtils.parseExpression(EXPRESSION_3); - ExpressionConstraint expressionShuffled = TestUtils.parseExpression(EXPRESSION_3_SHUFFLED); - assertEquals(expression.toString(), expressionShuffled.toString()); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/FocusConceptNormalizerTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/FocusConceptNormalizerTest.java deleted file mode 100644 index 61ac2464d97..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/FocusConceptNormalizerTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform.test; - -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.assertConceptDefinitionsEqual; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildAttribute; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildAttributeClauseList; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildConceptDefinition; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildExpression; -import static com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils.buildUnconstrainedConceptGroup; -import static org.junit.Assert.assertEquals; - -import java.util.Collections; - -import org.junit.Before; -import org.junit.Test; - -import com.b2international.snowowl.core.ApplicationContext; -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.eventbus.IEventBus; -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeClauseList; -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.simpleast.normalform.FocusConceptNormalizationResult; -import com.b2international.snowowl.semanticengine.simpleast.normalform.FocusConceptNormalizer; -import com.b2international.snowowl.semanticengine.simpleast.test.SnomedConcepts; -import com.b2international.snowowl.semanticengine.simpleast.utils.QueryAstUtils; -import com.b2international.snowowl.snomed.core.domain.SnomedConcept; -import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; -import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; -import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.google.common.base.Function; - -public class FocusConceptNormalizerTest { - - private FocusConceptNormalizer focusConceptNormalizer; - - @Before - public void beforeTest() { - focusConceptNormalizer = new FocusConceptNormalizer(Branch.MAIN_PATH); - } - - @Test - public void testFractureOfFemur() { - RValue expression = buildExpression(buildUnconstrainedConceptGroup(SnomedConcepts.FRACTURE_OF_FEMUR)); - FocusConceptNormalizationResult normalizedFocusConcepts = focusConceptNormalizer.normalizeFocusConcepts(QueryAstUtils.getFocusConcepts(expression)); - - // fracture of bone - SnomedConceptDocument expectedFocusConcept = getConcept(SnomedConcepts.FRACTURE_OF_BONE); - assertEquals(Collections.singletonList(expectedFocusConcept), normalizedFocusConcepts.filteredPrimitiveSuperTypes); - - AttributeClause associatedMorphologyAttribute = buildAttribute(SnomedConcepts.ASSOCIATED_MORPHOLOGY, SnomedConcepts.FRACTURE); - AttributeClause findingSiteAttribute = buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.BONE_STRUCTURE_OF_FEMUR); - AttributeClauseList expectedAttributeGroup = buildAttributeClauseList(associatedMorphologyAttribute, findingSiteAttribute); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(expectedAttributeGroup); - assertConceptDefinitionsEqual(expectedConceptDefinition, normalizedFocusConcepts.mergedConceptDefinition); - } - - @Test - public void testFootPain() { - RValue expression = buildExpression(buildUnconstrainedConceptGroup(SnomedConcepts.FOOT_PAIN)); - FocusConceptNormalizationResult normalizedFocusConcepts = focusConceptNormalizer.normalizeFocusConcepts(QueryAstUtils.getFocusConcepts(expression)); - - SnomedConceptDocument expectedFocusConcept = getConcept(SnomedConcepts.PAIN); - assertEquals(Collections.singletonList(expectedFocusConcept), normalizedFocusConcepts.filteredPrimitiveSuperTypes); - - AttributeClause findingSiteFootStructure = buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.FOOT_STRUCTURE); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(findingSiteFootStructure); - assertConceptDefinitionsEqual(expectedConceptDefinition, normalizedFocusConcepts.mergedConceptDefinition); - } - - @Test - public void testSalpingoOophorectomy() { - RValue expression = buildExpression(buildUnconstrainedConceptGroup(SnomedConcepts.SALPINGO_OOPHORECTOMY)); - FocusConceptNormalizationResult normalizedFocusConcepts = focusConceptNormalizer.normalizeFocusConcepts(QueryAstUtils.getFocusConcepts(expression)); - - SnomedConceptDocument expectedFocusConcept = getConcept(SnomedConcepts.EXCISION_OF_PELVIS); - assertEquals(Collections.singletonList(expectedFocusConcept), normalizedFocusConcepts.filteredPrimitiveSuperTypes); - - AttributeClause methodExcisionAction1 = buildAttribute(SnomedConcepts.METHOD, SnomedConcepts.EXCISION_ACTION); - AttributeClause procedureSiteFallopianTubeStructure = buildAttribute(SnomedConcepts.PROCEDURE_SITE_DIRECT, - SnomedConcepts.FALLOPIAN_TUBE_STRUCTURE); - AttributeClause methodExcisionAction2 = buildAttribute(SnomedConcepts.METHOD, SnomedConcepts.EXCISION_ACTION); - AttributeClause procedureSiteOvarianStructure = buildAttribute(SnomedConcepts.PROCEDURE_SITE_DIRECT, - SnomedConcepts.OVARIAN_STRUCTURE); - - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(buildAttributeClauseList(methodExcisionAction1, procedureSiteFallopianTubeStructure), - buildAttributeClauseList(methodExcisionAction2, procedureSiteOvarianStructure)); - assertConceptDefinitionsEqual(expectedConceptDefinition, normalizedFocusConcepts.mergedConceptDefinition); - } - - @Test - public void testAuscultation() { - RValue expression = buildExpression(buildUnconstrainedConceptGroup(SnomedConcepts.AUSCULTATION)); - FocusConceptNormalizationResult normalizedFocusConcepts = focusConceptNormalizer.normalizeFocusConcepts(QueryAstUtils.getFocusConcepts(expression)); - - SnomedConceptDocument expectedFocusConcept = getConcept(SnomedConcepts.AUSCULTATION); - assertEquals(Collections.singletonList(expectedFocusConcept), normalizedFocusConcepts.filteredPrimitiveSuperTypes); - - AttributeClause methodAuscultationAction = buildAttribute(SnomedConcepts.METHOD, SnomedConcepts.AUSCULTATION_ACTION); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(methodAuscultationAction); - assertConceptDefinitionsEqual(expectedConceptDefinition, normalizedFocusConcepts.mergedConceptDefinition); - } - - private SnomedConceptDocument getConcept(String conceptId) { - return SnomedRequests.prepareGetConcept(conceptId) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, Branch.MAIN_PATH) - .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .then(new Function() { - @Override - public SnomedConceptDocument apply(SnomedConcept input) { - return SnomedConceptDocument.builder(input).build(); - } - }) - .getSync(); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/NormalFormGeneratorTestFromSnomedDocument.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/NormalFormGeneratorTestFromSnomedDocument.java deleted file mode 100644 index a6221a33ffa..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/NormalFormGeneratorTestFromSnomedDocument.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform.test; - -import org.junit.Ignore; -import org.junit.Test; - -import com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils; -import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint; - -public class NormalFormGeneratorTestFromSnomedDocument { - - @Test - public void testFractureOfFemur() { - ExpressionConstraint originalExpression = TestUtils.parseExpression("71620000 | fracture of femur |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression("64572001 | disease | : {116676008 | associated morphology | = 72704001 | fracture | ," + - "363698007 | finding site | = 71341001 | bone structure of femur | }"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "64572001 | disease | : {116676008 | associated morphology | = 72704001 | fracture | ," + - "363698007 | finding site | = 71341001 | bone structure of femur | }"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - @Ignore - public void testAsthma() { - // Ignored, different in current SNOMED CT - ExpressionConstraint originalExpression = TestUtils.parseExpression("195967001 | asthma |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "195967001 | asthma | : {116676008 | associated morphology | = 26036001 | obstruction | ," + - "363698007 | finding site | = 955009 | bronchial structure | }"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "195967001 | asthma |"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - @Ignore - public void testAllergicAsthma() { - // Ignored, 'allergic asthma' is no longer fully defined. - ExpressionConstraint originalExpression = TestUtils.parseExpression("389145006 | allergic asthma |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "195967001 | asthma | : 42752001 | due to | = 419076005 | allergic reaction | " + - "{116676008 | associated morphology | = 26036001 | obstruction | ," + - "363698007 | finding site | = 955009 | bronchial structure | }"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "195967001 | asthma | : 42752001 | due to | = 419076005 | allergic reaction |"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testNeoplasmOfRightLowerLobeOfLung() { - ExpressionConstraint originalExpression = TestUtils.parseExpression("126716006 | neoplasm of right lower lobe of lung |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "64572001 | disease | : {116676008 | associated morphology | = 108369006 | neoplasm |," + - "363698007 | finding site | = " + - "(90572001 | structure of lower lobe of lung | :272741003 | laterality | = 24028007 | right | )}"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "64572001 | disease | : {116676008 | associated morphology | = 108369006 | neoplasm |," + - "363698007 | finding site | = " + - "(90572001 | structure of lower lobe of lung | :272741003 | laterality | = 24028007 | right | )}"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testFractureOfFemurDisplacedFracture() { - ExpressionConstraint originalExpression = TestUtils.parseExpression("71620000 | fracture of femur | : " + - "116676008 | associated morphology | = 134341006 | displaced fracture |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "64572001 | disease | : {116676008 | associated morphology | = " + - "134341006 | displaced fracture |,363698007 | finding site | = 71341001 | bone structure of femur | }"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "64572001 | disease | : {116676008 | associated morphology | = " + - "134341006 | displaced fracture |,363698007 | finding site | = 71341001 | bone structure of femur | }"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testFractureOfFemurDisplacedFractureBoneStructureOfFemur() { - ExpressionConstraint originalExpression = TestUtils.parseExpression("71620000 | fracture of femur | : " + - "116676008 | associated morphology | = 134341006 | displaced fracture | ," + - "363698007 | finding site | = 71341001 | bone structure of femur |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "64572001 | disease | : {116676008 | associated morphology | = 134341006 | displaced fracture |," + - "363698007 | finding site | = 71341001 | bone structure of femur | }"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "64572001 | disease | : {116676008 | associated morphology | = 134341006 | displaced fracture |," + - "363698007 | finding site | = 71341001 | bone structure of femur | }"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testFractureOfFemurSevere() { - ExpressionConstraint originalExpression = TestUtils.parseExpression("71620000 | fracture of femur | : " + - "246112005 | severity | = 24484000 | severe |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "64572001 | disease | : 246112005 | severity | = 24484000 | severe | " + - "{116676008 | associated morphology | = 72704001 | fracture |," + - "363698007 | finding site | = 71341001 | bone structure of femur | }"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "64572001 | disease | : 246112005 | severity | = 24484000 | severe | " + - "{116676008 | associated morphology | = 72704001 | fracture |," + - "363698007 | finding site | = 71341001 | bone structure of femur | }"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testFractureOfFemurLeft() { - ExpressionConstraint originalExpression = TestUtils.parseExpression("71620000 | fracture of femur | : " + - "363698007 | finding site | = " + - "(71341001 | bone structure of femur | :272741003 | laterality | = 7771000 | left | )"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "64572001 | disease | : {116676008 | associated morphology | = 72704001 | fracture |," + - "363698007 | finding site | = " + - "(71341001 | bone structure of femur | : 272741003 | laterality | = 7771000 | left | )}"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "64572001 | disease | : {116676008 | associated morphology | = 72704001 | fracture |," + - "363698007 | finding site | = " + - "(71341001 | bone structure of femur | : 272741003 | laterality | = 7771000 | left | )}"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testFootPainLeft() { - ExpressionConstraint originalExpression = TestUtils.parseExpression("47933007 | foot pain | : " + - "363698007 | finding site | = " + - "(56459004 | foot structure | :272741003 | laterality | = 7771000 | left | )"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "22253000 | pain | : 363698007 | finding site | = " + - "(56459004 | foot structure | : 272741003 | laterality | = 7771000 | left | )"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "22253000 | pain | : 363698007 | finding site | = " + - "(56459004 | foot structure | : 272741003 | laterality | = 7771000 | left | )"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testFootPainStructureOfLeftFoot() { - ExpressionConstraint originalExpression = TestUtils.parseExpression("47933007 | foot pain | : " + - "363698007 | finding site | = 22335008 | structure of left foot |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "22253000 | pain | : 363698007 | finding site | = " + - "(56459004 | foot structure | : 272741003 | laterality | = 7771000 | left | )"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "22253000 | pain | : 363698007 | finding site | = (56459004 | foot structure | : 272741003 | laterality | = 7771000 | left | )"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - @Ignore - public void testAuscultationFromDocument() { - // Ignored, auscultation doesn't point to (retired) concept 'anatomical concepts' anymore. - ExpressionConstraint originalExpression = TestUtils.parseExpression("37931006 | auscultation | "); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "315306007 | examination by method | : {260686004 | method | = 129436005 | auscultation - action |" + - ",363704007 | procedure site | = 257728006 | anatomical concepts |}"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "195967001 | asthma |"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - @Ignore - public void testExpiratoryCracklesEntireLowerLobeOfLung() { - // Ignored, 'auscultation' doesn't point to (retired) concept 'anatomical concepts' anymore. - // 'examination by method' is fully defined, first primitive supertype is 'procedure' - ExpressionConstraint originalExpression = TestUtils.parseExpression("12529006 | expiratory crackles | : " + - "363698007 | finding site | = 303549000 | entire lower lobe of lung |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "12529006 | expiratory crackles | : 363698007 | finding site | = 303549000 | entire lower lobe of lung |," + - "363714003 | interprets | = 78064003 | respiratory function | ," + - "418775008 | finding method | =" + - "(315306007 | examination by method | : " + - "{260686004 | method | = 129436005 | auscultation - action |," + - "363704007 | procedure site | = 257728006 | anatomical concepts |})"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "12529006 | expiratory crackles | : " + - "363698007 | finding site | = 303549000 | entire lower lobe of lung |"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testExpiratoryCrackles() { - ExpressionConstraint originalExpression = TestUtils.parseExpression("12529006 | expiratory crackles | "); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression("12529006 | expiratory crackles | :" + - "363698007 | finding site | = 82094008 | lower respiratory tract structure |," + - "418775008 | finding method | =" + - "(37931006 | auscultation | : " + - "260686004 | method | = 129436005 | auscultation - action |)"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "12529006 | expiratory crackles | "); // TODO: verify short normal form - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - @Ignore - public void testAllergicAsthmaDustMite() { - // Ignored, 'allergic asthma' is no longer fully defined. - ExpressionConstraint originalExpression = TestUtils.parseExpression("389145006 | allergic asthma | : " + - "246075003 | causative agent | = 260147004 | house dust mite |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "195967001 | asthma | : 246075003 | causative agent | = 260147004 | house dust mite |," + - "42752001 | due to | = 419076005 | allergic reaction | " + - "{116676008 | associated morphology | = 26036001 | obstruction |," + - "363698007 | finding site | = 955009 | bronchial structure | }"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "195967001 | asthma | : 246075003 | causative agent | = 260147004 | house dust mite | ," + - "42752001 | due to | = 419076005 | allergic reaction |"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testSalpingoOophorectomyEntireLeftFallopianTube() { - ExpressionConstraint originalExpression = TestUtils.parseExpression("116028008 | salpingo-oophorectomy | : " + - "363704007 | procedure site | = 280107002 | entire left fallopian tube |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "71388002 | procedure | : {260686004 | method | = 129304002 | excision - action |," + - "363704007 | procedure site | = " + - "(181463001 | entire fallopian tube | :" + - "272741003 | laterality | = 7771000 | left | )} " + - "{260686004 | method | = 129304002 | excision - action |," + - "363704007 | procedure site | = 15497006 | ovarian structure | }"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "71388002 | procedure | : {260686004 | method | = 129304002 | excision - action |," + - "363704007 | procedure site | = " + - "(181463001 | entire fallopian tube | :" + - "272741003 | laterality | = 7771000 | left | )} " + - "{260686004 | method | = 129304002 | excision - action |," + - "363704007 | procedure site | = 15497006 | ovarian structure | }"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testSalpingoOophorectomyLeft() { - ExpressionConstraint originalExpression = TestUtils.parseExpression("116028008 | salpingo-oophorectomy | : " + - "272741003 | laterality | = 7771000 | left |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "71388002 | procedure | : {260686004 | method | = 129304002 | excision - action |," + - "363704007 | procedure site | = " + - "(15497006 | ovarian structure | :" + - "272741003 | laterality | = 7771000 | left | )} " + - "{260686004 | method | = 129304002 | excision - action |," + - "363704007 | procedure site | = " + - "(31435000 | fallopian tube structure | :" + - "272741003 | laterality | = 7771000 | left | )}"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "71388002 | procedure | : {260686004 | method | = 129304002 | excision - action |," + - "363704007 | procedure site | = " + - "(15497006 | ovarian structure | :" + - "272741003 | laterality | = 7771000 | left | )} " + - "{260686004 | method | = 129304002 | excision - action |," + - "363704007 | procedure site | = " + - "(31435000 | fallopian tube structure | :" + - "272741003 | laterality | = 7771000 | left | )}"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - private void testNormalFormGenerator(ExpressionConstraint originalExpression, ExpressionConstraint expectedLongNormalFormExpression, - ExpressionConstraint expectedShortNormalFormExpression) { - throw new UnsupportedOperationException("TODO implement me"); -// SimpleAstExpressionNormalFormGenerator normalFormGenerator = new SimpleAstExpressionNormalFormGenerator(Branch.MAIN_PATH); -// ESCGEcoreRewriter rewriter = new ESCGEcoreRewriter(escgParser); -// RValue longNormalFormExpression = normalFormGenerator.getLongNormalForm(rewriter.rewrite(originalExpression)); -// TestUtils.assertExpressionsEqual("Long normal form expression different from expected.", rewriter.rewrite(expectedLongNormalFormExpression), longNormalFormExpression); -// -// normalFormGenerator = new SimpleAstExpressionNormalFormGenerator(Branch.MAIN_PATH); -// RValue shortNormalFormExpression = normalFormGenerator.getShortNormalForm(rewriter.rewrite(originalExpression)); -// TestUtils.assertExpressionsEqual("Short normal form expression different from expected.", rewriter.rewrite(expectedShortNormalFormExpression), shortNormalFormExpression); - } - -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/SimpleAstNormalFormGeneratorTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/SimpleAstNormalFormGeneratorTest.java deleted file mode 100644 index a031a435e5d..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/SimpleAstNormalFormGeneratorTest.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform.test; - -import org.junit.Test; - -import com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils; -import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint; - -/** - * - */ -public class SimpleAstNormalFormGeneratorTest { - - @Test - public void testAuscultation() { - ExpressionConstraint originalExpression = TestUtils.parseExpression( "37931006 | auscultation | :" + - "260686004 | method | = 129436005 | auscultation - action |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "315306007 | examination by method | : 260686004 | method | = 129436005 | auscultation - action |"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "315306007 | examination by method | : 260686004 | method | = 129436005 | auscultation - action |"); // TODO: check short form - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testExpiratoryCrackles() { - ExpressionConstraint originalExpression = TestUtils.parseExpression( "12529006 | expiratory crackles | "); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "12529006 | expiratory crackles | :" + - "363698007 | finding site | = 82094008 | lower respiratory tract structure |," + - "418775008 | finding method | =" + - "(37931006 | auscultation | : " + - "260686004 | method | = 129436005 | auscultation - action |)"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "12529006 | expiratory crackles | "); // TODO: verify short normal form - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - //////////////////////////////////////////////// tests from Orsi /////////////////////////////////////////// - - @Test - public void testTetralogyOfFallot() { - ExpressionConstraint originalExpression = TestUtils.parseExpression( "86299006 | tetralogy of fallot |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "86299006 | tetralogy of Fallot | :"+ - "246454002 | occurrence | = 255399007 | congenital |"+ - "{ 116676008 | associated morphology | = 107656002 | congenital anomaly |"+ - ", 363698007 | finding site | = 21814001 | cardiac ventricular structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 30812002 | overriding structures |"+ - ", 363698007 | finding site | = 113262008 | thoracic aorta structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 415582006 | stenosis |"+ - ", 363698007 | finding site | = 39057004 | pulmonary valve structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 56246009 | hypertrophy |"+ - ", 363698007 | finding site | = 53085002 | right ventricular structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 6920004 | defect |"+ - ", 363698007 | finding site | = 589001 | interventricular septum structure |"+ - "}"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "86299006 | tetralogy of Fallot |"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testExcisionOfSubmandibularGland() { - ExpressionConstraint originalExpression = TestUtils.parseExpression( "47227006 | excision of submandibular gland | "); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "71388002 | procedure | :"+ - "{ 260686004 | method | = 129304002 | excision - action |"+ - ", 405813007 | procedure site - Direct | = 385296007 | submandibular salivary gland structure |"+ - "}"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "71388002 | procedure | :"+ - "{ 260686004 | method | = 129304002 | excision - action |"+ - ", 405813007 | procedure site - Direct | = 385296007 | submandibular salivary gland structure |}"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testGaleazziFractureDislocation() { - ExpressionConstraint originalExpression = TestUtils.parseExpression( "271576001 | Galeazzi fracture dislocation |"); - ExpressionConstraint expectedLongNormalFormExpression = TestUtils.parseExpression( - "263079005 | fracture dislocation of wrist joint | :"+ - "{ 116676008 | associated morphology | = 72704001 | fracture |"+ - ", 363698007 | finding site | = 299706009 | bone structure of wrist and/or hand |"+ - "}"+ - "{ 116676008 | associated morphology | = 72704001 | fracture |"+ - ", 363698007 | finding site | = 47728000 | bone structure of shaft of radius |"+ - "}"+ - "{ 116676008 | associated morphology | = 87642003 | dislocation |"+ - ", 363698007 | finding site | = 74670003 | wrist joint structure |"+ - "}"); - ExpressionConstraint expectedShortNormalFormExpression = TestUtils.parseExpression( - "263079005 | fracture dislocation of wrist joint | :"+ - "{ 116676008 | associated morphology | = 72704001 | fracture |"+ - ", 363698007 | finding site | = 47728000 | bone structure of shaft of radius |}"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - private void testNormalFormGenerator(ExpressionConstraint originalExpression, ExpressionConstraint expectedLongNormalFormExpression, - ExpressionConstraint expectedShortNormalFormExpression) { - throw new UnsupportedOperationException("TODO implement me"); -// SimpleAstExpressionNormalFormGenerator normalFormGenerator = new SimpleAstExpressionNormalFormGenerator(Branch.MAIN_PATH); -// ESCGEcoreRewriter rewriter = new ESCGEcoreRewriter(escgParser); -// RValue rewrittenOriginalExpression = rewriter.rewrite(originalExpression); -// System.out.println("Original: " + rewrittenOriginalExpression); -// RValue longNormalFormExpression = normalFormGenerator.getLongNormalForm(rewrittenOriginalExpression); -// System.out.println("Normal form: " + longNormalFormExpression); -// TestUtils.assertExpressionsEqual("Long normal form expression does not match,", expectedLongNormalFormExpression, longNormalFormExpression); - -// normalFormGenerator = new BasicExpressionNormalFormGenerator(terminologyBrowser, statementBrowser); -// ExpressionConstraint shortNormalFormExpression = normalFormGenerator.getShortNormalForm(originalExpression); -// TestUtils.assertExpressionsEqual("Short normal form expression does not match,", expectedShortNormalFormExpression, shortNormalFormExpression); - } - -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/UngroupedAttributesMergerTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/UngroupedAttributesMergerTest.java deleted file mode 100644 index b2004867f4b..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/normalform/test/UngroupedAttributesMergerTest.java +++ /dev/null @@ -1,503 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform.test; - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeClauseList; -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.simpleast.normalform.UngroupedAttributesMerger; -import com.b2international.snowowl.semanticengine.simpleast.subsumption.SubsumptionTester; -import com.b2international.snowowl.semanticengine.simpleast.test.SnomedConcepts; -import com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; - -public class UngroupedAttributesMergerTest { - - @Test - public void testMergeSingleConceptDefinition() { - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(findingSiteLungStructure, causativeAgentDustAllergen); - - Map conceptDefinitionMap = new HashMap(); - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentDustAllergen)); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testUngroupedAttributeNameMatch1() { - /* - * If the value of one of the name-matched attributes subsumes the other value - * include the attribute with the most specific value (not grouped) - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentSubstance = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - - // build test concept definitions - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(findingSiteLungStructure, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept1, conceptDefinition1); - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(severitySevere, causativeAgentSubstance); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(findingSiteLungStructure, - severitySevere, causativeAgentDustAllergen); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testUngroupedAttributeNameMatch1Reverse() { - /* - * If the value of one of the name-matched attributes subsumes the other value - * include the attribute with the most specific value (not grouped) - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentSubstance = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - - // build test concept definitions - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(severitySevere, causativeAgentSubstance); - conceptDefinitionMap.put(concept2, conceptDefinition2); - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(findingSiteLungStructure, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - // build expected results - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(findingSiteLungStructure, - severitySevere, causativeAgentDustAllergen); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testUngroupedAttributeNameMatch2() { - /* - * If the value of the name-matched attributes are identical - * include one and omit the other - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentDustAllergen2 = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - - // build test concept definitions - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(findingSiteLungStructure, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept1, conceptDefinition1); - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(severitySevere, causativeAgentDustAllergen2); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(findingSiteLungStructure, severitySevere, - causativeAgentDustAllergen); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testUngroupedAttributeNameMatch2Reverse() { - /* - * If the value of the name-matched attributes are identical - * include one and omit the other - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentDustAllergen2 = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - - // build test concept definitions - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(severitySevere, causativeAgentDustAllergen2); - conceptDefinitionMap.put(concept2, conceptDefinition2); - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(findingSiteLungStructure, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - // build expected results - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(findingSiteLungStructure, severitySevere, - causativeAgentDustAllergen); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testUngroupedAttributeNameMatch3() { - /* - * If neither of the two preceding conditions apply - * include both attributes (not grouped) - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, - SnomedConcepts.SEVERE); - AttributeClause findingSiteHeadStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.HEAD_STRUCTURE); - - // build test concept definitions - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(findingSiteLungStructure); - conceptDefinitionMap.put(concept1, conceptDefinition1); - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(severitySevere, findingSiteHeadStructure); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(findingSiteLungStructure, severitySevere, - findingSiteHeadStructure); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testUngroupedAttributeNameMatch3Reverse() { - /* - * If neither of the two preceding conditions apply - * include both attributes (not grouped) - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, - SnomedConcepts.SEVERE); - AttributeClause findingSiteHeadStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.HEAD_STRUCTURE); - - // build test concept definitions - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(severitySevere, findingSiteHeadStructure); - conceptDefinitionMap.put(concept2, conceptDefinition2); - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(findingSiteLungStructure); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - // build expected results - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(findingSiteLungStructure, severitySevere, - findingSiteHeadStructure); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testGroupedAttributeNameMatch1() { - /* - * If the value of the ungrouped attribute subsumes value of the name-matched grouped attribute - * omit the ungrouped attribute from the target definition - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - AttributeClauseList group = TestUtils.buildAttributeClauseList(Arrays.asList(findingSiteLungStructure, causativeAgentDustAllergen)); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentSubstance = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - - // build test concept definitions - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(severitySevere, causativeAgentSubstance); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - AttributeClauseList expectedAttributeClauseList = TestUtils.buildAttributeClauseList(Arrays.asList((AttributeClause)EcoreUtil.copy(findingSiteLungStructure), - (AttributeClause)EcoreUtil.copy(causativeAgentDustAllergen))); - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(Collections.singleton(expectedAttributeClauseList), - Arrays.asList(EcoreUtil.copy(severitySevere))); - - ConceptDefinition mergedConceptDefinition = TestUtils.buildConceptDefinition(group); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testGroupedAttributeNameMatch2() { - /* - * If the value of the grouped attribute is subsumed by the value of the name-matched grouped attribute - * add the ungrouped attribute to the group containing the matching grouped attribute in the target definition - * if this condition is met by multiple groups - * add the ungrouped attribute to all groups that meet this condition - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentSubstance = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.SUBSTANCE); - AttributeClauseList group = TestUtils.buildAttributeClauseList(Arrays.asList(findingSiteLungStructure, causativeAgentSubstance)); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, - SnomedConcepts.SEVERE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.DUST_ALLERGEN); - - // build test concept definitions - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(severitySevere, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - AttributeClauseList expectedAttributeClauseList = TestUtils.buildAttributeClauseList(Arrays.asList((AttributeClause)EcoreUtil.copy(findingSiteLungStructure), - (AttributeClause)EcoreUtil.copy(causativeAgentDustAllergen), (AttributeClause)EcoreUtil.copy(causativeAgentSubstance))); - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(Collections.singleton(expectedAttributeClauseList), - Collections.singleton(EcoreUtil.copy(severitySevere))); - - ConceptDefinition mergedConceptDefinition = TestUtils.buildConceptDefinition(group); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testGroupedAttributeNameMatch3() { - /* - * If the value of the name-matched grouped and ungrouped attributes are disjoint - * add the ungrouped attribute as an ungrouped attribute in the target expression. - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.DUST_ALLERGEN); - AttributeClauseList group = TestUtils.buildAttributeClauseList(Arrays.asList(findingSiteLungStructure, causativeAgentDustAllergen)); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentContactAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.CONTACT_ALLERGEN); - - // build test concept definitions - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(severitySevere, causativeAgentContactAllergen); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - AttributeClauseList expectedAttributeClauseList = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { (AttributeClause)EcoreUtil.copy(findingSiteLungStructure), - (AttributeClause)EcoreUtil.copy(causativeAgentDustAllergen) })); - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(Collections.singleton(expectedAttributeClauseList), - Arrays.asList(EcoreUtil.copy(severitySevere), EcoreUtil.copy(causativeAgentContactAllergen))); - - ConceptDefinition mergedConceptDefinition = TestUtils.buildConceptDefinition(group); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testGroupedAttributeNameMatch1Reverse() { - /* - * If the value of the ungrouped attribute subsumes value of the name-matched grouped attribute - * omit the ungrouped attribute from the target definition - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - AttributeClauseList group = TestUtils.buildAttributeClauseList(Arrays.asList(findingSiteLungStructure, causativeAgentDustAllergen)); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentSubstance = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - - // build test concept definitions - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(severitySevere, causativeAgentSubstance); - conceptDefinitionMap.put(concept2, conceptDefinition2); - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - // build expected results - AttributeClauseList expectedAttributeClauseList = TestUtils.buildAttributeClauseList(Arrays.asList((AttributeClause)EcoreUtil.copy(findingSiteLungStructure), - (AttributeClause)EcoreUtil.copy(causativeAgentDustAllergen))); - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(Collections.singleton(expectedAttributeClauseList), - Arrays.asList(EcoreUtil.copy(severitySevere))); - - ConceptDefinition mergedConceptDefinition = TestUtils.buildConceptDefinition(group); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testGroupedAttributeNameMatch2Reverse() { - /* - * If the value of the grouped attribute is subsumed by the value of the name-matched grouped attribute - * add the ungrouped attribute to the group containing the matching grouped attribute in the target definition - * if this condition is met by multiple groups - * add the ungrouped attribute to all groups that meet this condition - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentSubstance = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.SUBSTANCE); - AttributeClauseList group = TestUtils.buildAttributeClauseList(Arrays.asList(findingSiteLungStructure, causativeAgentSubstance)); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, - SnomedConcepts.SEVERE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.DUST_ALLERGEN); - - // build test concept definitions - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(severitySevere, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept2, conceptDefinition2); - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - // build expected results - AttributeClauseList expectedAttributeClauseList = TestUtils.buildAttributeClauseList(Arrays.asList((AttributeClause)EcoreUtil.copy(findingSiteLungStructure), - (AttributeClause)EcoreUtil.copy(causativeAgentDustAllergen), (AttributeClause)EcoreUtil.copy(causativeAgentSubstance))); - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(Collections.singleton(expectedAttributeClauseList), - Collections.singleton(EcoreUtil.copy(severitySevere))); - - ConceptDefinition mergedConceptDefinition = TestUtils.buildConceptDefinition(group); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testGroupedAttributeNameMatch3Reverse() { - /* - * If the value of the name-matched grouped and ungrouped attributes are disjoint - * add the ungrouped attribute as an ungrouped attribute in the target expression. - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - AttributeClause findingSiteLungStructure = TestUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - AttributeClause causativeAgentDustAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.DUST_ALLERGEN); - AttributeClauseList group = TestUtils.buildAttributeClauseList(Arrays.asList(findingSiteLungStructure, causativeAgentDustAllergen)); - - AttributeClause severitySevere = TestUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - AttributeClause causativeAgentContactAllergen = TestUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.CONTACT_ALLERGEN); - - // build test concept definitions - ConceptRef concept2 = TestUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = TestUtils.buildConceptDefinition(severitySevere, causativeAgentContactAllergen); - conceptDefinitionMap.put(concept2, conceptDefinition2); - ConceptRef concept1 = TestUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = TestUtils.buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - // build expected results - AttributeClauseList expectedAttributeClauseList = TestUtils.buildAttributeClauseList(Arrays.asList(new AttributeClause[] { (AttributeClause)EcoreUtil.copy(findingSiteLungStructure), - (AttributeClause)EcoreUtil.copy(causativeAgentDustAllergen) })); - ConceptDefinition expectedConceptDefinition = TestUtils.buildConceptDefinition(Collections.singleton(expectedAttributeClauseList), - Arrays.asList(EcoreUtil.copy(severitySevere), EcoreUtil.copy(causativeAgentContactAllergen))); - - ConceptDefinition mergedConceptDefinition = TestUtils.buildConceptDefinition(group); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/subsumption/test/EscgVsBinaryResourcePerformanceTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/subsumption/test/EscgVsBinaryResourcePerformanceTest.java deleted file mode 100644 index e93ba81ba82..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/subsumption/test/EscgVsBinaryResourcePerformanceTest.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.subsumption.test; - -import java.io.IOException; -import java.io.StringReader; -import java.util.Collections; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl; -import org.eclipse.xtext.parser.IParser; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils; -import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint; - -/** - * Performance test to compare performance of ESCG expression parser and EMF binary resource parser. - * Does not require a full Snow Owl application to be initialized in the background. - * - */ -public class EscgVsBinaryResourcePerformanceTest { - - private static IParser escgParser; - - @BeforeClass - public static void initSpecific() { - escgParser = TestUtils.createESCGParser(); - // initialize parser, trying to avoid first parsing overhead when measuring performance - escgParser.parse(new StringReader("")).getRootASTElement(); - } - - private void performanceTest(String escgExpression, String binaryResourceName) throws IOException { - System.out.println("---------------------------------"); - long escgStartTime = System.nanoTime(); - ExpressionConstraint escgRootASTElement = TestUtils.parseExpression(escgExpression); - long escgEstimatedTime = System.nanoTime() - escgStartTime; - BinaryResourceImpl binaryResource = new BinaryResourceImpl(URI.createFileURI(binaryResourceName)); - binaryResource.getContents().add(escgRootASTElement); - binaryResource.save(Collections.emptyMap()); - - long binaryResourceStartTime = System.nanoTime(); - BinaryResourceImpl binaryResource2 = new BinaryResourceImpl(URI.createFileURI(binaryResourceName)); - binaryResource2.load(Collections.emptyMap()); - ExpressionConstraint binaryResourceFirstRootElement = (ExpressionConstraint) binaryResource2.getContents().get(0); - long binaryResourceEstimatedTime = System.nanoTime() - binaryResourceStartTime; - System.out.println("ESCG parser: " + escgEstimatedTime / 1000 + " us"); - System.out.println("Resulting expression: " + escgRootASTElement); - System.out.println("Binary resource parser: " + binaryResourceEstimatedTime / 1000 + " us"); - System.out.println("Resulting expression: " + binaryResourceFirstRootElement); - System.out.println("Performance difference: " + Math.round(((double)escgEstimatedTime / (double)binaryResourceEstimatedTime * 100))+ " %"); - } - - private void testExpressionPerformance() throws IOException { - performanceTest("243796009:363589002=" + - "17724006" + - ",405813007=88727008" + - ",408729009=410515003" + - ",408731000=410512000" + - ",408732007=410604004", "escg1.bin"); - performanceTest("243796009:363589002=" + - "312813005" + - ",405813007=244310007" + - ",408729009=410515003" + - ",408731000=410512000" + - ",408732007=410604004", "escg2.bin"); - performanceTest("243796009:246090004=(" + - "402138008:" + - "116676008=90120004" + - ",363714003=250467003)" + - ",408729009=410515003" + - ",408731000=410512000"+ - ",408732007=410604004", "escg3.bin"); - performanceTest("243796009:246090004=(" + - "14560005:116676008="+ - "419386004),"+ - "408729009=410515003,"+ - "408731000=410512000,"+ - "408732007=410604004", "escg4.bin"); - performanceTest("243796009:246090004= (" + - "14560005:116676008=" + - "415701004" + - ",363714003=386053000)," + - "408729009=410515003" + - ",408731000=410512000" + - ",408732007=410604004", "escg5.bin"); - performanceTest("243796009:246090004=(" + - "402138008:116676008=" + - "90120004" + - ",363714003=250467003)," + - "408729009=410515003" + - ",408731000=410512000" + - ",408732007=410604004", "escg6.bin"); - performanceTest("243796009:246090004=(" + - "14560005:116676008=" + - "415701004" + - ",363714003=386053000),"+ - "408729009=410515003"+ - ",408731000=410512000"+ - ",408732007=125676002", "escg7.bin"); - performanceTest("243796009:246090004=("+ - "14560005:116676008=" + - "415701004"+ - ",363714003=386053000),"+ - "408729009=410515003"+ - ",408731000=410512000"+ - ",408732007=410604004", "escg8.bin"); - performanceTest("243796009:{246090004=("+ - "14560005:116676008="+ - "415701004"+ - ",363714003=386053000),"+ - "408729009=410516002"+ - ",408731000=410512000"+ - ",408732007=410604004}", "escg9.bin"); - performanceTest("243796009:{246090004=("+ - "14560005:116676008="+ - "415701004"+ - ",363714003=386053000),"+ - "408729009=410594000"+ - ", 408731000=410512000"+ - ", 408732007=125676002}", "escg10.bin"); - } - - @Test - public void test() throws IOException { - System.out.println("Round 1:\n"); - testExpressionPerformance(); - System.out.println("\nRound 2:\n"); - testExpressionPerformance(); - System.out.println("\nRound 3:\n"); - testExpressionPerformance(); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/subsumption/test/SubsumptionTesterTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/subsumption/test/SubsumptionTesterTest.java deleted file mode 100644 index 305ee9548cf..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/subsumption/test/SubsumptionTesterTest.java +++ /dev/null @@ -1,415 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.subsumption.test; - -import java.util.Collection; - -import org.junit.Test; - -import com.b2international.snowowl.semanticengine.simpleast.test.utils.TestUtils; -import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint; - -/** - */ -public class SubsumptionTesterTest { - - private static final int TEST_ITERATION_COUNT = 1000; - - private void testExpressionSubsumption(ExpressionConstraint predicate, ExpressionConstraint candidate, boolean expectedResult) { - throw new UnsupportedOperationException("TODO implement me"); -// ESCGEcoreRewriter rewriter = new ESCGEcoreRewriter(escgParser); -// RValue rewrittenPredicate = rewriter.rewrite(predicate); -// RValue rewrittenCandidate = rewriter.rewrite(candidate); -// List iterationTimesInNanoseconds = Lists.newArrayList(); -// for (int i=0; i values) { - long avg = 0; - for (Long value : values) { - avg += value; - } - return avg / values.size(); - } - - @Test - public void testUngroupedAttributes() { - long parseStart = System.nanoTime(); - /* - * "243796009|Situation with explicit context| : 363589002|Associated procedure| = - * 17724006|Continuous wave Doppler analogue wave form analysis of upper extremity arteries| - * , 405813007|Procedure site - Direct| = 88727008|Entire left axillary artery| - * , 408729009|finding context| = 410515003|known present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| = 410604004|subject of record| " - */ - ExpressionConstraint candidateExpression = TestUtils.parseExpression("243796009:363589002=" + - "17724006" + - ",405813007=88727008" + - ",408729009=410515003" + - ",408731000=410512000" + - ",408732007=410604004"); - - /* - * "243796009|Situation with explicit context| : 363589002|Associated procedure| = - * 312813005|Ultrasound scan of upper limb arteries| - * , 405813007|Procedure site - Direct| = 244310007|Entire artery of upper extremity| - * , 408729009|finding context| = 410515003|known present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| = 410604004|subject of record|" - */ - ExpressionConstraint predicateExpression = TestUtils.parseExpression("243796009:363589002=" + - "312813005" + - ",405813007=244310007" + - ",408729009=410515003" + - ",408731000=410512000" + - ",408732007=410604004"); - long parseEnd = System.nanoTime(); - System.out.println("Expression parsing: " + ((parseEnd - parseStart)/1000) + " us"); - testExpressionSubsumption(predicateExpression, candidateExpression, true); - testExpressionSubsumption(candidateExpression, predicateExpression, false); - } - - @Test - public void testExpressionAttributeValue1() { - long parseStart = System.nanoTime(); - /* - * "243796009|Situation with explicit context| : 246090004|Associated finding| = ( - * 402138008|Disseminated cutaneous mycosis| : - * 116676008|Associated morphology| = 90120004|Mycosis fungoides| - * , 363714003|Interprets| = 250467003|Determination of growth of fungi|) - * , 408729009|finding context| = 410515003|known present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| = 410604004|subject of record| " - */ - ExpressionConstraint predicateExpression = TestUtils.parseExpression("243796009:246090004=(" + - "402138008:" + - "116676008=90120004" + - ",363714003=250467003)" + - ",408729009=410515003" + - ",408731000=410512000"+ - ",408732007=410604004"); - - /* - * "243796009|Situation with explicit context| : 246090004|Associated finding| = ( - * 14560005|Dermal mycosis| : 116676008|Associated morphology| = - * 419386004|Pagetoid reticulosis| ), - * 408729009|finding context| = 410515003|known present|, - * 408731000|temporal context| = 410512000|current or specified|, - * 408732007|subject relationship context| = 410604004|subject of record| " - */ - ExpressionConstraint candidateExpression = TestUtils.parseExpression("243796009:246090004=(" + - "14560005:116676008="+ - "419386004),"+ - "408729009=410515003,"+ - "408731000=410512000,"+ - "408732007=410604004"); - - long parseEnd = System.nanoTime(); - System.out.println("Expression parsing: " + ((parseEnd - parseStart)/1000) + " us"); - testExpressionSubsumption(predicateExpression, candidateExpression, false); - } - - @Test - public void testExpressionAttributeValue2() { - long parseStart = System.nanoTime(); - /* - * "243796009|Situation with explicit context| : 246090004|Associated finding| = ( - * 14560005|Dermal mycosis| : 116676008|Associated morphology| = - * 415701004|T-cell AND/OR NK-cell neoplasm| - * , 363714003|Interprets| = 386053000|Evaluation procedure|), - * 408729009|finding context| = 410515003|known present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| = 410604004|subject of record| " - */ - ExpressionConstraint predicateExpression = TestUtils.parseExpression("243796009:246090004= (" + - "14560005:116676008=" + - "415701004" + - ",363714003=386053000)," + - "408729009=410515003" + - ",408731000=410512000" + - ",408732007=410604004"); - - /* - * "243796009|Situation with explicit context| : 246090004|Associated finding| = ( - * 402138008|Disseminated cutaneous mycosis| : 116676008|Associated morphology| = - * 90120004|Mycosis fungoides| - * , 363714003|Interprets| = 250467003|Determination of growth of fungi|), - * 408729009|finding context| = 410515003|known present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| = 410604004|subject of record| " - */ - ExpressionConstraint candidateExpression = TestUtils.parseExpression("243796009:246090004=(" + - "402138008:116676008=" + - "90120004" + - ",363714003=250467003)," + - "408729009=410515003" + - ",408731000=410512000" + - ",408732007=410604004"); - - long parseEnd = System.nanoTime(); - System.out.println("Expression parsing: " + ((parseEnd - parseStart)/1000) + " us"); - testExpressionSubsumption(predicateExpression, candidateExpression, true); - } - - @Test - public void testExpressionAttributeValue3() { - long parseStart = System.nanoTime(); - /* - * "243796009|Situation with explicit context| : 246090004|Associated finding| = ( - * 14560005|Dermal mycosis| : 116676008|Associated morphology| = - * 415701004|T-cell AND/OR NK-cell neoplasm| - * , 363714003|Interprets| = 386053000|Evaluation procedure|), - * 408729009|finding context| = 410515003|known present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| =125676002|Person| " */ - ExpressionConstraint predicateExpression = TestUtils.parseExpression("243796009:246090004=(" + - "14560005:116676008=" + - "415701004" + - ",363714003=386053000),"+ - "408729009=410515003"+ - ",408731000=410512000"+ - ",408732007=125676002"); - - /* - * "243796009|Situation with explicit context| : 246090004|Associated finding| = ( - * 14560005|Dermal mycosis| : 116676008|Associated morphology| = - * 415701004|T-cell AND/OR NK-cell neoplasm| - * , 363714003|Interprets| = 386053000|Evaluation procedure|), - * 408729009|finding context| = 410515003|known present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| = 410604004|subject of record| " - */ - ExpressionConstraint candidateExpression = TestUtils.parseExpression("243796009:246090004=("+ - "14560005:116676008=" + - "415701004"+ - ",363714003=386053000),"+ - "408729009=410515003"+ - ",408731000=410512000"+ - ",408732007=410604004"); - - - long parseEnd = System.nanoTime(); - System.out.println("Expression parsing: " + ((parseEnd - parseStart)/1000) + " us"); - testExpressionSubsumption(predicateExpression, candidateExpression, true); - } - - @Test - public void testKnownAbsent() { - long parseStart = System.nanoTime(); - /* - * "243796009|Situation with explicit context| : 246090004|Associated finding| = ( - * 14560005|Dermal mycosis| : 116676008|Associated morphology| = - * 415701004|T-cell AND/OR NK-cell neoplasm| - * , 363714003|Interprets| = 386053000|Evaluation procedure|), - * 408729009|finding context| = 410516002|Known absent| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| =410604004|subject of record| " - */ - ExpressionConstraint predicateExpression = TestUtils.parseExpression("243796009:{246090004=("+ - "14560005:116676008="+ - "415701004"+ - ",363714003=386053000),"+ - "408729009=410516002"+ - ",408731000=410512000"+ - ",408732007=410604004}"); - - /* - * "243796009|Situation with explicit context| : 246090004|Associated finding| = ( - * 14560005|Dermal mycosis| : 116676008|Associated morphology| = - * 415701004|T-cell AND/OR NK-cell neoplasm| - * , 363714003|Interprets| = 386053000|Evaluation procedure|), - * 408729009|finding context| = 410594000|Definitely not present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| =125676002|Person| " - */ - ExpressionConstraint candidateExpression = TestUtils.parseExpression("243796009:{246090004=("+ - "14560005:116676008="+ - "415701004"+ - ",363714003=386053000),"+ - "408729009=410594000"+ - ", 408731000=410512000"+ - ", 408732007=125676002}"); - - long parseEnd = System.nanoTime(); - System.out.println("Expression parsing: " + ((parseEnd - parseStart)/1000) + " us"); - testExpressionSubsumption(predicateExpression, candidateExpression, true); - } - - @Test - public void testFullyDefinedAttributeValues() { - long parseStart = System.nanoTime(); - /* - * "243796009|Situation with explicit context| : {246090004|Associated finding| = ( - * 14560005|Dermal mycosis| : 116676008|Associated morphology| =111214005|Arthropathy associated with a mycosis| - * , 363714003|Interprets| = 386053000|Evaluation procedure|), - * 408729009|finding context| = 410515003|known present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| =125676002|Person| }" - */ - ExpressionConstraint predicateExpression = TestUtils.parseExpression("243796009:{246090004=("+ - "14560005:116676008=111214005"+ - ",363714003=386053000),"+ - "408729009=410515003"+ - ",408731000=410512000"+ - ",408732007=125676002}"); - - /* - * "243796009|Situation with explicit context| : {246090004|Associated finding| = ( - * 14560005|Dermal mycosis| : 116676008|Associated morphology| =111212009|Arthropathy associated with bacterial disease| - * , 363714003|Interprets| = 386053000|Evaluation procedure|), - * 408729009|finding context| = 410515003|known present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| =125676002|Person| }" - */ - ExpressionConstraint candidateExpression = TestUtils.parseExpression("243796009:{246090004=("+ - "14560005:116676008=111212009"+ - ",363714003= 386053000),"+ - "408729009=410515003"+ - ",408731000=410512000"+ - ",408732007=125676002}"); - - long parseEnd = System.nanoTime(); - System.out.println("Expression parsing: " + ((parseEnd - parseStart)/1000) + " us"); - testExpressionSubsumption(predicateExpression, candidateExpression, false); - } - - @Test - public void testFullyDefinedAttributeValuesKnownAbsent() { - long parseStart = System.nanoTime(); - /* - * "243796009|Situation with explicit context| : { 246090004|Associated finding| = ( - * 14560005|Dermal mycosis| : 116676008|Associated morphology| = - * 111214005|Arthropathy associated with a mycosis| - * , 363714003|Interprets| = 231428006|Cryotherapy to dorsal root ganglion|), - * 408729009|finding context| = 410516002|Known absent| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| =410604004|subject of record| }" - */ - ExpressionConstraint predicateExpression = TestUtils.parseExpression("243796009:{246090004=("+ - "14560005:116676008="+ - "111214005"+ - ",363714003=231428006),"+ - "408729009=410516002"+ - ",408731000=410512000"+ - ",408732007=410604004}"); - - /* - * "243796009|Situation with explicit context| : { 246090004|Associated finding| = ( - * 14560005|Dermal mycosis| : 116676008|Associated morphology| = - * 111214005|Arthropathy associated with a mycosis| - * , 363714003|Interprets| = 231428006|Cryotherapy to dorsal root ganglion|), - * 408729009|finding context| = 410516002|Known absent| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| =125676002|Person| }" - */ - ExpressionConstraint candidateExpression = TestUtils.parseExpression("243796009:{246090004=("+ - "14560005:116676008="+ - "111214005"+ - ",363714003=231428006),"+ - "408729009=410516002"+ - ",408731000=410512000"+ - ",408732007=125676002}"); - - long parseEnd = System.nanoTime(); - System.out.println("Expression parsing: " + ((parseEnd - parseStart)/1000) + " us"); - testExpressionSubsumption(predicateExpression, candidateExpression, true); - } - - @Test - public void testMultipleFocusConcepts() { - long parseStart = System.nanoTime(); - - /* - * "243796009|Situation with explicit context| : { 246090004|Associated finding| = ( - * 14560005|Dermal mycosis| +312646002|Burn of skin of eye region|), - * 408729009|finding context| =410515003|known present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| =410604004|subject of record| }" - */ - ExpressionConstraint predicateExpression = TestUtils.parseExpression("243796009:{246090004=("+ - "14560005+312646002),"+ - "408729009=410515003"+ - ",408731000=410512000"+ - ",408732007=410604004}"); - - /* - * "243796009|Situation with explicit context| : { 246090004|Associated finding| = ( - * 63041002|Acladiosis| +312646002|Burn of skin of eye region|), - * 408729009|finding context| =410515003|known present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| =410604004|subject of record| }" - */ - ExpressionConstraint candidateExpression = TestUtils.parseExpression("243796009:{246090004=("+ - "63041002+312646002),"+ - "408729009=410515003"+ - ",408731000=410512000"+ - ",408732007=410604004}"); - - long parseEnd = System.nanoTime(); - System.out.println("Expression parsing: " + ((parseEnd - parseStart)/1000) + " us"); - testExpressionSubsumption(predicateExpression, candidateExpression, true); - } - - @Test - public void testInactiveConcept() { - long parseStart = System.nanoTime(); - - /* - * "243796009|Situation with explicit context| : {246090004|Associated finding| = - * (71620000 | fracture of femur |: 116676008 | associated morphology | = - * (123735002|Fracture with displacement| :363698007 | finding site | = 71341001 | bone structure of femur |)) - * , 408729009|finding context| = 410515003|known present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| = 410604004|subject of record| }" - */ - ExpressionConstraint predicateExpression = TestUtils.parseExpression("243796009:{246090004="+ - "(71620000:116676008=(123735002:363698007=71341001))"+ - ",408729009=410515003"+ - ",408731000=410512000"+ - ",408732007=410604004}"); - - /* - * "243796009|Situation with explicit context| : {246090004|Associated finding| = - * (71620000 | fracture of femur |:116676008 | associated morphology | = - * (134341006 | displaced fracture | :363698007 | finding site | = 71341001 | bone structure of femur |)) - * , 408729009|finding context| = 410515003|known present| - * , 408731000|temporal context| = 410512000|current or specified| - * , 408732007|subject relationship context| = 410604004|subject of record| }" - */ - ExpressionConstraint candidateExpression = TestUtils.parseExpression("243796009:{246090004="+ - "(71620000:116676008=(134341006:363698007=71341001))"+ - ",408729009=410515003"+ - ",408731000=410512000"+ - ",408732007=410604004}"); - - long parseEnd = System.nanoTime(); - System.out.println("Expression parsing: " + ((parseEnd - parseStart)/1000) + " us"); - testExpressionSubsumption(predicateExpression, candidateExpression, false); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/AllNormalFormGeneratorTests.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/AllNormalFormGeneratorTests.java deleted file mode 100644 index dd5f3874f7e..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/AllNormalFormGeneratorTests.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.test; - -import org.junit.ClassRule; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -import com.b2international.snowowl.semanticengine.simpleast.normalform.test.AttributeGroupMergerTest; -import com.b2international.snowowl.semanticengine.simpleast.normalform.test.AttributeNormalizerTest; -import com.b2international.snowowl.semanticengine.simpleast.normalform.test.ConceptDefinitionAttributeRedundancyFilterTest; -import com.b2international.snowowl.semanticengine.simpleast.normalform.test.ConceptDefinitionMergerTest; -import com.b2international.snowowl.semanticengine.simpleast.normalform.test.ExpressionCanonicalRepresentationTest; -import com.b2international.snowowl.semanticengine.simpleast.normalform.test.FocusConceptNormalizerTest; -import com.b2international.snowowl.semanticengine.simpleast.normalform.test.NormalFormGeneratorTestFromSnomedDocument; -import com.b2international.snowowl.semanticengine.simpleast.normalform.test.SimpleAstNormalFormGeneratorTest; -import com.b2international.snowowl.semanticengine.simpleast.normalform.test.UngroupedAttributesMergerTest; -import com.b2international.snowowl.test.commons.SnowOwlAppRule; - -/** - * Test suite for all {@link BasicExpressionNormalFormGenerator} related unit tests. - *
      - * Note: run with at least 1G heap size. - * - */ -@RunWith(Suite.class) -@SuiteClasses({//ConceptDefinitionNormalizerTest.class, - AttributeGroupMergerTest.class, - UngroupedAttributesMergerTest.class, - ConceptDefinitionAttributeRedundancyFilterTest.class, - ConceptDefinitionMergerTest.class, - FocusConceptNormalizerTest.class, - AttributeNormalizerTest.class, - SimpleAstNormalFormGeneratorTest.class, - NormalFormGeneratorTestFromSnomedDocument.class, - ExpressionCanonicalRepresentationTest.class}) -public class AllNormalFormGeneratorTests { - - @ClassRule - public static final SnowOwlAppRule appRule = SnowOwlAppRule.snowOwl(AllNormalFormGeneratorTests.class); - -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/SemanticEngineTestPlugin.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/SemanticEngineTestPlugin.java deleted file mode 100644 index 55c07b70cb3..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/SemanticEngineTestPlugin.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.test; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -public class SemanticEngineTestPlugin implements BundleActivator { - - private static BundleContext context; - - static BundleContext getContext() { - return context; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext bundleContext) throws Exception { - SemanticEngineTestPlugin.context = bundleContext; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext bundleContext) throws Exception { - SemanticEngineTestPlugin.context = null; - } - -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/SnomedConcepts.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/SnomedConcepts.java deleted file mode 100644 index 85f077a0d25..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/SnomedConcepts.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.test; - -public abstract class SnomedConcepts { - // attribute name concepts - public static final String ATTRIBUTE = "246061005"; - public static final String FINDING_SITE = "363698007"; - public static final String PROCEDURE_SITE = "363704007"; - public static final String CAUSATIVE_AGENT = "246075003"; - public static final String ASSOCIATED_WITH = "47429007"; - public static final String ASSOCIATED_FINDING = "246090004"; - public static final String SEVERITY = "246112005"; - public static final String METHOD = "260686004"; - public static final String PROCEDURE_SITE_DIRECT = "405813007"; - public static final String ASSOCIATED_MORPHOLOGY = "116676008"; - // attribute value concepts - public static final String HEAD_STRUCTURE = "69536005"; - public static final String LUNG_STRUCTURE = "39607008"; - public static final String SEVERE = "24484000"; - public static final String DUST_ALLERGEN = "410980008"; - public static final String CONTACT_ALLERGEN = "406473004"; - public static final String SUBSTANCE = "105590001"; - // low-level primitive concepts - public static final String FAMILY_FELIDAE = "388618001"; // organism - public static final String SUBFAMILY_FELINAE = "388623001"; // organism - public static final String TURKISH_ANGORA_CAT = "61686008"; // organism - public static final String SUBFAMILY_PANTHERINAE = "388748007"; // organism - public static final String PANTHERA_TIGRIS = "79047009"; // organism - public static final String FOOT_STRUCTURE = "56459004"; // body structure - public static final String PAIN = "22253000"; // clinical finding - public static final String EXPIRATORY_CRACKLES = "12529006"; // clinical finding - public static final String EXCISION_ACTION = "129304002"; // qualifier value - public static final String FALLOPIAN_TUBE_STRUCTURE = "31435000"; // body structure - public static final String OVARIAN_STRUCTURE = "15497006"; // body structure - public static final String FRACTURE = "72704001"; // body structure - public static final String FRACTURE_OF_BONE = "125605004"; // clinical finding - public static final String BONE_STRUCTURE_OF_FEMUR = "71341001"; // body structure - public static final String EXCISION_OF_PELVIS = "123014005"; // procedure - public static final String AUSCULTATION = "37931006"; // procedure - public static final String AUSCULTATION_ACTION = "129436005"; // qualifier - - - // high-level primitive concepts - public static final String PROCEDURE = "71388002"; // procedure - public static final String DISEASE = "64572001"; // clinical finding - // fully defined concepts - public static final String DISORDER_OF_HEAD = "118934005"; // clinical finding - public static final String DISORDER_OF_EAR = "25906001"; // clinical finding - public static final String FOOT_PAIN = "47933007"; // clinical finding - public static final String FRACTURE_OF_FEMUR = "71620000"; // clinical finding - public static final String SALPINGO_OOPHORECTOMY = "116028008"; // procedure - - private SnomedConcepts() {} // suppressing public constructor to avoid subclassing -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/utils/TestUtils.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/utils/TestUtils.java deleted file mode 100644 index 8289f73359a..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/com/b2international/snowowl/semanticengine/simpleast/test/utils/TestUtils.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.test.utils; - -import java.io.StringReader; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import org.junit.ComparisonFailure; - -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeClauseList; -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.simpleast.utils.ConceptDefinitionComparator; -import com.b2international.snowowl.semanticengine.simpleast.utils.ExpressionComparator; -import com.b2international.snowowl.semanticengine.simpleast.utils.QueryAstUtils; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastFactory; -import com.b2international.snowowl.snomed.ecl.EclStandaloneSetup; -import com.b2international.snowowl.snomed.ecl.ecl.ExpressionConstraint; -import com.b2international.snowowl.snomed.ecl.parser.antlr.EclParser; -import com.google.common.collect.Lists; -import com.google.inject.Injector; - -/** - * Various utility functions for testing. - * - */ -public class TestUtils { - - private static EclParser parser; - - public static ExpressionConstraint parseExpression(String expression) { - if (expression == null) - throw new NullPointerException("Expression string cannot be null."); - return (ExpressionConstraint) parser.parse(new StringReader(expression)).getRootASTElement(); - } - - public static EclParser createESCGParser() { - if (parser == null) { - final Injector injector = new EclStandaloneSetup().createInjectorAndDoEMFRegistration(); - parser = injector.getInstance(EclParser.class); - } - return parser; - } - public static void assertConceptDefinitionsEqual(ConceptDefinition expectedConceptDefinition, - ConceptDefinition actualConceptDefinition) { - ConceptDefinitionComparator conceptDefinitionComparator = new ConceptDefinitionComparator(); - boolean equal = conceptDefinitionComparator.equal(expectedConceptDefinition, actualConceptDefinition); - - if (!equal) { - throw new ComparisonFailure("Concept definitions are not equal.", expectedConceptDefinition.toString(), actualConceptDefinition.toString()); - } - } - -// public static void assertExpressionsEqual(String message, Expression expected, Expression actual) { -// ExpressionComparator expressionComparator = new ExpressionComparator(); -// boolean equal = expressionComparator.equal(expected, actual); -// if (!equal) -// throw new ComparisonFailure(message, expected.toString(), actual.toString()); -// } - - - public static AttributeClauseList buildAttributeClauseList(Collection attributes) { - AttributeClauseList attributeClauseList = new AttributeClauseList(); - attributeClauseList.getAttributeClauses().addAll(attributes); - return attributeClauseList; - } - - public static AttributeClauseList buildAttributeClauseList(AttributeClause... attributes) { - return buildAttributeClauseList(Arrays.asList(attributes)); - } - - public static AttributeClause buildAttribute(String nameConceptId, String valueConceptId) { - ConceptRef nameConceptGroup = buildUnconstrainedConceptGroup(nameConceptId); - ConceptRef valueConceptGroup = buildUnconstrainedConceptGroup(valueConceptId); - AttributeClause attribute = ecoreastFactory.eINSTANCE.createAttributeClause(); - attribute.setLeft(nameConceptGroup); - attribute.setRight(valueConceptGroup); - return attribute; - } - - public static AttributeClause buildAttributeWithExpressionValue(String nameConceptId, String valueConceptId) { - ConceptRef nameConceptGroup = buildUnconstrainedConceptGroup(nameConceptId); - SubExpression valueNegatableSubExpression = buildSubExpressionFromSingleConceptId(valueConceptId); - AttributeClause attribute = ecoreastFactory.eINSTANCE.createAttributeClause(); - attribute.setLeft(nameConceptGroup); - attribute.setRight(valueNegatableSubExpression); - return attribute; - } - - public static AttributeClause buildAttribute(String nameConceptId, RValue valueExpression) { - ConceptRef nameConceptGroup = buildUnconstrainedConceptGroup(nameConceptId); - SubExpression valueNegatableSubExpression = ecoreastFactory.eINSTANCE.createSubExpression(); - valueNegatableSubExpression.setValue(valueExpression); - AttributeClause attribute = ecoreastFactory.eINSTANCE.createAttributeClause(); - attribute.setLeft(nameConceptGroup); - attribute.setRight(valueNegatableSubExpression); - return attribute; - } - - public static RValue buildExpression(ConceptRef focusConcept) { - return buildExpression(Collections.singletonList(focusConcept), Collections.emptyList(), - Collections.emptyList()); - } - - public static RValue buildExpression(List focusConcepts, List attributeGroups, - List ungroupedAttributes) { - List focusConceptIds = Lists.newArrayList(); - for (ConceptRef focusConcept : focusConcepts) { - focusConceptIds.add(focusConcept.getConceptId()); - } - return QueryAstUtils.buildExpression(focusConceptIds, attributeGroups, ungroupedAttributes); - } - - public static SubExpression buildSubExpressionFromSingleConceptId(String conceptId) { - ConceptRef conceptGroup = buildUnconstrainedConceptGroup(conceptId); - SubExpression negatableSubExpression = ecoreastFactory.eINSTANCE.createSubExpression(); -// negatableSubExpression.setValue(expression); - // TODO: is this needed? - return negatableSubExpression; - } - - public static ConceptRef buildConcept(String conceptId) { - ConceptRef concept = ecoreastFactory.eINSTANCE.createConceptRef(); - concept.setConceptId(conceptId); - return concept; - } - - public static ConceptRef buildUnconstrainedConceptGroup(String conceptId) { - ConceptRef concept = ecoreastFactory.eINSTANCE.createConceptRef(); - concept.setConceptId(conceptId); - return concept; - } - - public static ConceptDefinition buildConceptDefinition(Collection attributeGroups, - Collection ungroupedAttributes) { - ConceptDefinition conceptDefinition = new ConceptDefinition(); - conceptDefinition.getAttributeClauseLists().addAll(attributeGroups); - conceptDefinition.getUngroupedAttributes().addAll(ungroupedAttributes); - return conceptDefinition; - } - - public static ConceptDefinition buildConceptDefinition(AttributeClauseList attributeGroup) { - return buildConceptDefinition(Collections.singleton(attributeGroup), Collections.emptySet()); - } - - public static ConceptDefinition buildConceptDefinition(AttributeClauseList... attributeGroups) { - return buildConceptDefinition(Arrays.asList(attributeGroups), Collections.emptySet()); - } - - public static ConceptDefinition buildConceptDefinition(AttributeClause... attributes) { - return buildConceptDefinition(Collections.emptySet(), Arrays.asList(attributes)); - } - - public static void assertExpressionsEqual(String string, RValue expected, - RValue actual) { - ExpressionComparator conceptDefinitionComparator = new ExpressionComparator(); - boolean equal = conceptDefinitionComparator.equal(expected, actual); - - if (!equal) { - throw new ComparisonFailure("Expressions are not equal.", expected.toString(), actual.toString()); - } - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/configuration/snowowl.yml b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/configuration/snowowl.yml deleted file mode 100644 index 2b85702971e..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/src/configuration/snowowl.yml +++ /dev/null @@ -1,13 +0,0 @@ -systemUser: true - -snomed: - languages: - - - code: en - refSetIds: ["900000000000509007", "900000000000508004"] - - - code: en-us - refSetIds: ["900000000000509007"] - - - code: en-gb - refSetIds: ["900000000000508004"] \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/test.escg b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/test.escg deleted file mode 100644 index ceb7eceaed0..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast.test/test.escg +++ /dev/null @@ -1 +0,0 @@ -243796009 | situation with explicit context | \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/META-INF/MANIFEST.MF deleted file mode 100644 index 555c59823c4..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/META-INF/MANIFEST.MF +++ /dev/null @@ -1,16 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Snow Owl Semantic Engine for Simplified Expression AST -Bundle-SymbolicName: com.b2international.snowowl.snomed.semanticengine.simpleast -Bundle-Version: 7.3.0.qualifier -Bundle-Activator: com.b2international.snowowl.semanticengine.simpleast.SemanticEngineActivator -Bundle-Vendor: B2i Healthcare -Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", - com.b2international.snowowl.snomed.dsl, - com.b2international.snowowl.snomed.datastore -Bundle-RequiredExecutionEnvironment: JavaSE-11 -Bundle-ActivationPolicy: lazy -Export-Package: com.b2international.snowowl.semanticengine.simpleast,c - om.b2international.snowowl.semanticengine.simpleast.normalform,com.b2 - international.snowowl.semanticengine.simpleast.subsumption,com.b2inte - rnational.snowowl.semanticengine.simpleast.utils diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/pom.xml b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/pom.xml deleted file mode 100644 index 8a16bff920f..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 4.0.0 - - com.b2international.snowowl - 7.3.0-SNAPSHOT - snomed-parent - - com.b2international.snowowl.snomed.semanticengine.simpleast - eclipse-plugin - diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/SemanticEngineActivator.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/SemanticEngineActivator.java deleted file mode 100644 index 83decb5284a..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/SemanticEngineActivator.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -public class SemanticEngineActivator implements BundleActivator { - - private static BundleContext context; - - static BundleContext getContext() { - return context; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext bundleContext) throws Exception { - SemanticEngineActivator.context = bundleContext; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext bundleContext) throws Exception { - SemanticEngineActivator.context = null; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeClauseList.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeClauseList.java deleted file mode 100644 index 2f529b511dd..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeClauseList.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform; - -import java.util.List; - -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.google.common.collect.Lists; - -/** - * Simple class to represent an attribute group. - */ -public class AttributeClauseList { - private final List attributeClauses = Lists.newArrayList(); - - public List getAttributeClauses() { - return attributeClauses; - } - - @Override - public String toString() { - StringBuffer buf = new StringBuffer(); - buf.append('{'); - for (AttributeClause attribute : attributeClauses) { - buf.append(attribute.toString() ); - } - buf.append('}'); - return buf.toString(); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeClauseListMerger.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeClauseListMerger.java deleted file mode 100644 index d166b4f9286..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeClauseListMerger.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform; - -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import org.eclipse.emf.ecore.util.EcoreUtil; - -import com.b2international.snowowl.semanticengine.simpleast.subsumption.SubsumptionTester; -import com.b2international.snowowl.semanticengine.simpleast.utils.QueryAstUtils; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; - -/** - * 5.3.4.3 Merging groups
      - *
      • - * If a group in one definition meets the following criteria in relation to a group in the other - * definition then the groups are merged: - *
        • At least one attribute in one of the groups is name-matched by an attribute in the other group.
        • - * and - *
        • For each name-matched pair of attributes, the value of that attribute in one group either subsumes or is - * identical to the value of the name-matched attribute in the other group.
        - *
      • Groups that meet the criteria for merging are merged by adding all attributes present in both source - * groups to the same group in the merged target definition.
      • - *
      • Groups that cannot be merged are created as separate groups in the target definition.
      • - *
      - * Note that these conditions allow additional attributes that are not name-matched to be present in either - * of the candidate groups. They also allow values of name-matched attributes to be subsumed in different - * directions between the two groups (i.e. do not require the entire of one group to be subsumed the other group).

      - * - */ -public class AttributeClauseListMerger { - - private final SubsumptionTester subsumptionTester; - - /** - * Class constructor. - * - * @param subsumptionTester the {@link SubsumptionTester} to use - * @param mergedConceptDefinition the merged {@link ConceptDefinition} instance to populate - */ - public AttributeClauseListMerger(SubsumptionTester subsumptionTester) { - this.subsumptionTester = subsumptionTester; - } - - /** - * Because of the interdependencies with {@link UngroupedAttributesMerger}, this method modifies - * the specified {@link ConceptDefinition} as a side effect. - * - * @param conceptDefinitions the original concept definitions to be merged - * @param mergedConceptDefinition the {@link ConceptDefinition} to modify when merging - * @see AttributeClauseListMerger#AttributeClauseGroupMerger(SubsumptionTester, ConceptDefinition) - */ - public void mergeAttributeClauseGroups(Map conceptDefinitions, ConceptDefinition mergedConceptDefinition) { - // handle case when there is only one concept - if (conceptDefinitions.size() == 1) { - ConceptDefinition conceptDefinition = conceptDefinitions.values().iterator().next(); - mergedConceptDefinition.getAttributeClauseLists().addAll(conceptDefinition.getAttributeClauseLists()); - return; - } - - // use set to avoid duplicates - Collection processedAttributeClauseGroups = new HashSet(); - - for (Entry conceptMapEntry1 : conceptDefinitions.entrySet()) { - ConceptDefinition conceptDefinitions1 = conceptMapEntry1.getValue(); - List attributeGroups1 = conceptDefinitions1.getAttributeClauseLists(); - for (Entry conceptMapEntry2 : conceptDefinitions.entrySet()) { - // don't compare with same concept - if (conceptMapEntry1.getKey().equals(conceptMapEntry2.getKey())) - continue; - - ConceptDefinition conceptDefinitions2 = conceptMapEntry2.getValue(); - List attributeGroups2 = conceptDefinitions2.getAttributeClauseLists(); - - for (AttributeClauseList attributeGroup1 : attributeGroups1) { - if (processedAttributeClauseGroups.contains(attributeGroup1)) - continue; - boolean merged = false; - for (AttributeClauseList attributeGroup2 : attributeGroups2) { - if (processedAttributeClauseGroups.contains(attributeGroup2)) - continue; - boolean mergeable = isMergeable(attributeGroup1, attributeGroup2); - if (mergeable) { - AttributeClauseList mergedAttributeClauseGroup = new AttributeClauseList(); - Collection attributes1 = (EcoreUtil.copyAll(attributeGroup1.getAttributeClauses())); - Collection attributes2 = (EcoreUtil.copyAll(attributeGroup2.getAttributeClauses())); - mergedAttributeClauseGroup.getAttributeClauses().addAll(attributes1); - mergedAttributeClauseGroup.getAttributeClauses().addAll(attributes2); -// resultingAttributeClauseGroups.add(mergedAttributeClauseGroup); - mergedConceptDefinition.getAttributeClauseLists().add(mergedAttributeClauseGroup); - merged = true; - processedAttributeClauseGroups.add(attributeGroup2); - break; - } else { -// resultingAttributeClauseGroups.add(attributeGroup2); - mergedConceptDefinition.getAttributeClauseLists().add(attributeGroup2); - processedAttributeClauseGroups.add(attributeGroup2); - } - } - if (!merged) { -// resultingAttributeClauseGroups.add(attributeGroup1); - mergedConceptDefinition.getAttributeClauseLists().add(attributeGroup1); - } - processedAttributeClauseGroups.add(attributeGroup1); - } - } - } - } - - /** - *
      • - * If a group in one definition meets the following criteria in relation to a group in the other - * definition then the groups are merged: - *
        • At least one attribute in one of the groups is name-matched by an attribute in the other group.
        • - * and - *
        • For each name-matched pair of attributes, the value of that attribute in one group either subsumes or is - * identical to the value of the name-matched attribute in the other group.
      - * - * @param group1 - * @param group2 - * @return - */ - public boolean isMergeable(AttributeClauseList group1, AttributeClauseList group2) { - boolean mergeable = false; - for (AttributeClause attribute1 : group1.getAttributeClauses()) { - ConceptRef attribute1NameConcept = QueryAstUtils.getAttributeNameConcept(attribute1); - - for (AttributeClause attribute2 : group2.getAttributeClauses()) { - ConceptRef attribute2NameConcept = QueryAstUtils.getAttributeNameConcept(attribute2); - if (attribute1NameConcept.getConceptId().equals(attribute2NameConcept.getConceptId())) { - RValue attribute1ValueExpression = QueryAstUtils.getAttributeValueExpression(attribute1); - RValue attribute2ValueExpression = QueryAstUtils.getAttributeValueExpression(attribute2); - if (subsumptionTester.isSubsumed(attribute1ValueExpression, - attribute2ValueExpression) - || subsumptionTester.isSubsumed(attribute2ValueExpression, - attribute1ValueExpression)) { - mergeable = true; - break; - } - } - } - - } - - return mergeable; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeNameMatch.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeNameMatch.java deleted file mode 100644 index a09dbe761cc..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeNameMatch.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform; - -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; - - -/** - * Simple class to hold an attribute and its containing group, if it is grouped. - * If the attribute is ungrouped, the group will be {@link AttributeNameMatch#NO_GROUP}. - * - */ -public final class AttributeNameMatch { - - public static final AttributeClauseList NO_GROUP = new AttributeClauseList(); - - private AttributeClauseList group; - private final AttributeClause attribute; - - public AttributeNameMatch(AttributeClause attribute, AttributeClauseList group) { - this.attribute = attribute; - this.group = group; - } - - public AttributeNameMatch(AttributeClause attribute) { - this.attribute = attribute; - this.group = NO_GROUP; - } - - /** - * @return the name-matched attribute - */ - public AttributeClause getAttribute() { - return attribute; - } - - /** - * @return the group containing the attribute, or {@link AttributeNameMatch#NO_GROUP} if ungrouped - */ - public AttributeClauseList getGroup() { - return group; - } - - @Override - public String toString() { - if (group != NO_GROUP) - return attribute + " in " + group; - else - return attribute + " (ungrouped)"; - } - - public void setGroup(AttributeClauseList group) { - this.group = group; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeNormalizer.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeNormalizer.java deleted file mode 100644 index 37bb5c29f92..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/AttributeNormalizer.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform; - -import java.util.ArrayList; -import java.util.Collection; - -import org.eclipse.emf.ecore.util.EcoreUtil; - -import com.b2international.snowowl.semanticengine.simpleast.utils.QueryAstUtils; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastFactory; - -/** - * The value of every attribute specified in the expression refinement (including grouped - * and ungrouped attributes) is treated as an expression and normalized according to the - * full set of rules in section 5.3. - * To ensure depth-first processing, this recursive process is carried out before any - * other processing of the expression refinement.
      - * Recursive normalization should be applied to all values even if they are - * represented by single conceptIds. - * When all attribute values in the expression refinement have been processed, the - * refinement is passed to the "Merge refinement" process (5.3.5). - * - */ -public class AttributeNormalizer { - - private final SimpleAstExpressionNormalFormGenerator normalFormGenerator; - - public AttributeNormalizer(String branch) { - normalFormGenerator = new SimpleAstExpressionNormalFormGenerator(branch); - } - - /** - * @param attributeGroups - * @param ungroupedAttributes - * @return the normalized concept definition - */ - public ConceptDefinition normalizeAttributes(Collection attributeGroups, Collection ungroupedAttributes) { - // attribute groups - Collection normalizedAttributeClauseGroups = new ArrayList(); - for (AttributeClauseList attributeGroup : attributeGroups) { - Collection normalizedAttributes = new ArrayList(); - for (AttributeClause attribute : attributeGroup.getAttributeClauses()) { - AttributeClause normalizedAttribute = normalizeAttribute(attribute); - normalizedAttributes.add(normalizedAttribute); - } - AttributeClauseList normalizedAttributeClauseGroup = new AttributeClauseList(); - normalizedAttributeClauseGroup.getAttributeClauses().addAll(normalizedAttributes); - normalizedAttributeClauseGroups.add(normalizedAttributeClauseGroup); - } - - // ungrouped attributes - Collection normalizedUngroupedAttributes = new ArrayList(); - for (AttributeClause attribute : ungroupedAttributes) { - normalizedUngroupedAttributes.add(normalizeAttribute(attribute)); - } - - ConceptDefinition normalizedAttributes = new ConceptDefinition(); - normalizedAttributes.getAttributeClauseLists().addAll(normalizedAttributeClauseGroups); - normalizedAttributes.getUngroupedAttributes().addAll(normalizedUngroupedAttributes); - return normalizedAttributes; - } - - private AttributeClause normalizeAttribute(AttributeClause attribute) { - RValue value = QueryAstUtils.getAttributeValueExpression(attribute); - RValue normalFormValueExpression = normalFormGenerator.getLongNormalForm(value); - AttributeClause normalizedAttribute = ecoreastFactory.eINSTANCE.createAttributeClause(); - if (normalFormValueExpression instanceof ConceptRef) { - normalizedAttribute.setRight(normalFormValueExpression); - } else { - SubExpression valueSubExpression = ecoreastFactory.eINSTANCE.createSubExpression(); - valueSubExpression.setValue(normalFormValueExpression); - normalizedAttribute.setRight(valueSubExpression); - } - normalizedAttribute.setLeft(EcoreUtil.copy(attribute.getLeft())); - return normalizedAttribute; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinition.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinition.java deleted file mode 100644 index 4b1c4f27155..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinition.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform; - -import java.util.List; - -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.google.common.collect.Lists; - -/** - * Simple class to hold attribute groups and ungrouped attributes that belong together. - * - */ -public final class ConceptDefinition { - private final List ungroupedAttributes = Lists.newArrayList(); - private final List attributeGroups = Lists.newArrayList(); - - public List getAttributeClauseLists() { - return attributeGroups; - } - - public List getUngroupedAttributes() { - return ungroupedAttributes; - } - - @Override - public String toString() { - return attributeGroups + ", " + getUngroupedAttributes(); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinitionAttributeRedundancyFilter.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinitionAttributeRedundancyFilter.java deleted file mode 100644 index c64b2f0c685..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinitionAttributeRedundancyFilter.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform; - -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import com.b2international.snowowl.semanticengine.simpleast.subsumption.SubsumptionTester; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; - -/** - * 5.3.4.5 Remove redundant elements from the merged definition
      - * Check each group in the target definition and, within that group, compare the values of any name-matched attributes. - *
      • If an attribute in the group has a value that subsumes the value of another name- matched attribute in the same group, - * remove that attribute from this group in the target definition.
      • - * Check the ungrouped set of attributes. - *
      • If any ungrouped attribute has a value that subsumes the value of a name-matched attribute, remove this ungrouped - * attribute from the target definition.
      • - *
      - * - * Note:
      - * The removal of redundancies described only applies to name-matched pairs of attributes. It does not affect attributes - * that are redundant only because they are present in the definitions of the primitive focus concepts. Supertype (�is a�) - * relationships are ignored during this stage of processing.


      - * - */ -public class ConceptDefinitionAttributeRedundancyFilter { - - private final SubsumptionTester subsumptionTester; - - public ConceptDefinitionAttributeRedundancyFilter(SubsumptionTester subsumptionTester) { - this.subsumptionTester = subsumptionTester; - } - - /** - * @param conceptDefinition the {@link ConceptDefinition} to filter for redundant attributes - * @return the filtered {@link ConceptDefinition} - */ - public ConceptDefinition getFilteredConceptDefinition(ConceptDefinition conceptDefinition) { - ConceptDefinition filteredConceptDefinition = new ConceptDefinition(); - - // attribute groups - for (AttributeClauseList attributeGroup : conceptDefinition.getAttributeClauseLists()) { - filteredConceptDefinition.getAttributeClauseLists().add(filterRedundantAttributes(attributeGroup)); - } - - // ungrouped attributes - filteredConceptDefinition.getUngroupedAttributes().addAll(filterRedundantAttributes(conceptDefinition.getUngroupedAttributes())); - - return filteredConceptDefinition; - } - - private AttributeClauseList filterRedundantAttributes(AttributeClauseList attributeGroup) { - AttributeClauseList filteredAttributeClauseGroup = new AttributeClauseList(); - filteredAttributeClauseGroup.getAttributeClauses().addAll(filterRedundantAttributes(attributeGroup.getAttributeClauses())); - return filteredAttributeClauseGroup; - } - - private Set filterRedundantAttributes(Collection attributes) { - Set filteredAttributes = new HashSet(); - - /* - * for each attribute - * for each filtered attribute - * if attribute subsumes filtered attribute - * remove filtered - * add attribute - */ - - for (AttributeClause outerAttribute : attributes) { - AttributeClause subsumedFilteredAttribute = subsumesFilteredAttribute(filteredAttributes, outerAttribute); - if (subsumedFilteredAttribute != null) { - filteredAttributes.remove(subsumedFilteredAttribute); - filteredAttributes.add(outerAttribute); - } else if (subsumedByFilteredAttribute(filteredAttributes, outerAttribute) == null){ - filteredAttributes.add(outerAttribute); - } - } - - return filteredAttributes; - } - - private AttributeClause subsumesFilteredAttribute(Set filteredAttributes, AttributeClause attribute) { - for (AttributeClause filteredAttribute : filteredAttributes) { - if (subsumptionTester.isSubsumed(attribute, filteredAttribute)) { - return filteredAttribute; - } - } - return null; - } - - private AttributeClause subsumedByFilteredAttribute(Set filteredAttributes, AttributeClause attribute) { - for (AttributeClause filteredAttribute : filteredAttributes) { - if (subsumptionTester.isSubsumed(filteredAttribute, attribute)) { - return filteredAttribute; - } - } - return null; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinitionMerger.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinitionMerger.java deleted file mode 100644 index 3602ed505d8..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinitionMerger.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform; - -import java.util.Map; - -import com.b2international.snowowl.semanticengine.simpleast.subsumption.SubsumptionTester; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; - -/** - * 5.3.4 Merge definitions

      - * 5.3.4.1 Overview
      - * The set of normalized definitions derived from the "Normalize focus concepts" - * process (5.3.3) are merged with one another to remove redundancy. Then the - * normalized refinement is merged with the pre-merged definition to create a single - * refinement which expresses the full set of definitions and refinements without - * unnecessary redundancy.
      - * The rules applied to the merger are described below for grouped and ungrouped attributes.
      - * Group merging is completed before applying any ungrouped relationships. This ensures that, - * where appropriate, ungrouped attributes are applied to the correct groups in the output.
      - * Redundant attributes are not removed until the merger process is complete. This ensures that - * the full set of attributes is available to allow matching throughout the process of merging.

      - * 5.3.4.2 Attribute names and attribute hierarchies
      - * The following sections on merging groups and attributes refer to "name-matched" attributes. - * Two or more attributes in a definition or expression are "name-matched" if they have the - * same attribute name.
      - * For example, the attribute "procedure site"="appendix structure" is name-matched by the - * attribute "procedure site"="entire femur".
      - * However, consideration also needs to be given to hierarchical relationships between - * different "attribute names". For example, "procedure site � direct" and "procedure site � indirect" - * are subtypes of "procedure site".
      - * The simplest approach that can be consistently applied is to treat attributes that have - * subsumed names as name-matched for the purposes of group and value merging. The more specific - * attribute name is then applied to the merged attribute in the target definition. This means - * that the same rules apply for merging the values of "procedure site" and - * "procedure site � direct" as apply to mergers of attributes with identical names and that - * the name "procedure site - direct" would then be applied to any values that were merged in this way.

      - * - * Progress note:
      - * Review of a number of practical examples suggests that there may be some unexpected consequences - * of this approach. For this reason, while the issues that arise are studied further, implementers - * are recommended only to merge literal name-matched attributes.


      - * - */ -public class ConceptDefinitionMerger { - - - private final SubsumptionTester subsumptionTester; - - public ConceptDefinitionMerger(SubsumptionTester subsumptionTester) { - this.subsumptionTester = subsumptionTester; - } - - /** - * 5.3.4.3 Merging groups
      - * See {@link AttributeClauseListMerger}

      - * - * 5.3.4.4 Merging ungrouped attributes
      - * See {@link UngroupedAttributesMerger}

      - * - * 5.3.4.5 Remove redundant elements from the merged definition
      - * See {@link ConceptDefinitionAttributeRedundancyFilter}

      - * - * 5.3.4.6 Completion of the definition merging
      - * Once the focus concept definitions have been merged, the target definition is passed to the "Merge refinement" process (5.3.5). - * - * @param conceptDefinitions - * @param ungroupedAttributes - * @return the merged concept definition - */ - public ConceptDefinition mergeDefinitions(Map conceptDefinitions) { - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - AttributeClauseListMerger attributeGroupMerger = new AttributeClauseListMerger(subsumptionTester); - attributeGroupMerger.mergeAttributeClauseGroups(conceptDefinitions, mergedConceptDefinition); - UngroupedAttributesMerger ungroupedAttributeSetMerger = new UngroupedAttributesMerger(subsumptionTester); - ungroupedAttributeSetMerger.mergeUngroupedAttributes(conceptDefinitions, mergedConceptDefinition); - ConceptDefinitionAttributeRedundancyFilter conceptDefinitionRedundancyFilter = new ConceptDefinitionAttributeRedundancyFilter(subsumptionTester); - return conceptDefinitionRedundancyFilter.getFilteredConceptDefinition(mergedConceptDefinition); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinitionNormalizer.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinitionNormalizer.java deleted file mode 100644 index d53cfd8515b..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/ConceptDefinitionNormalizer.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import com.b2international.snowowl.core.ApplicationContext; -import com.b2international.snowowl.datastore.BranchPathUtils; -import com.b2international.snowowl.eventbus.IEventBus; -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationships; -import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; -import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastFactory; - -/** - * 5.3.3.1 The set of normalized definitions of each focus concept
      - * The set of normalized definitions includes a separate normalized definition for each focus concept, - *
      • - * The normalized definition includes
      • - *
        • All ungrouped relationships
        • - *
        • All relationship groups complete with contained relationships
        - *
      • All relationship values are normalized by recursively following the full set of rules - * described in section 5.3.
      • - *
      - * Note: Storage of pre-computed normalized form of concept definitions simplifies this process as - * it removes the requirement for recursive processing of definitions at run time. - * The set of normalized definitions is passed to the "Merge definitions" process (5.3.4). - * - */ -public class ConceptDefinitionNormalizer { - - private final SimpleAstExpressionNormalFormGenerator normalFormGenerator; - - public ConceptDefinitionNormalizer(String branch) { - this.normalFormGenerator = new SimpleAstExpressionNormalFormGenerator(branch); - } - - /** - * @param focusConcepts - * @return the normalized concept definition of each focus concept - */ - public Map getNormalizedConceptDefinitions(Collection focusConcepts) { - Map>> conceptDefinitionMap = new HashMap>>(); - for (ConceptRef focusConcept : focusConcepts) { - Map> attributeGroupMap = new HashMap>(); - /* - * 1. get defining attributes - * 2. normalizeAttributes(defining attributes) - */ - - final SnomedRelationships outboundRelationships = SnomedRequests.prepareSearchRelationship() - .all() - .filterByActive(true) - .filterByType(Concepts.IS_A) - .filterBySource(focusConcept.getConceptId()) - // TODO fix branch path - .build(SnomedDatastoreActivator.REPOSITORY_UUID, BranchPathUtils.createMainPath().getPath()) - .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .getSync(); - for (SnomedRelationship relationship : outboundRelationships) { - int relationshipGroup = relationship.getGroup(); - AttributeClause attribute = ecoreastFactory.eINSTANCE.createAttributeClause(); - ConceptRef name = ecoreastFactory.eINSTANCE.createConceptRef(); - name.setConceptId(relationship.getTypeId()); - attribute.setLeft(name); - ConceptRef value = ecoreastFactory.eINSTANCE.createConceptRef(); - value.setConceptId(relationship.getDestinationId()); - - RValue normalizedValueExpression = normalFormGenerator.getLongNormalForm(value); - if (normalizedValueExpression instanceof ConceptRef) { - attribute.setRight(normalizedValueExpression); - } else { - SubExpression subExpression = ecoreastFactory.eINSTANCE.createSubExpression(); - subExpression.setValue(normalizedValueExpression); - attribute.setRight(subExpression); - } - putAttributeInAttributeClauseGroupMap(attribute, relationshipGroup, attributeGroupMap); - } - conceptDefinitionMap.put(focusConcept, attributeGroupMap); - } - - - Map result = new HashMap(); - for (Entry>> conceptMapEntry : conceptDefinitionMap.entrySet()) { - Map> conceptMapValue = conceptMapEntry.getValue(); - ConceptDefinition conceptDefinitions = new ConceptDefinition(); - for (Map.Entry> relationshipGroupMapEntry : conceptMapValue.entrySet()) { - int relationshipGroup = relationshipGroupMapEntry.getKey(); - - if (relationshipGroup == 0) { - // ungrouped attributes - conceptDefinitions.getUngroupedAttributes().addAll(relationshipGroupMapEntry.getValue()); - } else { - // attribute groups - AttributeClauseList attributeGroup = new AttributeClauseList(); - attributeGroup.getAttributeClauses().addAll(relationshipGroupMapEntry.getValue()); - conceptDefinitions.getAttributeClauseLists().add(attributeGroup); - } - } - - result.put(conceptMapEntry.getKey(), conceptDefinitions); - } - - return result; - } - - private void putAttributeInAttributeClauseGroupMap(AttributeClause attribute, int group, Map> map) { - List list = map.get(group); - if (list == null) { - list = new ArrayList(); - map.put(group, list); - } - list.add(attribute); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/FocusConceptNormalizationResult.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/FocusConceptNormalizationResult.java deleted file mode 100644 index f912f9868c5..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/FocusConceptNormalizationResult.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform; - -import java.util.Collection; - -import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; - - - -/** - * Simple class to hold the results of the normalization of an expression's focus concepts. - * - */ -public final class FocusConceptNormalizationResult { - public Collection filteredPrimitiveSuperTypes; - public ConceptDefinition mergedConceptDefinition; - - FocusConceptNormalizationResult(Collection filteredPrimitiveSuperTypes2, ConceptDefinition mergedConceptDefinition) { - this.filteredPrimitiveSuperTypes = filteredPrimitiveSuperTypes2; - this.mergedConceptDefinition = mergedConceptDefinition; - } - - @Override - public String toString() { - return filteredPrimitiveSuperTypes + " : " + mergedConceptDefinition; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/FocusConceptNormalizer.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/FocusConceptNormalizer.java deleted file mode 100644 index db59063a8fb..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/FocusConceptNormalizer.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import com.b2international.snowowl.core.ApplicationContext; -import com.b2international.snowowl.eventbus.IEventBus; -import com.b2international.snowowl.semanticengine.simpleast.subsumption.SubsumptionTester; -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.SnomedConcept; -import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationships; -import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; -import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; -import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; - -/** - * 5.3.3 Normalize focus concepts
      - * The set of focus concepts is normalized to generated two separate outputs:

      - * 5.3.3.1 The set of normalized definitions of each focus concept
      - * The set of normalized definitions includes a separate normalized definition for each focus concept, - * The normalized definition includes - *
        - *
      • All ungrouped relationships
      • - *
      • All relationship groups complete with contained relationships
      • - *
      - * All relationship values are normalized by recursively following the full set of rules described - * in section 5.3.
      - * Note: Storage of pre-computed normalized form of concept definitions simplifies this process as - * it removes the requirement for recursive processing of definitions at run time. - * The set of normalized definitions is passed to the "Merge definitions" process (5.3.4).

      - * 5.3.3.2 The non-redundant proximal primitive supertypes of the focus concepts
      - * The non-redundant proximal primitive supertypes of the focus concepts is the set of all primitive - * supertypes of all the focus concepts with redundant concepts removed.
      - * A concept is redundant if it is: - *
        - *
      • A duplicate of another member of the set
      • - *
      • A super type of another concept in the set.
      • - *
      - * The set of proximal primitive supertypes generated by this process is passed to the - * "Create expression" process (5.3.6) as the focus concepts for the output expression. - * - */ -public class FocusConceptNormalizer { - - private final SubsumptionTester subsumptionTester; - private final String branch; - - public FocusConceptNormalizer(final String branch) { - this.branch = branch; - this.subsumptionTester = new SubsumptionTester(branch); - } - - - /** - * @param focusConcepts - * @return the normalized focus concepts - */ - public FocusConceptNormalizationResult normalizeFocusConcepts(Collection focusConcepts) { - Collection proximalPrimitiveSuperTypes = collectProximalPrimitiveSupertypes(focusConcepts); - Collection filteredPrimitiveSuperTypes = filterRedundantSuperTypes(proximalPrimitiveSuperTypes); - ConceptDefinitionNormalizer conceptDefinitionNormalizer = new ConceptDefinitionNormalizer(branch); - Map conceptDefinitions = conceptDefinitionNormalizer.getNormalizedConceptDefinitions(focusConcepts); - ConceptDefinitionMerger conceptDefinitionMerger = new ConceptDefinitionMerger(subsumptionTester); - ConceptDefinition mergedFocusConceptDefinitions = conceptDefinitionMerger.mergeDefinitions(conceptDefinitions); - return new FocusConceptNormalizationResult(filteredPrimitiveSuperTypes, mergedFocusConceptDefinitions); - } - - private Collection collectProximalPrimitiveSupertypes(Collection focusConcepts) { - Set proximatePrimitiveSuperTypes = new HashSet(); - - for (ConceptRef concept : focusConcepts) { - final SnomedConcept fc = SnomedRequests.prepareGetConcept(concept.getConceptId()) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, branch) - .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .getSync(); - proximatePrimitiveSuperTypes.addAll(getProximatePrimitiveSuperTypes(fc)); - } - - return proximatePrimitiveSuperTypes; - } - - /** - * The non-redundant proximal primitive supertypes of the focus concepts is the set of - * all primitive supertypes of all the focus concepts with redundant concepts removed.
      - * A concept is redundant if it is: - *
        - *
      • A duplicate of another member of the set
      • - *
      • A super type of another concept in the set.
      • - *
      - * @param proximalPrimitiveSuperTypes - * @return - */ - private Collection filterRedundantSuperTypes(Collection proximalPrimitiveSuperTypes) { - List filteredSuperTypes = new ArrayList(); - - for(SnomedConceptDocument superType: proximalPrimitiveSuperTypes) { - if (!filteredSuperTypes.contains(superType) && !containsSubType(proximalPrimitiveSuperTypes, superType)) { - filteredSuperTypes.add(superType); - } - } - - return filteredSuperTypes; - } - - private boolean containsSubType(Collection proximalPrimitiveSuperTypes, SnomedConceptDocument conceptToTest) { - Collection conceptSubTypes = getAllSubTypes(conceptToTest.getId()); - for (SnomedConceptDocument conceptMini : proximalPrimitiveSuperTypes) { - if (conceptSubTypes.contains(conceptMini)) { - return true; - } - } - - return false; - } - - - private Collection getAllSubTypes(String id) { - return SnomedRequests.prepareSearchConcept() - .all() - .filterByAncestor(id) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, branch) - .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .then(SnomedConcepts.TO_DOCS) - .getSync(); - } - - - private Set getProximatePrimitiveSuperTypes(SnomedConcept concept) { - Set proximatePrimitiveSuperTypes = new HashSet(); - - if (concept.getDefinitionStatus().isPrimitive()) { - proximatePrimitiveSuperTypes.add(SnomedConceptDocument.builder(concept).build()); - return proximatePrimitiveSuperTypes; - } - - final SnomedRelationships outboundRelationships = SnomedRequests.prepareSearchRelationship() - .all() - .filterByActive(true) - .filterByType(Concepts.IS_A) - .filterBySource(concept.getId()) - .setExpand("destinationConcept()") - .build(SnomedDatastoreActivator.REPOSITORY_UUID, branch) - .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .getSync(); - for (SnomedRelationship relationship : outboundRelationships) { - proximatePrimitiveSuperTypes.addAll(getProximatePrimitiveSuperTypes(relationship.getDestination())); - } - return filterSuperTypesToProximate(proximatePrimitiveSuperTypes); - } - - private Set filterSuperTypesToProximate(Set superTypes) { - Set filteredProximateSuperTypes = new HashSet(); - - for (SnomedConceptDocument superType : superTypes) { - // System.out.println("****** Processing super type: " + terminologyBrowser.getConceptMini(superType) + " ******"); - if (filteredProximateSuperTypes.isEmpty()) { - // System.out.println("Added: " + terminologyBrowser.getConceptMini(superType)); - filteredProximateSuperTypes.add(superType); - } else { - // remove types from proximateSuperTypes, if there is a more specific type among the superTypes - boolean toBeAdded = false; - Set removedProximateSuperTypes = new HashSet(); - for (SnomedConceptDocument proximateSuperType : filteredProximateSuperTypes) { - /* - * If the super type is a super type of a type already in the proximate super type set, then - * it shouldn't be added, no further checks necessary. - */ - if (isSuperTypeOf(superType, proximateSuperType)) { - toBeAdded = false; - break; - } - - /* - * Remove super type and add more specific type. In case of multiple super types we get here several times, - * but since we are using Set, adding the same concept multiple times is not an issue. - */ - if (isSuperTypeOf(proximateSuperType, superType)) { - removedProximateSuperTypes.add(proximateSuperType); - } - - toBeAdded = true; - } - - // process differences - // System.out.println("Removed: " + getConceptMinisForIntegerIds(removedProximateSuperTypes)); - filteredProximateSuperTypes.removeAll(removedProximateSuperTypes); - if (toBeAdded) { - // System.out.println("Added: " + terminologyBrowser.getConceptMini(superType)); - filteredProximateSuperTypes.add(superType); - } - } - } - - return filteredProximateSuperTypes; - } - - private boolean isSuperTypeOf(SnomedConceptDocument superType, SnomedConceptDocument subType) { - return SnomedRequests.prepareSearchConcept() - .setLimit(0) - .filterByAncestor(superType.getId()) - .filterById(subType.getId()) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, branch) - .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .getSync().getTotal() > 0; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/RefinementsMerger.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/RefinementsMerger.java deleted file mode 100644 index a8de940d5e4..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/RefinementsMerger.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform; - -import java.util.HashMap; -import java.util.Map; - -import com.b2international.snowowl.semanticengine.simpleast.subsumption.SubsumptionTester; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastFactory; - -/** - * 5.3.5 Merge refinement
      - * The normalized expression refinement from the "Normalize attribute values in refinement" process (5.3.2) - * is merged with the combined definition from the "Merge definitions" process (5.3.4).
      - * The rules for this process are the same as those for merging definitions (see 5.3.4) with the following additions.

      - * 5.3.5.1 Normalization of laterality
      - * If an attribute representing a value for "laterality" (272741003) is present in the refinement and is applied to - * a focus concept that is not subsumed by "body structure" (123037004), the laterality attribute should be applied - * to any and every lateralizable "body structure" specified in the resulting refinement.

      - * 5.3.5.2 Normalization of non-context attributes applied in a context wrapper
      - * If the focus concept is subsumed by "context-dependent categories" (364629017) and any attributes other than - * valid context attributes* are present in the refinement, these attributes are applied as additional refinement - * of the value of the "associated finding" (246090004) or "associated procedure" (363589002) attribute.

      - * 5.3.5.3 Completion of the definition merging
      - * Once the refinement has been merged the resulting final refinement is passed to the "Create expression" process (5.3.6).

      - * - * * The only valid context attributes are:
      - * "associated finding" (246090004), "associated procedure" (363589002), "finding context" (2470590016), - * "procedure context" (2470591017), "temporal context" (2470592012) and "subject relationship context" (2470593019).
      - * - */ -public class RefinementsMerger { - - private final String branch; - - public RefinementsMerger(final String branch) { - this.branch = branch; - } - - /** - * @param normalizedFocusConcepts - * @param normalizedExpressionRefinements - * @return the merged refinements - */ - public ConceptDefinition mergeRefinements(FocusConceptNormalizationResult normalizedFocusConcepts, ConceptDefinition normalizedExpressionRefinements) { - ConceptDefinitionMerger conceptDefinitionMerger = new ConceptDefinitionMerger(new SubsumptionTester(branch)); - Map conceptDefinitionMap = new HashMap(); - // TODO: get rid of dummy concepts - conceptDefinitionMap.put(ecoreastFactory.eINSTANCE.createConceptRef(), normalizedFocusConcepts.mergedConceptDefinition); - conceptDefinitionMap.put(ecoreastFactory.eINSTANCE.createConceptRef(), normalizedExpressionRefinements); - ConceptDefinition mergedDefinitions = conceptDefinitionMerger.mergeDefinitions(conceptDefinitionMap); - return mergedDefinitions; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/SimpleAstExpressionNormalFormGenerator.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/SimpleAstExpressionNormalFormGenerator.java deleted file mode 100644 index fe5efd4aa57..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/SimpleAstExpressionNormalFormGenerator.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform; - -import java.util.Collection; -import java.util.List; - -import com.b2international.snowowl.semanticengine.simpleast.utils.QueryAstUtils; -import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.google.common.collect.Lists; - -/** - * Generates the normal form of an arbitrary ESCG expression. - * - */ -public class SimpleAstExpressionNormalFormGenerator { - - private final String branch; - - public SimpleAstExpressionNormalFormGenerator(String branch) { - this.branch = branch; - } - - /** - * @return the original expression in long normal form - */ - public RValue getLongNormalForm(RValue originalExpression) { - // expression focus concepts - Collection focusConcepts = QueryAstUtils.getFocusConcepts(originalExpression); - FocusConceptNormalizer focusConceptNormalizer = new FocusConceptNormalizer(branch); - FocusConceptNormalizationResult normalizedFocusConcepts = focusConceptNormalizer.normalizeFocusConcepts(focusConcepts); - - // expression refinements - List ungroupedExpressionAttributes = QueryAstUtils.getUngroupedAttributes(originalExpression); - List attributeGroups = QueryAstUtils.getAttributeGroups(originalExpression); - List expressionAttributeClauseLists = Lists.newArrayList(); - for (AttributeClauseGroup attributeClauseGroup : attributeGroups) { - AttributeClauseList attributeClauseList = new AttributeClauseList(); - List attributes = QueryAstUtils.getUngroupedAttributes(attributeClauseGroup.getValue()); - attributeClauseList.getAttributeClauses().addAll(attributes); - expressionAttributeClauseLists.add(attributeClauseList); - } - - AttributeNormalizer attributeNormalizer = new AttributeNormalizer(branch); - ConceptDefinition normalizedExpressionRefinements = attributeNormalizer.normalizeAttributes(expressionAttributeClauseLists, - ungroupedExpressionAttributes); - - // merge refinements - RefinementsMerger refinementsMerger = new RefinementsMerger(branch); - ConceptDefinition mergedRefinements = refinementsMerger.mergeRefinements(normalizedFocusConcepts, normalizedExpressionRefinements); - - // create expression - List focusConceptIds = Lists.newArrayList(); - for (SnomedConceptDocument conceptMini : normalizedFocusConcepts.filteredPrimitiveSuperTypes) { - focusConceptIds.add(conceptMini.getId()); - } - return QueryAstUtils.buildExpression(focusConceptIds, - mergedRefinements.getAttributeClauseLists(), - mergedRefinements.getUngroupedAttributes()); - } - - /** - * @return the original expression in short normal form - */ - public RValue getShortNormalForm(RValue originalExpression) { - throw new UnsupportedOperationException("Not implemented yet."); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/UngroupedAttributesMerger.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/UngroupedAttributesMerger.java deleted file mode 100644 index 50597a2c1bd..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/normalform/UngroupedAttributesMerger.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.normalform; - -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.b2international.snowowl.semanticengine.simpleast.subsumption.SubsumptionTester; -import com.b2international.snowowl.semanticengine.simpleast.utils.QueryAstUtils; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; - -/** - * 5.3.4.4 Merging ungrouped attributes
      - *
      • - * If an ungrouped attribute in one definition is name-matched by a grouped attribute in the other definition, - * this attribute is merged according to the following rules:
      • - *
        • - * If the value of the ungrouped attribute subsumes value of the name-matched grouped attribute - *
          • omit the ungrouped attribute from the target definition
          - *
        • If the value of the grouped attribute subsumes the value of the name-matched grouped attribute - *
          • - * add the ungrouped attribute to the group containing the matching grouped attribute in the target definition
          • - *
          • if this condition is met by multiple groups, add the ungrouped attribute to all groups that meet this condition
          • - *
          - *
        • If the value of the name-matched grouped and ungrouped attributes are disjoint
        • - *
          • add the ungrouped attribute as an ungrouped attribute in the target expression.
        - *
      • If an ungrouped attribute is name-matched with an ungrouped attribute in the other definition - * this attribute is merged according to the following rules: - *
        • - * If the value of one of the name-matched attributes subsumes the other value
        • - *
          • - * include the attribute with the most specific value (not grouped)
          • - *
          • omit the attributed with the less specific value
          - *
        • If the value of the name-matched attributes are identical
        • - *
          • Include one and omit the other
          - *
        • If neither of the two preceding conditions apply
        • - *
          • - * include both attributes (not grouped)
        - *
      • If an attribute is ungrouped in one expression and there is no name-matched attribute in the - * other definition - *
        • include the attribute (not grouped).
      - * - */ -public class UngroupedAttributesMerger { - - private final SubsumptionTester subsumptionTester; - - /** - * Class constructor. - * - * @param subsumptionTester the {@link SubsumptionTester} to use - */ - public UngroupedAttributesMerger(SubsumptionTester subsumptionTester) { - this.subsumptionTester = subsumptionTester; - } - - /** - * Because of the interdependencies with {@link AttributeClauseListMerger}, this method modifies - * the {@link ConceptDefinition} specified in the constructor as a side effect. - * - * @param conceptDefinitions the original concept definitions to be merged - * @see UngroupedAttributesMerger#UngroupedAttributesMerger(SubsumptionTester, ConceptDefinition) - */ - public void mergeUngroupedAttributes(Map conceptDefinitionMap, ConceptDefinition mergedConceptDefinition) { - // handle case when there is only one concept - if (conceptDefinitionMap.size() == 1) { - ConceptDefinition conceptDefinition = conceptDefinitionMap.values().iterator().next(); - mergedConceptDefinition.getUngroupedAttributes().addAll(conceptDefinition.getUngroupedAttributes()); - return; - } - - Set ungroupedAttributeSet = new HashSet(); - Set processedAttributes = new HashSet(); - - for (Entry outerConceptMapEntry : conceptDefinitionMap.entrySet()) { - ConceptDefinition outerConceptDefinition = outerConceptMapEntry.getValue(); - Set nonNameMatchedAttributes = new HashSet(); - Set attributesToOmitFromMergedUngroupedAttributes = new HashSet(); - - for (AttributeClause outerUngroupedAttribute : outerConceptDefinition.getUngroupedAttributes()) { - if (processedAttributes.contains(outerUngroupedAttribute)) - continue; - Collection nameMatchedAttributes = QueryAstUtils.findNameMatchedAttributesInConceptDefinitons( - outerUngroupedAttribute, filterConceptDefinitionMap(conceptDefinitionMap, outerConceptMapEntry.getKey()).values()); - - // If an ungrouped attribute in one definition is name-matched by a grouped attribute in the other definition - Collection groupedAttributeNameMatches = QueryAstUtils.getGroupedAttributeNameMatches(nameMatchedAttributes); - for (AttributeNameMatch groupedAttributeNameMatch : groupedAttributeNameMatches) { - AttributeClause groupedNameMatchedAttribute = groupedAttributeNameMatch.getAttribute(); - if (processedAttributes.contains(groupedNameMatchedAttribute)) - continue; - - /* If the value of the ungrouped attribute subsumes value of the name-matched grouped attribute - * omit the ungrouped attribute from the target definition */ - if (subsumptionTester.isSubsumed(outerUngroupedAttribute, groupedNameMatchedAttribute)) { - attributesToOmitFromMergedUngroupedAttributes.add(outerUngroupedAttribute); - processedAttributes.add(outerUngroupedAttribute); - } - /* If the value of the grouped attribute subsumes the value of the name-matched grouped attribute - * add the ungrouped attribute to the group containing the matching grouped attribute in the target definition - * if this condition is met by multiple groups - * add the ungrouped attribute to all groups that meet this condition */ - else if (subsumptionTester.isSubsumed(groupedNameMatchedAttribute, outerUngroupedAttribute)) { - AttributeClauseList attributeGroup = groupedAttributeNameMatch.getGroup(); - List groupedAttributes = attributeGroup.getAttributeClauses(); - - /* - * find attribute group in mergedConceptDefinition - * if found - * add outerUngorupedAttribute to this group - * else - * find groupedNameMatchedAttribute in group - * if found - * add outerUngorupedAttribute to this group - */ - for (AttributeClauseList mergedAttributeClauseGroup : mergedConceptDefinition.getAttributeClauseLists()) { - if (mergedAttributeClauseGroup == attributeGroup) { - groupedAttributes.add(outerUngroupedAttribute); - break; - } else { - // TODO: add test case for this branch - for (AttributeClause mergedGroupedAttribute : groupedAttributes) { - if (mergedGroupedAttribute == groupedNameMatchedAttribute) { - mergedAttributeClauseGroup.getAttributeClauses().add(outerUngroupedAttribute); - break; - } - } - } - } - - attributesToOmitFromMergedUngroupedAttributes.add(outerUngroupedAttribute); - processedAttributes.add(outerUngroupedAttribute); - } - /* If the value of the name-matched grouped and ungrouped attributes are disjoint - * add the ungrouped attribute as an ungrouped attribute in the target expression. */ - else { - ungroupedAttributeSet.add(outerUngroupedAttribute); - processedAttributes.add(outerUngroupedAttribute); - } - - processedAttributes.add(groupedNameMatchedAttribute); - } - - // If an ungrouped attribute is name-matched with an ungrouped attribute in the other definition - Collection ungroupedAttributeNameMatches = QueryAstUtils.getUngroupedAttributeNameMatches(nameMatchedAttributes); - for (AttributeNameMatch ungroupedAttributeNameMatch : ungroupedAttributeNameMatches) { - AttributeClause ungroupedNameMatchedAttribute = ungroupedAttributeNameMatch.getAttribute(); - if (processedAttributes.contains(ungroupedNameMatchedAttribute)) - continue; - - /* If the value of one of the name-matched attributes subsumes the other value - * include the attribute with the most specific value (not grouped) - * omit the attributed with the less specific value - * If the value of the name-matched attributes are identical - * include one and omit the other - * TODO: is this really handled by the two ifs? */ - boolean nameMatchedSubsumesUngrouped = subsumptionTester.isSubsumed(ungroupedNameMatchedAttribute, outerUngroupedAttribute); - boolean ungroupedSubsumesNameMatched = subsumptionTester.isSubsumed(outerUngroupedAttribute, ungroupedNameMatchedAttribute); - if (nameMatchedSubsumesUngrouped) { - ungroupedAttributeSet.add(outerUngroupedAttribute); - attributesToOmitFromMergedUngroupedAttributes.add(ungroupedNameMatchedAttribute); - } else if (ungroupedSubsumesNameMatched) { - ungroupedAttributeSet.add(ungroupedNameMatchedAttribute); - attributesToOmitFromMergedUngroupedAttributes.add(outerUngroupedAttribute); - processedAttributes.add(ungroupedNameMatchedAttribute); - } - /* If neither of the two preceding conditions apply - * include both attributes (not grouped) */ - else { - ungroupedAttributeSet.add(outerUngroupedAttribute); - ungroupedAttributeSet.add(ungroupedNameMatchedAttribute); - } - - processedAttributes.add(ungroupedNameMatchedAttribute); - } - - /* If an attribute is ungrouped in one expression and there is no name-matched attribute in the other definition - * include the attribute (not grouped). - */ - nonNameMatchedAttributes.add(outerUngroupedAttribute); - processedAttributes.add(outerUngroupedAttribute); // ??? - } - - // only add those non-matched attributes which we don't explicitly want to omit - for (AttributeClause nonNameMatchedAttribute : nonNameMatchedAttributes) { - if (!attributesToOmitFromMergedUngroupedAttributes.contains(nonNameMatchedAttribute)) - ungroupedAttributeSet.add(nonNameMatchedAttribute); - } - - } - - mergedConceptDefinition.getUngroupedAttributes().addAll(ungroupedAttributeSet); - } - - private Map filterConceptDefinitionMap(Map originalMap, ConceptRef concept) { - Map filteredMap = new HashMap(originalMap); - filteredMap.remove(concept); - return filteredMap; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/subsumption/SubsumptionTester.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/subsumption/SubsumptionTester.java deleted file mode 100644 index 0df8e07b7c9..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/subsumption/SubsumptionTester.java +++ /dev/null @@ -1,560 +0,0 @@ -/* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.subsumption; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import com.b2international.snowowl.core.ApplicationContext; -import com.b2international.snowowl.eventbus.IEventBus; -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeClauseList; -import com.b2international.snowowl.semanticengine.simpleast.utils.QueryAstUtils; -import com.b2international.snowowl.snomed.core.domain.SnomedConcept; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationships; -import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; -import com.b2international.snowowl.snomed.datastore.index.SnomedHierarchy; -import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; -import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.google.common.base.Strings; -import com.google.common.collect.Lists; - -/** - * Implementation of the subsumption testing rules described in the document - * SNOMED CT Transforming Expressions to Normal Forms. Method Javadocs contain - * excerpts from the above document. - * - */ -public class SubsumptionTester { - - private static final String CONCEPT_ID_FINDING_CONTEXT = "408729009"; - private static final String CONCEPT_ID_KNOWN_ABSENT = "410516002"; - private static final String CONCEPT_ID_DEFINITELY_NOT_PRESENT = "410594000"; - private static final String CONCEPT_ID_TEMPORAL_CONTEXT = "408731000"; - private static final String CONCEPT_ID_ASSOCIATED_FINDING = "246090004"; - private static final String CONCEPT_ID_SUBJECT_RELATIONSHIP_CONTEXT = "408732007"; - private static final String CONCEPT_ID_SAME_AS = "168666000"; - private static final String CONCEPT_ID_REPLACED_BY = "370124000"; - - private final String branch; - - public SubsumptionTester(String branch) { - this.branch = branch; - } - - /** - * The following steps are applied to test if a normalized-predicate subsumes a normalized-candidate. - * This assumes that these normal form expressions have been generated in accordance with 6.3.1. - *
        - *
      1. Test that each focus concept referenced in the normalized-predicate subsumes at least - * one focus concept in the normalized-candidate.
        - *
          - *
        • If not, the normalized-predicate does not subsume the normalized-candidate. No further testing is required.
        • - * Exit with result false.
          - *
        • The approach to testing concept subsumption is described in section 6.3.5
        • - *
        - *
      2. - *
      3. Test that each attribute group in the normalized-predicate subsumes at least one - * attribute group in the normalized-candidate. - *
          - *
        • If not, the normalized-predicate does not subsume the normalized-candidate. No further testing is required.
        • - * Exit with result false. - *
        • The approach to testing attribute group subsumption is described in section 6.3.3
        • - *
        - *
      4. - *
      5. Test that each ungrouped attribute in the normalized-predicate subsumes at least one - * attribute (either grouped or ungrouped) in the normalized-candidate. - *
          - *
        • If not, the normalized-predicate does not subsume the normalized-candidate.
        • - * Exit with result false. - *
        • The approach to testing attribute subsumption is described in section 6.3.4
        • - *
        - *
      6. If all these tests succeed, the normalized-predicate subsumes the normalized-candidate. - *
      - * - * @param predicateRoot the predicate Expression in short normal form - * @param candidateRoot the candidate Expression in long normal form - * @return - */ - public boolean isSubsumed(RValue predicateRoot, RValue candidateRoot) { - // focus concepts - Collection predicateFocusConcepts = QueryAstUtils.getFocusConcepts(predicateRoot); - Collection candidateFocusConcepts = QueryAstUtils.getFocusConcepts(candidateRoot); - for (ConceptRef predicateFocusConcept : predicateFocusConcepts) { - // check if it subsumes at least one candidate focus concept - boolean subsumed = false; - for (ConceptRef candidateFocusConcept : candidateFocusConcepts) { - subsumed = isSubsumed(predicateFocusConcept, candidateFocusConcept); - if (subsumed) - break; - } - if (!subsumed) - return false; - } - - // attribute groups - List predicateUngroupedAttributes = QueryAstUtils.getUngroupedAttributes(predicateRoot); - List predicateAttributeLists = getAttributeLists(predicateRoot); - List candidateUngroupedAttributes = QueryAstUtils.getUngroupedAttributes(candidateRoot); - List candidateAttributeLists = getAttributeLists(candidateRoot); - - for (AttributeClauseList predicateAttributeGroup : predicateAttributeLists) { - // check if it subsumes at least one candidate attribute group - boolean subsumed = false; - for (AttributeClauseList candidateAttributeGroup : candidateAttributeLists) { - subsumed = isSubsumed(predicateAttributeGroup, candidateAttributeGroup); - if (subsumed) - break; - } - if (!subsumed) - return false; - } - - // ungrouped attributes - List groupedCandidateAttributes = new ArrayList(); - for (AttributeClauseList candidateAttributeGroup : candidateAttributeLists) { - List attributes = candidateAttributeGroup.getAttributeClauses(); - groupedCandidateAttributes.addAll(attributes); - } - - List allCandidateAttributes = new ArrayList(candidateUngroupedAttributes); - allCandidateAttributes.addAll(groupedCandidateAttributes); - - for (AttributeClause ungroupedPredicateAttribute : predicateUngroupedAttributes) { - // Test that each ungrouped attribute in the normalized-predicate subsumes at least one - // attribute (either grouped or ungrouped) in the normalized-candidate. - boolean subsumed = false; - for (AttributeClause candidateAttribute : allCandidateAttributes) { - subsumed = isSubsumed(ungroupedPredicateAttribute, candidateAttribute); - if (subsumed) - break; - } - if (!subsumed) - return false; - } - - return true; - } - - private List getAttributeLists(RValue predicateRoot) { - List predicateAttributeGroups = QueryAstUtils.getAttributeGroups(predicateRoot); - List predicateAttributeLists = Lists.newArrayList(); - for (AttributeClauseGroup attributeClauseGroup : predicateAttributeGroups) { - AttributeClauseList attributeClauseList = new AttributeClauseList(); - List attributes = QueryAstUtils.getUngroupedAttributes(attributeClauseGroup.getValue()); - attributeClauseList.getAttributeClauses().addAll(attributes); - predicateAttributeLists.add(attributeClauseList); - } - return predicateAttributeLists; - } - - /** - * The following steps test if a predicate-concept subsumes a candidate-concept. - *
        - *
      1. Test if candidate-concept is an inactive concept
      2. - *
          - *
        • candidate-concept.conceptStatus NOT IN (0, 6, 11)
        • - * If the candidate-concept is inactive then look for an active concept - * related by a historical relationship "SAME AS" or "REPLACED BY" and - * treat this as the candidate-concept in subsequent steps. - *
        - *
      3. Test if the candidate-concept is identical to the predicate-concept. - *
          - *
        • If candidate-concept.conceptId == predicate-concept.conceptId - * the concepts are identical.
        • - * Exit with result true (accept equivalent) - *
        - *
      4. Test if the predicate-concept is one of the supertype ancestors of the candidate-concept. - *
          - *
        • This is true if a sequence of "is a" relationships leads from the candidate-concept - * (as source conceptId1) to the predicate-concept (as the target conceptId2).
        • - * Exit returning the result of this test - *
        • Various approaches to optimization of this test are described in the - * SNOMED CT Technical Implementation Guide. The recommended approach using - * a "transitive closure table" is summarized in Section 7.
        • - *
        - *
      - * - * @param predicate the predicate {@link Concept} - * @param candidate the candidate {@link Concept} - * @return - */ - public boolean isSubsumed(ConceptRef predicate, ConceptRef candidate) { - return isSubsumed(predicate.getConceptId(), candidate.getConceptId()); - } - - public boolean isSubsumed(String predicate, String candidate) { - final SnomedConcept predicateConceptMini = getConcept(predicate); - final SnomedConcept candidateConceptMini = getConcept(candidate); - return isSubsumed(predicateConceptMini, candidateConceptMini); - } - - private SnomedConcept getConcept(String conceptId) { - return SnomedRequests.prepareGetConcept(conceptId).build(SnomedDatastoreActivator.REPOSITORY_UUID, branch).execute(getBus()).getSync(); - } - - /** - * The following steps test if a predicate-concept subsumes a candidate-concept. - *
        - *
      1. Test if candidate-concept is an inactive concept
      2. - *
          - *
        • candidate-concept.conceptStatus NOT IN (0, 6, 11)
        • - * If the candidate-concept is inactive then look for an active concept - * related by a historical relationship "SAME AS" or "REPLACED BY" and - * treat this as the candidate-concept in subsequent steps. - *
        - *
      3. Test if the candidate-concept is identical to the predicate-concept. - *
          - *
        • If candidate-concept.conceptId == predicate-concept.conceptId - * the concepts are identical.
        • - * Exit with result true (accept equivalent) - *
        - *
      4. Test if the predicate-concept is one of the supertype ancestors of the candidate-concept. - *
          - *
        • This is true if a sequence of "is a" relationships leads from the candidate-concept - * (as source conceptId1) to the predicate-concept (as the target conceptId2).
        • - * Exit returning the result of this test - *
        • Various approaches to optimization of this test are described in the - * SNOMED CT Technical Implementation Guide. The recommended approach using - * a "transitive closure table" is summarized in Section 7.
        • - *
        - *
      - * - * @param predicate the predicate {@link SnomedConcept} - * @param candidate the candidate {@link SnomedConcept} - * @return - */ - public boolean isSubsumed(SnomedConcept predicate, SnomedConcept candidate) { - final String candidateId; - if (candidate.isActive()) { - candidateId = candidate.getId(); - } else { - String replacementConceptId = null; - - final SnomedRelationships outboundRelationships = SnomedRequests.prepareSearchRelationship() - .all() - .filterByActive(true) - .filterBySource(candidate.getId()) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, branch) - .execute(getBus()) - .getSync(); - - for (SnomedRelationship relationship : outboundRelationships) { - if (relationship.getTypeId().equals(CONCEPT_ID_SAME_AS) || relationship.getTypeId().equals(CONCEPT_ID_REPLACED_BY)) { - replacementConceptId = relationship.getDestinationId(); - break; - } - } - - candidateId = replacementConceptId; - } - - // if no replacement concept found, the candidate is not considered subsumed - if (Strings.isNullOrEmpty(candidateId)) { - return false; - } - - if (predicate.getId().equals(candidateId)) { - return true; - } - - return SnomedRequests.prepareSearchConcept() - .setLimit(0) - .filterByAncestor(predicate.getId()) - .filterById(candidateId) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, branch) - .execute(getBus()) - .getSync().getTotal() > 0; - } - - private IEventBus getBus() { - return ApplicationContext.getServiceForClass(IEventBus.class); - } - - /** - * The following steps test if a predicate-concept subsumes a candidate-concept. - *
        - *
      1. Test if candidate-concept is an inactive concept
      2. - *
          - *
        • candidate-concept.conceptStatus NOT IN (0, 6, 11)
        • - * If the candidate-concept is inactive then look for an active concept - * related by a historical relationship "SAME AS" or "REPLACED BY" and - * treat this as the candidate-concept in subsequent steps. - *
        - *
      3. Test if the candidate-concept is identical to the predicate-concept. - *
          - *
        • If candidate-concept.conceptId == predicate-concept.conceptId - * the concepts are identical.
        • - * Exit with result true (accept equivalent) - *
        - *
      4. Test if the predicate-concept is one of the supertype ancestors of the candidate-concept. - *
          - *
        • This is true if a sequence of "is a" relationships leads from the candidate-concept - * (as source conceptId1) to the predicate-concept (as the target conceptId2).
        • - * Exit returning the result of this test - *
        • Various approaches to optimization of this test are described in the - * SNOMED CT Technical Implementation Guide. The recommended approach using - * a "transitive closure table" is summarized in Section 7.
        • - *
        - *
      - * - * @param predicateId the predicate {@link SnomedConceptDocument} - * @param candidateId the candidate {@link SnomedConceptDocument} - * @param hierarchy represents the hierarchy between the active concepts - * @return - */ - public boolean isSubsumed(final long predicateId, final long candidateId, final SnomedHierarchy hierarchy) { - - long candidateIdCopy = candidateId; - - if (!hierarchy.isActive(candidateId)) { - - long replacementConceptId = -1L; - - // FIXME follow historical association members if the concept is inactive -// final SnomedRelationshipReplacedByOrSameAsQueryAdapter adapter = new SnomedRelationshipReplacedByOrSameAsQueryAdapter(candidateId); -// -// final Collection entires = ApplicationContext.getInstance().getService(SnomedClientIndexService.class).search(adapter, 1); -// -// if (!CompareUtils.isEmpty(entires)) { -// -// final SnomedRelationshipIndexEntry entry = entires.iterator().next(); -// replacementConceptId = Long.parseLong(entry.getValueId()); -// candidateIdCopy = replacementConceptId; -// -// } - - // if no replacement concept found, the candidate is not considered subsumed - if (-1L == replacementConceptId) { - - return false; - - } - - } - - if (predicateId == candidateIdCopy) { - - return true; - - } - - return hierarchy.getAllSuperTypeIds(candidateIdCopy).contains(predicateId); - - } - - - /** - * The following steps test if a predicate-attribute-group subsumes candidate-attribute-group. - *
        - *
      1. Check the predicate-attribute-group for the presence of the attribute: "finding context" (408729009).
      2. - *
          - *
        • If the group does not contain this attribute, apply the normal attribute group tests specified in section 6.3.3.1.
        • - *
        - *
      3. If the predicate-attribute-group contains the "finding context" (408729009) attribute, check whether its value is one of - * the following: "known absent" (410516002) or "definitely not present" (410594000).
      4. - *
          - *
        • If the attribute exists and has one of these values, apply the tests for a context attribute group with absent finding, - * as specified in section 6.3.3.2.
        • - *
        • If the attribute exists and has any other value, apply the tests for a normal attribute group, as specified in section 6.3.3.1.
        • - *
        - *
      - * @param predicate the predicate {@link AttributeGroup} - * @param candidate the candidate {@link AttributeGroup} - * @return - */ - public boolean isSubsumed(AttributeClauseList predicate, AttributeClauseList candidate) { - for (AttributeClause predicateAttribute : predicate.getAttributeClauses()) { - ConceptRef predicateNameConcept = (ConceptRef) predicateAttribute.getLeft(); - if (!predicateNameConcept.getConceptId().equals(CONCEPT_ID_FINDING_CONTEXT)) - continue; - - RValue predicateValue = predicateAttribute.getRight(); - if (predicateValue instanceof ConceptRef) { - ConceptRef predicateValueConceptGroup = (ConceptRef) predicateValue; - if (predicateValueConceptGroup.getConceptId().equals(CONCEPT_ID_KNOWN_ABSENT) || predicateValueConceptGroup.getConceptId().equals(CONCEPT_ID_DEFINITELY_NOT_PRESENT)) - return contextAttributeGroupWithAbsentFindingSubsumptionTest(predicate, candidate); - } - } - - return normalAttributeGroupSubsumptionTest(predicate, candidate); - } - - /** - * The following step tests most attribute groups. However, a modified approach (see 6.3.3.2) is required - * in the case of attribute groups that indicate the absence of a finding. - *
        - *
      1. Test that each attribute in the predicate-attribute-group subsumes at least one attribute in the candidate-attribute-group.
      2. - *
          - *
        • If not, the predicate-attribute-group does not subsume the candidate-attribute-group.
        • - * Exit with result false. - *
        • The approach to testing attribute subsumption is described in section 6.3.4 2. - *
        - *
      3. If all attributes in the group pass this test then the predicate-attribute-group subsumes - * the candidate-attribute-group.
      4. - * Exit with result true. - *
      - */ - private boolean normalAttributeGroupSubsumptionTest(AttributeClauseList predicate, AttributeClauseList candidate) { - List predicateAttributes = predicate.getAttributeClauses(); - List candidateAttributes = candidate.getAttributeClauses(); - - for (AttributeClause predicateAttribute : predicateAttributes) { - boolean subsumed = false; - for (AttributeClause candidateAttribute : candidateAttributes) { - subsumed = isSubsumed(predicateAttribute, candidateAttribute); - if (subsumed) - break; - } - if (!subsumed) - return false; - } - - return true; - } - - /** - * The following steps test most attribute groups that indicate the absence of a finding. - * This approach differs from the general tests applicable to other attribute groups because of - * the way in which assertions of absence affect the direction of subsumption. - * This is discussed in detail in Annex A. - *
        - *
      1. Attempt to match each attribute in the predicate-attribute-group with an attribute which has - * the same name in the candidate-attribute-group. - *
          - *
        • If any attribute in the predicate-attribute-group is not matched by an attribute - * with same name in the candidate-attribute-group, the predicate-attribute-group - * does not subsume the candidate-attribute-group.
        • - * Exit with result false. - *
        - *
      2. - *
      3. For each of the matched attributes identified in the previous step, compare the value - * of the attribute in the predicate-attribute-group with the value of the same attribute - * in the candidate-attribute-group. - *
          - *
        • If the attribute name is "finding context" (408729009) or "temporal context" (408731000), - * the candidate-value must be equivalent to or subsumed by the predicate-value.
        • - *
        • However, if the attribute name is "associated finding" (246090004) or - * "subject relationship context" (408732007), the direction of the test is inverted. - * In these cases, the predicate-value must be equivalent to or subsumed by the candidate-value.
        • - *
        • If any of these tests fail, the predicate-attribute-group does not subsume the candidate-attribute-group.
        • - * Exit with result false. - *
        • Attribute values are expressions and are tested in the same way as any other - * expression (see 6.2 and 6.3).
        • - * Expression subsumption testing is recursive where expressions include nested qualifiers. - *
        - *
      4. - *
      5. If all the tests above are successful, the predicate-attribute-group subsumes the candidate-attribute-group.
      6. - * Exit with result true. - * - * @param predicate - * @param candidate - * @return - */ - private boolean contextAttributeGroupWithAbsentFindingSubsumptionTest(AttributeClauseList predicate, AttributeClauseList candidate) { - List predicateAttributes = predicate.getAttributeClauses(); - List candidateAttributes = candidate.getAttributeClauses(); - - for (AttributeClause predicateAttribute : predicateAttributes) { - boolean subsumed = false; - ConceptRef predicateNameConcept = QueryAstUtils.getAttributeNameConcept(predicateAttribute); - - for (AttributeClause candidateAttribute : candidateAttributes) { - ConceptRef candidateNameConcept = QueryAstUtils.getAttributeNameConcept(candidateAttribute); - if (candidateNameConcept.getConceptId().equals(predicateNameConcept.getConceptId())) { - if (candidateNameConcept.getConceptId().equals(CONCEPT_ID_FINDING_CONTEXT) - || candidateNameConcept.getConceptId().equals(CONCEPT_ID_TEMPORAL_CONTEXT)) { - subsumed = isSubsumed(QueryAstUtils.getAttributeValueExpression(predicateAttribute), - QueryAstUtils.getAttributeValueExpression(candidateAttribute)); - } else if (candidateNameConcept.getConceptId().equals(CONCEPT_ID_ASSOCIATED_FINDING) - || candidateNameConcept.getConceptId().equals(CONCEPT_ID_SUBJECT_RELATIONSHIP_CONTEXT)) { - subsumed = isSubsumed(QueryAstUtils.getAttributeValueExpression(candidateAttribute), - QueryAstUtils.getAttributeValueExpression(predicateAttribute)); - } - - if (subsumed) - break; - } - - } - - if (!subsumed) - return false; - } - - return true; - } - - /** - * The following steps test if a predicate-attribute subsumes a candidate-attribute. - *
          - *
        1. Test that the candidate attribute name is either the same as or subsumed by the - * predicate attribute name.
        2. - *
            - *
          • If not, the predicate-attribute does not subsume the candidate-attribute
          • - * Exit with result false. - *
          • The approach to testing concept subsumption is described in section 6.3.5
          • - *
          - *
        3. Test that the candidate-attribute value is equivalent to or subsumed by the - * predicate-attribute value. - *
            - *
          • If not, the predicate-attribute does not subsume the candidate-attribute
          • - * Exit with result false. - *
          • Attribute values are expressions and are tested in the same way as any - * other expression (see 6.2 and 6.3).
          • - * Expression subsumption testing is recursive where expressions include nested qualifiers. - *
          - *
        4. If both the above tests are successful, the predicate-attribute subsumes the - * candidate- attribute.
        5. - * Exit with result true. - *
        - * - * @param predicate the predicate {@link AttributeClause} - * @param candidate the candidate {@link AttributeClause} - * @return - */ - public boolean isSubsumed(AttributeClause predicate, AttributeClause candidate) { - // attribute names - com.b2international.snowowl.snomed.dsl.query.queryast.RValue predicateNameLValue = predicate.getLeft(); - if (!(predicateNameLValue instanceof ConceptRef)) - throw new UnsupportedOperationException("Attribute name '" + predicateNameLValue + "' is not supported."); - com.b2international.snowowl.snomed.dsl.query.queryast.RValue candidateNameLValue = candidate.getLeft(); - if (!(candidateNameLValue instanceof ConceptRef)) - throw new UnsupportedOperationException("Attribute name '" + candidateNameLValue + "' is not supported."); - - ConceptRef predicateNameConceptRef = (ConceptRef) predicateNameLValue; - ConceptRef candidateNameConceptRef = (ConceptRef) candidateNameLValue; - - - if (!isSubsumed(predicateNameConceptRef, candidateNameConceptRef)) - return false; - - // attribute values - RValue predicateValueExpressionRoot = QueryAstUtils.getAttributeValueExpression(predicate); - RValue candidateValueExpressionRoot = QueryAstUtils.getAttributeValueExpression(candidate); - - if (!isSubsumed(predicateValueExpressionRoot, candidateValueExpressionRoot)) - return false; - - return true; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/AttributeCollectionComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/AttributeCollectionComparator.java deleted file mode 100644 index ff8aaec3c9b..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/AttributeCollectionComparator.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.utils; - -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; - -/** - * {@link CollectionComparator} implementation to handle collections of {@link AttributeClause}s. - * - */ -public class AttributeCollectionComparator extends CollectionComparator { - - @Override - protected boolean itemsEqual(AttributeClause expected, AttributeClause actual) { - // TODO: handle single-concept expressions - return expected.toString().equals(actual.toString()); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/AttributeGroupCollectionComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/AttributeGroupCollectionComparator.java deleted file mode 100644 index dd8ac0d87ca..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/AttributeGroupCollectionComparator.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.utils; - -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeClauseList; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; - -/** - * {@link CollectionComparator} implementation to handle collections of {@link AttributeClause}s. - * - */ -public class AttributeGroupCollectionComparator extends CollectionComparator { - - @Override - protected boolean itemsEqual(AttributeClauseList expected, AttributeClauseList actual) { - return getItemDiff(expected, actual).isEmpty(); - } - - private CollectionComparator.CollectionDiff getItemDiff(AttributeClauseList expected, AttributeClauseList actual) { - AttributeCollectionComparator attributeListMatcher = new AttributeCollectionComparator(); - return attributeListMatcher.getDiff(expected.getAttributeClauses(), actual.getAttributeClauses()); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/CollectionComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/CollectionComparator.java deleted file mode 100644 index 4ac31ccf69f..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/CollectionComparator.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * - */ -package com.b2international.snowowl.semanticengine.simpleast.utils; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; - -/** - * Generic superclass of collection equality testers. - * Subclasses should implement {@link CollectionComparator#itemsEqual(T, T)}. - * - */ -public abstract class CollectionComparator { - - public static final class CollectionDiff { - private final Collection addedItems; - private final Collection removedItems; - - public CollectionDiff(Collection addedItems, Collection removedItems) { - this.addedItems = new ArrayList(addedItems); - this.removedItems = new ArrayList(removedItems); - } - - public Collection getAddedItems() { - return addedItems; - } - - public Collection getRemovedItems() { - return removedItems; - } - - public boolean isEmpty() { - return getAddedItems().isEmpty() && getRemovedItems().isEmpty(); - } - - @Override - public String toString() { - StringBuilder stringBuilder = new StringBuilder(); - - if (!getAddedItems().isEmpty()) { - stringBuilder.append("Added: "); - for (Iterator addedItemIterator = getAddedItems().iterator(); addedItemIterator.hasNext();) { - T item = addedItemIterator.next(); - stringBuilder.append(item.toString()); - if (addedItemIterator.hasNext()) - stringBuilder.append(','); - } - stringBuilder.append("; "); - } - - if (!getRemovedItems().isEmpty()) { - stringBuilder.append("Removed: "); - for (Iterator removedItemIterator = getRemovedItems().iterator(); removedItemIterator.hasNext();) { - T item = removedItemIterator.next(); - stringBuilder.append(item.toString()); - if (removedItemIterator.hasNext()) - stringBuilder.append(','); - } - } - - return stringBuilder.toString(); - } - } - - protected CollectionDiff diff = new CollectionDiff(new ArrayList(), new ArrayList()); - - public CollectionDiff getDiff(Collection expected, Collection actual) { - Collection addedItems = new ArrayList(); - Collection removedItems = new ArrayList(); - - for (T actualItem : actual) { - boolean found = false; - for (T expectedItem : expected) { - if (itemsEqual(expectedItem, actualItem)) { - found = true; - break; - } - } - - if (!found) - addedItems.add(actualItem); - } - - for (T expectedItem : expected) { - boolean found = false; - for (T actualItem : actual) { - if (itemsEqual(actualItem, expectedItem)) { - found = true; - break; - } - } - - if (!found) - removedItems.add(expectedItem); - } - - diff.getAddedItems().addAll(addedItems); - diff.getRemovedItems().addAll(removedItems); - return diff; - } - - /** - * @param expected - * @param actual - * @return true if the two collections are found to be equal, false otherwise - */ - public boolean equal(Collection expected, Collection actual) { - CollectionDiff collectionDiff = getDiff(expected, actual); - return collectionDiff.isEmpty(); - } - - /** - * @param expected - * @param actual - * @return true if the two objects are found to be equal, false otherwise - */ - abstract protected boolean itemsEqual(T expected, T actual); -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/ConceptDefinitionComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/ConceptDefinitionComparator.java deleted file mode 100644 index 1c694d09bfb..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/ConceptDefinitionComparator.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.utils; - -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeClauseList; -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.simpleast.utils.CollectionComparator.CollectionDiff; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; - -/** - * An {@link ObjectComparator} implementation to handle {@link ConceptDefinition}s. - * - */ -public class ConceptDefinitionComparator extends ObjectComparator { - - @Override - public boolean equal(ConceptDefinition expected, ConceptDefinition actual) { - AttributeGroupCollectionComparator attributeGroupCollectionComparator = new AttributeGroupCollectionComparator(); - CollectionDiff attributeGroupCollectionDiff = attributeGroupCollectionComparator.getDiff( - expected.getAttributeClauseLists(), actual.getAttributeClauseLists()); - - AttributeCollectionComparator attributeCollectionComparator = new AttributeCollectionComparator(); - CollectionDiff attributeCollectionDiff = attributeCollectionComparator.getDiff( - expected.getUngroupedAttributes(), actual.getUngroupedAttributes()); - - boolean equal = attributeCollectionDiff.isEmpty() && attributeGroupCollectionDiff.isEmpty(); - return equal; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/ExpressionComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/ExpressionComparator.java deleted file mode 100644 index 7d9f072ec78..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/ExpressionComparator.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.utils; - -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinition; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; - -/** - * An {@link ObjectComparator} implementation to handle {@link ConceptDefinition}s. - * - */ -public class ExpressionComparator extends ObjectComparator { - - @Override - public boolean equal(RValue expected, RValue actual) { - // TODO Auto-generated method stub -// LValueCollectionComparator lValueCollectionComparator = new LValueCollectionComparator(); -// boolean lValuesEqual = lValueCollectionComparator.equal(expected.getLValues(), actual.getLValues()); -// RefinementsComparator refinementsComparator = new RefinementsComparator(); -// boolean refinementsEqual = refinementsComparator.equal(expected.getRefinements(), actual.getRefinements()); -// return lValuesEqual && refinementsEqual; - - return expected.toString().equals(actual.toString()); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/QueryAstUtils.java b/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/QueryAstUtils.java deleted file mode 100644 index 8ecd0707cfd..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.simpleast/src/com/b2international/snowowl/semanticengine/simpleast/utils/QueryAstUtils.java +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.simpleast.utils; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.emf.ecore.util.EcoreUtil; - -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeClauseList; -import com.b2international.snowowl.semanticengine.simpleast.normalform.AttributeNameMatch; -import com.b2international.snowowl.semanticengine.simpleast.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.simpleast.subsumption.SubsumptionTester; -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.dsl.query.queryast.AndClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClause; -import com.b2international.snowowl.snomed.dsl.query.queryast.AttributeClauseGroup; -import com.b2international.snowowl.snomed.dsl.query.queryast.ConceptRef; -import com.b2international.snowowl.snomed.dsl.query.queryast.RValue; -import com.b2international.snowowl.snomed.dsl.query.queryast.SubExpression; -import com.b2international.snowowl.snomed.dsl.query.queryast.ecoreastFactory; -import com.google.common.base.Preconditions; -import com.google.common.collect.Lists; -import com.google.common.collect.Ordering; - -/** - * Collection of utility methods used by the {@link SubsumptionTester} and the {@link BasicExpressionNormalFormGenerator}. - * - */ -public final class QueryAstUtils { - - /* The only valid context attributes are:
        - * "associated finding" (246090004), "associated procedure" (363589002), "finding context" (2470590016), - * "procedure context" (2470591017), "temporal context" (2470592012) and "subject relationship context" (2470593019).*/ - private static final List VALID_CONTEXT_ATTRIBUTE_NAMES = Arrays.asList("246090004", "363589002", - "2470590016", "2470591017", "2470592012", "2470593019"); - - private QueryAstUtils() { } // suppress default constructor - - public static List getFocusConcepts(RValue expressionRoot) { - List focusConcepts = Lists.newArrayList(); - collectFocusConcepts(expressionRoot, focusConcepts); - return focusConcepts; - } - - public static List getAttributeGroups(RValue expressionRoot) { - List attributeGroups = Lists.newArrayList(); - collectAttributeGroups(expressionRoot, attributeGroups); - return attributeGroups; - } - - private static void collectAttributeGroups(RValue root, List attributeGroups) { - if (root instanceof AttributeClauseGroup) { - AttributeClauseGroup attributeGroup = (AttributeClauseGroup) root; - attributeGroups.add(attributeGroup); - } else if (root instanceof AndClause) { - AndClause rootAndClause = (AndClause) root; - collectAttributeGroups(rootAndClause.getLeft(), attributeGroups); - collectAttributeGroups(rootAndClause.getRight(), attributeGroups); - } else if (root instanceof SubExpression) { - SubExpression subExpression = (SubExpression) root; - collectAttributeGroups(subExpression.getValue(), attributeGroups); - } - } - - public static List getUngroupedAttributes(RValue expressionRoot) { - List ungroupedAttributes = Lists.newArrayList(); - collectNonIsAAttributes(expressionRoot, ungroupedAttributes); - return ungroupedAttributes; - } - - private static void collectNonIsAAttributes(RValue root, List attributes) { - if (root instanceof AttributeClause) { - AttributeClause attribute = (AttributeClause) root; - if (!(getAttributeNameConcept(attribute).getConceptId().equals(Concepts.IS_A))) { - attributes.add(attribute); - } - } else if (root instanceof AndClause) { - AndClause rootAndClause = (AndClause) root; - collectNonIsAAttributes(rootAndClause.getLeft(), attributes); - collectNonIsAAttributes(rootAndClause.getRight(), attributes); - } else if (root instanceof SubExpression) { - SubExpression subExpression = (SubExpression) root; - collectNonIsAAttributes(subExpression.getValue(), attributes); - } - } - - private static void collectFocusConcepts(RValue root, Collection focusConcepts) { - if (root instanceof AndClause) { - AndClause rootAndClause = (AndClause) root; - collectFocusConcepts(rootAndClause.getLeft(), focusConcepts); - collectFocusConcepts(rootAndClause.getRight(), focusConcepts); - } else if (root instanceof ConceptRef) { - focusConcepts.add((ConceptRef) root); - } else if (root instanceof SubExpression) { - SubExpression subExpression = (SubExpression) root; - collectFocusConcepts(subExpression.getValue(), focusConcepts); - } - } - - /** - * @param attribute - * @return the name concept of the specified {@link AttributeClause} - * @throws UnsupportedOperationException if the attribute name is not of the type {@link ConceptRef} - */ - public static ConceptRef getAttributeNameConcept(AttributeClause attribute) { - RValue nameLValue = attribute.getLeft(); - if (!(nameLValue instanceof ConceptRef)) - throw new UnsupportedOperationException("Attribute name '" + nameLValue + "' is not supported."); - ConceptRef nameConceptGroup = (ConceptRef) nameLValue; - return nameConceptGroup; - } - - /** - * @param attribute - * @return the value of the specified {@link AttributeClause} - */ - public static RValue getAttributeValueExpression(AttributeClause predicate) { - RValue right = predicate.getRight(); - if (right instanceof SubExpression) { - return EcoreUtil.copy(right); - } - RValue expressionValue = EcoreUtil.copy(right); - if (right instanceof ConceptRef) { - return expressionValue; -// AttributeClause attributeClause = ecoreastFactory.eINSTANCE.createAttributeClause(); -// ConceptRef isA = ecoreastFactory.eINSTANCE.createConceptRef(); -// isA.setConceptId(IS_A); -// attributeClause.setLeft(isA); -// attributeClause.setRight(EcoreUtil.copy(right)); -// expressionValue = attributeClause; - } - SubExpression subExpression = ecoreastFactory.eINSTANCE.createSubExpression(); - subExpression.setValue(expressionValue); - - return subExpression; - } - - /** - * @param attributeToMatch - * @param attributes - * @return the attributes from the specified collection, which are name-matched with the specified attribute - */ - public static Collection findNameMatchedAttributes(AttributeClause attributeToMatch, Collection attributes) { - return findNameMatchedAttributes(getAttributeNameConcept(attributeToMatch), attributes); - } - - /** - * @param attributeNameConceptToMatch - * @param attributes - * @return the attributes from the specified collection, which are name-matched with the specified concept - */ - public static Collection findNameMatchedAttributes(ConceptRef attributeNameConceptToMatch, Collection attributes) { - // use set to avoid duplicates - Collection nameMatchedAttributes = new HashSet(); - for (AttributeClause attribute : attributes) { - ConceptRef attributeNameConceptRef = getAttributeNameConcept(attribute); - ConceptRef attributeToMatchNameConcept = attributeNameConceptToMatch; - if (attributeNameConceptRef.getConceptId().equals(attributeToMatchNameConcept.getConceptId())) { - nameMatchedAttributes.add(new AttributeNameMatch(attribute)); - } - } - - return Collections.unmodifiableCollection(nameMatchedAttributes); - } - - /** - * @param attributeToMatch - * @param attributeGroup - * @return the attributes and their containing groups from the specified group, which are name-matched with the specified attribute - */ - public static Collection findNameMatchedAttributesInGroups(ConceptRef attributeNameConceptToMatch, Collection attributeGroups) { - Collection nameMatchedAttributes = new HashSet(); - for (AttributeClauseList attributeGroup : attributeGroups) { - nameMatchedAttributes.addAll(findNameMatchedAttributes(attributeNameConceptToMatch, attributeGroup)); - } - return Collections.unmodifiableCollection(nameMatchedAttributes); - } - - /** - * @param attributeToMatch - * @param attributeGroup - * @return the attributes and their containing groups from the specified group, which are name-matched with the specified attribute - */ - public static Collection findNameMatchedAttributes(ConceptRef attributeNameConceptToMatch, AttributeClauseList attributeGroup) { - Collection groupedAttributes = attributeGroup.getAttributeClauses(); - Collection attributeNameMatches = findNameMatchedAttributes(attributeNameConceptToMatch, groupedAttributes); - for (AttributeNameMatch attributeNameMatch : attributeNameMatches) { - attributeNameMatch.setGroup(attributeGroup); - } - - return Collections.unmodifiableCollection(attributeNameMatches); - } - - /** - * @param attributeToMatch - * @param attributeGroup - * @return the attributes and their containing groups from the specified group, which are name-matched with the specified attribute - */ - public static Collection findNameMatchedAttributes(AttributeClause attributeToMatch, AttributeClauseList attributeGroup) { - return findNameMatchedAttributes(getAttributeNameConcept(attributeToMatch), attributeGroup); - } - - public static Collection findNameMatchedAttributes(AttributeClause attributeToMatch, ConceptDefinition conceptDefinition) { - // use set to avoid duplicates - Collection allNameMatchedAttributes = new HashSet(); - Collection ungroupedNameMatchedAttributes = findNameMatchedAttributes(attributeToMatch, - conceptDefinition.getUngroupedAttributes()); - allNameMatchedAttributes.addAll(ungroupedNameMatchedAttributes); - - for (AttributeClauseList attributeGroup : conceptDefinition.getAttributeClauseLists()) { - allNameMatchedAttributes.addAll(findNameMatchedAttributes(attributeToMatch, attributeGroup)); - } - - return Collections.unmodifiableCollection(allNameMatchedAttributes); - } - - public static Collection findNameMatchedAttributes(String attributeNameConceptIdToMatch, ConceptDefinition conceptDefinition) { - // use set to avoid duplicates - Collection allNameMatchedAttributes = new HashSet(); - ConceptRef attributeNameConceptToMatch = ecoreastFactory.eINSTANCE.createConceptRef(); - attributeNameConceptToMatch.setConceptId(attributeNameConceptIdToMatch); - Collection ungroupedNameMatchedAttributes = findNameMatchedAttributes(attributeNameConceptToMatch, - conceptDefinition.getUngroupedAttributes()); - allNameMatchedAttributes.addAll(ungroupedNameMatchedAttributes); - - for (AttributeClauseList attributeGroup : conceptDefinition.getAttributeClauseLists()) { - allNameMatchedAttributes.addAll(findNameMatchedAttributes(attributeNameConceptToMatch, attributeGroup)); - } - - return Collections.unmodifiableCollection(allNameMatchedAttributes); - } - - public static Collection findNameMatchedAttributesInConceptDefinitons(AttributeClause attributeToMatch, - Collection conceptDefinitions) { - // use set to avoid duplicates - Collection nameMatchedAttributes = new HashSet(); - for (ConceptDefinition conceptDefinition : conceptDefinitions) { - nameMatchedAttributes.addAll(findNameMatchedAttributes(attributeToMatch, conceptDefinition)); - } - - return Collections.unmodifiableCollection(nameMatchedAttributes); - } - - public static Collection getGroupedAttributeNameMatches(Collection matches) { - Collection groupedAttributeNameMatches = new HashSet(); - for (AttributeNameMatch attributeNameMatch : matches) { - if (attributeNameMatch.getGroup() != AttributeNameMatch.NO_GROUP) - groupedAttributeNameMatches.add(attributeNameMatch); - } - - return Collections.unmodifiableCollection(groupedAttributeNameMatches); - } - - public static Collection getUngroupedAttributeNameMatches(Collection matches) { - Collection ungroupedAttributeNameMatches = new HashSet(); - for (AttributeNameMatch attributeNameMatch : matches) { - if (attributeNameMatch.getGroup() == AttributeNameMatch.NO_GROUP) - ungroupedAttributeNameMatches.add(attributeNameMatch); - } - - return Collections.unmodifiableCollection(ungroupedAttributeNameMatches); - } - - public static boolean isLateralizable(ConceptRef concept) { - throw new UnsupportedOperationException("Not implemented yet."); - } - - /** - * The only valid context attributes are:
        - * "associated finding" (246090004), "associated procedure" (363589002), "finding context" (2470590016), - * "procedure context" (2470591017), "temporal context" (2470592012) and "subject relationship context" (2470593019). - * - * @param attribute - * @return true if the attribute name is one of the valid concepts, false otherwise - */ - public static boolean isValidContextAttribute(AttributeClause attribute) { - ConceptRef attributeNameConcept = getAttributeNameConcept(attribute); - return VALID_CONTEXT_ATTRIBUTE_NAMES.contains(attributeNameConcept.getConceptId()); - } - - public static boolean isNullOrEmpty(Collection collection) { - return collection == null || collection.isEmpty(); - } - - public static Collection getAttributes(Collection attributeGroups) { - Collection attributes = new HashSet(); - for (AttributeClauseList attributeGroup : attributeGroups) { - attributes.addAll(attributeGroup.getAttributeClauses()); - } - return attributes; - } - - public static RValue buildExpression(Collection superTypes, List attributeClauseLists, - List ungroupedAttributes) { - Preconditions.checkArgument(!superTypes.isEmpty(), "There should be at least one super type."); - - // sort super type concepts alphabetically by ID - ArrayList sortedSuperTypes = Lists.newArrayList(superTypes); - Collections.sort(sortedSuperTypes, Ordering.natural()); - - ConceptRef firstSuperTypeConceptRef = ecoreastFactory.eINSTANCE.createConceptRef(); - Iterator superTypeIterator = superTypes.iterator(); - firstSuperTypeConceptRef.setConceptId(superTypeIterator.next()); - - RValue root = firstSuperTypeConceptRef; - - // focus concepts - while (superTypeIterator.hasNext()) { - String conceptId = superTypeIterator.next(); - root = createAndClause(root, createConceptRef(conceptId)); - } - - // refinements - Collections.sort(ungroupedAttributes, Ordering.usingToString()); - for (AttributeClause attribute : ungroupedAttributes) { - root = createAndClause(root, attribute); - } - sortAttributeGroups(attributeClauseLists); - for (AttributeClauseList group : attributeClauseLists) { - root = handleAttributeClauseGroup(root, group); - } - - return root; - } - - private static void sortAttributeGroups(List attributeClauseLists) { - for (AttributeClauseList attributeClauseList : attributeClauseLists) { - Collections.sort(attributeClauseList.getAttributeClauses(), Ordering.usingToString()); - } - Collections.sort(attributeClauseLists, Ordering.usingToString()); - } - - private static RValue handleAttributeClauseGroup(RValue root, AttributeClauseList attributeClauseList) { - Preconditions.checkNotNull(root, "Root must not be null."); - Preconditions.checkNotNull(attributeClauseList, "Attribute clause llist must not be null."); - AttributeClauseGroup attributeClauseGroup = ecoreastFactory.eINSTANCE.createAttributeClauseGroup(); - List attributeClauses = attributeClauseList.getAttributeClauses(); - if(attributeClauses != null && !attributeClauses.isEmpty()) { - // no need to sort here, attributes were already sorted while sorting their containing groups - AttributeClause firstAttribute = attributeClauses.get(0); - RValue localRootClause = firstAttribute; - - for(int i = 1; i < attributeClauses.size(); i++) { - AttributeClause attribute = attributeClauses.get(i); - - // TODO: handle RefSet - if (attribute.getLeft() instanceof ConceptRef) { - RValue rValue = attribute; - localRootClause = createAndClause(localRootClause, rValue); - } - } -// SubExpression valueSubExpression = ecoreastFactory.eINSTANCE.createSubExpression(); -// valueSubExpression.setValue(localRootClause); - attributeClauseGroup.setValue(localRootClause); - return createAndClause(root, attributeClauseGroup); - } - return root; - } - - private static AndClause createAndClause(RValue left, RValue right) { - AndClause clause = ecoreastFactory.eINSTANCE.createAndClause(); - clause.setLeft(left); - clause.setRight(right); - return clause; - } - - protected static RValue createConceptRef(String conceptId) { - return createConceptRef(conceptId, ""); - } - - protected static RValue createConceptRef(String conceptId, String label) { - ConceptRef conceptRef = ecoreastFactory.eINSTANCE.createConceptRef(); - conceptRef.setConceptId(conceptId); - conceptRef.setLabel(label); - return conceptRef; - } - - protected static AttributeClause createAttributeClause(RValue left, RValue right) { - AttributeClause attributeClause = ecoreastFactory.eINSTANCE.createAttributeClause(); - attributeClause.setLeft(left); - attributeClause.setRight(right); - return attributeClause; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.semanticengine.test/META-INF/MANIFEST.MF deleted file mode 100644 index 4b8c6c5ebb0..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/META-INF/MANIFEST.MF +++ /dev/null @@ -1,22 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Snow Owl SNOMED CT Semantic Engine Test -Bundle-SymbolicName: com.b2international.snowowl.snomed.semanticengine.test -Bundle-Version: 7.3.0.qualifier -Bundle-Activator: com.b2international.snowowl.semanticengine.test.SemanticEngineTestPlugin -Bundle-Vendor: B2i Healthcare -Require-Bundle: org.junit;bundle-version="4.8.2", - com.b2international.snowowl.snomed.scg, - com.b2international.commons, - com.google.inject;bundle-version="2.0.0", - com.b2international.snowowl.core, - com.b2international.snowowl.datastore, - org.eclipse.core.runtime;bundle-version="3.6.0", - com.b2international.snowowl.snomed.semanticengine, - org.eclipse.emf.ecore;bundle-version="2.6.0", - com.b2international.snowowl.snomed.datastore, - com.b2international.snowowl.test.commons -Bundle-RequiredExecutionEnvironment: JavaSE-11 -Bundle-ActivationPolicy: lazy -Export-Package: com.b2international.snowowl.semanticengine.test, - com.b2international.snowowl.semanticengine.test.utils diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/build.properties b/snomed/com.b2international.snowowl.snomed.semanticengine.test/build.properties deleted file mode 100644 index 56d77655550..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -source.. = src/ -output.. = target/classes/ -bin.includes = META-INF/,\ - . diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/pom.xml b/snomed/com.b2international.snowowl.snomed.semanticengine.test/pom.xml deleted file mode 100644 index 17ccfe923b1..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 4.0.0 - - com.b2international.snowowl - 7.3.0-SNAPSHOT - snomed-parent - - com.b2international.snowowl.snomed.semanticengine.test - eclipse-plugin - diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/AttributeNormalizerTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/AttributeNormalizerTest.java deleted file mode 100644 index 3fff4dea184..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/AttributeNormalizerTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform.test; - -import static com.b2international.snowowl.semanticengine.test.utils.TestUtils.assertConceptDefinitionsEqual; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildAttribute; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildConcept; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildConceptDefinition; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildExpression; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildGroup; -import static org.junit.Assert.assertEquals; - -import java.util.Collections; - -import org.junit.Before; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.semanticengine.normalform.AttributeNormalizer; -import com.b2international.snowowl.semanticengine.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.test.SnomedConcepts; - -public class AttributeNormalizerTest { - - private AttributeNormalizer attributeNormalizer; - - @Before - public void beforeTest() { - attributeNormalizer = new AttributeNormalizer(Branch.MAIN_PATH); - } - - @Test - public void testEmptyInput() { - ConceptDefinition conceptDefinition = attributeNormalizer.normalizeAttributes(Collections.emptyList(), - Collections.emptyList()); - assertEquals(0, conceptDefinition.getGroups().size()); - assertEquals(0, conceptDefinition.getUngroupedAttributes().size()); - } - - @Test - public void testUngroupedAttributeNormalization() { - Attribute associatedFindingPain = buildAttribute(SnomedConcepts.ASSOCIATED_FINDING, SnomedConcepts.FOOT_PAIN); - ConceptDefinition normalizedConceptDefinition = attributeNormalizer.normalizeAttributes(Collections.emptyList(), - Collections.singletonList(associatedFindingPain)); - - Expression expectedValueExpression = buildExpression(Collections.singleton(buildConcept(SnomedConcepts.PAIN)), Collections.emptySet(), - Collections.singleton(buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.FOOT_STRUCTURE))); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(buildAttribute(SnomedConcepts.ASSOCIATED_FINDING, expectedValueExpression)); - assertConceptDefinitionsEqual(expectedConceptDefinition, normalizedConceptDefinition); - } - - @Test - public void testGroupedAttributeNormalization() { - Attribute associatedFindingPain = buildAttribute(SnomedConcepts.ASSOCIATED_FINDING, SnomedConcepts.FOOT_PAIN); - ConceptDefinition normalizedConceptDefinition = attributeNormalizer.normalizeAttributes(Collections.singletonList( - buildGroup(associatedFindingPain)), - Collections.emptyList()); - - Expression expectedValueExpression = buildExpression(Collections.singleton(buildConcept(SnomedConcepts.PAIN)), Collections.emptySet(), - Collections.singleton(buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.FOOT_STRUCTURE))); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(buildGroup(buildAttribute(SnomedConcepts.ASSOCIATED_FINDING, expectedValueExpression))); - assertConceptDefinitionsEqual(expectedConceptDefinition, normalizedConceptDefinition); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ConceptDefinitionAttributeRedundancyFilterTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ConceptDefinitionAttributeRedundancyFilterTest.java deleted file mode 100644 index e5c9ade9488..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ConceptDefinitionAttributeRedundancyFilterTest.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform.test; - -import static com.b2international.snowowl.semanticengine.test.utils.TestUtils.assertConceptDefinitionsEqual; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildAttribute; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildConceptDefinition; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildGroup; - -import java.util.Collections; - -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.junit.Before; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.semanticengine.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.normalform.ConceptDefinitionAttributeRedundancyFilter; -import com.b2international.snowowl.semanticengine.subsumption.SubsumptionTester; -import com.b2international.snowowl.semanticengine.test.SnomedConcepts; - -public class ConceptDefinitionAttributeRedundancyFilterTest { - - private SubsumptionTester subsumptionTester; - - @Before - public void beforeTest() { - subsumptionTester = new SubsumptionTester(Branch.MAIN_PATH); - } - - @Test - public void testEmptyConceptDefinition() { - ConceptDefinitionAttributeRedundancyFilter filter = new ConceptDefinitionAttributeRedundancyFilter(subsumptionTester); - ConceptDefinition filteredConceptDefinition = filter.getFilteredConceptDefinition(new ConceptDefinition()); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(Collections.emptySet(), - Collections.emptySet()); - assertConceptDefinitionsEqual(expectedConceptDefinition, filteredConceptDefinition); - } - - @Test - public void testGroupRedundancyFilter1() { - Attribute tigerAttribute = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.PANTHERA_TIGRIS); - Attribute felidaeAttribute = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.FAMILY_FELIDAE); - ConceptDefinition conceptDefinition = buildConceptDefinition(buildGroup(tigerAttribute, felidaeAttribute)); - - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(buildGroup(EcoreUtil.copy(felidaeAttribute))); - - ConceptDefinitionAttributeRedundancyFilter filter = new ConceptDefinitionAttributeRedundancyFilter(subsumptionTester); - ConceptDefinition filteredConceptDefinition = filter.getFilteredConceptDefinition(conceptDefinition); - - assertConceptDefinitionsEqual(expectedConceptDefinition, filteredConceptDefinition); - } - - @Test - public void testGroupRedundancyFilter2() { - Attribute attributeTiger = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.PANTHERA_TIGRIS); - Attribute associatedWithFamilyFelidae = buildAttribute(SnomedConcepts.ASSOCIATED_WITH, SnomedConcepts.FAMILY_FELIDAE); - Attribute attributeSubfamilyPantherinae = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.SUBFAMILY_PANTHERINAE); - Attribute associatedWithSubstance = buildAttribute(SnomedConcepts.ASSOCIATED_WITH, SnomedConcepts.SUBSTANCE); - ConceptDefinition conceptDefinition = buildConceptDefinition(buildGroup(attributeTiger, associatedWithSubstance, - associatedWithFamilyFelidae, attributeSubfamilyPantherinae)); - - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(buildGroup(EcoreUtil.copy(associatedWithFamilyFelidae), - EcoreUtil.copy(associatedWithSubstance), EcoreUtil.copy(attributeSubfamilyPantherinae))); - - ConceptDefinitionAttributeRedundancyFilter filter = new ConceptDefinitionAttributeRedundancyFilter(subsumptionTester); - ConceptDefinition filteredConceptDefinition = filter.getFilteredConceptDefinition(conceptDefinition); - - assertConceptDefinitionsEqual(expectedConceptDefinition, filteredConceptDefinition); - } - - @Test - public void testUngroupedAttributeRedundancyFilter1() { - Attribute tigerAttribute = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.PANTHERA_TIGRIS); - Attribute felidaeAttribute = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.FAMILY_FELIDAE); - ConceptDefinition conceptDefinition = buildConceptDefinition(tigerAttribute, felidaeAttribute); - - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(EcoreUtil.copy(felidaeAttribute)); - - ConceptDefinitionAttributeRedundancyFilter filter = new ConceptDefinitionAttributeRedundancyFilter(subsumptionTester); - ConceptDefinition filteredConceptDefinition = filter.getFilteredConceptDefinition(conceptDefinition); - - assertConceptDefinitionsEqual(expectedConceptDefinition, filteredConceptDefinition); - } - - @Test - public void testUngroupedAttributeRedundancyFilter2() { - Attribute attributeTiger = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.PANTHERA_TIGRIS); - Attribute associatedWithFamilyFelidae = buildAttribute(SnomedConcepts.ASSOCIATED_WITH, SnomedConcepts.FAMILY_FELIDAE); - Attribute attributeSubfamilyPantherinae = buildAttribute(SnomedConcepts.ATTRIBUTE, SnomedConcepts.SUBFAMILY_PANTHERINAE); - Attribute associatedWithSubstance = buildAttribute(SnomedConcepts.ASSOCIATED_WITH, SnomedConcepts.SUBSTANCE); - ConceptDefinition conceptDefinition = buildConceptDefinition(attributeTiger, associatedWithSubstance, - associatedWithFamilyFelidae, attributeSubfamilyPantherinae); - - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(EcoreUtil.copy(associatedWithFamilyFelidae), - EcoreUtil.copy(associatedWithSubstance), EcoreUtil.copy(attributeSubfamilyPantherinae)); - - ConceptDefinitionAttributeRedundancyFilter filter = new ConceptDefinitionAttributeRedundancyFilter(subsumptionTester); - ConceptDefinition filteredConceptDefinition = filter.getFilteredConceptDefinition(conceptDefinition); - - assertConceptDefinitionsEqual(expectedConceptDefinition, filteredConceptDefinition); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ConceptDefinitionMergerTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ConceptDefinitionMergerTest.java deleted file mode 100644 index bee0f47a01e..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ConceptDefinitionMergerTest.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform.test; - -import static com.b2international.snowowl.semanticengine.test.utils.TestUtils.assertConceptDefinitionsEqual; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildAttribute; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildConcept; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildConceptDefinition; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildGroup; - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.junit.Before; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.semanticengine.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.normalform.ConceptDefinitionMerger; -import com.b2international.snowowl.semanticengine.subsumption.SubsumptionTester; -import com.b2international.snowowl.semanticengine.test.SnomedConcepts; - -public class ConceptDefinitionMergerTest { - - private ConceptDefinitionMerger conceptDefinitionMerger; - - @Before - public void beforeTest() { - conceptDefinitionMerger = new ConceptDefinitionMerger(new SubsumptionTester(Branch.MAIN_PATH)); - } - - @Test - public void test1() { - /* - * If the value of the grouped attribute is subsumed by the value of the name-matched grouped attribute - * add the ungrouped attribute to the group containing the matching grouped attribute in the target definition - * if this condition is met by multiple groups - * add the ungrouped attribute to all groups that meet this condition - */ - Map conceptDefinitionMap = new HashMap(); - - Attribute findingSiteLungStructure = buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentSubstance = buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.SUBSTANCE); - Group group = buildGroup(Arrays.asList(findingSiteLungStructure, causativeAgentSubstance)); - - Attribute severitySevere = buildAttribute(SnomedConcepts.SEVERITY, - SnomedConcepts.SEVERE); - Attribute causativeAgentDustAllergen = buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.DUST_ALLERGEN); - - // build test concept definitions - Concept concept1 = buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - Concept concept2 = buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = buildConceptDefinition(severitySevere, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - Group expectedGroup = buildGroup(Arrays.asList(EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentSubstance))); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(Collections.singleton(expectedGroup), - Collections.singleton(EcoreUtil.copy(severitySevere))); - - ConceptDefinition mergedConceptDefinition = conceptDefinitionMerger.mergeDefinitions(conceptDefinitionMap); - - assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ConceptDefinitionNormalizerTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ConceptDefinitionNormalizerTest.java deleted file mode 100644 index ed88a3c1581..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ConceptDefinitionNormalizerTest.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform.test; - -import java.util.Arrays; -import java.util.Collections; -import java.util.Map; - -import org.junit.Before; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.semanticengine.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.normalform.ConceptDefinitionNormalizer; -import com.b2international.snowowl.semanticengine.test.utils.TestUtils; -import com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils; - -public class ConceptDefinitionNormalizerTest { - - private ConceptDefinitionNormalizer conceptDefinitionNormalizer; - - @Before - public void beforeTest() { - conceptDefinitionNormalizer = new ConceptDefinitionNormalizer(Branch.MAIN_PATH); - } - - /** - * The concept "fracture of femur" (Figure 4) is fully defined and its proximal primitive - * supertype is a high-level primitive2. - */ - @Test - public void testFractureOfFemur() { - String focusConceptId = "71620000"; // fracture of femur - Concept focusConcept = ScgBuilderUtils.buildConcept(focusConceptId); - Map normalizedConceptDefinitions = - conceptDefinitionNormalizer.getNormalizedConceptDefinitions(Collections.singleton(focusConcept)); - - // associated morphology = fracture - Attribute associatedMorphologyAttribute = ScgBuilderUtils.buildAttribute("116676008", "72704001"); - // finding site = bone structure of femur - Attribute findingSiteAttribute = ScgBuilderUtils.buildAttribute("363698007", "71341001"); - Group expectedGroup = ScgBuilderUtils.buildGroup(Arrays.asList( - new Attribute[] { associatedMorphologyAttribute, findingSiteAttribute })); - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(expectedGroup); - - ConceptDefinition actualNormalizedConceptDefinition = normalizedConceptDefinitions.values().iterator().next(); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, actualNormalizedConceptDefinition); - } - - /** - * The concept "neoplasm of right lower lobe of lung" Figure 7) is fully-defined with a high-level proximal primitive ("disease"). - * However, the value of the "finding site" attribute ("structure of right lower lobe of lung") is itself fully defined. - */ - @Test - public void testNeoplasmOfRightLowerLobeOfLung() { - String focusConceptId = "126716006"; // neoplasm of right lower lobe of lung - Concept focusConcept = ScgBuilderUtils.buildConcept(focusConceptId); - Map normalizedConceptDefinitions = - conceptDefinitionNormalizer.getNormalizedConceptDefinitions(Collections.singleton(focusConcept)); - - // associated morphology = neoplasm - Attribute associatedMorphologyAttribute = ScgBuilderUtils.buildAttribute("116676008", "108369006"); - // finding site = (structure of lower lobe of lung : laterality = right) - Concept structureOfLowerLobeOfLung = ScgBuilderUtils.buildConcept("90572001"); - Attribute lateralityRightAttribute = ScgBuilderUtils.buildAttribute("272741003", "24028007"); - Expression findingSiteValueExpression = ScgBuilderUtils.buildExpression(Collections.singletonList(structureOfLowerLobeOfLung), - Collections.emptyList(), - Collections.singletonList(lateralityRightAttribute)); - Attribute findingSiteAttribute = ScgBuilderUtils.buildAttribute("363698007", findingSiteValueExpression); - Group expectedGroup = ScgBuilderUtils.buildGroup(Arrays.asList( - new Attribute[] { associatedMorphologyAttribute, findingSiteAttribute })); - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(expectedGroup); - - ConceptDefinition actualNormalizedConceptDefinition = normalizedConceptDefinitions.values().iterator().next(); - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, actualNormalizedConceptDefinition); - } - - /** - * The concept "asthma" (Figure 5) is primitive so it is its own proximal primitive supertype. - */ - @Test - public void testAsthma() { - String focusConceptId = "195967001"; // asthma - Concept focusConcept = ScgBuilderUtils.buildConcept(focusConceptId); - Map normalizedConceptDefinitions = - conceptDefinitionNormalizer.getNormalizedConceptDefinitions(Collections.singleton(focusConcept)); - - // finding site = Structure of respiratory system (body structure) - Attribute findingSiteAttribute = ScgBuilderUtils.buildAttribute("363698007", "20139000"); - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(findingSiteAttribute); - - ConceptDefinition actualNormalizedConceptDefinition = normalizedConceptDefinitions.values().iterator().next(); - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, actualNormalizedConceptDefinition); - } - - /** - * Concept with more complex definition. Some concept definitions include - * multiple instances of the same defining attribute. Usually these are grouped - * separately for example to represent a procedure that examines one body structure and removes another. - */ - @Test - public void testSalpingoOophporectomy() { - String focusConceptId = "116028008"; // salpingo-oophorectomy - Concept focusConcept = ScgBuilderUtils.buildConcept(focusConceptId); - Map normalizedConceptDefinitions = - conceptDefinitionNormalizer.getNormalizedConceptDefinitions(Collections.singleton(focusConcept)); - - // TODO: confirm that 'procedure site' and 'procedure site - direct' are both in the normalized definition - // and will be filtered out at a later stage - - // method = excision - action - Attribute methodAttribute1 = ScgBuilderUtils.buildAttribute("260686004", "129304002"); - // procedure site - direct = Fallopian tube structure (body structure) - Attribute procedureSiteDirectAttribute1 = ScgBuilderUtils.buildAttribute("405813007", "31435000"); - // method = excision - action - Attribute methodAttribute2 = ScgBuilderUtils.buildAttribute("260686004", "129304002"); - // procedure site - direct = ovarian structure - Attribute procedureSiteDirectAttribute2 = ScgBuilderUtils.buildAttribute("405813007", "15497006"); - - Group expectedGroup1 = ScgBuilderUtils.buildGroup(Arrays.asList( - new Attribute[] { methodAttribute1, procedureSiteDirectAttribute1 })); - Group expectedGroup2 = ScgBuilderUtils.buildGroup(Arrays.asList( - new Attribute[] { methodAttribute2, procedureSiteDirectAttribute2 })); - - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(Arrays.asList(expectedGroup1, expectedGroup2), - Collections.emptySet()); - - ConceptDefinition actualNormalizedConceptDefinition = normalizedConceptDefinitions.values().iterator().next(); - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, actualNormalizedConceptDefinition); - } - -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ExpressionCanonicalRepresentationTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ExpressionCanonicalRepresentationTest.java deleted file mode 100644 index 9fdcca2ae71..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/ExpressionCanonicalRepresentationTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform.test; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -import com.b2international.snowowl.dsl.SCGStandaloneSetup; -import com.b2international.snowowl.dsl.scg.Expression; - -public class ExpressionCanonicalRepresentationTest { - - private static final String EXPRESSION_1 = "64572001:{116676008=72704001,363698007=71341001}"; - private static final String EXPRESSION_1_SHUFFLED = "64572001:{363698007=71341001,116676008=72704001}"; - private static final String EXPRESSION_2 = "71388002:" + - "{260686004=129304002,363704007=(15497006:272741003=7771000)}" + - "{260686004=129304002,363704007=(31435000:272741003=7771000)}"; - private static final String EXPRESSION_2_SHUFFLED = "71388002:" + - "{260686004=129304002,363704007=(31435000:272741003=7771000)}" + - "{260686004=129304002,363704007=(15497006:272741003=7771000)}"; - private static final String EXPRESSION_3 = "195967001+7771000"; - private static final String EXPRESSION_3_SHUFFLED = "7771000+195967001"; - - @Test - public void testGroupedAttributeSorting() { - Expression expression = (Expression) SCGStandaloneSetup.parse( EXPRESSION_1); - Expression expressionShuffled = (Expression) SCGStandaloneSetup.parse( EXPRESSION_1_SHUFFLED); - assertEquals(expression.toString(), expressionShuffled.toString()); - } - - @Test - public void testAttributeGroupSorting() { - Expression expression = (Expression) SCGStandaloneSetup.parse( EXPRESSION_2); - Expression expressionShuffled = (Expression) SCGStandaloneSetup.parse( EXPRESSION_2_SHUFFLED); - assertEquals(expression.toString(), expressionShuffled.toString()); - } - - @Test - public void testFocusConceptSorting() { - Expression expression = (Expression) SCGStandaloneSetup.parse( EXPRESSION_3); - Expression expressionShuffled = (Expression) SCGStandaloneSetup.parse( EXPRESSION_3_SHUFFLED); - assertEquals(expression.toString(), expressionShuffled.toString()); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/FocusConceptNormalizerTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/FocusConceptNormalizerTest.java deleted file mode 100644 index d8fdaaf7ebe..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/FocusConceptNormalizerTest.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform.test; - -import static com.b2international.snowowl.semanticengine.test.utils.TestUtils.assertConceptDefinitionsEqual; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildAttribute; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildConcept; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildConceptDefinition; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildExpression; -import static com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils.buildGroup; -import static org.junit.Assert.assertEquals; - -import java.util.Collections; - -import org.junit.Before; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.semanticengine.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.normalform.FocusConceptNormalizationResult; -import com.b2international.snowowl.semanticengine.normalform.FocusConceptNormalizer; -import com.b2international.snowowl.semanticengine.test.SnomedConcepts; -import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; - -public class FocusConceptNormalizerTest { - - private FocusConceptNormalizer focusConceptNormalizer; - - @Before - public void beforeTest() { - focusConceptNormalizer = new FocusConceptNormalizer(Branch.MAIN_PATH); - } - - @Test - public void testFractureOfFemur() { - Expression expression = buildExpression(buildConcept(SnomedConcepts.FRACTURE_OF_FEMUR)); - FocusConceptNormalizationResult normalizedFocusConcepts = focusConceptNormalizer.normalizeFocusConcepts(expression.getConcepts()); - - // fracture of bone - SnomedConceptDocument expectedFocusConcept = getConcept(SnomedConcepts.FRACTURE_OF_BONE); - assertEquals(Collections.singletonList(expectedFocusConcept), normalizedFocusConcepts.filteredPrimitiveSuperTypes); - - Attribute associatedMorphologyAttribute = buildAttribute(SnomedConcepts.ASSOCIATED_MORPHOLOGY, SnomedConcepts.FRACTURE); - Attribute findingSiteAttribute = buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.BONE_STRUCTURE_OF_FEMUR); - Group expectedGroup = buildGroup(associatedMorphologyAttribute, findingSiteAttribute); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(expectedGroup); - assertConceptDefinitionsEqual(expectedConceptDefinition, normalizedFocusConcepts.mergedConceptDefinition); - } - - @Test - public void testFootPain() { - Expression expression = buildExpression(buildConcept(SnomedConcepts.FOOT_PAIN)); - FocusConceptNormalizationResult normalizedFocusConcepts = focusConceptNormalizer.normalizeFocusConcepts(expression.getConcepts()); - - SnomedConceptDocument expectedFocusConcept = getConcept(SnomedConcepts.PAIN); - assertEquals(Collections.singletonList(expectedFocusConcept), normalizedFocusConcepts.filteredPrimitiveSuperTypes); - - Attribute findingSiteFootStructure = buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.FOOT_STRUCTURE); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(findingSiteFootStructure); - assertConceptDefinitionsEqual(expectedConceptDefinition, normalizedFocusConcepts.mergedConceptDefinition); - } - - @Test - public void testSalpingoOophorectomy() { - Expression expression = buildExpression(buildConcept(SnomedConcepts.SALPINGO_OOPHORECTOMY)); - FocusConceptNormalizationResult normalizedFocusConcepts = focusConceptNormalizer.normalizeFocusConcepts(expression.getConcepts()); - - SnomedConceptDocument expectedFocusConcept = getConcept(SnomedConcepts.EXCISION_OF_PELVIS); - assertEquals(Collections.singletonList(expectedFocusConcept), normalizedFocusConcepts.filteredPrimitiveSuperTypes); - - Attribute methodExcisionAction1 = buildAttribute(SnomedConcepts.METHOD, SnomedConcepts.EXCISION_ACTION); - Attribute procedureSiteFallopianTubeStructure = buildAttribute(SnomedConcepts.PROCEDURE_SITE_DIRECT, - SnomedConcepts.FALLOPIAN_TUBE_STRUCTURE); - Attribute methodExcisionAction2 = buildAttribute(SnomedConcepts.METHOD, SnomedConcepts.EXCISION_ACTION); - Attribute procedureSiteOvarianStructure = buildAttribute(SnomedConcepts.PROCEDURE_SITE_DIRECT, - SnomedConcepts.OVARIAN_STRUCTURE); - - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(buildGroup(methodExcisionAction1, procedureSiteFallopianTubeStructure), - buildGroup(methodExcisionAction2, procedureSiteOvarianStructure)); - assertConceptDefinitionsEqual(expectedConceptDefinition, normalizedFocusConcepts.mergedConceptDefinition); - } - - - @Test - public void testAuscultation() { - Expression expression = buildExpression(buildConcept(SnomedConcepts.AUSCULTATION)); - FocusConceptNormalizationResult normalizedFocusConcepts = focusConceptNormalizer.normalizeFocusConcepts(expression.getConcepts()); - - SnomedConceptDocument expectedFocusConcept = getConcept(SnomedConcepts.AUSCULTATION); - assertEquals(Collections.singletonList(expectedFocusConcept), normalizedFocusConcepts.filteredPrimitiveSuperTypes); - - Attribute methodAuscultationAction = buildAttribute(SnomedConcepts.METHOD, SnomedConcepts.AUSCULTATION_ACTION); - ConceptDefinition expectedConceptDefinition = buildConceptDefinition(methodAuscultationAction); - assertConceptDefinitionsEqual(expectedConceptDefinition, normalizedFocusConcepts.mergedConceptDefinition); - } - - private SnomedConceptDocument getConcept(String fractureOfBone) { - throw new UnsupportedOperationException("Not implemented"); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/GroupMergerTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/GroupMergerTest.java deleted file mode 100644 index 0112eb8b883..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/GroupMergerTest.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform.test; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.junit.Before; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.semanticengine.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.normalform.GroupMerger; -import com.b2international.snowowl.semanticengine.subsumption.SubsumptionTester; -import com.b2international.snowowl.semanticengine.test.SnomedConcepts; -import com.b2international.snowowl.semanticengine.test.utils.TestUtils; -import com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils; - -public class GroupMergerTest { - - private GroupMerger attributeGroupMerger; - - @Before - public void beforeTest() { - attributeGroupMerger = new GroupMerger(new SubsumptionTester(Branch.MAIN_PATH)); - } - - @Test - public void testIsMergeable1() { - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - Group group1 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { findingSiteLungStructure, causativeAgentDustAllergen })); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute associatedWithDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.ASSOCIATED_WITH, SnomedConcepts.DUST_ALLERGEN); - Group group2 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { severitySevere, associatedWithDustAllergen })); - - assertFalse(attributeGroupMerger.isMergeable(group1, group2)); - assertFalse(attributeGroupMerger.isMergeable(group2, group1)); - } - - @Test - public void testIsMergeable2() { - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - Group group1 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { findingSiteLungStructure, causativeAgentDustAllergen })); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentDustAllergen2 = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - Group group2 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { severitySevere, causativeAgentDustAllergen2 })); - - assertTrue(attributeGroupMerger.isMergeable(group1, group2)); - assertTrue(attributeGroupMerger.isMergeable(group2, group1)); - } - - @Test - public void testIsMergeable3() { - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - Group group1 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { findingSiteLungStructure, causativeAgentDustAllergen })); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentSubstance = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - Group group2 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { causativeAgentSubstance, severitySevere })); - - assertTrue(attributeGroupMerger.isMergeable(group1, group2)); - assertTrue(attributeGroupMerger.isMergeable(group2, group1)); - } - - @Test - public void testIsMergeable4() { - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Group group1 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { findingSiteLungStructure })); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentSubstance = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - Group group2 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { causativeAgentSubstance, severitySevere })); - - assertFalse(attributeGroupMerger.isMergeable(group1, group2)); - assertFalse(attributeGroupMerger.isMergeable(group2, group1)); - } - - @Test - public void testIsMergeable5() { - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - Group group1 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { causativeAgentDustAllergen })); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentSubstance = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - Group group2 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { causativeAgentSubstance, severitySevere })); - - assertTrue(attributeGroupMerger.isMergeable(group1, group2)); - assertTrue(attributeGroupMerger.isMergeable(group2, group1)); - } - - @Test - public void testMergeSingleConceptDefinition() { - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - Group group1 = ScgBuilderUtils.buildGroup(Arrays.asList(findingSiteLungStructure, causativeAgentDustAllergen)); - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(group1); - - Map conceptDefinitionMap = new HashMap(); - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - Group expectedMergedGroup = ScgBuilderUtils.buildGroup(Arrays.asList(EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentDustAllergen))); - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(expectedMergedGroup); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - attributeGroupMerger.mergeGroups(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testMergeGroups1() { - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - Group group1 = ScgBuilderUtils.buildGroup(Arrays.asList(findingSiteLungStructure, causativeAgentDustAllergen)); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentSubstance = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - Group group2 = ScgBuilderUtils.buildGroup(Arrays.asList(causativeAgentSubstance, severitySevere)); - - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(group1); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(group2); - - Map conceptDefinitionMap = new HashMap(); - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - conceptDefinitionMap.put(concept1, conceptDefinition1); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - Group expectedMergedGroup = ScgBuilderUtils.buildGroup(Arrays.asList(EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentDustAllergen), EcoreUtil.copy(causativeAgentSubstance), EcoreUtil.copy(severitySevere))); - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(expectedMergedGroup); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - attributeGroupMerger.mergeGroups(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testMergeGroups2() { - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Group group1 = ScgBuilderUtils.buildGroup(Arrays.asList(findingSiteLungStructure)); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentSubstance = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - Group group2 = ScgBuilderUtils.buildGroup(Arrays.asList(causativeAgentSubstance, severitySevere)); - - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(group1); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(group2); - - Map conceptDefinitionMap = new HashMap(); - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - conceptDefinitionMap.put(concept1, conceptDefinition1); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - Group expectedMergedGroup1 = ScgBuilderUtils.buildGroup(Arrays.asList(EcoreUtil.copy(findingSiteLungStructure))); - Group expectedMergedGroup2 = ScgBuilderUtils.buildGroup(Arrays.asList(EcoreUtil.copy(causativeAgentSubstance), - EcoreUtil.copy(severitySevere))); - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(Arrays.asList(expectedMergedGroup1, expectedMergedGroup2), - Collections.emptySet()); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - attributeGroupMerger.mergeGroups(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testMergeGroups3() { - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Group group1 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { findingSiteLungStructure })); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentSubstance = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - Group group2 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { causativeAgentSubstance, severitySevere })); - - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(group1); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(group2); - - Map conceptDefinitionMap = new HashMap(); - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - conceptDefinitionMap.put(concept1, conceptDefinition1); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - Group expectedMergedGroup1 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[]{ EcoreUtil.copy(findingSiteLungStructure) })); - Group expectedMergedGroup2 = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[]{ EcoreUtil.copy(causativeAgentSubstance), - EcoreUtil.copy(severitySevere) })); - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(Arrays.asList(expectedMergedGroup1, expectedMergedGroup2), - Collections.emptySet()); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - attributeGroupMerger.mergeGroups(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/NormalFormGeneratorTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/NormalFormGeneratorTest.java deleted file mode 100644 index 591bee7d410..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/normalform/test/NormalFormGeneratorTest.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform.test; - -import java.util.List; - -import org.junit.Ignore; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.dsl.SCGStandaloneSetup; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.semanticengine.normalform.ScgExpressionNormalFormGenerator; -import com.b2international.snowowl.semanticengine.test.utils.TestUtils; -import com.google.common.collect.Lists; - -/** - * - */ -public class NormalFormGeneratorTest { - - @Test - public void testAuscultation() { - // updated expected normal forms to match SNOMED CT INT 20120131 - Expression originalExpression = (Expression) SCGStandaloneSetup.parse("37931006 | auscultation | "); - Expression expectedLongNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "71388002 | procedure | : 260686004 | method | = 129436005 | auscultation - action |"); - Expression expectedShortNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "71388002 | procedure | : 260686004 | method | = 129436005 | auscultation - action |"); // TODO: check short form - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testExpiratoryCrackles() { - // updated expected normal forms to match SNOMED CT INT 20120131 - Expression originalExpression = (Expression) SCGStandaloneSetup.parse("12529006 | expiratory crackles | "); - Expression expectedLongNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "12529006 | expiratory crackles | :" + - "363698007 | finding site | = 82094008 | lower respiratory tract structure |," + - "418775008 | finding method | =" + - "(71388002 | auscultation | : " + - "260686004 | method | = 129436005 | auscultation - action |)"); - Expression expectedShortNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "12529006 | expiratory crackles | "); // TODO: verify short normal form - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - //////////////////////////////////////////////// old tests from Orsi /////////////////////////////////////////// - - @Test - public void testTetralogyOfFallot() { - Expression originalExpression = (Expression) SCGStandaloneSetup.parse("86299006 | tetralogy of fallot |"); - Expression expectedLongNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "86299006 | tetralogy of Fallot | :" + - "246454002 | occurrence | = 255399007 | congenital |" + - "{ 116676008 | associated morphology | = 107656002 | congenital anomaly |" + - ", 363698007 | finding site | = 21814001 | cardiac ventricular structure |" + - "}" + - "{ 116676008 | associated morphology | = 30812002 | overriding structures |" + - ", 363698007 | finding site | = 113262008 | thoracic aorta structure |" + - "}" + - "{ 116676008 | associated morphology | = 415582006 | stenosis |" + - ", 363698007 | finding site | = 39057004 | pulmonary valve structure |" + - "}" + - "{ 116676008 | associated morphology | = 56246009 | hypertrophy |" + - ", 363698007 | finding site | = 53085002 | right ventricular structure |" + - "}" + - "{ 116676008 | associated morphology | = 6920004 | defect |" + - ", 363698007 | finding site | = 589001 | interventricular septum structure |" + - "}"); - - Expression expectedShortNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "86299006 | tetralogy of Fallot |"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testTetralogyOfFallotRoundTwo() { - Expression originalExpression = (Expression) SCGStandaloneSetup.parse("86299006 | tetralogy of Fallot | :"+ - "246454002 | occurrence | = 255399007 | congenital |"+ - "{ 116676008 | associated morphology | = 107656002 | congenital anomaly |"+ - ", 363698007 | finding site | = 21814001 | cardiac ventricular structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 30812002 | overriding structures |"+ - ", 363698007 | finding site | = 113262008 | thoracic aorta structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 415582006 | stenosis |"+ - ", 363698007 | finding site | = 39057004 | pulmonary valve structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 56246009 | hypertrophy |"+ - ", 363698007 | finding site | = 53085002 | right ventricular structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 6920004 | defect |"+ - ", 363698007 | finding site | = 589001 | interventricular septum structure |"+ - "}"); - - Expression expectedLongNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "86299006 | tetralogy of Fallot | :"+ - "246454002 | occurrence | = 255399007 | congenital |"+ - "{ 116676008 | associated morphology | = 107656002 | congenital anomaly |"+ - ", 363698007 | finding site | = 21814001 | cardiac ventricular structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 30812002 | overriding structures |"+ - ", 363698007 | finding site | = 113262008 | thoracic aorta structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 415582006 | stenosis |"+ - ", 363698007 | finding site | = 39057004 | pulmonary valve structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 56246009 | hypertrophy |"+ - ", 363698007 | finding site | = 53085002 | right ventricular structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 6920004 | defect |"+ - ", 363698007 | finding site | = 589001 | interventricular septum structure |"+ - "}"); - Expression expectedShortNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "86299006 | tetralogy of Fallot |"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testExcisionOfSubmandibularGland() { - Expression originalExpression = (Expression) SCGStandaloneSetup.parse("47227006 | excision of submandibular gland | "); - Expression expectedLongNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "71388002 | procedure | :"+ - "{ 260686004 | method | = 129304002 | excision - action |"+ - ", 405813007 | procedure site - Direct | = 385296007 | submandibular salivary gland structure |"+ - "}"); - Expression expectedShortNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "71388002 | procedure | :"+ - "{ 260686004 | method | = 129304002 | excision - action |"+ - ", 405813007 | procedure site - Direct | = 385296007 | submandibular salivary gland structure |}"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - @Ignore - public void testGaleazziFractureDislocation() { - Expression originalExpression = (Expression) SCGStandaloneSetup.parse("271576001 | Galeazzi fracture dislocation |"); - Expression expectedLongNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "263079005 | fracture dislocation of wrist joint | :"+ - "{ 116676008 | associated morphology | = 72704001 | fracture |"+ - ", 363698007 | finding site | = 299706009 | bone structure of wrist and/or hand |"+ - "}"+ - "{ 116676008 | associated morphology | = 72704001 | fracture |"+ - ", 363698007 | finding site | = 47728000 | bone structure of shaft of radius |"+ - "}"+ - "{ 116676008 | associated morphology | = 87642003 | dislocation |"+ - ", 363698007 | finding site | = 74670003 | wrist joint structure |"+ - "}"); - Expression expectedShortNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "263079005 | fracture dislocation of wrist joint | :"+ - "{ 116676008 | associated morphology | = 72704001 | fracture |"+ - ", 363698007 | finding site | = 47728000 | bone structure of shaft of radius |}"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - //////////////////////////////////////////////// new tests from Orsi (2012-03-23) /////////////////////////////////////////// - - @Test - public void testAcuteAppendicitisWithAppendixAbscess() { - Expression originalExpression = (Expression) SCGStandaloneSetup.parse("266439004"); - Expression expectedLongNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "64572001 | disease | :"+ - "263502005 | clinical course | = 424124008 | sudden onset AND/OR short duration |"+ - "{ 116676008 | associated morphology | = 44132006 | abscess morphology |"+ - ", 363698007 | finding site | = 66754008 | appendix structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 4532008 | acute inflammation |"+ - ", 363698007 | finding site | = 66754008 | appendix structure |"+ - "}"); - // TODO: figure out expected short normal form - Expression expectedShortNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "64572001 | disease | :"+ - "263502005 | clinical course | = 424124008 | sudden onset AND/OR short duration |"+ - "{ 116676008 | associated morphology | = 44132006 | abscess morphology |"+ - ", 363698007 | finding site | = 66754008 | appendix structure |"+ - "}"+ - "{ 116676008 | associated morphology | = 4532008 | acute inflammation |"+ - ", 363698007 | finding site | = 66754008 | appendix structure |"+ - "}"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testViralHepatitis() { - Expression originalExpression = (Expression) SCGStandaloneSetup.parse("3738000"); - Expression expectedLongNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "64572001 | disease | :"+ - "246075003 | causative agent | = 49872002 | virus |"+ - ", 370135005 | pathological process | = 441862004 | infectious process |"+ - "{ 116676008 | associated morphology | = 23583003 | inflammation |"+ - ", 363698007 | finding site | = 10200004 | liver structure |"+ - "}"); - // TODO: figure out expected short normal form - Expression expectedShortNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "64572001 | disease | :"+ - "246075003 | causative agent | = 49872002 | virus |"+ - ", 370135005 | pathological process | = 441862004 | infectious process |"+ - "{ 116676008 | associated morphology | = 23583003 | inflammation |"+ - ", 363698007 | finding site | = 10200004 | liver structure |"+ - "}"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testCerebellarInfarction() { - Expression originalExpression = (Expression) SCGStandaloneSetup.parse("95460007"); - Expression expectedLongNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "230696001 | posterior cerebral circulation infarction | :"+ - "{ 116676008 | associated morphology | = 55641003 | infarct |"+ - ", 363698007 | finding site | = 113305005 | cerebellar structure |" + - "}"); - // TODO: figure out expected short normal form - Expression expectedShortNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "230696001 | posterior cerebral circulation infarction | :"+ - "{ 116676008 | associated morphology | = 55641003 | infarct |"+ - ", 363698007 | finding site | = 113305005 | cerebellar structure |" + - "}"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testCuttingToenails() { - Expression originalExpression = (Expression) SCGStandaloneSetup.parse("229832002"); - Expression expectedLongNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "71388002 | procedure | :"+ - "{ 260686004 | method | = 360314001 | cutting - action |"+ - ", 405813007 | procedure site - Direct | = 76578001 | structure of nail of toe |"+ - "}"); - // TODO: figure out expected short normal form - Expression expectedShortNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "71388002 | procedure | :"+ - "{ 260686004 | method | = 360314001 | cutting - action |"+ - ", 405813007 | procedure site - Direct | = 76578001 | structure of nail of toe |"+ - "}"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - @Test - public void testRastelliOperation() { - Expression originalExpression = (Expression) SCGStandaloneSetup.parse("18932005 | Rastelli operation in repair of transposition of great vessels |"); - Expression expectedLongNormalFormExpression = (Expression) SCGStandaloneSetup.parse( - "18932005 | Rastelli operation in repair of transposition of great vessels | :"+ - "363702006 | has focus | = ( 71388002 | procedure | :"+ - "260686004 | method | = 129377008 | reconstruction - action | )"+ - "{ 260686004 | method | = 129284003 | surgical action |"+ - ", 363704007 | procedure site | = 13418002 | structure of outflow tract of left ventricle |"+ - "}"+ - "{ 260686004 | method | = 129407005 | grafting - action |"+ - ", 363700003 | direct morphology | = 32776006 | congenital vascular anomaly |"+ - ", 405813007 | procedure site - Direct | = 15825003 | aortic structure |"+ - ", 424226004 | using device | = 386028003 | surgical patch |"+ - "}"+ - "{ 260686004 | method | = 129407005 | grafting - action |"+ - ", 363700003 | direct morphology | = 32776006 | congenital vascular anomaly |"+ - ", 405813007 | procedure site - Direct | = 87878005 | left ventricular structure |"+ - ", 424226004 | using device | = 386028003 | surgical patch |"+ - "}"+ - "{ 260686004 | method | = 257741005 | anastomosis - action |"+ - ", 405813007 | procedure site - Direct | = 15825003 | aortic structure |"+ - "}"+ - "{ 260686004 | method | = 257741005 | anastomosis - action |"+ - ", 405813007 | procedure site - Direct | = 87878005 | left ventricular structure |"+ - "}"+ - "{ 260686004 | method | = 257741005 | anastomosis - action |"+ - ", 405814001 | procedure site - Indirect | = 44627009 | structure of outflow tract of right ventricle |"+ - "}"+ - "{ 260686004 | method | = 257903006 | repair - action |"+ - ", 363700003 | direct morphology | = 6920004 | defect |"+ - ", 405813007 | procedure site - Direct | = 589001 | interventricular septum structure |"+ - "}"+ - "{ 260686004 | method | = 257903006 | repair - action |"+ - ", 405813007 | procedure site - Direct | = 34202007 | aortic valve structure |"+ - "}"+ - "{ 260686004 | method | = 360021005 | bypass - action |"+ - ", 363700003 | direct morphology | = 32776006 | congenital vascular anomaly |"+ - ", 405813007 | procedure site - Direct | = 53085002 | right ventricular structure |"+ - ", 424226004 | using device | = 386028003 | surgical patch |"+ - "}"+ - "{ 260686004 | method | = 360021005 | bypass - action |"+ - ", 363700003 | direct morphology | = 32776006 | congenital vascular anomaly |"+ - ", 405813007 | procedure site - Direct | = 81040000 | pulmonary artery structuree |"+ - ", 424226004 | using device | = 257283004 | valved cardiac conduit |"+ - "}"); - - // TODO: short normal form probably wrong - Expression expectedShortNormalFormExpression = (Expression) SCGStandaloneSetup.parse("18932005 | Rastelli operation in repair of transposition of great vessels |"); - testNormalFormGenerator(originalExpression, expectedLongNormalFormExpression, expectedShortNormalFormExpression); - } - - /** - * Recursively feeds the output of the normal form generators into the same generators for a given number of times. - * @see TestUtils#TEST_ITERATION_COUNT - * - * @param originalExpression - * @param expectedLongNormalFormExpression - * @param expectedShortNormalFormExpression - */ - private void testNormalFormGenerator(Expression originalExpression, Expression expectedLongNormalFormExpression, - Expression expectedShortNormalFormExpression) { - - Expression longNormalFormTestOriginalExpression = originalExpression; - List iterationTimesInNanoseconds = Lists.newArrayList(); - for (int i=0; i conceptDefinitionMap = new HashMap(); - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentDustAllergen)); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testUngroupedAttributeNameMatch1() { - /* - * If the value of one of the name-matched attributes subsumes the other value - * include the attribute with the most specific value (not grouped) - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentSubstance = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - - // build test concept definitions - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(findingSiteLungStructure, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept1, conceptDefinition1); - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(severitySevere, causativeAgentSubstance); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(findingSiteLungStructure, - severitySevere, causativeAgentDustAllergen); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testUngroupedAttributeNameMatch1Reverse() { - /* - * If the value of one of the name-matched attributes subsumes the other value - * include the attribute with the most specific value (not grouped) - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentSubstance = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - - // build test concept definitions - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(severitySevere, causativeAgentSubstance); - conceptDefinitionMap.put(concept2, conceptDefinition2); - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(findingSiteLungStructure, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - // build expected results - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(findingSiteLungStructure, - severitySevere, causativeAgentDustAllergen); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testUngroupedAttributeNameMatch2() { - /* - * If the value of the name-matched attributes are identical - * include one and omit the other - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentDustAllergen2 = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - - // build test concept definitions - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(findingSiteLungStructure, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept1, conceptDefinition1); - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(severitySevere, causativeAgentDustAllergen2); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(findingSiteLungStructure, severitySevere, - causativeAgentDustAllergen); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testUngroupedAttributeNameMatch2Reverse() { - /* - * If the value of the name-matched attributes are identical - * include one and omit the other - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentDustAllergen2 = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - - // build test concept definitions - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(severitySevere, causativeAgentDustAllergen2); - conceptDefinitionMap.put(concept2, conceptDefinition2); - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(findingSiteLungStructure, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - // build expected results - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(findingSiteLungStructure, severitySevere, - causativeAgentDustAllergen); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testUngroupedAttributeNameMatch3() { - /* - * If neither of the two preceding conditions apply - * include both attributes (not grouped) - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, - SnomedConcepts.SEVERE); - Attribute findingSiteHeadStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.HEAD_STRUCTURE); - - // build test concept definitions - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(findingSiteLungStructure); - conceptDefinitionMap.put(concept1, conceptDefinition1); - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(severitySevere, findingSiteHeadStructure); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(findingSiteLungStructure, severitySevere, - findingSiteHeadStructure); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testUngroupedAttributeNameMatch3Reverse() { - /* - * If neither of the two preceding conditions apply - * include both attributes (not grouped) - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, - SnomedConcepts.SEVERE); - Attribute findingSiteHeadStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.HEAD_STRUCTURE); - - // build test concept definitions - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(severitySevere, findingSiteHeadStructure); - conceptDefinitionMap.put(concept2, conceptDefinition2); - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(findingSiteLungStructure); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - // build expected results - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(findingSiteLungStructure, severitySevere, - findingSiteHeadStructure); - - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testGroupedAttributeNameMatch1() { - /* - * If the value of the ungrouped attribute subsumes value of the name-matched grouped attribute - * omit the ungrouped attribute from the target definition - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - Group group = ScgBuilderUtils.buildGroup(Arrays.asList(findingSiteLungStructure, causativeAgentDustAllergen)); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentSubstance = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - - // build test concept definitions - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(severitySevere, causativeAgentSubstance); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - Group expectedGroup = ScgBuilderUtils.buildGroup(Arrays.asList(EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentDustAllergen))); - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(Collections.singleton(expectedGroup), - Arrays.asList(EcoreUtil.copy(severitySevere))); - - ConceptDefinition mergedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(EcoreUtil.copy(group)); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testGroupedAttributeNameMatch2() { - /* - * If the value of the grouped attribute is subsumed by the value of the name-matched grouped attribute - * add the ungrouped attribute to the group containing the matching grouped attribute in the target definition - * if this condition is met by multiple groups - * add the ungrouped attribute to all groups that meet this condition - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentSubstance = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.SUBSTANCE); - Group group = ScgBuilderUtils.buildGroup(Arrays.asList(findingSiteLungStructure, causativeAgentSubstance)); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, - SnomedConcepts.SEVERE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.DUST_ALLERGEN); - - // build test concept definitions - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(severitySevere, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - Group expectedGroup = ScgBuilderUtils.buildGroup(Arrays.asList(EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentDustAllergen), EcoreUtil.copy(causativeAgentSubstance))); - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(Collections.singleton(expectedGroup), - Collections.singleton(EcoreUtil.copy(severitySevere))); - - ConceptDefinition mergedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(group); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testGroupedAttributeNameMatch3() { - /* - * If the value of the name-matched grouped and ungrouped attributes are disjoint - * add the ungrouped attribute as an ungrouped attribute in the target expression. - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.DUST_ALLERGEN); - Group group = ScgBuilderUtils.buildGroup(Arrays.asList(findingSiteLungStructure, causativeAgentDustAllergen)); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentContactAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.CONTACT_ALLERGEN); - - // build test concept definitions - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(severitySevere, causativeAgentContactAllergen); - conceptDefinitionMap.put(concept2, conceptDefinition2); - - // build expected results - Group expectedGroup = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentDustAllergen) })); - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(Collections.singleton(expectedGroup), - Arrays.asList(EcoreUtil.copy(severitySevere), EcoreUtil.copy(causativeAgentContactAllergen))); - - ConceptDefinition mergedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(group); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testGroupedAttributeNameMatch1Reverse() { - /* - * If the value of the ungrouped attribute subsumes value of the name-matched grouped attribute - * omit the ungrouped attribute from the target definition - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.DUST_ALLERGEN); - Group group = ScgBuilderUtils.buildGroup(Arrays.asList(findingSiteLungStructure, causativeAgentDustAllergen)); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentSubstance = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, SnomedConcepts.SUBSTANCE); - - // build test concept definitions - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(severitySevere, causativeAgentSubstance); - conceptDefinitionMap.put(concept2, conceptDefinition2); - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - // build expected results - Group expectedGroup = ScgBuilderUtils.buildGroup(Arrays.asList(EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentDustAllergen))); - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(Collections.singleton(expectedGroup), - Arrays.asList(EcoreUtil.copy(severitySevere))); - - ConceptDefinition mergedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(EcoreUtil.copy(group)); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testGroupedAttributeNameMatch2Reverse() { - /* - * If the value of the grouped attribute is subsumed by the value of the name-matched grouped attribute - * add the ungrouped attribute to the group containing the matching grouped attribute in the target definition - * if this condition is met by multiple groups - * add the ungrouped attribute to all groups that meet this condition - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentSubstance = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.SUBSTANCE); - Group group = ScgBuilderUtils.buildGroup(Arrays.asList(findingSiteLungStructure, causativeAgentSubstance)); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, - SnomedConcepts.SEVERE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.DUST_ALLERGEN); - - // build test concept definitions - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(severitySevere, causativeAgentDustAllergen); - conceptDefinitionMap.put(concept2, conceptDefinition2); - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - // build expected results - Group expectedGroup = ScgBuilderUtils.buildGroup(Arrays.asList(EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentDustAllergen), EcoreUtil.copy(causativeAgentSubstance))); - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(Collections.singleton(expectedGroup), - Collections.singleton(EcoreUtil.copy(severitySevere))); - - ConceptDefinition mergedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(group); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } - - @Test - public void testGroupedAttributeNameMatch3Reverse() { - /* - * If the value of the name-matched grouped and ungrouped attributes are disjoint - * add the ungrouped attribute as an ungrouped attribute in the target expression. - */ - - UngroupedAttributesMerger merger = new UngroupedAttributesMerger(new SubsumptionTester(Branch.MAIN_PATH)); - Map conceptDefinitionMap = new HashMap(); - - Attribute findingSiteLungStructure = ScgBuilderUtils.buildAttribute(SnomedConcepts.FINDING_SITE, - SnomedConcepts.LUNG_STRUCTURE); - Attribute causativeAgentDustAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.DUST_ALLERGEN); - Group group = ScgBuilderUtils.buildGroup(Arrays.asList(findingSiteLungStructure, causativeAgentDustAllergen)); - - Attribute severitySevere = ScgBuilderUtils.buildAttribute(SnomedConcepts.SEVERITY, SnomedConcepts.SEVERE); - Attribute causativeAgentContactAllergen = ScgBuilderUtils.buildAttribute(SnomedConcepts.CAUSATIVE_AGENT, - SnomedConcepts.CONTACT_ALLERGEN); - - // build test concept definitions - Concept concept2 = ScgBuilderUtils.buildConcept("CONCEPT_2"); - ConceptDefinition conceptDefinition2 = ScgBuilderUtils.buildConceptDefinition(severitySevere, causativeAgentContactAllergen); - conceptDefinitionMap.put(concept2, conceptDefinition2); - Concept concept1 = ScgBuilderUtils.buildConcept("CONCEPT_1"); - ConceptDefinition conceptDefinition1 = ScgBuilderUtils.buildConceptDefinition(group); - conceptDefinitionMap.put(concept1, conceptDefinition1); - - // build expected results - Group expectedGroup = ScgBuilderUtils.buildGroup(Arrays.asList(new Attribute[] { EcoreUtil.copy(findingSiteLungStructure), - EcoreUtil.copy(causativeAgentDustAllergen) })); - ConceptDefinition expectedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(Collections.singleton(expectedGroup), - Arrays.asList(EcoreUtil.copy(severitySevere), EcoreUtil.copy(causativeAgentContactAllergen))); - - ConceptDefinition mergedConceptDefinition = ScgBuilderUtils.buildConceptDefinition(group); - merger.mergeUngroupedAttributes(conceptDefinitionMap, mergedConceptDefinition); - - TestUtils.assertConceptDefinitionsEqual(expectedConceptDefinition, mergedConceptDefinition); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/subsumption/test/SubsumptionTesterTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/subsumption/test/SubsumptionTesterTest.java deleted file mode 100644 index 44807ce9d7a..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/subsumption/test/SubsumptionTesterTest.java +++ /dev/null @@ -1,427 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.subsumption.test; - -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.dsl.SCGStandaloneSetup; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.semanticengine.subsumption.SubsumptionTester; -import com.b2international.snowowl.semanticengine.test.utils.TestUtils; -import com.google.common.collect.Lists; - -/** - * - */ -public class SubsumptionTesterTest { - - private void testExpressionSubsumption(Expression predicate, Expression candidate, boolean expectedResult) { - List iterationTimesInNanoseconds = Lists.newArrayList(); - for (int i=0; i - * Note: run with at least 1G heap size. - * - * @since 3.3 - */ -@RunWith(Suite.class) -@SuiteClasses({ - AttributeNormalizerTest.class, - ConceptDefinitionAttributeRedundancyFilterTest.class, - ConceptDefinitionMergerTest.class, - ConceptDefinitionNormalizerTest.class, - ExpressionCanonicalRepresentationTest.class, - FocusConceptNormalizerTest.class, - GroupMergerTest.class, - NormalFormGeneratorTest.class, - NormalFormGeneratorTestFromSnomedDocument.class, - UngroupedAttributesMergerTest.class, - ContextWrapperBuilderTest.class, - SemanticUtilsTest.class -}) -public class AllSemanticEngineTests { - - @ClassRule - public static final SnowOwlAppRule appRule = SnowOwlAppRule.snowOwl(AllSemanticEngineTests.class); - -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/test/SemanticEngineTestPlugin.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/test/SemanticEngineTestPlugin.java deleted file mode 100644 index a4cedd7b3be..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/test/SemanticEngineTestPlugin.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.test; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -public class SemanticEngineTestPlugin implements BundleActivator { - - private static BundleContext context; - - static BundleContext getContext() { - return context; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext bundleContext) throws Exception { - SemanticEngineTestPlugin.context = bundleContext; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext bundleContext) throws Exception { - SemanticEngineTestPlugin.context = null; - } - -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/test/SnomedConcepts.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/test/SnomedConcepts.java deleted file mode 100644 index 15dacb65aae..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/test/SnomedConcepts.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.test; - -public abstract class SnomedConcepts { - // attribute name concepts - public static final String ATTRIBUTE = "246061005"; - public static final String FINDING_SITE = "363698007"; - public static final String PROCEDURE_SITE = "363704007"; - public static final String CAUSATIVE_AGENT = "246075003"; - public static final String ASSOCIATED_WITH = "47429007"; - public static final String ASSOCIATED_FINDING = "246090004"; - public static final String SEVERITY = "246112005"; - public static final String METHOD = "260686004"; - public static final String PROCEDURE_SITE_DIRECT = "405813007"; - public static final String ASSOCIATED_MORPHOLOGY = "116676008"; - // attribute value concepts - public static final String HEAD_STRUCTURE = "69536005"; - public static final String LUNG_STRUCTURE = "39607008"; - public static final String SEVERE = "24484000"; - public static final String DUST_ALLERGEN = "410980008"; - public static final String CONTACT_ALLERGEN = "406473004"; - public static final String SUBSTANCE = "105590001"; - // low-level primitive concepts - public static final String FAMILY_FELIDAE = "388618001"; // organism - public static final String SUBFAMILY_FELINAE = "388623001"; // organism - public static final String TURKISH_ANGORA_CAT = "61686008"; // organism - public static final String SUBFAMILY_PANTHERINAE = "388748007"; // organism - public static final String PANTHERA_TIGRIS = "79047009"; // organism - public static final String FOOT_STRUCTURE = "56459004"; // body structure - public static final String PAIN = "22253000"; // clinical finding - public static final String EXPIRATORY_CRACKLES = "12529006"; // clinical finding - public static final String EXCISION_ACTION = "129304002"; // qualifier value - public static final String FALLOPIAN_TUBE_STRUCTURE = "31435000"; // body structure - public static final String OVARIAN_STRUCTURE = "15497006"; // body structure - public static final String FRACTURE = "72704001"; // body structure - public static final String FRACTURE_OF_BONE = "125605004"; // clinical finding - public static final String BONE_STRUCTURE_OF_FEMUR = "71341001"; // body structure - public static final String EXCISION_OF_PELVIS = "123014005"; // procedure - public static final String AUSCULTATION = "37931006"; // procedure - public static final String AUSCULTATION_ACTION = "129436005"; // qualifier - - - // high-level primitive concepts - public static final String PROCEDURE = "71388002"; // procedure - public static final String DISEASE = "64572001"; // clinical finding - // fully defined concepts - public static final String DISORDER_OF_HEAD = "118934005"; // clinical finding - public static final String DISORDER_OF_EAR = "25906001"; // clinical finding - public static final String FOOT_PAIN = "47933007"; // clinical finding - public static final String FRACTURE_OF_FEMUR = "71620000"; // clinical finding - public static final String SALPINGO_OOPHORECTOMY = "116028008"; // procedure - - // tetralogy of fallot attribute value concepts - public static final String CONGENITAL_ANOMALY = "107656002"; - public static final String CARDIAC_VENTRICULAR_STRUCTURE = "21814001"; - public static final String OVERRIDING_STRUCTURES = "30812002"; - public static final String THORACIC_AORTA = "113262008"; - public static final String STENOSIS = "415582006"; - public static final String PULMONARY_VALVE = "39057004"; - - - private SnomedConcepts() {} // suppressing public constructor to avoid subclassing -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/test/utils/TestUtils.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/test/utils/TestUtils.java deleted file mode 100644 index 3960793429d..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/test/utils/TestUtils.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.test.utils; - -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import org.junit.ComparisonFailure; - -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.semanticengine.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.utils.ConceptDefinitionComparator; -import com.b2international.snowowl.semanticengine.utils.ExpressionComparator; - -/** - * Various utility functions for testing. - * - */ -public class TestUtils { - - public static final int TEST_ITERATION_COUNT = 100; - - public static void printPerformanceStats(String message, List iterationTimesInNanoseconds) { - Long max = Collections.max(iterationTimesInNanoseconds); - Long min = Collections.min(iterationTimesInNanoseconds); - - System.out.format("%s: totalIterations=%d, min=%d us, max=%d us, avg=%d us.\n", message, iterationTimesInNanoseconds.size(), - min/1000, max/1000, average(iterationTimesInNanoseconds)/1000); - } - - private static long average(Collection values) { - long avg = 0; - for (Long value : values) { - avg += value; - } - return avg / values.size(); - } - - public static void assertConceptDefinitionsEqual(ConceptDefinition expectedConceptDefinition, - ConceptDefinition actualConceptDefinition) { - ConceptDefinitionComparator conceptDefinitionComparator = new ConceptDefinitionComparator(); - boolean equal = conceptDefinitionComparator.equal(expectedConceptDefinition, actualConceptDefinition); - - if (!equal) { - throw new ComparisonFailure("Concept definitions are not equal.", expectedConceptDefinition.toString(), actualConceptDefinition.toString()); - } - } - - public static void assertExpressionsEqual(String message, Expression expected, Expression actual) { - ExpressionComparator expressionComparator = new ExpressionComparator(); - boolean equal = expressionComparator.equal(expected, actual); - if (!equal) - throw new ComparisonFailure(message, expected.toString(), actual.toString()); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/utils/test/ContextWrapperBuilderTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/utils/test/ContextWrapperBuilderTest.java deleted file mode 100644 index 282ad52f119..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/utils/test/ContextWrapperBuilderTest.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils.test; - -import java.util.Collections; - -import org.junit.Assert; -import org.junit.Test; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.semanticengine.utils.ContextWrapperBuilder; -import com.b2international.snowowl.semanticengine.utils.ScgBuilderUtils; -import com.b2international.snowowl.semanticengine.utils.SemanticUtils; - -public class ContextWrapperBuilderTest { - - private static final String BODY_WEIGHT_ID = "27113001"; - private static final String DEFAULT_SUBJECT_RELATIONSHIP_VALUE_ID = "33333333"; - private static final String DEFAULT_TEMPORAL_CONTEXT_VALUE_ID = "22222222"; - private static final String DEFAULT_FINDING_CONTEXT_VALUE_ID = "11111111"; - - @Test - public void testCompleteWrapper() { - ContextWrapperBuilder contextWrapperBuilder = new ContextWrapperBuilder(); - Concept concept = ScgBuilderUtils.buildConcept(BODY_WEIGHT_ID); // body weight - Expression clinicalKernelExpression = ScgBuilderUtils.buildExpression(concept); - Concept situationWithExplicitContextConcept = ScgBuilderUtils.buildConcept(SemanticUtils.SITUATION_WITH_EXPLICIT_CONTEXT_ID); - Attribute findingContextAttribute = ScgBuilderUtils.buildAttribute(SemanticUtils.FINDING_CONTEXT_ID, DEFAULT_FINDING_CONTEXT_VALUE_ID); - Attribute temporalContextAttribute = ScgBuilderUtils.buildAttribute(SemanticUtils.TEMPORAL_CONTEXT_ID, DEFAULT_TEMPORAL_CONTEXT_VALUE_ID); - Attribute subjectRelationshipContextAttribute = ScgBuilderUtils.buildAttribute(SemanticUtils.SUBJECT_RELATIONSHIP_CONTEXT_ID, DEFAULT_SUBJECT_RELATIONSHIP_VALUE_ID); - Group group = ScgBuilderUtils.buildGroup(contextWrapperBuilder.buildAssociatedFindingAttribute(clinicalKernelExpression), - findingContextAttribute, temporalContextAttribute, subjectRelationshipContextAttribute); - Expression incompleteContextWrapperExpression = ScgBuilderUtils.buildExpression( - Collections.singletonList(situationWithExplicitContextConcept), - Collections.singletonList(group), Collections.emptyList()); - - Assert.assertTrue(ContextWrapperBuilder.hasSomeContextWrapper(incompleteContextWrapperExpression)); - Assert.assertTrue(ContextWrapperBuilder.hasCompleteContextWrapper(incompleteContextWrapperExpression)); - Expression completeContextWrapperExpression = contextWrapperBuilder.ensureCompleteContextWrapper(incompleteContextWrapperExpression); - Assert.assertTrue(ContextWrapperBuilder.hasCompleteContextWrapper(completeContextWrapperExpression)); - String findingContextValueId = SemanticUtils.getAttributeValueId(completeContextWrapperExpression, SemanticUtils.FINDING_CONTEXT_ID); - String temporalContextValueId = SemanticUtils.getAttributeValueId(completeContextWrapperExpression, SemanticUtils.TEMPORAL_CONTEXT_ID); - String subjectRelContextValueId = SemanticUtils.getAttributeValueId(completeContextWrapperExpression, SemanticUtils.SUBJECT_RELATIONSHIP_CONTEXT_ID); - Assert.assertEquals(DEFAULT_FINDING_CONTEXT_VALUE_ID, findingContextValueId); - Assert.assertEquals(DEFAULT_TEMPORAL_CONTEXT_VALUE_ID, temporalContextValueId); - Assert.assertEquals(DEFAULT_SUBJECT_RELATIONSHIP_VALUE_ID, subjectRelContextValueId); - } - - @Test - public void testLessIncompleteWrapper() { - ContextWrapperBuilder contextWrapperBuilder = new ContextWrapperBuilder(); - Concept concept = ScgBuilderUtils.buildConcept(BODY_WEIGHT_ID); // body weight - Expression clinicalKernelExpression = ScgBuilderUtils.buildExpression(concept); - Concept situationWithExplicitContextConcept = ScgBuilderUtils.buildConcept(SemanticUtils.SITUATION_WITH_EXPLICIT_CONTEXT_ID); - Attribute findingContextAttribute = contextWrapperBuilder.buildDefaultFindingContextAttribute(); - String testConceptId = "123456789"; - findingContextAttribute.setValue(ScgBuilderUtils.buildConcept(testConceptId)); - Group group = ScgBuilderUtils.buildGroup(contextWrapperBuilder.buildAssociatedFindingAttribute(clinicalKernelExpression), - findingContextAttribute); - Expression incompleteContextWrapperExpression = ScgBuilderUtils.buildExpression( - Collections.singletonList(situationWithExplicitContextConcept), - Collections.singletonList(group), Collections.emptyList()); - - Assert.assertTrue(ContextWrapperBuilder.hasSomeContextWrapper(incompleteContextWrapperExpression)); - Assert.assertFalse(ContextWrapperBuilder.hasCompleteContextWrapper(incompleteContextWrapperExpression)); - Expression completeContextWrapperExpression = contextWrapperBuilder.ensureCompleteContextWrapper(incompleteContextWrapperExpression); - Assert.assertTrue(ContextWrapperBuilder.hasCompleteContextWrapper(completeContextWrapperExpression)); - String findingContextValueId = SemanticUtils.getAttributeValueId(completeContextWrapperExpression, SemanticUtils.FINDING_CONTEXT_ID); - Assert.assertEquals(testConceptId, findingContextValueId); - } - - @Test - public void testIncompleteWrapper() { - ContextWrapperBuilder contextWrapperBuilder = new ContextWrapperBuilder(); - Concept concept = ScgBuilderUtils.buildConcept(BODY_WEIGHT_ID); // body weight - Expression clinicalKernelExpression = ScgBuilderUtils.buildExpression(concept); - Concept situationWithExplicitContextConcept = ScgBuilderUtils.buildConcept(SemanticUtils.SITUATION_WITH_EXPLICIT_CONTEXT_ID); - Group group = ScgBuilderUtils.buildGroup(contextWrapperBuilder.buildAssociatedFindingAttribute(clinicalKernelExpression)); - Expression incompleteContextWrapperExpression = ScgBuilderUtils.buildExpression( - Collections.singletonList(situationWithExplicitContextConcept), - Collections.singletonList(group), Collections.emptyList()); - - Assert.assertTrue(ContextWrapperBuilder.hasSomeContextWrapper(incompleteContextWrapperExpression)); - Assert.assertFalse(ContextWrapperBuilder.hasCompleteContextWrapper(incompleteContextWrapperExpression)); - Expression completeContextWrapperExpression = contextWrapperBuilder.ensureCompleteContextWrapper(incompleteContextWrapperExpression); - Assert.assertTrue(ContextWrapperBuilder.hasCompleteContextWrapper(completeContextWrapperExpression)); - } - - @Test(expected=IllegalArgumentException.class) - public void testMismatchedWrapper1() { - ContextWrapperBuilder contextWrapperBuilder = new ContextWrapperBuilder(); - Concept concept = ScgBuilderUtils.buildConcept(BODY_WEIGHT_ID); // body weight - Expression clinicalKernelExpression = ScgBuilderUtils.buildExpression(concept); - Concept situationWithExplicitContextConcept = ScgBuilderUtils.buildConcept(SemanticUtils.SITUATION_WITH_EXPLICIT_CONTEXT_ID); - Group group = ScgBuilderUtils.buildGroup(contextWrapperBuilder.buildAssociatedFindingAttribute(clinicalKernelExpression), - contextWrapperBuilder.buildDefaultProcedureContextAttribute()); - Expression incompleteContextWrapperExpression = ScgBuilderUtils.buildExpression( - Collections.singletonList(situationWithExplicitContextConcept), - Collections.singletonList(group), Collections.emptyList()); - - Assert.assertTrue(ContextWrapperBuilder.hasSomeContextWrapper(incompleteContextWrapperExpression)); - Assert.assertFalse(ContextWrapperBuilder.hasCompleteContextWrapper(incompleteContextWrapperExpression)); - contextWrapperBuilder.ensureCompleteContextWrapper(incompleteContextWrapperExpression); - } - - @Test(expected=IllegalArgumentException.class) - public void testMismatchedWrapper2() { - ContextWrapperBuilder contextWrapperBuilder = new ContextWrapperBuilder(); - Concept concept = ScgBuilderUtils.buildConcept(BODY_WEIGHT_ID); // body weight - Expression clinicalKernelExpression = ScgBuilderUtils.buildExpression(concept); - Concept situationWithExplicitContextConcept = ScgBuilderUtils.buildConcept(SemanticUtils.SITUATION_WITH_EXPLICIT_CONTEXT_ID); - Group group = ScgBuilderUtils.buildGroup(contextWrapperBuilder.buildAssociatedProcedureAttribute(clinicalKernelExpression), - contextWrapperBuilder.buildDefaultFindingContextAttribute()); - Expression incompleteContextWrapperExpression = ScgBuilderUtils.buildExpression( - Collections.singletonList(situationWithExplicitContextConcept), - Collections.singletonList(group), Collections.emptyList()); - - Assert.assertTrue(ContextWrapperBuilder.hasSomeContextWrapper(incompleteContextWrapperExpression)); - Assert.assertFalse(ContextWrapperBuilder.hasCompleteContextWrapper(incompleteContextWrapperExpression)); - contextWrapperBuilder.ensureCompleteContextWrapper(incompleteContextWrapperExpression); - } - - @Test(expected=IllegalArgumentException.class) - public void testWithClinicalKernelOnly() { - ContextWrapperBuilder contextWrapperBuilder = new ContextWrapperBuilder(); - Concept concept = ScgBuilderUtils.buildConcept(BODY_WEIGHT_ID); // body weight - Expression clinicalKernelExpression = ScgBuilderUtils.buildExpression(concept); - Assert.assertFalse(ContextWrapperBuilder.hasSomeContextWrapper(clinicalKernelExpression)); - Assert.assertFalse(ContextWrapperBuilder.hasCompleteContextWrapper(clinicalKernelExpression)); - contextWrapperBuilder.ensureCompleteContextWrapper(clinicalKernelExpression); - } - -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/utils/test/SemanticUtilsTest.java b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/utils/test/SemanticUtilsTest.java deleted file mode 100644 index 1b05f429c4b..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/com/b2international/snowowl/semanticengine/utils/test/SemanticUtilsTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils.test; - -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; - -import com.b2international.snowowl.dsl.SCGStandaloneSetup; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.semanticengine.utils.SemanticUtils; -import com.google.common.collect.Lists; - -/** - * - */ -public class SemanticUtilsTest { - - @Test - public void testContextAttributeExtractor() { - doTestContextAttributeExtractor("243796009:363589002=" + - "17724006" + - ",405813007=88727008" + - ",408729009=410515003" + - ",408731000=410512000" + - ",408732007=410604004", "410515003", "410512000", "410604004", null); - } - - @Test(expected=IllegalArgumentException.class) - public void testContextAttributeExtractorWithExpressionValue() { - doTestContextAttributeExtractor("243796009:363589002=" + - "17724006" + - ",405813007=88727008" + - ",408729009=410515003" + - ",408731000=(410512000)" + - ",408732007=410604004", "410515003", "410512000", "410604004", null); - } - - @Test - public void testClinicalKernelExtractorWithSimpleKernel() { - doTestClinicalKernelExtractor("243796009:363589002=" + - "17724006" + - ",405813007=88727008" + - ",408729009=410515003" + - ",408731000=410512000" + - ",408732007=410604004", Lists.newArrayList("17724006")); - } - - @Test - public void testClinicalKernelExtractorWithComplexKernel() { - doTestClinicalKernelExtractor("243796009:363589002=" + - "(17724006+73211009:405813007=88727008)" + - ",405813007=88727008" + - ",408729009=410515003" + - ",408731000=410512000" + - ",408732007=410604004", Lists.newArrayList("17724006", "73211009")); - } - - private void doTestContextAttributeExtractor(String expressionString, String expectedFindingContext, String expectedTemporalContext, - String expectedSubjectRelationshipContext, String expectedProcedureContext) { - Expression expression = (Expression) SCGStandaloneSetup.parse(expressionString); - String findingContext = SemanticUtils.getAttributeValueId(expression, SemanticUtils.FINDING_CONTEXT_ID); - Assert.assertEquals(expectedFindingContext, findingContext); - String temporalContext = SemanticUtils.getAttributeValueId(expression, SemanticUtils.TEMPORAL_CONTEXT_ID); - Assert.assertEquals(expectedTemporalContext, temporalContext); - String subjectRelationshipContext = SemanticUtils.getAttributeValueId(expression, SemanticUtils.SUBJECT_RELATIONSHIP_CONTEXT_ID); - Assert.assertEquals(expectedSubjectRelationshipContext, subjectRelationshipContext); - String procContext = SemanticUtils.getAttributeValueId(expression, SemanticUtils.PROCEDURE_CONTEXT_ID); - Assert.assertEquals(expectedProcedureContext, procContext); - } - - private void doTestClinicalKernelExtractor(String expressionString, List expectedFocusConceptIds) { - Expression expression = (Expression) SCGStandaloneSetup.parse(expressionString); - List clinicalKernelFocusConceptIds = SemanticUtils.getClinicalKernelFocusConceptIds(expression); - Assert.assertFalse(clinicalKernelFocusConceptIds.isEmpty()); - Assert.assertEquals(expectedFocusConceptIds, clinicalKernelFocusConceptIds); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/configuration/snowowl.yml b/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/configuration/snowowl.yml deleted file mode 100644 index e826b2bd74e..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/src/configuration/snowowl.yml +++ /dev/null @@ -1,13 +0,0 @@ -systemUser: true - -snomed: - languages: - - - code: en - refSetIds: ["900000000000509007", "900000000000508004"] - - - code: en-us - refSetIds: ["900000000000509007"] - - - code: en-gb - refSetIds: ["900000000000508004"] diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine.test/test.escg b/snomed/com.b2international.snowowl.snomed.semanticengine.test/test.escg deleted file mode 100644 index ceb7eceaed0..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine.test/test.escg +++ /dev/null @@ -1 +0,0 @@ -243796009 | situation with explicit context | \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/.classpath b/snomed/com.b2international.snowowl.snomed.semanticengine/.classpath deleted file mode 100644 index 8f1dba04e60..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.semanticengine/META-INF/MANIFEST.MF deleted file mode 100644 index 4e940c61fa7..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/META-INF/MANIFEST.MF +++ /dev/null @@ -1,16 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Snow Owl SNOMED CT Semantic Engine -Bundle-SymbolicName: com.b2international.snowowl.snomed.semanticengine -Bundle-Version: 7.3.0.qualifier -Bundle-Activator: com.b2international.snowowl.semanticengine.SemanticEnginePlugin -Bundle-Vendor: B2i Healthcare -Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", - com.b2international.snowowl.snomed.scg, - com.b2international.snowowl.snomed.datastore -Bundle-RequiredExecutionEnvironment: JavaSE-11 -Bundle-ActivationPolicy: lazy -Export-Package: com.b2international.snowowl.semanticengine.normalform, - com.b2international.snowowl.semanticengine.subsumption,com.b2internat - ional.snowowl.semanticengine.utils -Import-Package: org.slf4j;version="1.7.25" diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/pom.xml b/snomed/com.b2international.snowowl.snomed.semanticengine/pom.xml deleted file mode 100644 index 3af6be0d3e0..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 4.0.0 - - com.b2international.snowowl - snomed-parent - 7.3.0-SNAPSHOT - - com.b2international.snowowl.snomed.semanticengine - eclipse-plugin - diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/SemanticEnginePlugin.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/SemanticEnginePlugin.java deleted file mode 100644 index 3484bb753e3..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/SemanticEnginePlugin.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -public class SemanticEnginePlugin implements BundleActivator { - - private static BundleContext context; - - static BundleContext getContext() { - return context; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext bundleContext) throws Exception { - SemanticEnginePlugin.context = bundleContext; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext bundleContext) throws Exception { - SemanticEnginePlugin.context = null; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/AttributeNameMatch.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/AttributeNameMatch.java deleted file mode 100644 index 26b9e7cb92c..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/AttributeNameMatch.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.dsl.scg.ScgFactory; - - -/** - * Simple class to hold an attribute and its containing group, if it is grouped. - * If the attribute is ungrouped, the group will be {@link AttributeNameMatch#NO_GROUP}. - * - */ -public final class AttributeNameMatch { - - public static final Group NO_GROUP = ScgFactory.eINSTANCE.createGroup(); - - private Group group; - private final Attribute attribute; - - public AttributeNameMatch(Attribute attribute, Group group) { - this.attribute = attribute; - this.group = group; - } - - public AttributeNameMatch(Attribute attribute) { - this.attribute = attribute; - this.group = NO_GROUP; - } - - /** - * @return the name-matched attribute - */ - public Attribute getAttribute() { - return attribute; - } - - /** - * @return the group containing the attribute, or {@link AttributeNameMatch#NO_GROUP} if ungrouped - */ - public Group getGroup() { - return group; - } - - @Override - public String toString() { - if (group != NO_GROUP) - return attribute + " in " + group; - else - return attribute + " (ungrouped)"; - } - - public void setGroup(Group group) { - this.group = group; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/AttributeNormalizer.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/AttributeNormalizer.java deleted file mode 100644 index 2c7403001b7..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/AttributeNormalizer.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.ecore.util.EcoreUtil; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.dsl.scg.ScgFactory; -import com.b2international.snowowl.semanticengine.utils.SemanticUtils; - -/** - * The value of every attribute specified in the expression refinement (including grouped - * and ungrouped attributes) is treated as an expression and normalized according to the - * full set of rules in section 5.3. - * To ensure depth-first processing, this recursive process is carried out before any - * other processing of the expression refinement.
        - * Recursive normalization should be applied to all values even if they are - * represented by single conceptIds. - * When all attribute values in the expression refinement have been processed, the - * refinement is passed to the "Merge refinement" process (5.3.5). - * - */ -public class AttributeNormalizer { - - private final ScgExpressionNormalFormGenerator normalFormGenerator; - - public AttributeNormalizer(String branchPath) { - normalFormGenerator = new ScgExpressionNormalFormGenerator(branchPath); - } - - /** - * @param Groups - * @param ungroupedAttributes - * @return the normalized concept definition - */ - public ConceptDefinition normalizeAttributes(List Groups, List ungroupedAttributes) { - // attribute groups - Collection normalizedGroups = new ArrayList(); - for (Group group : Groups) { - Collection normalizedAttributes = new ArrayList(); - for (Attribute attribute : group.getAttributes()) { - Attribute normalizedAttribute = normalizeAttribute(attribute); - normalizedAttributes.add(normalizedAttribute); - } - Group normalizedGroup = ScgFactory.eINSTANCE.createGroup(); - normalizedGroup.getAttributes().addAll(normalizedAttributes); - normalizedGroups.add(normalizedGroup); - } - - // ungrouped attributes - Collection normalizedUngroupedAttributes = new ArrayList(); - for (Attribute attribute : ungroupedAttributes) { - normalizedUngroupedAttributes.add(normalizeAttribute(attribute)); - } - - ConceptDefinition normalizedAttributes = new ConceptDefinition(); - normalizedAttributes.getGroups().addAll(normalizedGroups); - normalizedAttributes.getUngroupedAttributes().addAll(normalizedUngroupedAttributes); - return normalizedAttributes; - } - - private Attribute normalizeAttribute(Attribute attribute) { - Expression valueExpression = SemanticUtils.getAttributeValueExpression(attribute); - Expression normalFormValueExpression = normalFormGenerator.getLongNormalForm(valueExpression); - Attribute normalizedAttribute = ScgFactory.eINSTANCE.createAttribute(); - normalizedAttribute.setValue(SemanticUtils.buildRValue(normalFormValueExpression)); - normalizedAttribute.setName(EcoreUtil.copy(attribute.getName())); - return normalizedAttribute; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinition.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinition.java deleted file mode 100644 index a92010d15ff..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinition.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform; - -import java.util.ArrayList; -import java.util.List; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Group; - -/** - * Simple class to hold attribute groups and ungrouped attributes that belong together. - * - */ -public final class ConceptDefinition { - private final List ungroupedAttributes = new ArrayList(); - private final List groups = new ArrayList(); - - public List getGroups() { - return groups; - } - - public List getUngroupedAttributes() { - return ungroupedAttributes; - } - - @Override - public String toString() { - return groups + ", " + getUngroupedAttributes(); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinitionAttributeRedundancyFilter.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinitionAttributeRedundancyFilter.java deleted file mode 100644 index cbbd606517a..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinitionAttributeRedundancyFilter.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform; - -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.dsl.scg.ScgFactory; -import com.b2international.snowowl.semanticengine.subsumption.SubsumptionTester; - -/** - * 5.3.4.5 Remove redundant elements from the merged definition
        - * Check each group in the target definition and, within that group, compare the values of any name-matched attributes. - *
        • If an attribute in the group has a value that subsumes the value of another name- matched attribute in the same group, - * remove that attribute from this group in the target definition.
        • - * Check the ungrouped set of attributes. - *
        • If any ungrouped attribute has a value that subsumes the value of a name-matched attribute, remove this ungrouped - * attribute from the target definition.
        • - *
        - * - * Note:
        - * The removal of redundancies described only applies to name-matched pairs of attributes. It does not affect attributes - * that are redundant only because they are present in the definitions of the primitive focus concepts. Supertype (�is a�) - * relationships are ignored during this stage of processing.


        - * - */ -public class ConceptDefinitionAttributeRedundancyFilter { - - private final SubsumptionTester subsumptionTester; - - public ConceptDefinitionAttributeRedundancyFilter(SubsumptionTester subsumptionTester) { - this.subsumptionTester = subsumptionTester; - } - - /** - * @param conceptDefinition the {@link ConceptDefinition} to filter for redundant attributes - * @return the filtered {@link ConceptDefinition} - */ - public ConceptDefinition getFilteredConceptDefinition(ConceptDefinition conceptDefinition) { - ConceptDefinition filteredConceptDefinition = new ConceptDefinition(); - - // attribute groups - for (Group Group : conceptDefinition.getGroups()) { - filteredConceptDefinition.getGroups().add(filterRedundantAttributes(Group)); - } - - // ungrouped attributes - filteredConceptDefinition.getUngroupedAttributes().addAll(filterRedundantAttributes(conceptDefinition.getUngroupedAttributes())); - - return filteredConceptDefinition; - } - - private Group filterRedundantAttributes(Group group) { - Group filteredGroup = ScgFactory.eINSTANCE.createGroup(); - filteredGroup.getAttributes().addAll(filterRedundantAttributes((group).getAttributes())); - return filteredGroup; - } - - private Set filterRedundantAttributes(Collection attributes) { - Set filteredAttributes = new HashSet(); - - /* - * for each attribute - * for each filtered attribute - * if attribute subsumes filtered attribute - * remove filtered - * add attribute - */ - - for (Attribute outerAttribute : attributes) { - Attribute subsumedFilteredAttribute = subsumesFilteredAttribute(filteredAttributes, outerAttribute); - if (subsumedFilteredAttribute != null) { - filteredAttributes.remove(subsumedFilteredAttribute); - filteredAttributes.add(outerAttribute); - } else if (subsumedByFilteredAttribute(filteredAttributes, outerAttribute) == null){ - filteredAttributes.add(outerAttribute); - } - } - - return filteredAttributes; - } - - private Attribute subsumesFilteredAttribute(Set filteredAttributes, Attribute attribute) { - for (Attribute filteredAttribute : filteredAttributes) { - if (subsumptionTester.isSubsumed(attribute, filteredAttribute)) { - return filteredAttribute; - } - } - return null; - } - - private Attribute subsumedByFilteredAttribute(Set filteredAttributes, Attribute attribute) { - for (Attribute filteredAttribute : filteredAttributes) { - if (subsumptionTester.isSubsumed(filteredAttribute, attribute)) { - return filteredAttribute; - } - } - return null; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinitionMerger.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinitionMerger.java deleted file mode 100644 index 16c275ed161..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinitionMerger.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform; - -import java.util.Map; - -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.semanticengine.subsumption.SubsumptionTester; - -/** - * 5.3.4 Merge definitions

        - * 5.3.4.1 Overview
        - * The set of normalized definitions derived from the "Normalize focus concepts" - * process (5.3.3) are merged with one another to remove redundancy. Then the - * normalized refinement is merged with the pre-merged definition to create a single - * refinement which expresses the full set of definitions and refinements without - * unnecessary redundancy.
        - * The rules applied to the merger are described below for grouped and ungrouped attributes.
        - * Group merging is completed before applying any ungrouped relationships. This ensures that, - * where appropriate, ungrouped attributes are applied to the correct groups in the output.
        - * Redundant attributes are not removed until the merger process is complete. This ensures that - * the full set of attributes is available to allow matching throughout the process of merging.

        - * 5.3.4.2 Attribute names and attribute hierarchies
        - * The following sections on merging groups and attributes refer to "name-matched" attributes. - * Two or more attributes in a definition or expression are "name-matched" if they have the - * same attribute name.
        - * For example, the attribute "procedure site"="appendix structure" is name-matched by the - * attribute "procedure site"="entire femur".
        - * However, consideration also needs to be given to hierarchical relationships between - * different "attribute names". For example, "procedure site � direct" and "procedure site � indirect" - * are subtypes of "procedure site".
        - * The simplest approach that can be consistently applied is to treat attributes that have - * subsumed names as name-matched for the purposes of group and value merging. The more specific - * attribute name is then applied to the merged attribute in the target definition. This means - * that the same rules apply for merging the values of "procedure site" and - * "procedure site � direct" as apply to mergers of attributes with identical names and that - * the name "procedure site - direct" would then be applied to any values that were merged in this way.

        - * - * Progress note:
        - * Review of a number of practical examples suggests that there may be some unexpected consequences - * of this approach. For this reason, while the issues that arise are studied further, implementers - * are recommended only to merge literal name-matched attributes.


        - * - */ -public class ConceptDefinitionMerger { - - - private final SubsumptionTester subsumptionTester; - - public ConceptDefinitionMerger(SubsumptionTester subsumptionTester) { - this.subsumptionTester = subsumptionTester; - } - - /** - * 5.3.4.3 Merging groups
        - * See {@link GroupMerger}

        - * - * 5.3.4.4 Merging ungrouped attributes
        - * See {@link UngroupedAttributesMerger}

        - * - * 5.3.4.5 Remove redundant elements from the merged definition
        - * See {@link ConceptDefinitionAttributeRedundancyFilter}

        - * - * 5.3.4.6 Completion of the definition merging
        - * Once the focus concept definitions have been merged, the target definition is passed to the "Merge refinement" process (5.3.5). - * - * @param conceptDefinitions - * @param ungroupedAttributes - * @return the merged concept definition - */ - public ConceptDefinition mergeDefinitions(Map conceptDefinitions) { - ConceptDefinition mergedConceptDefinition = new ConceptDefinition(); - GroupMerger GroupMerger = new GroupMerger(subsumptionTester); - GroupMerger.mergeGroups(conceptDefinitions, mergedConceptDefinition); - UngroupedAttributesMerger ungroupedAttributeSetMerger = new UngroupedAttributesMerger(subsumptionTester); - ungroupedAttributeSetMerger.mergeUngroupedAttributes(conceptDefinitions, mergedConceptDefinition); - ConceptDefinitionAttributeRedundancyFilter conceptDefinitionRedundancyFilter = new ConceptDefinitionAttributeRedundancyFilter(subsumptionTester); - return conceptDefinitionRedundancyFilter.getFilteredConceptDefinition(mergedConceptDefinition); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinitionNormalizer.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinitionNormalizer.java deleted file mode 100644 index 2cee12e6065..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ConceptDefinitionNormalizer.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import com.b2international.snowowl.core.ApplicationContext; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.AttributeValue; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.dsl.scg.ScgFactory; -import com.b2international.snowowl.eventbus.IEventBus; -import com.b2international.snowowl.semanticengine.utils.SemanticUtils; -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationships; -import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; -import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; - -/** - * 5.3.3.1 The set of normalized definitions of each focus concept
        - * The set of normalized definitions includes a separate normalized definition for each focus concept, - *
        • - * The normalized definition includes
        • - *
          • All ungrouped relationships
          • - *
          • All relationship groups complete with contained relationships
          - *
        • All relationship values are normalized by recursively following the full set of rules - * described in section 5.3.
        • - *
        - * Note: Storage of pre-computed normalized form of concept definitions simplifies this process as - * it removes the requirement for recursive processing of definitions at run time. - * The set of normalized definitions is passed to the "Merge definitions" process (5.3.4). - * - */ -public class ConceptDefinitionNormalizer { - - private final String branchPath; - private final ScgExpressionNormalFormGenerator normalFormGenerator; - - public ConceptDefinitionNormalizer(String branchPath) { - this.branchPath = branchPath; - this.normalFormGenerator = new ScgExpressionNormalFormGenerator(branchPath); - } - - /** - * @param focusConcepts - * @return the normalized concept definition of each focus concept - */ - public Map getNormalizedConceptDefinitions(Collection focusConcepts) { - Map>> conceptDefinitionMap = new HashMap>>(); - for (Concept focusConcept : focusConcepts) { - Map> GroupMap = new HashMap>(); - /* - * 1. get defining attributes - * 2. normalizeAttributes(defining attributes) - */ - //int internalID = terminologyBrowser.resolve(focusConcept.getId()); - //int[] outgoingRelationships = terminologyBrowser.getData().outgoingRelationships[internalID]; - final SnomedRelationships outboundRelationships = SnomedRequests.prepareSearchRelationship() - .all() - .filterByActive(true) - .filterByType(Concepts.IS_A) - .filterBySource(focusConcept.getId()) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, branchPath) - .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .getSync(); - //for (int i = 0; i < outgoingRelationships.length; i++) { - for (SnomedRelationship relationship : outboundRelationships) { - if (!Concepts.ADDITIONAL_RELATIONSHIP.equals(relationship.getCharacteristicType().getConceptId())) { - - int relationshipGroup = relationship.getGroup(); - Attribute attribute = ScgFactory.eINSTANCE.createAttribute(); - Concept nameConcept = ScgFactory.eINSTANCE.createConcept(); - nameConcept.setId(relationship.getTypeId()); - attribute.setName(nameConcept); - Expression valueExpression = ScgFactory.eINSTANCE.createExpression(); - Concept valueConcept = ScgFactory.eINSTANCE.createConcept(); - valueConcept.setId(relationship.getDestinationId()); - valueExpression.getConcepts().add(valueConcept); - Expression valueNormalFormExpression = normalFormGenerator.getLongNormalForm(valueExpression); - // only build subexpression, if necessary - AttributeValue value = SemanticUtils.buildRValue(valueNormalFormExpression); - attribute.setValue(value); - putAttributeInGroupMap(attribute, relationshipGroup, GroupMap); - } - } - conceptDefinitionMap.put(focusConcept, GroupMap); - } - - - Map result = new HashMap(); - for (Entry>> conceptMapEntry : conceptDefinitionMap.entrySet()) { - Map> conceptMapValue = conceptMapEntry.getValue(); - ConceptDefinition conceptDefinitions = new ConceptDefinition(); - for (Map.Entry> relationshipGroupMapEntry : conceptMapValue.entrySet()) { - int relationshipGroup = relationshipGroupMapEntry.getKey(); - - if (relationshipGroup == 0) { - // ungrouped attributes - conceptDefinitions.getUngroupedAttributes().addAll(relationshipGroupMapEntry.getValue()); - } else { - // attribute groups - Group group = ScgFactory.eINSTANCE.createGroup(); - group.getAttributes().addAll(relationshipGroupMapEntry.getValue()); - conceptDefinitions.getGroups().add(group); - } - } - - result.put(conceptMapEntry.getKey(), conceptDefinitions); - } - - return result; - } - - private void putAttributeInGroupMap(Attribute attribute, Integer group, Map> map) { - List list = map.get(group); - if (list == null) { - list = new ArrayList(); - map.put(group, list); - } - list.add(attribute); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ExpressionNormalFormGenerator.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ExpressionNormalFormGenerator.java deleted file mode 100644 index 46d2011a5b4..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ExpressionNormalFormGenerator.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform; - -import com.b2international.snowowl.dsl.scg.Expression; - - -/** - * Generates the normal form of an arbitrary ESCG expression. - * - */ -public interface ExpressionNormalFormGenerator { - - /** - * @return the original expression in long normal form - */ - public Expression getLongNormalForm(Expression originalExpression); - - /** - * @return the original expression in short normal form - */ - public Expression getShortNormalForm(Expression originalExpression); -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/FocusConceptNormalizationResult.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/FocusConceptNormalizationResult.java deleted file mode 100644 index e1c7cd77740..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/FocusConceptNormalizationResult.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform; - -import java.util.Collection; - -import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; - - - -/** - * Simple class to hold the results of the normalization of an expression's focus concepts. - * - */ -public final class FocusConceptNormalizationResult { - public Collection filteredPrimitiveSuperTypes; - public ConceptDefinition mergedConceptDefinition; - - FocusConceptNormalizationResult(Collection filteredPrimitiveSuperTypes2, ConceptDefinition mergedConceptDefinition) { - this.filteredPrimitiveSuperTypes = filteredPrimitiveSuperTypes2; - this.mergedConceptDefinition = mergedConceptDefinition; - } - - @Override - public String toString() { - return filteredPrimitiveSuperTypes + " : " + mergedConceptDefinition; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/FocusConceptNormalizer.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/FocusConceptNormalizer.java deleted file mode 100644 index 66c22669f1f..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/FocusConceptNormalizer.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import com.b2international.snowowl.core.ApplicationContext; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.eventbus.IEventBus; -import com.b2international.snowowl.semanticengine.subsumption.SubsumptionTester; -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.SnomedConcept; -import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationships; -import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; -import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; -import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; -import com.google.common.base.Function; -import com.google.common.collect.Collections2; - -/** - * 5.3.3 Normalize focus concepts
        - * The set of focus concepts is normalized to generated two separate outputs:

        - * 5.3.3.1 The set of normalized definitions of each focus concept
        - * The set of normalized definitions includes a separate normalized definition for each focus concept, - * The normalized definition includes - *
          - *
        • All ungrouped relationships
        • - *
        • All relationship groups complete with contained relationships
        • - *
        - * All relationship values are normalized by recursively following the full set of rules described - * in section 5.3.
        - * Note: Storage of pre-computed normalized form of concept definitions simplifies this process as - * it removes the requirement for recursive processing of definitions at run time. - * The set of normalized definitions is passed to the "Merge definitions" process (5.3.4).

        - * 5.3.3.2 The non-redundant proximal primitive supertypes of the focus concepts
        - * The non-redundant proximal primitive supertypes of the focus concepts is the set of all primitive - * supertypes of all the focus concepts with redundant concepts removed.
        - * A concept is redundant if it is: - *
          - *
        • A duplicate of another member of the set
        • - *
        • A super type of another concept in the set.
        • - *
        - * The set of proximal primitive supertypes generated by this process is passed to the - * "Create expression" process (5.3.6) as the focus concepts for the output expression. - * - */ -public class FocusConceptNormalizer { - - private final String branchPath; - private final SubsumptionTester subsumptionTester; - - public FocusConceptNormalizer(String branchPath) { - this.branchPath = branchPath; - this.subsumptionTester = new SubsumptionTester(branchPath); - } - - /** - * @param focusConcepts - * @return the normalized focus concepts - */ - public FocusConceptNormalizationResult normalizeFocusConcepts(Collection focusConcepts) { - Collection proximalPrimitiveSuperTypes = collectProximalPrimitiveSupertypes(toIdSet(focusConcepts)); - Collection filteredPrimitiveSuperTypes = filterRedundantSuperTypes(proximalPrimitiveSuperTypes); - ConceptDefinitionNormalizer conceptDefinitionNormalizer = new ConceptDefinitionNormalizer(branchPath); - Map conceptDefinitions = conceptDefinitionNormalizer.getNormalizedConceptDefinitions(focusConcepts); - ConceptDefinitionMerger conceptDefinitionMerger = new ConceptDefinitionMerger(subsumptionTester); - ConceptDefinition mergedFocusConceptDefinitions = conceptDefinitionMerger.mergeDefinitions(conceptDefinitions); - return new FocusConceptNormalizationResult(filteredPrimitiveSuperTypes, mergedFocusConceptDefinitions); - } - - private Collection collectProximalPrimitiveSupertypes(Collection focusConceptIds) { - Set proximatePrimitiveSuperTypes = new HashSet<>(); - - if (focusConceptIds.isEmpty()) { - return proximatePrimitiveSuperTypes; - } - - Collection focusConcepts = SnomedRequests.prepareSearchConcept() - .filterByIds(focusConceptIds) - .setLimit(focusConceptIds.size()) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, branchPath) - .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .then(new Function>() { - @Override - public Collection apply(SnomedConcepts input) { - return SnomedConceptDocument.fromConcepts(input); - } - }) - .getSync(); - - - for (SnomedConceptDocument focusConcept : focusConcepts) { - proximatePrimitiveSuperTypes.addAll(getProximatePrimitiveSuperTypes(focusConcept)); - } - - return proximatePrimitiveSuperTypes; - } - - /** - * The non-redundant proximal primitive supertypes of the focus concepts is the set of - * all primitive supertypes of all the focus concepts with redundant concepts removed.
        - * A concept is redundant if it is: - *
          - *
        • A duplicate of another member of the set
        • - *
        • A super type of another concept in the set.
        • - *
        - * @param proximalPrimitiveSuperTypes - * @return - */ - private Collection filterRedundantSuperTypes(Collection proximalPrimitiveSuperTypes) { - List filteredSuperTypes = new ArrayList(proximalPrimitiveSuperTypes); - - for(SnomedConceptDocument superType: proximalPrimitiveSuperTypes) { - for(SnomedConceptDocument otherSuperType: proximalPrimitiveSuperTypes) { - if (!otherSuperType.equals(superType) && filteredSuperTypes.contains(otherSuperType) && isSuperTypeOf(superType, otherSuperType)) { - filteredSuperTypes.remove(superType); - } - } - } - - return filteredSuperTypes; - } - - private Set getProximatePrimitiveSuperTypes(SnomedConceptDocument focusConcept) { - Set proximatePrimitiveSuperTypes = new HashSet(); - - if (focusConcept.isPrimitive()) { - proximatePrimitiveSuperTypes.add(focusConcept); - return proximatePrimitiveSuperTypes; - } - - final SnomedRelationships outboundRelationships = SnomedRequests.prepareSearchRelationship() - .all() - .filterByActive(true) - .filterByType(Concepts.IS_A) - .filterByCharacteristicType(Concepts.INFERRED_RELATIONSHIP) - .filterBySource(focusConcept.getId()) - .setExpand("destination()") - .build(SnomedDatastoreActivator.REPOSITORY_UUID, branchPath) - .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .getSync(); - //for (int i = 0; i < outgoingRelationships.length; i++) { - for (SnomedRelationship relationship : outboundRelationships) { - SnomedConcept destinationConcept = relationship.getDestination(); - SnomedConceptDocument destinationConceptDocument = SnomedConceptDocument.builder(destinationConcept).build(); - - if (destinationConcept.getDefinitionStatus().isPrimitive()) { - proximatePrimitiveSuperTypes.add(destinationConceptDocument); - } else { - proximatePrimitiveSuperTypes.addAll(getProximatePrimitiveSuperTypes(destinationConceptDocument)); - } - } - return filterSuperTypesToProximate(proximatePrimitiveSuperTypes); - } - - private Set filterSuperTypesToProximate(Set superTypes) { - Set filteredProximateSuperTypes = new HashSet(); - - for (SnomedConceptDocument superType : superTypes) { - if (filteredProximateSuperTypes.isEmpty()) { - filteredProximateSuperTypes.add(superType); - } else { - // remove types from proximateSuperTypes, if there is a more specific type among the superTypes - boolean toBeAdded = false; - Set removedProximateSuperTypes = new HashSet(); - for (SnomedConceptDocument proximateSuperType : filteredProximateSuperTypes) { - /* - * If the super type is a super type of a type already in the proximate super type set, then - * it shouldn't be added, no further checks necessary. - */ - if (isSuperTypeOf(superType, proximateSuperType)) { - toBeAdded = false; - break; - } - - /* - * Remove super type and add more specific type. In case of multiple super types we get here several times, - * but since we are using Set, adding the same concept multiple times is not an issue. - */ - if (isSuperTypeOf(proximateSuperType, superType)) { - removedProximateSuperTypes.add(proximateSuperType); - } - - toBeAdded = true; - } - - // process differences - filteredProximateSuperTypes.removeAll(removedProximateSuperTypes); - if (toBeAdded) { - filteredProximateSuperTypes.add(superType); - } - } - } - - return filteredProximateSuperTypes; - } - - private boolean isSuperTypeOf(SnomedConceptDocument superType, SnomedConceptDocument subType) { - long superTypeId = Long.parseLong(superType.getId()); - return subType.getAncestors().contains(superTypeId) || subType.getParents().contains(superTypeId); - } - - private Collection toIdSet(Collection focusConcepts) { - return Collections2.transform(focusConcepts, new Function() { - @Override - public String apply(Concept input) { - return input.getId(); - } - }); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/GroupMerger.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/GroupMerger.java deleted file mode 100644 index 3f991c055fc..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/GroupMerger.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform; - -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import org.eclipse.emf.ecore.util.EcoreUtil; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.dsl.scg.ScgFactory; -import com.b2international.snowowl.semanticengine.subsumption.SubsumptionTester; -import com.b2international.snowowl.semanticengine.utils.SemanticUtils; - -/** - * 5.3.4.3 Merging groups
        - *
        • - * If a group in one definition meets the following criteria in relation to a group in the other - * definition then the groups are merged: - *
          • At least one attribute in one of the groups is name-matched by an attribute in the other group.
          • - * and - *
          • For each name-matched pair of attributes, the value of that attribute in one group either subsumes or is - * identical to the value of the name-matched attribute in the other group.
          - *
        • Groups that meet the criteria for merging are merged by adding all attributes present in both source - * groups to the same group in the merged target definition.
        • - *
        • Groups that cannot be merged are created as separate groups in the target definition.
        • - *
        - * Note that these conditions allow additional attributes that are not name-matched to be present in either - * of the candidate groups. They also allow values of name-matched attributes to be subsumed in different - * directions between the two groups (i.e. do not require the entire of one group to be subsumed the other group).

        - * - */ -public class GroupMerger { - - private final SubsumptionTester subsumptionTester; - - /** - * Class constructor. - * - * @param subsumptionTester the {@link SubsumptionTester} to use - * @param mergedConceptDefinition the merged {@link ConceptDefinition} instance to populate - */ - public GroupMerger(SubsumptionTester subsumptionTester) { - this.subsumptionTester = subsumptionTester; - } - - /** - * Because of the interdependencies with {@link UngroupedAttributesMerger}, this method modifies - * the specified {@link ConceptDefinition} as a side effect. - * - * @param conceptDefinitions the original concept definitions to be merged - * @param mergedConceptDefinition the {@link ConceptDefinition} to modify when merging - * @see GroupMerger#GroupMerger(SubsumptionTester, ConceptDefinition) - */ - public void mergeGroups(Map conceptDefinitions, ConceptDefinition mergedConceptDefinition) { - // handle case when there is only one concept - if (conceptDefinitions.size() == 1) { - ConceptDefinition conceptDefinition = conceptDefinitions.values().iterator().next(); - mergedConceptDefinition.getGroups().addAll(conceptDefinition.getGroups()); - return; - } - - // use set to avoid duplicates - Collection processedGroups = new HashSet(); - - for (Entry conceptMapEntry1 : conceptDefinitions.entrySet()) { - ConceptDefinition conceptDefinition1 = conceptMapEntry1.getValue(); - List groups1 = conceptDefinition1.getGroups(); - for (Entry conceptMapEntry2 : conceptDefinitions.entrySet()) { - // don't compare with same concept - if (conceptMapEntry1.getKey().equals(conceptMapEntry2.getKey())) - continue; - - ConceptDefinition conceptDefinition2 = conceptMapEntry2.getValue(); - List groups2 = conceptDefinition2.getGroups(); - - for (Group group1 : groups1) { - if (processedGroups.contains(group1)) - continue; - boolean merged = false; - for (Group group2 : groups2) { - if (processedGroups.contains(group2)) - continue; - boolean mergeable = isMergeable(group1, group2); - if (mergeable) { - Group mergedGroup = ScgFactory.eINSTANCE.createGroup(); - Collection attributes1 = (EcoreUtil.copyAll(group1.getAttributes())); - Collection attributes2 = (EcoreUtil.copyAll(group2.getAttributes())); - mergedGroup.getAttributes().addAll(attributes1); - mergedGroup.getAttributes().addAll(attributes2); - mergedConceptDefinition.getGroups().add(mergedGroup); - merged = true; - processedGroups.add(group2); - break; - } - } - if (!merged) { - mergedConceptDefinition.getGroups().add(group1); - } - processedGroups.add(group1); - } - - - for (Group group2 : groups2) { - if (processedGroups.contains(group2)) - continue; - boolean merged = false; - for (Group group1 : groups1) { - if (processedGroups.contains(group1)) - continue; - boolean mergeable = isMergeable(group2, group1); - if (mergeable) { - Group mergedGroup = ScgFactory.eINSTANCE.createGroup(); - Collection attributes1 = (EcoreUtil.copyAll(group1.getAttributes())); - Collection attributes2 = (EcoreUtil.copyAll(group2.getAttributes())); - mergedGroup.getAttributes().addAll(attributes1); - mergedGroup.getAttributes().addAll(attributes2); - mergedConceptDefinition.getGroups().add(mergedGroup); - merged = true; - processedGroups.add(group1); - break; - } - } - if (!merged) { - mergedConceptDefinition.getGroups().add(group2); - } - processedGroups.add(group2); - } - } - } - } - - /** - *
        • - * If a group in one definition meets the following criteria in relation to a group in the other - * definition then the groups are merged: - *
          • At least one attribute in one of the groups is name-matched by an attribute in the other group.
          • - * and - *
          • For each name-matched pair of attributes, the value of that attribute in one group either subsumes or is - * identical to the value of the name-matched attribute in the other group.
        - * - * @param group1 - * @param group2 - * @return - */ - public boolean isMergeable(Group group1, Group group2) { - boolean mergeable = false; - for (Attribute attribute1 : group1.getAttributes()) { - Concept attribute1NameConcept = attribute1.getName(); - for (Attribute attribute2 : group2.getAttributes()) { - Concept attribute2NameConcept = attribute2.getName(); - if (attribute1NameConcept.getId().equals(attribute2NameConcept.getId())) { - Expression attribute1ValueExpression = SemanticUtils.getAttributeValueExpression(attribute1); - Expression attribute2ValueExpression = SemanticUtils.getAttributeValueExpression(attribute2); - if (subsumptionTester.isSubsumed(attribute1ValueExpression, - attribute2ValueExpression) - || subsumptionTester.isSubsumed(attribute2ValueExpression, - attribute1ValueExpression)) { - mergeable = true; - } else { - // if there is even one name-matched attribute pair, where the subsumption doesn't hold - return false; - } - } - } - } - return mergeable; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/RefinementsMerger.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/RefinementsMerger.java deleted file mode 100644 index fdb3a10f494..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/RefinementsMerger.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform; - -import java.util.HashMap; -import java.util.Map; - -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.ScgFactory; -import com.b2international.snowowl.semanticengine.subsumption.SubsumptionTester; - -/** - * 5.3.5 Merge refinement
        - * The normalized expression refinement from the "Normalize attribute values in refinement" process (5.3.2) - * is merged with the combined definition from the "Merge definitions" process (5.3.4).
        - * The rules for this process are the same as those for merging definitions (see 5.3.4) with the following additions.

        - * 5.3.5.1 Normalization of laterality
        - * If an attribute representing a value for "laterality" (272741003) is present in the refinement and is applied to - * a focus concept that is not subsumed by "body structure" (123037004), the laterality attribute should be applied - * to any and every lateralizable "body structure" specified in the resulting refinement.

        - * 5.3.5.2 Normalization of non-context attributes applied in a context wrapper
        - * If the focus concept is subsumed by "context-dependent categories" (364629017) and any attributes other than - * valid context attributes* are present in the refinement, these attributes are applied as additional refinement - * of the value of the "associated finding" (246090004) or "associated procedure" (363589002) attribute.

        - * 5.3.5.3 Completion of the definition merging
        - * Once the refinement has been merged the resulting final refinement is passed to the "Create expression" process (5.3.6).

        - * - * * The only valid context attributes are:
        - * "associated finding" (246090004), "associated procedure" (363589002), "finding context" (2470590016), - * "procedure context" (2470591017), "temporal context" (2470592012) and "subject relationship context" (2470593019).
        - * - */ -public class RefinementsMerger { - - private final String branchPath; - - public RefinementsMerger(String branchPath) { - this.branchPath = branchPath; - } - - /** - * @param normalizedFocusConcepts - * @param normalizedExpressionRefinements - * @return the merged refinements - */ - public ConceptDefinition mergeRefinements(FocusConceptNormalizationResult normalizedFocusConcepts, ConceptDefinition normalizedExpressionRefinements) { - ConceptDefinitionMerger conceptDefinitionMerger = new ConceptDefinitionMerger(new SubsumptionTester(branchPath)); - Map conceptDefinitionMap = new HashMap(); - // TODO: get rid of dummy concepts - conceptDefinitionMap.put(ScgFactory.eINSTANCE.createConcept(), normalizedFocusConcepts.mergedConceptDefinition); - conceptDefinitionMap.put(ScgFactory.eINSTANCE.createConcept(), normalizedExpressionRefinements); - ConceptDefinition mergedRefinements = conceptDefinitionMerger.mergeDefinitions(conceptDefinitionMap); - // TODO: handle special cases - return mergedRefinements; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ScgExpressionNormalFormGenerator.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ScgExpressionNormalFormGenerator.java deleted file mode 100644 index a42f15690ed..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/ScgExpressionNormalFormGenerator.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -import org.eclipse.emf.common.util.ECollections; -import org.eclipse.emf.common.util.EList; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.AttributeValue; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.dsl.scg.ScgFactory; -import com.b2international.snowowl.semanticengine.utils.AttributeCollectionComparator; -import com.b2international.snowowl.semanticengine.utils.SemanticUtils; -import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; -import com.google.common.collect.Ordering; - -/** - * Generates the normal form of an arbitrary SCG expression. - * - */ -public class ScgExpressionNormalFormGenerator implements ExpressionNormalFormGenerator { - - private final String branchPath; - - public ScgExpressionNormalFormGenerator(String branchPath) { - this.branchPath = branchPath; - } - - /** - * @return the original expression in long normal form - */ - public Expression getLongNormalForm(Expression originalExpression) { - // expression focus concepts - Collection focusConcepts = originalExpression.getConcepts(); - FocusConceptNormalizer focusConceptNormalizer = new FocusConceptNormalizer(branchPath); - FocusConceptNormalizationResult normalizedFocusConcepts = focusConceptNormalizer.normalizeFocusConcepts(focusConcepts); - - // expression refinements - List expressionAttributeGroups = originalExpression.getGroups(); - List expressionUngroupedAttributes = originalExpression.getAttributes(); - AttributeNormalizer attributeNormalizer = new AttributeNormalizer(branchPath); - ConceptDefinition normalizedExpressionRefinements = attributeNormalizer.normalizeAttributes(expressionAttributeGroups, - expressionUngroupedAttributes); - - // merge refinements - RefinementsMerger refinementsMerger = new RefinementsMerger(branchPath); - ConceptDefinition mergedRefinements = refinementsMerger.mergeRefinements(normalizedFocusConcepts, normalizedExpressionRefinements); - - // create expression - Expression normalizedExpression = ScgFactory.eINSTANCE.createExpression(); -// normalizedExpression.getRefinements().addAll(mergedRefinements); - normalizedExpression.getGroups().addAll(mergedRefinements.getGroups()); - normalizedExpression.getAttributes().addAll(mergedRefinements.getUngroupedAttributes()); - normalizedExpression.getConcepts().addAll(wrapConceptMinis(normalizedFocusConcepts.filteredPrimitiveSuperTypes)); - - sortExpressionContents(normalizedExpression); - return normalizedExpression; - } - - private void sortExpressionContents(Expression expression) { - - /* - * 5.5.2 Canonical representations - * - * The idea of a canonical representation is that it generates a - * predictable string rendering. The missing element to deliver this in - * the description of the "long normal form", is a specified sort order - * within the collections elements in an expression. A standard sort - * order is not essential for general purpose use but it is very useful - * to enable fast matching of logically identical expressions (which - * might otherwise be obscured by differences in order that have no - * semantic relevance). The canonical form for a SNOMED CT expression is - * regarded as being the long normal form ordered according to the - * following sorting rules. - */ - sortConcepts(expression.getConcepts()); - sortAttributes(expression.getAttributes()); - sortGroups(expression.getGroups()); - } - - private void sortConcepts(EList concepts) { - - /* - * ConceptIds are sorted alphabetically based on their normal string rendering (i.e. - * digits with no leading zeros) - */ - ECollections.sort(concepts, Ordering.usingToString()); - } - - private void sortAttributes(EList attributes) { - - /* - * Attributes are sorted alphabetically based on the string concatenation of the - * name and value conceptIds separated by an "=" sign. - * - * If a value contains nested refinements, the value is enclosed in - * round brackets (which may influence the sort order) and the elements - * of the nested expression are sorted by applying the general canonical - * sorting rules. - */ - for (Attribute attribute : attributes) { - - AttributeValue rValue = attribute.getValue(); - - if (rValue instanceof Expression) { - sortExpressionContents((Expression) rValue); - } - } - - ECollections.sort(attributes, Ordering.usingToString()); - } - - private void sortGroups(EList groups) { - - /* - * Groups are sorted by alphabetical order of the combined set of previously sorted - * attributes. - */ - for (Group group : groups) { - sortAttributes(group.getAttributes()); - } - - ECollections.sort(groups, Ordering.usingToString()); - } - - /** - * @return the original expression in short normal form - */ - public Expression getShortNormalForm(Expression originalExpression) { - Expression longNormalFormExpression = getLongNormalForm(originalExpression); - deriveShortNormalForm(longNormalFormExpression); - return longNormalFormExpression; - } - - private void deriveShortNormalForm(Expression expression) { - /* 5.5.1.4 Recursive removal of redundancy - * The process described in this section is recursively applied to any nested expressions that remain - * after the top-level process to remove redundant attributes and groups. Unlike the process of normalization, - * this process is done breadth first at each level in the hierarchy. If long normalized forms at nested - * levels are shortened before checking for redundancy, the expression will not match those in the merged - * definition even if they are semantically identical. */ - deriveShortNormalFormNoRecursion(expression); - Collection attributesWithExpressionValue = collectAttributesWithExpressionValue(expression); - for (Attribute attributeWithExpressionValue : attributesWithExpressionValue) { - deriveShortNormalFormNoRecursion(SemanticUtils.getAttributeValueExpression(attributeWithExpressionValue)); - } - } - - private void deriveShortNormalFormNoRecursion(Expression expression) { - Collection primitiveFocusConcepts = expression.getConcepts(); - FocusConceptNormalizer focusConceptNormalizer = new FocusConceptNormalizer(branchPath); - FocusConceptNormalizationResult normalizationResult = focusConceptNormalizer.normalizeFocusConcepts(primitiveFocusConcepts); - - /* 5.5.1.3 Removed redundant attributes and groups - * Attributes and groups shared with the merged definition are removed from the refinement. - * Only groups and ungrouped attributes that are identical can be removed from the refinement. - * If a group is not identical the parts that are similar cannot be removed. */ - Collection groupsToRemove = new HashSet(); - List longNormalFormGroups = expression.getGroups(); - for (Group refinementGroup : longNormalFormGroups) { - for (Group mergedDefinitionGroup : normalizationResult.mergedConceptDefinition.getGroups()) { - AttributeCollectionComparator attributeCollectionComparator = new AttributeCollectionComparator(); - boolean equal = attributeCollectionComparator.equal(mergedDefinitionGroup.getAttributes(), - refinementGroup.getAttributes()); - if (equal) - groupsToRemove.add(refinementGroup); - } - } - - Collection ungroupedAttributesToRemove = new HashSet(); - List longNormalFormUngroupedAttributes = expression.getAttributes(); - for (Attribute refinementAttribute : longNormalFormUngroupedAttributes) { - for (Attribute mergedDefinitionAttribute : normalizationResult.mergedConceptDefinition.getUngroupedAttributes()) { - if (refinementAttribute.toString().equals(mergedDefinitionAttribute.toString())) - ungroupedAttributesToRemove.add(refinementAttribute); - } - } - longNormalFormGroups.removeAll(groupsToRemove); - longNormalFormUngroupedAttributes.removeAll(ungroupedAttributesToRemove); - } - - private Collection collectAttributesWithExpressionValue(Expression expression) { - Set attributes = new HashSet(); - attributes.addAll(SemanticUtils.getAttributes(expression.getGroups())); - attributes.addAll(expression.getAttributes()); - for (Iterator attributeIterator = attributes.iterator(); attributeIterator.hasNext();) { - Attribute attribute = attributeIterator.next(); - if (!(attribute.getValue() instanceof Expression)) - attributeIterator.remove(); - } - return attributes; - } - - private Collection wrapConceptMinis(Collection filteredPrimitiveSuperTypes) { - List concepts = new ArrayList(); - for (SnomedConceptDocument conceptMini : filteredPrimitiveSuperTypes) { - Concept concept = ScgFactory.eINSTANCE.createConcept(); - concept.setId(conceptMini.getId()); - concepts.add(concept); - } - return concepts; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/UngroupedAttributesMerger.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/UngroupedAttributesMerger.java deleted file mode 100644 index 7f2ccc6574c..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/normalform/UngroupedAttributesMerger.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.normalform; - -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.semanticengine.subsumption.SubsumptionTester; -import com.b2international.snowowl.semanticengine.utils.SemanticUtils; - -/** - * 5.3.4.4 Merging ungrouped attributes
        - *
        • - * If an ungrouped attribute in one definition is name-matched by a grouped attribute in the other definition, - * this attribute is merged according to the following rules:
        • - *
          • - * If the value of the ungrouped attribute subsumes value of the name-matched grouped attribute - *
            • omit the ungrouped attribute from the target definition
            - *
          • If the value of the grouped attribute subsumes the value of the name-matched grouped attribute - *
            • - * add the ungrouped attribute to the group containing the matching grouped attribute in the target definition
            • - *
            • if this condition is met by multiple groups, add the ungrouped attribute to all groups that meet this condition
            • - *
            - *
          • If the value of the name-matched grouped and ungrouped attributes are disjoint
          • - *
            • add the ungrouped attribute as an ungrouped attribute in the target expression.
          - *
        • If an ungrouped attribute is name-matched with an ungrouped attribute in the other definition - * this attribute is merged according to the following rules: - *
          • - * If the value of one of the name-matched attributes subsumes the other value
          • - *
            • - * include the attribute with the most specific value (not grouped)
            • - *
            • omit the attributed with the less specific value
            - *
          • If the value of the name-matched attributes are identical
          • - *
            • Include one and omit the other
            - *
          • If neither of the two preceding conditions apply
          • - *
            • - * include both attributes (not grouped)
          - *
        • If an attribute is ungrouped in one expression and there is no name-matched attribute in the - * other definition - *
          • include the attribute (not grouped).
        - * - */ -public class UngroupedAttributesMerger { - - private final SubsumptionTester subsumptionTester; - - /** - * Class constructor. - * - * @param subsumptionTester the {@link SubsumptionTester} to use - */ - public UngroupedAttributesMerger(SubsumptionTester subsumptionTester) { - this.subsumptionTester = subsumptionTester; - } - - /** - * Because of the interdependencies with {@link GroupMerger}, this method modifies - * the {@link ConceptDefinition} specified in the constructor as a side effect. - * - * @param conceptDefinitions the original concept definitions to be merged - * @see UngroupedAttributesMerger#UngroupedAttributesMerger(SubsumptionTester, ConceptDefinition) - */ - public void mergeUngroupedAttributes(Map conceptDefinitionMap, ConceptDefinition mergedConceptDefinition) { - // handle case when there is only one concept - if (conceptDefinitionMap.size() == 1) { - ConceptDefinition conceptDefinition = conceptDefinitionMap.values().iterator().next(); - mergedConceptDefinition.getUngroupedAttributes().addAll(conceptDefinition.getUngroupedAttributes()); - return; - } - - Set ungroupedAttributeSet = new HashSet(); - Set processedAttributes = new HashSet(); - - for (Entry outerConceptMapEntry : conceptDefinitionMap.entrySet()) { - ConceptDefinition outerConceptDefinition = outerConceptMapEntry.getValue(); - Set nonNameMatchedAttributes = new HashSet(); - Set attributesToOmitFromMergedUngroupedAttributes = new HashSet(); - - for (Attribute outerUngroupedAttribute : outerConceptDefinition.getUngroupedAttributes()) { - if (processedAttributes.contains(outerUngroupedAttribute)) - continue; - Collection nameMatchedAttributes = SemanticUtils.findNameMatchedAttributesInConceptDefinitons( - outerUngroupedAttribute, filterConceptDefinitionMap(conceptDefinitionMap, outerConceptMapEntry.getKey()).values()); - - // If an ungrouped attribute in one definition is name-matched by a grouped attribute in the other definition - Collection groupedAttributeNameMatches = SemanticUtils.getGroupedAttributeNameMatches(nameMatchedAttributes); - for (AttributeNameMatch groupedAttributeNameMatch : groupedAttributeNameMatches) { - Attribute groupedNameMatchedAttribute = groupedAttributeNameMatch.getAttribute(); - if (processedAttributes.contains(groupedNameMatchedAttribute)) - continue; - - /* If the value of the ungrouped attribute subsumes value of the name-matched grouped attribute - * omit the ungrouped attribute from the target definition */ - if (subsumptionTester.isSubsumed(outerUngroupedAttribute, groupedNameMatchedAttribute)) { - attributesToOmitFromMergedUngroupedAttributes.add(outerUngroupedAttribute); - processedAttributes.add(outerUngroupedAttribute); - } - /* If the value of the grouped attribute subsumes the value of the name-matched grouped attribute - * add the ungrouped attribute to the group containing the matching grouped attribute in the target definition - * if this condition is met by multiple groups - * add the ungrouped attribute to all groups that meet this condition */ - else if (subsumptionTester.isSubsumed(groupedNameMatchedAttribute, outerUngroupedAttribute)) { - Group group = groupedAttributeNameMatch.getGroup(); - List groupedAttributes = group.getAttributes(); - - /* - * find attribute group in mergedConceptDefinition - * if found - * add outerUngorupedAttribute to this group - * else - * find groupedNameMatchedAttribute in group - * if found - * add outerUngorupedAttribute to this group - */ - for (Group mergedGroup : mergedConceptDefinition.getGroups()) { - if (mergedGroup == group) { - groupedAttributes.add(outerUngroupedAttribute); - break; - } else { - // TODO: add test case for this branch - for (Attribute mergedGroupedAttribute : groupedAttributes) { - if (mergedGroupedAttribute == groupedNameMatchedAttribute) { - mergedGroup.getAttributes().add(outerUngroupedAttribute); - break; - } - } - } - } - - attributesToOmitFromMergedUngroupedAttributes.add(outerUngroupedAttribute); - processedAttributes.add(outerUngroupedAttribute); - } - /* If the value of the name-matched grouped and ungrouped attributes are disjoint - * add the ungrouped attribute as an ungrouped attribute in the target expression. */ - else { - ungroupedAttributeSet.add(outerUngroupedAttribute); - processedAttributes.add(outerUngroupedAttribute); - } - - processedAttributes.add(groupedNameMatchedAttribute); - } - - // If an ungrouped attribute is name-matched with an ungrouped attribute in the other definition - Collection ungroupedAttributeNameMatches = SemanticUtils.getUngroupedAttributeNameMatches(nameMatchedAttributes); - for (AttributeNameMatch ungroupedAttributeNameMatch : ungroupedAttributeNameMatches) { - Attribute ungroupedNameMatchedAttribute = ungroupedAttributeNameMatch.getAttribute(); - if (processedAttributes.contains(ungroupedNameMatchedAttribute)) - continue; - - /* If the value of one of the name-matched attributes subsumes the other value - * include the attribute with the most specific value (not grouped) - * omit the attributed with the less specific value - * If the value of the name-matched attributes are identical - * include one and omit the other - * TODO: is this really handled by the two ifs? */ - boolean nameMatchedSubsumesUngrouped = subsumptionTester.isSubsumed(ungroupedNameMatchedAttribute, outerUngroupedAttribute); - boolean ungroupedSubsumesNameMatched = subsumptionTester.isSubsumed(outerUngroupedAttribute, ungroupedNameMatchedAttribute); - if (nameMatchedSubsumesUngrouped) { - ungroupedAttributeSet.add(outerUngroupedAttribute); - attributesToOmitFromMergedUngroupedAttributes.add(ungroupedNameMatchedAttribute); - } else if (ungroupedSubsumesNameMatched) { - ungroupedAttributeSet.add(ungroupedNameMatchedAttribute); - attributesToOmitFromMergedUngroupedAttributes.add(outerUngroupedAttribute); - processedAttributes.add(ungroupedNameMatchedAttribute); - } - /* If neither of the two preceding conditions apply - * include both attributes (not grouped) */ - else { - ungroupedAttributeSet.add(outerUngroupedAttribute); - ungroupedAttributeSet.add(ungroupedNameMatchedAttribute); - } - - processedAttributes.add(ungroupedNameMatchedAttribute); - } - - /* If an attribute is ungrouped in one expression and there is no name-matched attribute in the other definition - * include the attribute (not grouped). - */ - nonNameMatchedAttributes.add(outerUngroupedAttribute); - processedAttributes.add(outerUngroupedAttribute); // ??? - } - - // only add those non-matched attributes which we don't explicitly want to omit - for (Attribute nonNameMatchedAttribute : nonNameMatchedAttributes) { - if (!attributesToOmitFromMergedUngroupedAttributes.contains(nonNameMatchedAttribute)) - ungroupedAttributeSet.add(nonNameMatchedAttribute); - } - - } - - mergedConceptDefinition.getUngroupedAttributes().addAll(ungroupedAttributeSet); - } - - private Map filterConceptDefinitionMap(Map originalMap, Concept concept) { - Map filteredMap = new HashMap(originalMap); - filteredMap.remove(concept); - return filteredMap; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/subsumption/SubsumptionTester.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/subsumption/SubsumptionTester.java deleted file mode 100644 index 1930476ad80..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/subsumption/SubsumptionTester.java +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.subsumption; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import com.b2international.snowowl.core.ApplicationContext; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.AttributeValue; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.dsl.scg.ScgFactory; -import com.b2international.snowowl.eventbus.IEventBus; -import com.b2international.snowowl.semanticengine.utils.SemanticUtils; -import com.b2international.snowowl.snomed.core.domain.SnomedConcept; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; -import com.b2international.snowowl.snomed.core.domain.SnomedRelationships; -import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; -import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; - -/** - * Implementation of the subsumption testing rules described in the document - * SNOMED CT Transforming Expressions to Normal Forms. Method Javadocs contain - * excerpts from the above document. - * - */ -public class SubsumptionTester { - - private static final String CONCEPT_ID_FINDING_CONTEXT = "408729009"; - private static final String CONCEPT_ID_KNOWN_ABSENT = "410516002"; - private static final String CONCEPT_ID_DEFINITELY_NOT_PRESENT = "410594000"; - private static final String CONCEPT_ID_TEMPORAL_CONTEXT = "408731000"; - private static final String CONCEPT_ID_ASSOCIATED_FINDING = "246090004"; - private static final String CONCEPT_ID_SUBJECT_RELATIONSHIP_CONTEXT = "408732007"; - private static final String CONCEPT_ID_SAME_AS = "168666000"; - private static final String CONCEPT_ID_REPLACED_BY = "370124000"; - - private final String branchPath; - - public SubsumptionTester(String branchPath) { - this.branchPath = branchPath; - } - - /** - * The following steps are applied to test if a normalized-predicate subsumes a normalized-candidate. - * This assumes that these normal form expressions have been generated in accordance with 6.3.1. - *
          - *
        1. Test that each focus concept referenced in the normalized-predicate subsumes at least - * one focus concept in the normalized-candidate.
          - *
            - *
          • If not, the normalized-predicate does not subsume the normalized-candidate. No further testing is required.
          • - * Exit with result false.
            - *
          • The approach to testing concept subsumption is described in section 6.3.5
          • - *
          - *
        2. - *
        3. Test that each attribute group in the normalized-predicate subsumes at least one - * attribute group in the normalized-candidate. - *
            - *
          • If not, the normalized-predicate does not subsume the normalized-candidate. No further testing is required.
          • - * Exit with result false. - *
          • The approach to testing attribute group subsumption is described in section 6.3.3
          • - *
          - *
        4. - *
        5. Test that each ungrouped attribute in the normalized-predicate subsumes at least one - * attribute (either grouped or ungrouped) in the normalized-candidate. - *
            - *
          • If not, the normalized-predicate does not subsume the normalized-candidate.
          • - * Exit with result false. - *
          • The approach to testing attribute subsumption is described in section 6.3.4
          • - *
          - *
        6. If all these tests succeed, the normalized-predicate subsumes the normalized-candidate. - *
        - * - * @param predicate the predicate Expression in short normal form - * @param candidate the candidate Expression in long normal form - * @return - */ - public boolean isSubsumed(Expression predicate, Expression candidate) { - // focus concepts - Collection predicateFocusConcepts = predicate.getConcepts(); - Collection candidateFocusConcepts = candidate.getConcepts(); - for (Concept predicateFocusConcept : predicateFocusConcepts) { - // check if it subsumes at least one candidate focus concept - boolean subsumed = false; - for (Concept candidateFocusConcept : candidateFocusConcepts) { - subsumed = isSubsumed(predicateFocusConcept, candidateFocusConcept); - if (subsumed) - break; - } - if (!subsumed) - return false; - } - - // attribute groups - List predicateGroups = predicate.getGroups(); - List candidateGroups = candidate.getGroups(); - - for (Group predicateGroup : predicateGroups) { - // check if it subsumes at least one candidate attribute group - boolean subsumed = false; - for (Group candidateGroup : candidateGroups) { - subsumed = isSubsumed(predicateGroup, candidateGroup); - if (subsumed) - break; - } - if (!subsumed) - return false; - } - - // ungrouped attributes - List ungroupedPredicateAttributes = predicate.getAttributes(); - List ungroupedCandidateAttributes = candidate.getAttributes(); - List groupedCandidateAttributes = new ArrayList(); - - for (Group candidateGroup : candidateGroups) { - List attributes = candidateGroup.getAttributes(); - groupedCandidateAttributes.addAll(attributes); - } - - List allCandidateAttributes = new ArrayList(ungroupedCandidateAttributes); - allCandidateAttributes.addAll(groupedCandidateAttributes); - - for (Attribute ungroupedPredicateAttribute : ungroupedPredicateAttributes) { - // Test that each ungrouped attribute in the normalized-predicate subsumes at least one - // attribute (either grouped or ungrouped) in the normalized-candidate. - boolean subsumed = false; - for (Attribute candidateAttribute : allCandidateAttributes) { - subsumed = isSubsumed(ungroupedPredicateAttribute, candidateAttribute); - if (subsumed) - break; - } - if (!subsumed) - return false; - } - - return true; - } - - /** - * The following steps test if a predicate-concept subsumes a candidate-concept. - *
          - *
        1. Test if candidate-concept is an inactive concept
        2. - *
            - *
          • candidate-concept.conceptStatus NOT IN (0, 6, 11)
          • - * If the candidate-concept is inactive then look for an active concept - * related by a historical relationship "SAME AS" or "REPLACED BY" and - * treat this as the candidate-concept in subsequent steps. - *
          - *
        3. Test if the candidate-concept is identical to the predicate-concept. - *
            - *
          • If candidate-concept.conceptId == predicate-concept.conceptId - * the concepts are identical.
          • - * Exit with result true (accept equivalent) - *
          - *
        4. Test if the predicate-concept is one of the supertype ancestors of the candidate-concept. - *
            - *
          • This is true if a sequence of "is a" relationships leads from the candidate-concept - * (as source conceptId1) to the predicate-concept (as the target conceptId2).
          • - * Exit returning the result of this test - *
          • Various approaches to optimization of this test are described in the - * SNOMED CT Technical Implementation Guide. The recommended approach using - * a "transitive closure table" is summarized in Section 7.
          • - *
          - *
        - * - * @param predicate the predicate {@link Concept} - * @param candidate the candidate {@link Concept} - * @return - */ - public boolean isSubsumed(Concept predicate, Concept candidate) { - - final SnomedConcept candidateConcept = SnomedRequests.prepareGetConcept(candidate.getId()) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, branchPath) - .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .getSync(); - - if (!candidateConcept.isActive()) { - String replacementConceptId = null; - final SnomedRelationships outboundRelationships = SnomedRequests.prepareSearchRelationship() - .all() - .filterByActive(true) - .filterBySource(candidate.getId()) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, branchPath) - .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .getSync(); - //for (int i = 0; i < outgoingRelationships.length; i++) { - for (SnomedRelationship relationship : outboundRelationships) { - if (relationship.getTypeId().equals(CONCEPT_ID_SAME_AS) || relationship.getTypeId().equals(CONCEPT_ID_REPLACED_BY)) { - replacementConceptId = relationship.getDestinationId(); - break; - } - } - - // if no replacement concept found, the candidate is not considered subsumed - if (replacementConceptId == null) { - return false; - } - - Concept replacementCandidateConcept = ScgFactory.eINSTANCE.createConcept(); - replacementCandidateConcept.setId(replacementConceptId); - candidate = replacementCandidateConcept; - } - - if (predicate.getId().equals(candidate.getId())) - return true; - - long predicateId = Long.parseLong(predicate.getId()); - for (long parentId : candidateConcept.getParentIds()) { - if (parentId == predicateId) { - return true; - } - } - - for (long ancestorId : candidateConcept.getAncestorIds()) { - if (ancestorId == predicateId) { - return true; - } - } - - return false; - } - - /** - * The following steps test if a predicate-attribute-group subsumes candidate-attribute-group. - *
          - *
        1. Check the predicate-attribute-group for the presence of the attribute: "finding context" (408729009).
        2. - *
            - *
          • If the group does not contain this attribute, apply the normal attribute group tests specified in section 6.3.3.1.
          • - *
          - *
        3. If the predicate-attribute-group contains the "finding context" (408729009) attribute, check whether its value is one of - * the following: "known absent" (410516002) or "definitely not present" (410594000).
        4. - *
            - *
          • If the attribute exists and has one of these values, apply the tests for a context attribute group with absent finding, - * as specified in section 6.3.3.2.
          • - *
          • If the attribute exists and has any other value, apply the tests for a normal attribute group, as specified in section 6.3.3.1.
          • - *
          - *
        - * @param predicate the predicate {@link Group} - * @param candidate the candidate {@link Group} - * @return - */ - public boolean isSubsumed(Group predicate, Group candidate) { - for (Attribute predicateAttribute : predicate.getAttributes()) { - Concept predicateNameConcept = predicateAttribute.getName(); - if (!predicateNameConcept.getId().equals(CONCEPT_ID_FINDING_CONTEXT)) - continue; - - AttributeValue predicateValue = predicateAttribute.getValue(); - if (predicateValue instanceof Concept) { - Concept predicateValueConcept = (Concept) predicateValue; - if (predicateValueConcept.getId().equals(CONCEPT_ID_KNOWN_ABSENT) || predicateValueConcept.getId().equals(CONCEPT_ID_DEFINITELY_NOT_PRESENT)) - return contextGroupWithAbsentFindingSubsumptionTest(predicate, candidate); - } - } - - return normalGroupSubsumptionTest(predicate, candidate); - } - - /** - * The following step tests most attribute groups. However, a modified approach (see 6.3.3.2) is required - * in the case of attribute groups that indicate the absence of a finding. - *
          - *
        1. Test that each attribute in the predicate-attribute-group subsumes at least one attribute in the candidate-attribute-group.
        2. - *
            - *
          • If not, the predicate-attribute-group does not subsume the candidate-attribute-group.
          • - * Exit with result false. - *
          • The approach to testing attribute subsumption is described in section 6.3.4 2. - *
          - *
        3. If all attributes in the group pass this test then the predicate-attribute-group subsumes - * the candidate-attribute-group.
        4. - * Exit with result true. - *
        - */ - private boolean normalGroupSubsumptionTest(Group predicate, Group candidate) { - List predicateAttributes = predicate.getAttributes(); - List candidateAttributes = candidate.getAttributes(); - - for (Attribute predicateAttribute : predicateAttributes) { - boolean subsumed = false; - for (Attribute candidateAttribute : candidateAttributes) { - subsumed = isSubsumed(predicateAttribute, candidateAttribute); - if (subsumed) - break; - } - if (!subsumed) - return false; - } - - return true; - } - - /** - * The following steps test most attribute groups that indicate the absence of a finding. - * This approach differs from the general tests applicable to other attribute groups because of - * the way in which assertions of absence affect the direction of subsumption. - * This is discussed in detail in Annex A. - *
          - *
        1. Attempt to match each attribute in the predicate-attribute-group with an attribute which has - * the same name in the candidate-attribute-group. - *
            - *
          • If any attribute in the predicate-attribute-group is not matched by an attribute - * with same name in the candidate-attribute-group, the predicate-attribute-group - * does not subsume the candidate-attribute-group.
          • - * Exit with result false. - *
          - *
        2. - *
        3. For each of the matched attributes identified in the previous step, compare the value - * of the attribute in the predicate-attribute-group with the value of the same attribute - * in the candidate-attribute-group. - *
            - *
          • If the attribute name is "finding context" (408729009) or "temporal context" (408731000), - * the candidate-value must be equivalent to or subsumed by the predicate-value.
          • - *
          • However, if the attribute name is "associated finding" (246090004) or - * "subject relationship context" (408732007), the direction of the test is inverted. - * In these cases, the predicate-value must be equivalent to or subsumed by the candidate-value.
          • - *
          • If any of these tests fail, the predicate-attribute-group does not subsume the candidate-attribute-group.
          • - * Exit with result false. - *
          • Attribute values are expressions and are tested in the same way as any other - * expression (see 6.2 and 6.3).
          • - * Expression subsumption testing is recursive where expressions include nested qualifiers. - *
          - *
        4. - *
        5. If all the tests above are successful, the predicate-attribute-group subsumes the candidate-attribute-group.
        6. - * Exit with result true. - * - * @param predicate - * @param candidate - * @return - */ - private boolean contextGroupWithAbsentFindingSubsumptionTest(Group predicate, Group candidate) { - List predicateAttributes = predicate.getAttributes(); - List candidateAttributes = candidate.getAttributes(); - boolean subsumed = false; - - for (Attribute predicateAttribute : predicateAttributes) { - Concept predicateNameConcept = predicateAttribute.getName(); - - for (Attribute candidateAttribute : candidateAttributes) { - Concept candidateNameConcept = candidateAttribute.getName(); - if (candidateNameConcept.getId().equals(predicateNameConcept.getId())) { - if (candidateNameConcept.getId().equals(CONCEPT_ID_FINDING_CONTEXT) - || candidateNameConcept.getId().equals(CONCEPT_ID_TEMPORAL_CONTEXT)) { - subsumed = isSubsumed(SemanticUtils.getAttributeValueExpression(predicateAttribute), - SemanticUtils.getAttributeValueExpression(candidateAttribute)); - } else if (candidateNameConcept.getId().equals(CONCEPT_ID_ASSOCIATED_FINDING) - || candidateNameConcept.getId().equals(CONCEPT_ID_SUBJECT_RELATIONSHIP_CONTEXT)) { - subsumed = isSubsumed(SemanticUtils.getAttributeValueExpression(candidateAttribute), - SemanticUtils.getAttributeValueExpression(predicateAttribute)); - } - - if (subsumed) - break; - } - - } - - if (!subsumed) - return false; - } - - return true; - } - - /** - * The following steps test if a predicate-attribute subsumes a candidate-attribute. - *
            - *
          1. Test that the candidate attribute name is either the same as or subsumed by the - * predicate attribute name.
          2. - *
              - *
            • If not, the predicate-attribute does not subsume the candidate-attribute
            • - * Exit with result false. - *
            • The approach to testing concept subsumption is described in section 6.3.5
            • - *
            - *
          3. Test that the candidate-attribute value is equivalent to or subsumed by the - * predicate-attribute value. - *
              - *
            • If not, the predicate-attribute does not subsume the candidate-attribute
            • - * Exit with result false. - *
            • Attribute values are expressions and are tested in the same way as any - * other expression (see 6.2 and 6.3).
            • - * Expression subsumption testing is recursive where expressions include nested qualifiers. - *
            - *
          4. If both the above tests are successful, the predicate-attribute subsumes the - * candidate- attribute.
          5. - * Exit with result true. - *
          - * - * @param predicate the predicate {@link Attribute} - * @param candidate the candidate {@link Attribute} - * @return - */ - public boolean isSubsumed(Attribute predicate, Attribute candidate) { - // attribute names - Concept predicateNameConcept = predicate.getName(); - Concept candidateNameConcept = candidate.getName(); - if (!isSubsumed(predicateNameConcept, candidateNameConcept)) - return false; - - // attribute values - Expression predicateValueExpression = SemanticUtils.getAttributeValueExpression(predicate); - Expression candidateValueExpression = SemanticUtils.getAttributeValueExpression(candidate); - - if (!isSubsumed(predicateValueExpression, candidateValueExpression)) - return false; - - return true; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributePresenceCheckingVisitor.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributePresenceCheckingVisitor.java deleted file mode 100644 index 5538243e719..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributePresenceCheckingVisitor.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import com.b2international.commons.tree.TreeVisitor; -import com.b2international.commons.tree.emf.EObjectTreeNode; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Expression; - -/** - * Visitor implementation to check for the presence of an attribute in an SCG {@link Expression}. - * - */ -public class AttributePresenceCheckingVisitor implements TreeVisitor { - - private final String attributeNameId; - private boolean present; - - /** - * Constructor. - * @param attributeNameId the attribute name concept ID to search for - */ - public AttributePresenceCheckingVisitor(String attributeNameId) { - this.attributeNameId = attributeNameId; - } - - @Override - public boolean visit(EObjectTreeNode node) { - if (node.getEObject() instanceof Attribute) { - Attribute attribute = (Attribute) node.getEObject(); - if (attribute.getName().getId().equals(attributeNameId)) { - present = true; - return false; - } - } - return true; - } - - @Override - public boolean entering(EObjectTreeNode node) { - return true; - } - - @Override - public boolean leaving(EObjectTreeNode node) { - return true; - } - - /** - * @return true if an attribute with the specified name exists in the given expression, false otherwise - */ - public boolean isPresent() { - return present; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeValueCollectionComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeValueCollectionComparator.java deleted file mode 100644 index d8928d96511..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeValueCollectionComparator.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import com.b2international.snowowl.dsl.scg.AttributeValue; - - -public class AttributeValueCollectionComparator extends CollectionComparator { - - @Override - protected boolean itemsEqual(AttributeValue expected, AttributeValue actual) { - AttributeValueComparator lValueComparator = new AttributeValueComparator(); - return lValueComparator.equal(expected, actual); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeValueComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeValueComparator.java deleted file mode 100644 index c54030e9800..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeValueComparator.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import com.b2international.snowowl.dsl.scg.AttributeValue; -import com.b2international.snowowl.dsl.scg.Concept; - - -public class AttributeValueComparator extends ObjectComparator { - - @Override - public boolean equal(AttributeValue expected, AttributeValue actual) { - if (expected == null || actual == null) - throw new NullPointerException("Null value not supported in LValueComparator."); - if (expected instanceof Concept && actual instanceof Concept) { - Concept expectedConcept = (Concept) expected; - Concept actualConcept = (Concept) expected; - String expectedConceptId = expectedConcept.getId(); - String actualConceptId = actualConcept.getId(); - return expectedConceptId.equals(actualConceptId); - } else { - throw new IllegalArgumentException("Invalid arguments: " + expected + ", " + actual); - } - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeValueExtractingVisitor.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeValueExtractingVisitor.java deleted file mode 100644 index bc7e41f7f32..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/AttributeValueExtractingVisitor.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import java.text.MessageFormat; - -import com.b2international.commons.tree.TreeVisitor; -import com.b2international.commons.tree.emf.EObjectTreeNode; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; - -/** - * Visitor implementation to extract the value of the first occurrence of an attribute with a specific name. - */ -public class AttributeValueExtractingVisitor implements TreeVisitor { - - private final String attributeNameId; - private String extractedAttributeValueId; - - public AttributeValueExtractingVisitor(String attributeNameId) { - this.attributeNameId = attributeNameId; - } - - @Override - public boolean visit(EObjectTreeNode node) { - if (node.getEObject() instanceof Attribute) { - Attribute attribute = (Attribute) node.getEObject(); - if (attribute.getName().getId().equals(attributeNameId)) { - if (attribute.getValue() instanceof Concept) { - Concept valueConcept = (Concept) attribute.getValue(); - extractedAttributeValueId = valueConcept.getId(); - return false; - } else { - throw new IllegalArgumentException(MessageFormat.format( - "Context wrapper attribute with name {0} has an expression value.", attributeNameId)); - } - } - } - return true; - } - - @Override - public boolean entering(EObjectTreeNode node) { - return true; - } - - @Override - public boolean leaving(EObjectTreeNode node) { - return true; - } - - /** - * @return the extracted attribute value, or null if specified attribute not found - */ - public String getExtractedAttributeValueId() { - return extractedAttributeValueId; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ClinicalKernelFocusConceptExtractingVisitor.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ClinicalKernelFocusConceptExtractingVisitor.java deleted file mode 100644 index ba7fca58d62..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ClinicalKernelFocusConceptExtractingVisitor.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import java.util.List; - -import org.eclipse.emf.common.util.EList; - -import com.b2international.commons.tree.TreeVisitor; -import com.b2international.commons.tree.emf.EObjectTreeNode; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.google.common.collect.Lists; - -/** - * Visitor implementation to extract the focus concepts from an SCG {@link Expression}'s clinical kernel. - */ -public class ClinicalKernelFocusConceptExtractingVisitor implements TreeVisitor { - - private List extractedFocusConceptIds = Lists.newArrayList(); - private boolean inClinicalKernel = false; - - @Override - public boolean visit(EObjectTreeNode node) { - if (node.getFeature() == null && node.getEObject() instanceof Attribute) { - Attribute attribute = (Attribute) node.getEObject(); - if (attribute.getName().getId().equals(SemanticUtils.ASSOCIATED_FINDING_ID) - || attribute.getName().getId().equals(SemanticUtils.ASSOCIATED_PROCEDURE_ID)) { - inClinicalKernel = true; - } - } else if (inClinicalKernel) { - Attribute clinicalKernelAttribute = (Attribute) node.getEObject(); - if (clinicalKernelAttribute.getValue() instanceof Expression) { - Expression clinicalKernelExpression = (Expression) clinicalKernelAttribute.getValue(); - EList focusConcepts = clinicalKernelExpression.getConcepts(); - for (Concept concept : focusConcepts) { - extractedFocusConceptIds.add(concept.getId()); - } - return false; - } else if (clinicalKernelAttribute.getValue() instanceof Concept) { - Concept focusConcept = (Concept) clinicalKernelAttribute.getValue(); - extractedFocusConceptIds.add(focusConcept.getId()); - return false; - } - } - return true; - } - - @Override - public boolean entering(EObjectTreeNode node) { - return true; - } - - @Override - public boolean leaving(EObjectTreeNode node) { - return true; - } - - /** - * @return the list of focus concept IDs from the clinical kernel - */ - public List getExtractedFocusConceptIds() { - return extractedFocusConceptIds; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/CollectionComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/CollectionComparator.java deleted file mode 100644 index 6397cbf7690..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/CollectionComparator.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; - -/** - * Generic superclass of collection equality testers. - * Subclasses should implement {@link CollectionComparator#itemsEqual(T, T)}. - * - */ -public abstract class CollectionComparator { - - public static final class CollectionDiff { - private final Collection addedItems; - private final Collection removedItems; - - public CollectionDiff(Collection addedItems, Collection removedItems) { - this.addedItems = new ArrayList(addedItems); - this.removedItems = new ArrayList(removedItems); - } - - public Collection getAddedItems() { - return addedItems; - } - - public Collection getRemovedItems() { - return removedItems; - } - - public boolean isEmpty() { - return getAddedItems().isEmpty() && getRemovedItems().isEmpty(); - } - - @Override - public String toString() { - StringBuilder stringBuilder = new StringBuilder(); - - if (!getAddedItems().isEmpty()) { - stringBuilder.append("Added: "); - for (Iterator addedItemIterator = getAddedItems().iterator(); addedItemIterator.hasNext();) { - T item = addedItemIterator.next(); - stringBuilder.append(item.toString()); - if (addedItemIterator.hasNext()) - stringBuilder.append(','); - } - stringBuilder.append("; "); - } - - if (!getRemovedItems().isEmpty()) { - stringBuilder.append("Removed: "); - for (Iterator removedItemIterator = getRemovedItems().iterator(); removedItemIterator.hasNext();) { - T item = removedItemIterator.next(); - stringBuilder.append(item.toString()); - if (removedItemIterator.hasNext()) - stringBuilder.append(','); - } - } - - return stringBuilder.toString(); - } - } - - protected CollectionDiff diff = new CollectionDiff(new ArrayList(), new ArrayList()); - - public CollectionDiff getDiff(Collection expected, Collection actual) { - Collection addedItems = new ArrayList(); - Collection removedItems = new ArrayList(); - - for (T actualItem : actual) { - boolean found = false; - for (T expectedItem : expected) { - if (itemsEqual(expectedItem, actualItem)) { - found = true; - break; - } - } - - if (!found) - addedItems.add(actualItem); - } - - for (T expectedItem : expected) { - boolean found = false; - for (T actualItem : actual) { - if (itemsEqual(actualItem, expectedItem)) { - found = true; - break; - } - } - - if (!found) - removedItems.add(expectedItem); - } - - diff.getAddedItems().addAll(addedItems); - diff.getRemovedItems().addAll(removedItems); - return diff; - } - - /** - * @param expected - * @param actual - * @return true if the two collections are found to be equal, false otherwise - */ - public boolean equal(Collection expected, Collection actual) { - CollectionDiff collectionDiff = getDiff(expected, actual); - return collectionDiff.isEmpty(); - } - - /** - * @param expected - * @param actual - * @return true if the two objects are found to be equal, false otherwise - */ - abstract protected boolean itemsEqual(T expected, T actual); -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ConceptCollectionComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ConceptCollectionComparator.java deleted file mode 100644 index 6186a754572..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ConceptCollectionComparator.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import com.b2international.snowowl.dsl.scg.Concept; - -public class ConceptCollectionComparator extends CollectionComparator { - @Override - protected boolean itemsEqual(Concept expected, Concept actual) { - AttributeValueComparator lValueComparator = new AttributeValueComparator(); - return lValueComparator.equal(expected, actual); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ConceptDefinitionComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ConceptDefinitionComparator.java deleted file mode 100644 index 450172e1c6f..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ConceptDefinitionComparator.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.semanticengine.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.utils.CollectionComparator.CollectionDiff; - -/** - * An {@link ObjectComparator} implementation to handle {@link ConceptDefinition}s. - * - */ -public class ConceptDefinitionComparator extends ObjectComparator { - - @Override - public boolean equal(ConceptDefinition expected, ConceptDefinition actual) { - GroupCollectionComparator GroupCollectionComparator = new GroupCollectionComparator(); - CollectionDiff GroupCollectionDiff = GroupCollectionComparator.getDiff( - expected.getGroups(), actual.getGroups()); - - AttributeCollectionComparator attributeCollectionComparator = new AttributeCollectionComparator(); - CollectionDiff attributeCollectionDiff = attributeCollectionComparator.getDiff( - expected.getUngroupedAttributes(), actual.getUngroupedAttributes()); - - boolean equal = attributeCollectionDiff.isEmpty() && GroupCollectionDiff.isEmpty(); - return equal; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ContextWrapperBuilder.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ContextWrapperBuilder.java deleted file mode 100644 index 5c182681b2f..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ContextWrapperBuilder.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import java.text.MessageFormat; -import java.util.Collections; - -import com.b2international.commons.tree.emf.EObjectWalker; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.google.common.base.Preconditions; - -/** - * Ensures that an SCG {@link Expression} has a complete context wrapper. - */ -public class ContextWrapperBuilder { - - /** - * Ensures the completeness of the context wrapper of the expression passed in. - * Note: it modifies and returns the original expression. - * @param contextWrapperExpression the expression to process - * @return the processed expression - */ - public Expression ensureCompleteContextWrapper(Expression contextWrapperExpression) { - Preconditions.checkNotNull(contextWrapperExpression, "Expression cannot be null."); - Preconditions.checkArgument(hasSomeContextWrapper(contextWrapperExpression), - "The expression %s doesn't have a context wrapper.", contextWrapperExpression.toString()); - Group contextWrapperAttributeGroup = contextWrapperExpression.getGroups().get(0); - - // finding / procedure context - if (hasAttribute(contextWrapperExpression, SemanticUtils.ASSOCIATED_FINDING_ID)) { // finding - if (hasAttribute(contextWrapperExpression, SemanticUtils.PROCEDURE_CONTEXT_ID)) - throw new IllegalArgumentException(MessageFormat.format("The expression {0} is inconsistent, it has both " + - "an associated finding and a procedure context.", contextWrapperExpression.toString())); - if (!hasAttribute(contextWrapperExpression, SemanticUtils.FINDING_CONTEXT_ID)) { - Attribute findingContextAttribute = buildDefaultFindingContextAttribute(); - contextWrapperAttributeGroup.getAttributes().add(findingContextAttribute); - } - } else if (hasAttribute(contextWrapperExpression, SemanticUtils.ASSOCIATED_PROCEDURE_ID)) { // procedure - if (hasAttribute(contextWrapperExpression, SemanticUtils.FINDING_CONTEXT_ID)) - throw new IllegalArgumentException(MessageFormat.format("The expression {0} is inconsistent, it has both " + - "an associated procedure and a finding context.", contextWrapperExpression.toString())); - if (!hasAttribute(contextWrapperExpression, SemanticUtils.PROCEDURE_CONTEXT_ID)) { - Attribute procedureContextAttribute = buildDefaultProcedureContextAttribute(); - contextWrapperAttributeGroup.getAttributes().add(procedureContextAttribute); - } - } - - // temporal context - if (!hasAttribute(contextWrapperExpression, SemanticUtils.TEMPORAL_CONTEXT_ID)) { - contextWrapperAttributeGroup.getAttributes().add(buildDefaultTemporalContextAttribute()); - } - - // subject relationship context - if (!hasAttribute(contextWrapperExpression, SemanticUtils.SUBJECT_RELATIONSHIP_CONTEXT_ID)) { - contextWrapperAttributeGroup.getAttributes().add(buildDefaultSubjectRelationshipContextAttribute()); - } - - return contextWrapperExpression; - } - - private static boolean hasAttribute(Expression expression, String nameConceptId) { - AttributePresenceCheckingVisitor attributeValueExtractor = new AttributePresenceCheckingVisitor(nameConceptId); - EObjectWalker walker = EObjectWalker.createContainmentWalker(attributeValueExtractor); - walker.walk(expression); - return attributeValueExtractor.isPresent(); - } - - /** - * @param expression - * @return true if the expression passed in has at least an incomplete context wrapper, false otherwise - */ - public static boolean hasSomeContextWrapper(Expression expression) { - boolean focusConceptPresent = expression.getConcepts().size() == 1 && expression.getConcepts().get(0) != null - && SemanticUtils.SITUATION_WITH_EXPLICIT_CONTEXT_ID.equals(expression.getConcepts().get(0).getId()); - boolean hasOneAttributeGroup = expression.getGroups().size() == 1; - return focusConceptPresent && hasOneAttributeGroup; - } - - /** - * @param expression - * @return true if the expression passed in already has a complete context wrapper, false otherwise - */ - public static boolean hasCompleteContextWrapper(Expression expression) { - Preconditions.checkNotNull(expression, "Expression cannot be null."); - boolean incompleteContextWrapperPresent = hasSomeContextWrapper(expression); - boolean clinicalKernelPresent = hasAttribute(expression, SemanticUtils.ASSOCIATED_FINDING_ID) - || hasAttribute(expression, SemanticUtils.ASSOCIATED_PROCEDURE_ID); - boolean contextPresent = hasAttribute(expression, SemanticUtils.FINDING_CONTEXT_ID) - || hasAttribute(expression, SemanticUtils.PROCEDURE_CONTEXT_ID); - boolean temporalContextPresent = hasAttribute(expression, SemanticUtils.TEMPORAL_CONTEXT_ID); - boolean subjectRelationshipContextPresent = hasAttribute(expression, SemanticUtils.SUBJECT_RELATIONSHIP_CONTEXT_ID); - return incompleteContextWrapperPresent && clinicalKernelPresent && contextPresent && temporalContextPresent - && subjectRelationshipContextPresent; - } - - public Expression buildAssociatedFindingContextWrapper(Expression clinicalKernelExpression) { - Concept situationWithExplicitContextConcept = ScgBuilderUtils.buildConcept(SemanticUtils.SITUATION_WITH_EXPLICIT_CONTEXT_ID); - Group group = ScgBuilderUtils.buildGroup(buildAssociatedFindingAttribute(clinicalKernelExpression), - buildDefaultFindingContextAttribute(), - buildDefaultTemporalContextAttribute(), - buildDefaultSubjectRelationshipContextAttribute()); - Expression expression = ScgBuilderUtils.buildExpression(Collections.singletonList(situationWithExplicitContextConcept), - Collections.singletonList(group), Collections.emptyList()); - return expression; - } - - public Expression buildAssociatedProcedureContextWrapper(Expression clinicalKernelExpression) { - Concept situationWithExplicitContextConcept = ScgBuilderUtils.buildConcept(SemanticUtils.SITUATION_WITH_EXPLICIT_CONTEXT_ID); - Group group = ScgBuilderUtils.buildGroup(buildAssociatedProcedureAttribute(clinicalKernelExpression), - buildDefaultProcedureContextAttribute(), - buildDefaultTemporalContextAttribute(), - buildDefaultSubjectRelationshipContextAttribute()); - Expression expression = ScgBuilderUtils.buildExpression(Collections.singletonList(situationWithExplicitContextConcept), - Collections.singletonList(group), Collections.emptyList()); - return expression; - } - - public Attribute buildAssociatedFindingAttribute(Expression clinicalKernelExpression) { - return ScgBuilderUtils.buildAttribute(SemanticUtils.ASSOCIATED_FINDING_ID, clinicalKernelExpression); - } - - public Attribute buildAssociatedProcedureAttribute(Expression clinicalKernelExpression) { - return ScgBuilderUtils.buildAttribute(SemanticUtils.ASSOCIATED_PROCEDURE_ID, clinicalKernelExpression); - } - - public Attribute buildDefaultTemporalContextAttribute() { - return ScgBuilderUtils.buildAttribute(SemanticUtils.TEMPORAL_CONTEXT_ID, SemanticUtils.CURRENT_ID); - } - - public Attribute buildDefaultSubjectRelationshipContextAttribute() { - return ScgBuilderUtils.buildAttribute(SemanticUtils.SUBJECT_RELATIONSHIP_CONTEXT_ID, SemanticUtils.SUBJECT_OF_RECORD_ID); - } - - public Attribute buildDefaultFindingContextAttribute() { - return ScgBuilderUtils.buildAttribute(SemanticUtils.FINDING_CONTEXT_ID, SemanticUtils.KNOWN_PRESENT_ID); - } - - public Attribute buildDefaultProcedureContextAttribute() { - return ScgBuilderUtils.buildAttribute(SemanticUtils.PROCEDURE_CONTEXT_ID, SemanticUtils.PERFORMED_ID); - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ExpressionComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ExpressionComparator.java deleted file mode 100644 index 839544463fe..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ExpressionComparator.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import com.b2international.snowowl.dsl.scg.Expression; - - -public class ExpressionComparator extends ObjectComparator { - - @Override - public boolean equal(Expression expected, Expression actual) { - ConceptCollectionComparator lValueCollectionComparator = new ConceptCollectionComparator(); - boolean lValuesEqual = lValueCollectionComparator.equal(expected.getConcepts(), actual.getConcepts()); - RefinementsComparator refinementsComparator = new RefinementsComparator(); - boolean refinementsEqual = refinementsComparator.equal(expected, actual); - return lValuesEqual && refinementsEqual; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/GroupCollectionComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/GroupCollectionComparator.java deleted file mode 100644 index ef316d398cd..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/GroupCollectionComparator.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Group; - - -/** - * {@link CollectionComparator} implementation to handle collections of {@link Attribute}s. - * - */ -public class GroupCollectionComparator extends CollectionComparator { - - @Override - protected boolean itemsEqual(Group expected, Group actual) { - return getItemDiff(expected, actual).isEmpty(); - } - - private com.b2international.snowowl.semanticengine.utils.CollectionComparator.CollectionDiff getItemDiff(Group expected, Group actual) { - AttributeCollectionComparator attributeListMatcher = new AttributeCollectionComparator(); - return attributeListMatcher.getDiff(expected.getAttributes(), actual.getAttributes()); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/LimitedDepthAttributeValueExtractingVisitor.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/LimitedDepthAttributeValueExtractingVisitor.java deleted file mode 100644 index b6a868eb1a2..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/LimitedDepthAttributeValueExtractingVisitor.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import com.b2international.commons.tree.TreeVisitor; -import com.b2international.commons.tree.emf.EObjectTreeNode; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; - -/** - * Extracts the first occurrence of the specified attribute, limiting the traversal to a specified depth - * in the SCG expression. - * - * @param - */ -public class LimitedDepthAttributeValueExtractingVisitor implements TreeVisitor { - - private int scgExpressionDepth = 0; - private long attributeValueId = 0l; - private final int maxScgExpressionDepth; - private final String attributeNameId; - - /** - * Class constructor. - * Note: set maxScgExpressionDepth to '2' for stopping at the clinical kernel's top expression level. - * - * @param maxScgExpressionDepth the maximum depth of SCG subexpressions to recurse into. - */ - public LimitedDepthAttributeValueExtractingVisitor(String attributeNameId, int maxScgExpressionDepth) { - this.attributeNameId = attributeNameId; - this.maxScgExpressionDepth = maxScgExpressionDepth; - } - - @Override - public boolean visit(EObjectTreeNode node) { - if (node.getFeature() == null && node.getEObject() instanceof com.b2international.snowowl.dsl.scg.Attribute - && ((Attribute)node.getEObject()).getName().getId().equals(attributeNameId) - && ((Attribute)node.getEObject()).getValue() instanceof Concept) { - Attribute attribute = (Attribute)node.getEObject(); - if (attributeValueId == 0l) - attributeValueId = Long.parseLong(((Concept) attribute.getValue()).getId()); - return false; - } - return true; - } - - @Override - public boolean entering(EObjectTreeNode node) { - if (node.getFeature() == null && node.getEObject() instanceof com.b2international.snowowl.dsl.scg.Expression) { - // don't traverse full depth of expression tree - if (scgExpressionDepth > maxScgExpressionDepth) { - return false; - } - scgExpressionDepth++; - } - return true; - } - - @Override - public boolean leaving(EObjectTreeNode node) { - if (node.getFeature() == null && node.getEObject() instanceof com.b2international.snowowl.dsl.scg.Expression) { - scgExpressionDepth--; - } - return true; - } - - public Long getAttributeValueId() { - return attributeValueId; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/MessageDigestUtil.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/MessageDigestUtil.java deleted file mode 100644 index a5acf040283..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/MessageDigestUtil.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import java.io.UnsupportedEncodingException; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; - -public final class MessageDigestUtil { - - private static final String CHARSET_NAME = "UTF-8"; - private static final String DIGEST_ALGORITHM = "SHA-1"; - - private static MessageDigest messageDigest; - - private static synchronized MessageDigest getMessageDigest() { - - if (messageDigest == null) { - try { - messageDigest = MessageDigest.getInstance(DIGEST_ALGORITHM); - } catch (NoSuchAlgorithmException e) { - throw new IllegalStateException("Couldn't get digest algorithm instance.", e); - } - } - - return messageDigest; - } - - public static synchronized byte[] calculateHash(String text) { - - try { - return getMessageDigest().digest(text.getBytes(CHARSET_NAME)); - } catch (UnsupportedEncodingException e) { - throw new IllegalStateException("Couldn't convert input string to byte array.", e); - } - } - - private MessageDigestUtil() { - // Prevent instantiation - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ObjectComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ObjectComparator.java deleted file mode 100644 index a2cb82d50e7..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ObjectComparator.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -/** - * Generic superclass of object comparators. - * - * - * @param - */ -public abstract class ObjectComparator { - - /** - * @param expected - * @param actual - * @return true if the two objects are found to be equal, false otherwise - */ - abstract public boolean equal(T expected, T actual); -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/PrimitiveClinicalKernelDetectingVisitor.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/PrimitiveClinicalKernelDetectingVisitor.java deleted file mode 100644 index b3365f2e5e3..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/PrimitiveClinicalKernelDetectingVisitor.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import com.b2international.commons.tree.TreeVisitor; -import com.b2international.commons.tree.emf.EObjectTreeNode; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; - -/** - * Visitor implementation that checks if a normalized SCG {@link Expression}'s - * clinical kernel is composed entirely of primitive concepts (with no - * additional attributes or groups). - * - */ -public class PrimitiveClinicalKernelDetectingVisitor implements TreeVisitor { - - private boolean isClinicalKernelPrimitive = false; - private boolean inClinicalKernel = false; - - @Override - public boolean visit(EObjectTreeNode node) { - if (node.getFeature() == null && node.getEObject() instanceof Attribute) { - Attribute attribute = (Attribute) node.getEObject(); - if (attribute.getName().getId().equals(SemanticUtils.ASSOCIATED_FINDING_ID) - || attribute.getName().getId().equals(SemanticUtils.ASSOCIATED_PROCEDURE_ID)) { - inClinicalKernel = true; - } - } else if (inClinicalKernel) { - Attribute clinicalKernelAttribute = (Attribute) node.getEObject(); - if (clinicalKernelAttribute.getValue() instanceof Expression) { - Expression clinicalKernelExpression = (Expression) clinicalKernelAttribute.getValue(); - if (clinicalKernelExpression.getAttributes().isEmpty() && clinicalKernelExpression.getGroups().isEmpty()) { - isClinicalKernelPrimitive = true; - } - return false; - } else if (clinicalKernelAttribute.getValue() instanceof Concept) { - isClinicalKernelPrimitive = true; - return false; - } - } - return true; - } - - @Override - public boolean entering(EObjectTreeNode node) { - return true; - } - - @Override - public boolean leaving(EObjectTreeNode node) { - return true; - } - - /** - * @return true if the normalized context wrapper's clinical kernel - * contains no refinements (just primitive concepts), - * false otherwise - */ - public boolean isClinicalKernelPrimitive() { - return isClinicalKernelPrimitive; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/RefinementsComparator.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/RefinementsComparator.java deleted file mode 100644 index e7bc6dddc1a..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/RefinementsComparator.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import java.util.List; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Expression; - - -public class RefinementsComparator extends ObjectComparator { - - @Override - public boolean equal(Expression expected, Expression actual) { - if (expected == null && actual == null) - return true; - -// List expectedUngroupedAttributes = SemanticUtils.getUngroupedAttributes(expected); -// List actualUngroupedAttributes = SemanticUtils.getUngroupedAttributes(actual); - List expectedUngroupedAttributes = expected.getAttributes(); - List actualUngroupedAttributes = actual.getAttributes(); - - if (SemanticUtils.isNullOrEmpty(expectedUngroupedAttributes) && SemanticUtils.isNullOrEmpty(actualUngroupedAttributes)) - return true; - if (SemanticUtils.isNullOrEmpty(expectedUngroupedAttributes) && !SemanticUtils.isNullOrEmpty(actualUngroupedAttributes)) - return false; - if (!SemanticUtils.isNullOrEmpty(expectedUngroupedAttributes) && SemanticUtils.isNullOrEmpty(actualUngroupedAttributes)) - return false; - - GroupCollectionComparator GroupCollectionComparator = new GroupCollectionComparator(); - boolean groupsEqual = GroupCollectionComparator.equal(expected.getGroups(), actual.getGroups()); - AttributeCollectionComparator attributeCollectionComparator = new AttributeCollectionComparator(); - boolean ungroupedAttributesEqual = attributeCollectionComparator.equal(expectedUngroupedAttributes, - actualUngroupedAttributes); - return groupsEqual && ungroupedAttributesEqual; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ScgBuilderUtils.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ScgBuilderUtils.java deleted file mode 100644 index d21f97c3885..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/ScgBuilderUtils.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.dsl.scg.ScgFactory; -import com.b2international.snowowl.semanticengine.normalform.ConceptDefinition; - -/** - * Collection of utility methods for building SCG {@link Expression}s, {@link Attribute}s, {@link Group}s and {@link Concept}s. - * - */ -public class ScgBuilderUtils { - - public static Group buildGroup(Collection attributes) { - Group attributeGroup = ScgFactory.eINSTANCE.createGroup(); - attributeGroup.getAttributes().addAll(attributes); - return attributeGroup; - } - - public static Group buildGroup(Attribute... attributes) { - return buildGroup(Arrays.asList(attributes)); - } - - public static Attribute buildAttribute(String nameConceptId, String valueConceptId) { - Concept nameConcept = buildConcept(nameConceptId); - Concept valueConcept = buildConcept(valueConceptId); - Attribute attribute = ScgFactory.eINSTANCE.createAttribute(); - attribute.setName(nameConcept); - attribute.setValue(valueConcept); - return attribute; - } - - public static Attribute buildAttributeWithExpressionValue(String nameConceptId, String valueConceptId) { - Concept nameConcept = buildConcept(nameConceptId); - Expression valueExpression = buildExpressionFromSingleConceptId(valueConceptId); - Attribute attribute = ScgFactory.eINSTANCE.createAttribute(); - attribute.setName(nameConcept); - attribute.setValue(valueExpression); - return attribute; - } - - public static Attribute buildAttribute(String nameConceptId, Expression valueExpression) { - Concept nameConcept = buildConcept(nameConceptId); - Attribute attribute = ScgFactory.eINSTANCE.createAttribute(); - attribute.setName(nameConcept); - attribute.setValue(valueExpression); - return attribute; - } - - public static Expression buildExpression(Concept lValue) { - return buildExpression(Collections.singleton(lValue), Collections.emptySet(), - Collections.emptySet()); - } - - public static Expression buildExpression(Collection lValues, Collection attributeGroups, - Collection ungroupedAttributes) { - ScgFactory factory = ScgFactory.eINSTANCE; - Expression expression = factory.createExpression(); - - expression.getConcepts().addAll(lValues); - expression.getAttributes().addAll(ungroupedAttributes); - expression.getGroups().addAll(attributeGroups); - - return expression; - } - - public static Expression buildExpressionFromSingleConceptId(String conceptId) { - Concept conceptGroup = buildConcept(conceptId); - Expression expression = ScgFactory.eINSTANCE.createExpression(); - expression.getConcepts().add(conceptGroup); - return expression; - } - - public static Concept buildConcept(String conceptId) { - Concept concept = ScgFactory.eINSTANCE.createConcept(); - concept.setId(conceptId); - return concept; - } - - public static ConceptDefinition buildConceptDefinition(Collection attributeGroups, - Collection ungroupedAttributes) { - ConceptDefinition conceptDefinition = new ConceptDefinition(); - conceptDefinition.getGroups().addAll(attributeGroups); - conceptDefinition.getUngroupedAttributes().addAll(ungroupedAttributes); - return conceptDefinition; - } - - public static ConceptDefinition buildConceptDefinition(Group attributeGroup) { - return buildConceptDefinition(Collections.singleton(attributeGroup), Collections.emptySet()); - } - - public static ConceptDefinition buildConceptDefinition(Group... attributeGroups) { - return buildConceptDefinition(Arrays.asList(attributeGroups), Collections.emptySet()); - } - - public static ConceptDefinition buildConceptDefinition(Attribute... attributes) { - return buildConceptDefinition(Collections.emptySet(), Arrays.asList(attributes)); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/SemanticUtils.java b/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/SemanticUtils.java deleted file mode 100644 index 91e20d4ad65..00000000000 --- a/snomed/com.b2international.snowowl.snomed.semanticengine/src/com/b2international/snowowl/semanticengine/utils/SemanticUtils.java +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.semanticengine.utils; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.util.EcoreUtil; - -import com.b2international.commons.tree.emf.EObjectWalker; -import com.b2international.snowowl.dsl.scg.Attribute; -import com.b2international.snowowl.dsl.scg.AttributeValue; -import com.b2international.snowowl.dsl.scg.Concept; -import com.b2international.snowowl.dsl.scg.Expression; -import com.b2international.snowowl.dsl.scg.Group; -import com.b2international.snowowl.dsl.scg.ScgFactory; -import com.b2international.snowowl.semanticengine.normalform.AttributeNameMatch; -import com.b2international.snowowl.semanticengine.normalform.ConceptDefinition; -import com.b2international.snowowl.semanticengine.normalform.ScgExpressionNormalFormGenerator; -import com.b2international.snowowl.semanticengine.subsumption.SubsumptionTester; - -/** - * Collection of utility methods used by the {@link SubsumptionTester} and the {@link ScgExpressionNormalFormGenerator}. - * - */ -public final class SemanticUtils { - - public static final String KNOWN_PRESENT_ID = "410515003"; - public static final String CURRENT_ID = "15240007"; - public static final String PERFORMED_ID = "398166005"; - public static final String SUBJECT_OF_RECORD_ID = "410604004"; - public static final String ASSOCIATED_FINDING_ID = "246090004"; - public static final String ASSOCIATED_PROCEDURE_ID = "363589002"; - public static final String FINDING_CONTEXT_ID = "408729009"; - public static final String PROCEDURE_CONTEXT_ID = "408730004"; - public static final String TEMPORAL_CONTEXT_ID = "408731000"; - public static final String SUBJECT_RELATIONSHIP_CONTEXT_ID = "408732007"; - public static final String SITUATION_WITH_EXPLICIT_CONTEXT_ID = "243796009"; - - public static final String ASSOCIATED_MORPHOLOGY_ID = "116676008"; - public static final String FINDING_SITE_ID = "363698007"; - public static final String CAUSATIVE_AGENT_ID = "246075003"; - public static final String HAS_ACTIVE_INGREDIENT_ID = "127489000"; - public static final String HAS_DOSE_FORM_ID = "411116001"; - - private static final List VALID_CONTEXT_ATTRIBUTE_NAMES = Arrays.asList(ASSOCIATED_FINDING_ID, ASSOCIATED_PROCEDURE_ID, - FINDING_CONTEXT_ID, PROCEDURE_CONTEXT_ID, TEMPORAL_CONTEXT_ID, SUBJECT_RELATIONSHIP_CONTEXT_ID); - - private SemanticUtils() { } // suppress default constructor - - /** - * Returns the value of the first occurrence of an attribute with the specified name. - * @param expression - * @param attributeNameId - * @return the value of the first occurrence of an attribute with the specified name - */ - public static String getAttributeValueId(Expression expression, String attributeNameId) { - AttributeValueExtractingVisitor attributeValueExtractor = new AttributeValueExtractingVisitor(attributeNameId); - EObjectWalker walker = EObjectWalker.createContainmentWalker(attributeValueExtractor); - walker.walk(expression); - String extractedAttributeValueId = attributeValueExtractor.getExtractedAttributeValueId(); - return extractedAttributeValueId; - } - - /** - * Returns the value of the first occurrence of an attribute with the specified name, traversing - * the SCG expression only to a limited depth. - * @param expression - * @param attributeNameId - * @return the value of the first occurrence of an attribute with the specified name - */ - public static Long getAttributeValueIdFromLimitedDepth(Expression expression, String attributeNameId, int maxScgExpressionDepth) { - LimitedDepthAttributeValueExtractingVisitor attributeValueExtractor = new LimitedDepthAttributeValueExtractingVisitor( - attributeNameId, maxScgExpressionDepth); - EObjectWalker walker = EObjectWalker.createContainmentWalker(attributeValueExtractor); - walker.walk(expression); - Long extractedAttributeValueId = attributeValueExtractor.getAttributeValueId(); - return extractedAttributeValueId; - } - - /** - * Returns the focus concepts of the specified {@link Expression}'s clinical kernel. - * @param expression - * @return the focus concepts of the specified {@link Expression}'s clinical kernel - */ - public static List getClinicalKernelFocusConceptIds(Expression expression) { - ClinicalKernelFocusConceptExtractingVisitor focusConceptExtractor = new ClinicalKernelFocusConceptExtractingVisitor(); - EObjectWalker walker = EObjectWalker.createContainmentWalker(focusConceptExtractor); - walker.walk(expression); - return focusConceptExtractor.getExtractedFocusConceptIds(); - } - - public static boolean isClinicalKernelPrimitive(Expression expression) { - PrimitiveClinicalKernelDetectingVisitor primitiveDetector = new PrimitiveClinicalKernelDetectingVisitor(); - EObjectWalker walker = EObjectWalker.createContainmentWalker(primitiveDetector); - walker.walk(expression); - return primitiveDetector.isClinicalKernelPrimitive(); - } - - public static boolean isSingleConceptExpression(Expression expression) { - return expression.getAttributes().isEmpty() && - expression.getGroups().isEmpty() && - expression.getConcepts().size() == 1; - } - - /** - * @param attribute - * @return the attribute {@link Expression} of the specified {@link Attribute} - */ - public static Expression getAttributeValueExpression(Attribute attribute) { - Expression expression = ScgFactory.eINSTANCE.createExpression(); - AttributeValue rValue = attribute.getValue(); - if (rValue instanceof Concept) { - Concept valueConcept = (Concept) rValue; - expression.getConcepts().add(EcoreUtil.copy(valueConcept)); - } else if (rValue instanceof Expression) { - Expression negatableSubExpression = (Expression) rValue; - expression.getGroups().addAll(EcoreUtil.copyAll(negatableSubExpression.getGroups())); - expression.getAttributes().addAll(EcoreUtil.copyAll(negatableSubExpression.getAttributes())); - EList concepts = negatableSubExpression.getConcepts(); - for (Concept lValue : concepts) { - expression.getConcepts().add(EcoreUtil.copy(lValue)); - } - } - - return expression; - } - - /** - * @param attributeToMatch - * @param attributes - * @return the attributes from the specified collection, which are name-matched with the specified attribute - */ - public static Collection findNameMatchedAttributes(Attribute attributeToMatch, Collection attributes) { - return findNameMatchedAttributes(attributeToMatch.getName(), attributes); - } - - /** - * @param attributeNameConceptToMatch - * @param attributes - * @return the attributes from the specified collection, which are name-matched with the specified concept - */ - public static Collection findNameMatchedAttributes(Concept attributeNameConceptToMatch, Collection attributes) { - // use set to avoid duplicates - Collection nameMatchedAttributes = new HashSet(); - for (Attribute attribute : attributes) { - Concept attributeNameConcept = attribute.getName(); - Concept attributeToMatchNameConcept = attributeNameConceptToMatch; - if (attributeNameConcept.getId().equals(attributeToMatchNameConcept.getId())) { - nameMatchedAttributes.add(new AttributeNameMatch(attribute)); - } - } - - return Collections.unmodifiableCollection(nameMatchedAttributes); - } - - /** - * @param attributeToMatch - * @param Group - * @return the attributes and their containing groups from the specified group, which are name-matched with the specified attribute - */ - public static Collection findNameMatchedAttributesInGroups(Concept attributeNameConceptToMatch, Collection Groups) { - Collection nameMatchedAttributes = new HashSet(); - for (Group Group : Groups) { - nameMatchedAttributes.addAll(findNameMatchedAttributes(attributeNameConceptToMatch, Group)); - } - return Collections.unmodifiableCollection(nameMatchedAttributes); - } - - /** - * @param attributeToMatch - * @param Group - * @return the attributes and their containing groups from the specified group, which are name-matched with the specified attribute - */ - public static Collection findNameMatchedAttributes(Concept attributeNameConceptToMatch, Group group) { - Collection groupedAttributes = group.getAttributes(); - Collection attributeNameMatches = findNameMatchedAttributes(attributeNameConceptToMatch, groupedAttributes); - for (AttributeNameMatch attributeNameMatch : attributeNameMatches) { - attributeNameMatch.setGroup(group); - } - - return Collections.unmodifiableCollection(attributeNameMatches); - } - - /** - * @param attributeToMatch - * @param Group - * @return the attributes and their containing groups from the specified group, which are name-matched with the specified attribute - */ - public static Collection findNameMatchedAttributes(Attribute attributeToMatch, Group Group) { - return findNameMatchedAttributes(attributeToMatch.getName(), Group); - } - - public static Collection findNameMatchedAttributes(Attribute attributeToMatch, ConceptDefinition conceptDefinition) { - // use set to avoid duplicates - Collection allNameMatchedAttributes = new HashSet(); - Collection ungroupedNameMatchedAttributes = findNameMatchedAttributes(attributeToMatch, - conceptDefinition.getUngroupedAttributes()); - allNameMatchedAttributes.addAll(ungroupedNameMatchedAttributes); - - for (Group Group : conceptDefinition.getGroups()) { - allNameMatchedAttributes.addAll(findNameMatchedAttributes(attributeToMatch, Group)); - } - - return Collections.unmodifiableCollection(allNameMatchedAttributes); - } - - public static Collection findNameMatchedAttributes(String attributeNameConceptIdToMatch, ConceptDefinition conceptDefinition) { - // use set to avoid duplicates - Collection allNameMatchedAttributes = new HashSet(); - Concept attributeNameConceptToMatch = ScgFactory.eINSTANCE.createConcept(); - attributeNameConceptToMatch.setId(attributeNameConceptIdToMatch); - Collection ungroupedNameMatchedAttributes = findNameMatchedAttributes(attributeNameConceptToMatch, - conceptDefinition.getUngroupedAttributes()); - allNameMatchedAttributes.addAll(ungroupedNameMatchedAttributes); - - for (Group Group : conceptDefinition.getGroups()) { - allNameMatchedAttributes.addAll(findNameMatchedAttributes(attributeNameConceptToMatch, Group)); - } - - return Collections.unmodifiableCollection(allNameMatchedAttributes); - } - - public static Collection findNameMatchedAttributesInConceptDefinitons(Attribute attributeToMatch, - Collection conceptDefinitions) { - // use set to avoid duplicates - Collection nameMatchedAttributes = new HashSet(); - for (ConceptDefinition conceptDefinition : conceptDefinitions) { - nameMatchedAttributes.addAll(findNameMatchedAttributes(attributeToMatch, conceptDefinition)); - } - - return Collections.unmodifiableCollection(nameMatchedAttributes); - } - - public static Collection getGroupedAttributeNameMatches(Collection matches) { - Collection groupedAttributeNameMatches = new HashSet(); - for (AttributeNameMatch attributeNameMatch : matches) { - if (attributeNameMatch.getGroup() != AttributeNameMatch.NO_GROUP) - groupedAttributeNameMatches.add(attributeNameMatch); - } - - return Collections.unmodifiableCollection(groupedAttributeNameMatches); - } - - public static Collection getUngroupedAttributeNameMatches(Collection matches) { - Collection ungroupedAttributeNameMatches = new HashSet(); - for (AttributeNameMatch attributeNameMatch : matches) { - if (attributeNameMatch.getGroup() == AttributeNameMatch.NO_GROUP) - ungroupedAttributeNameMatches.add(attributeNameMatch); - } - - return Collections.unmodifiableCollection(ungroupedAttributeNameMatches); - } - - public static boolean isLateralizable(Concept concept) { - throw new UnsupportedOperationException("Not implemented yet."); - } - - /** - * The only valid context attributes are:
          - * "associated finding" (246090004), "associated procedure" (363589002), "finding context" (2470590016), - * "procedure context" (2470591017), "temporal context" (2470592012) and "subject relationship context" (2470593019). - * - * @param attribute - * @return true if the attribute name is one of the valid concepts, false otherwise - */ - public static boolean isValidContextAttribute(Attribute attribute) { - Concept attributeNameConcept = attribute.getName(); - return VALID_CONTEXT_ATTRIBUTE_NAMES.contains(attributeNameConcept.getId()); - } - - public static boolean isNullOrEmpty(Collection collection) { - return collection == null || collection.isEmpty(); - } - - /** - * @param valueNormalFormExpression - * @return {@link ConceptGroup} if the specified expression only has a single focus concept, {@link NegatableSubExpression} otherwise - */ - public static AttributeValue buildRValue(Expression valueNormalFormExpression) { - if (valueNormalFormExpression.getGroups().isEmpty() && valueNormalFormExpression.getAttributes().isEmpty() - && valueNormalFormExpression.getConcepts().size() == 1) { - Concept valueNormalFormExpressionFocusConcept = valueNormalFormExpression.getConcepts().iterator().next(); - Concept concept = ScgFactory.eINSTANCE.createConcept(); - concept.setId(valueNormalFormExpressionFocusConcept.getId()); - return concept; - } else { - return EcoreUtil.copy(valueNormalFormExpression); - } - } - - public static Collection getAttributes(Collection Groups) { - Collection attributes = new HashSet(); - for (Group group : Groups) { - attributes.addAll(group.getAttributes()); - } - return attributes; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.validation.snomed/.classpath b/snomed/com.b2international.snowowl.validation.snomed/.classpath index c6dc66b6c22..4c5919d4e8d 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/.classpath +++ b/snomed/com.b2international.snowowl.validation.snomed/.classpath @@ -17,5 +17,6 @@ + diff --git a/snomed/com.b2international.snowowl.validation.snomed/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.validation.snomed/META-INF/MANIFEST.MF index f7d040300fc..1f307c01f12 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.validation.snomed/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Validation Rules Bundle-SymbolicName: com.b2international.snowowl.validation.snomed;singleton:=true -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", diff --git a/snomed/com.b2international.snowowl.validation.snomed/pom.xml b/snomed/com.b2international.snowowl.validation.snomed/pom.xml index bc2205511d3..ff7c58d8281 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/pom.xml +++ b/snomed/com.b2international.snowowl.validation.snomed/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snomed-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT @@ -52,7 +52,6 @@ org.eclipse.tycho tycho-surefire-plugin - ${tycho.version} snomed-validation-tests @@ -60,6 +59,7 @@ test + ${tycho.testArgLine} -Xms1g -Xmx1g -XX:+AlwaysLockClassLoader -Dosgi.classloader.type=nonparallel -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch **/AllGenericValidationTests.java diff --git a/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule666.groovy b/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule666.groovy index abcf456aad8..1fc175d6325 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule666.groovy +++ b/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule666.groovy @@ -51,7 +51,8 @@ if (params.isUnpublishedOnly) { def conceptsWithUnpublishedLanguageMembers = SnomedRequests.prepareSearchDescription() .filterByIds(descriptionsIdsWithUnpublishedLanguageMembers) .setLimit(descriptionsIdsWithUnpublishedLanguageMembers.size()) - .setFields(SnomedDescriptionIndexEntry.Fields.CONCEPT_ID) + .setFields(SnomedDescriptionIndexEntry.Fields.ID, + SnomedDescriptionIndexEntry.Fields.CONCEPT_ID) .build() .execute(ctx) .collect({SnomedDescription d -> d.getConceptId()}) diff --git a/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule_duplicate_members.groovy b/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule_duplicate_members.groovy index a5d12ca6139..2699e680d89 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule_duplicate_members.groovy +++ b/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule_duplicate_members.groovy @@ -42,7 +42,7 @@ final Aggregation memberAggregation = searcher memberAggregation.getBuckets().entrySet().each({entry -> entry.getValue().getHits().forEach({referencedComponentId -> final ComponentCategory referencedComponentCategory = SnomedIdentifiers.getComponentCategory(referencedComponentId) - final ComponentIdentifier affectedComponent + ComponentIdentifier affectedComponent = ComponentIdentifier.UNKOWN switch(referencedComponentCategory) { case ComponentCategory.CONCEPT: affectedComponent = ComponentIdentifier.of(SnomedTerminologyComponentConstants.CONCEPT_NUMBER, referencedComponentId); diff --git a/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule_mrcm_constraint.groovy b/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule_mrcm_constraint.groovy index afa7cf5f505..6a60819d666 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule_mrcm_constraint.groovy +++ b/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule_mrcm_constraint.groovy @@ -100,7 +100,7 @@ def getOWLRelationships = { SnomedReferenceSetMember owlMember -> } if (params.isUnpublishedOnly) { - SnomedRelationshipSearchRequestBuilder requestBuilder = SnomedRequests.prepareSearchRelationship() + SnomedRelationshipSearchRequestBuilder requestBuilder = SnomedRequests.prepareSearchRelationship() .filterByActive(true) .filterByEffectiveTime(EffectiveTimes.UNSET_EFFECTIVE_TIME) .all() @@ -133,7 +133,7 @@ if (params.isUnpublishedOnly) { SnomedRelationshipPredicate predicate = getPredicate(constraint) def predicateCharType = predicate.getCharacteristicTypeId() - if (predicate.getAttributeExpression().equals(typeId) && (Strings.isNullOrEmpty(predicateCharType) || charTypeId.equals(predicateCharType))) { + if (getApplicableConcepts(predicate.getAttributeExpression()).contains(typeId) && (Strings.isNullOrEmpty(predicateCharType) || charTypeId.equals(predicateCharType))) { if (!getApplicableConcepts(predicate.getRangeExpression()).contains(destinationId)) { issues.add(ComponentIdentifier.of(SnomedTerminologyComponentConstants.RELATIONSHIP_NUMBER, relationshipId)) } @@ -158,15 +158,15 @@ if (params.isUnpublishedOnly) { def charType = predicate.getCharacteristicTypeId() return Concepts.STATED_RELATIONSHIP == charType || Strings.isNullOrEmpty(charType) }).collect(Collectors.toSet()) - - for (SnomedRelationshipPredicate predicate : applicableRulePredicates) { - for (SnomedOWLRelationshipDocument relationship : getOWLRelationships(owlAxiomMember)) { - if (relationship.getTypeId().equals(predicate.getAttributeExpression()) && - !getApplicableConcepts(predicate.getRangeExpression()).contains(relationship.getDestinationId())) { - issues.add(ComponentIdentifier.of(SnomedTerminologyComponentConstants.REFSET_MEMBER_NUMBER, owlAxiomMember.getId())) - } + + for (SnomedRelationshipPredicate predicate : applicableRulePredicates) { + for (SnomedOWLRelationshipDocument relationship : getOWLRelationships(owlAxiomMember)) { + if (getApplicableConcepts(predicate.getAttributeExpression()).contains(relationship.getTypeId()) && + !getApplicableConcepts(predicate.getRangeExpression()).contains(relationship.getDestinationId())) { + issues.add(ComponentIdentifier.of(SnomedTerminologyComponentConstants.REFSET_MEMBER_NUMBER, owlAxiomMember.getId())) } } + } } } else { @@ -183,7 +183,7 @@ if (params.isUnpublishedOnly) { final ExpressionBuilder expressionBuilder = Expressions.builder() .filter(SnomedRelationshipIndexEntry.Expressions.active()) .filter(SnomedRelationshipIndexEntry.Expressions.sourceIds(domain)) - .filter(SnomedRelationshipIndexEntry.Expressions.typeId(attributeExpression)) + .filter(SnomedRelationshipIndexEntry.Expressions.typeIds(getApplicableConcepts(attributeExpression))) .mustNot(SnomedRelationshipIndexEntry.Expressions.destinationIds(getApplicableConcepts(rangeExpression))) if (!Strings.isNullOrEmpty(charType)) { @@ -220,7 +220,7 @@ if (params.isUnpublishedOnly) { Set domain = getApplicableConcepts(domainExpression) for (SnomedRelationshipPredicate predicate : applicableMrcmRulePredicates) { - def attribute = Lists.newArrayList(predicate.getAttributeExpression()) + def attribute = getApplicableConcepts(predicate.getAttributeExpression()) def range = getApplicableConcepts(predicate.getRangeExpression()) final ExpressionBuilder expressionBuilder = Expressions.builder() diff --git a/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule_mrcm_constraint_type.groovy b/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule_mrcm_constraint_type.groovy index 4f8a67dcc6c..0dd4dd85ab2 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule_mrcm_constraint_type.groovy +++ b/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule_mrcm_constraint_type.groovy @@ -50,21 +50,6 @@ def mrcmRules = SnomedRequests.prepareSearchConstraint() ? ((SnomedCardinalityPredicate) constraint.getPredicate()).getPredicate() instanceof SnomedRelationshipPredicate : constraint.getPredicate() instanceof SnomedRelationshipPredicate}) .collect(); - -def typeMultimapBuilder = ImmutableMultimap.builder() - -for (SnomedConstraint constraint : mrcmRules) { - SnomedRelationshipPredicate predicate = constraint.getPredicate() instanceof SnomedCardinalityPredicate - ? ((SnomedCardinalityPredicate) constraint.getPredicate()).getPredicate() - : constraint.getPredicate() - String typeId = predicate.getAttributeExpression() - - if (!typeId.equals(Concepts.IS_A)) { - typeMultimapBuilder.put(typeId, constraint) - } -} - -Multimap mrcmRulesByAttributeType = typeMultimapBuilder.build() def getApplicableConcepts = { String conceptSetExpression -> def expression = Expressions.builder() @@ -84,6 +69,21 @@ def getApplicableConcepts = { String conceptSetExpression -> return conceptIds } +def typeMultimapBuilder = ImmutableMultimap.builder() +for (SnomedConstraint constraint : mrcmRules) { + final SnomedRelationshipPredicate predicate = constraint.getPredicate() instanceof SnomedCardinalityPredicate + ? ((SnomedCardinalityPredicate) constraint.getPredicate()).getPredicate() + : constraint.getPredicate() + + final String attributeExpression = predicate.getAttributeExpression() + if (!Concepts.IS_A.equals(attributeExpression)) { + getApplicableConcepts(attributeExpression).forEach({ + typeMultimapBuilder.put(it, constraint) + }) + } +} +Multimap mrcmRulesByAttributeType = typeMultimapBuilder.build() + def getCachedApplicableConcepts = { String conceptSetExpression -> return getApplicableConcepts(conceptSetExpression) }.memoize() diff --git a/snomed/com.b2international.snowowl.validation.snomed/src/test/java/com/b2international/snowowl/validation/snomed/AllGenericValidationTests.java b/snomed/com.b2international.snowowl.validation.snomed/src/test/java/com/b2international/snowowl/validation/snomed/AllGenericValidationTests.java index cf06db690bd..fdebfe41e9a 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/src/test/java/com/b2international/snowowl/validation/snomed/AllGenericValidationTests.java +++ b/snomed/com.b2international.snowowl.validation.snomed/src/test/java/com/b2international/snowowl/validation/snomed/AllGenericValidationTests.java @@ -23,8 +23,10 @@ import org.junit.runners.Suite.SuiteClasses; import com.b2international.commons.platform.PlatformUtil; +import com.b2international.snowowl.core.terminology.TerminologyRegistry; import com.b2international.snowowl.core.validation.eval.GroovyScriptValidationRuleEvaluator; import com.b2international.snowowl.core.validation.eval.ValidationRuleEvaluator; +import com.b2international.snowowl.snomed.core.SnomedPlugin; import com.b2international.snowowl.snomed.validation.SnomedQueryValidationRuleEvaluator; /** @@ -39,6 +41,7 @@ public static void init() { ValidationRuleEvaluator.Registry.register(new SnomedQueryValidationRuleEvaluator()); final Path resourcesDir = PlatformUtil.toAbsoluteBundlePath(BaseGenericValidationRuleTest.class.getClassLoader().getResource("src/main/resources")); ValidationRuleEvaluator.Registry.register(new GroovyScriptValidationRuleEvaluator(resourcesDir)); + TerminologyRegistry.INSTANCE.register(new SnomedPlugin()); } } diff --git a/snomed/com.b2international.snowowl.validation.snomed/src/test/java/com/b2international/snowowl/validation/snomed/BaseGenericValidationRuleTest.java b/snomed/com.b2international.snowowl.validation.snomed/src/test/java/com/b2international/snowowl/validation/snomed/BaseGenericValidationRuleTest.java index febb0167b81..12addc73cd3 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/src/test/java/com/b2international/snowowl/validation/snomed/BaseGenericValidationRuleTest.java +++ b/snomed/com.b2international.snowowl.validation.snomed/src/test/java/com/b2international/snowowl/validation/snomed/BaseGenericValidationRuleTest.java @@ -43,6 +43,7 @@ import com.b2international.snowowl.core.internal.validation.ValidationConfiguration; import com.b2international.snowowl.core.internal.validation.ValidationRepository; import com.b2international.snowowl.core.internal.validation.ValidationThreadPool; +import com.b2international.snowowl.core.terminology.TerminologyRegistry; import com.b2international.snowowl.core.validation.ValidateRequestBuilder; import com.b2international.snowowl.core.validation.ValidationRequests; import com.b2international.snowowl.core.validation.issue.ValidationIssue; @@ -56,7 +57,6 @@ import com.b2international.snowowl.snomed.core.ecl.DefaultEclSerializer; import com.b2international.snowowl.snomed.core.ecl.EclParser; import com.b2international.snowowl.snomed.core.ecl.EclSerializer; -import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; import com.b2international.snowowl.snomed.datastore.index.constraint.ConceptSetDefinitionFragment; import com.b2international.snowowl.snomed.datastore.index.constraint.HierarchyDefinitionFragment; import com.b2international.snowowl.snomed.datastore.index.constraint.PredicateFragment; @@ -111,7 +111,8 @@ public void setup() { .with(EclSerializer.class, new DefaultEclSerializer(ECL_INJECTOR.getInstance(ISerializer.class))).with(Index.class, rawIndex()) .with(RevisionIndex.class, index()).with(ObjectMapper.class, getMapper()) .with(ValidationRepository.class, new ValidationRepository(rawIndex())) - .with(ClassLoader.class, SnomedDatastoreActivator.class.getClassLoader()) + .with(ClassLoader.class, getClass().getClassLoader()) + .with(TerminologyRegistry.class, TerminologyRegistry.INSTANCE) .with(ValidationThreadPool.class, new ValidationThreadPool(1, 1, 1)).build(); // index common required SNOMED CT Concepts diff --git a/snomed/com.b2international.snowowl.validation.snomed/src/test/java/com/b2international/snowowl/validation/snomed/GenericValidationRuleTest.java b/snomed/com.b2international.snowowl.validation.snomed/src/test/java/com/b2international/snowowl/validation/snomed/GenericValidationRuleTest.java index 74c3150e6ad..8636b07de0d 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/src/test/java/com/b2international/snowowl/validation/snomed/GenericValidationRuleTest.java +++ b/snomed/com.b2international.snowowl.validation.snomed/src/test/java/com/b2international/snowowl/validation/snomed/GenericValidationRuleTest.java @@ -16,6 +16,7 @@ package com.b2international.snowowl.validation.snomed; +import static com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants.DESCRIPTION_NUMBER; import static com.b2international.snowowl.test.commons.snomed.RandomSnomedIdentiferGenerator.generateConceptId; import static com.b2international.snowowl.test.commons.snomed.RandomSnomedIdentiferGenerator.generateDescriptionId; @@ -44,6 +45,7 @@ import com.b2international.snowowl.snomed.datastore.index.entry.SnomedOWLRelationshipDocument; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry; +import com.google.common.base.Function; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; @@ -214,17 +216,19 @@ public void rule665() throws Exception { public void rule666() throws Exception { final String ruleId = "666"; indexRule(ruleId); - + // index concept with two FSNs in the same language refset String concept1Id = generateConceptId(); SnomedDescriptionIndexEntry fsn1 = description(generateDescriptionId(), Concepts.FULLY_SPECIFIED_NAME, "Fully specified name 1 (tag)") .conceptId(concept1Id) .acceptability(Concepts.REFSET_LANGUAGE_TYPE_ES, Acceptability.PREFERRED) .build(); + SnomedRefSetMemberIndexEntry fsn1Member = createLanguageRefsetMember(fsn1); SnomedDescriptionIndexEntry fsn2 = description(generateDescriptionId(), Concepts.FULLY_SPECIFIED_NAME, "Fully specified name 2 (tag)") .conceptId(concept1Id) .acceptability(Concepts.REFSET_LANGUAGE_TYPE_ES, Acceptability.PREFERRED) .build(); + SnomedRefSetMemberIndexEntry fsn2Member = createLanguageRefsetMember(fsn2); SnomedConceptDocument c1 = concept(concept1Id) .preferredDescriptions(ImmutableList.of( new SnomedDescriptionFragment(fsn1.getId(), fsn1.getTypeId(), fsn1.getTerm(), Concepts.REFSET_LANGUAGE_TYPE_ES), @@ -237,10 +241,12 @@ public void rule666() throws Exception { .acceptability(Concepts.REFSET_LANGUAGE_TYPE_ES, Acceptability.PREFERRED) .conceptId(concept2Id) .build(); + SnomedRefSetMemberIndexEntry pt1Member = createLanguageRefsetMember(pt1); SnomedDescriptionIndexEntry pt2 = description(generateDescriptionId(), Concepts.SYNONYM, "Preferred term 2") .acceptability(Concepts.REFSET_LANGUAGE_TYPE_ES, Acceptability.PREFERRED) .conceptId(concept2Id) .build(); + SnomedRefSetMemberIndexEntry pt2Member = createLanguageRefsetMember(pt2); SnomedConceptDocument c2 = concept(concept2Id) .preferredDescriptions( ImmutableList.of( @@ -254,38 +260,59 @@ public void rule666() throws Exception { .conceptId(concept3Id) .acceptability(Concepts.REFSET_LANGUAGE_TYPE_ES, Acceptability.PREFERRED) .build(); + SnomedRefSetMemberIndexEntry fsn3Member = createLanguageRefsetMember(fsn3); SnomedDescriptionIndexEntry pt3 = description(generateDescriptionId(), Concepts.SYNONYM, "Preferred term 3") .acceptability(Concepts.REFSET_LANGUAGE_TYPE_ES, Acceptability.PREFERRED) .conceptId(concept3Id) .build(); + SnomedRefSetMemberIndexEntry pt3Member = createLanguageRefsetMember(pt3); SnomedConceptDocument c3 = concept(concept3Id) .preferredDescriptions(ImmutableList.of( new SnomedDescriptionFragment(fsn3.getId(), fsn3.getTypeId(), fsn3.getTerm(), Concepts.REFSET_LANGUAGE_TYPE_ES), new SnomedDescriptionFragment(pt3.getId(), pt3.getTypeId(), pt3.getTerm(), Concepts.REFSET_LANGUAGE_TYPE_ES) )) .build(); - indexRevision(MAIN, fsn1, fsn2, c1, pt1, pt2, c2, fsn3, pt3, c3); + indexRevision(MAIN, fsn1, fsn2, c1, pt1, pt2, c2, fsn3, pt3, c3, fsn1Member, fsn2Member, + fsn3Member, pt1Member, pt2Member, pt3Member); ValidationIssues issues = validate(ruleId); assertAffectedComponents(issues, ComponentIdentifier.of(SnomedTerminologyComponentConstants.CONCEPT_NUMBER, c1.getId()), ComponentIdentifier.of(SnomedTerminologyComponentConstants.CONCEPT_NUMBER, c2.getId())); } + + private SnomedRefSetMemberIndexEntry createLanguageRefsetMember(SnomedDescriptionIndexEntry description) { + return member(description.getId(), DESCRIPTION_NUMBER, Concepts.REFSET_LANGUAGE_TYPE_ES) + .referenceSetType(SnomedRefSetType.LANGUAGE) + .build(); + } @Test public void rule667() throws Exception { final String ruleId = "667"; indexRule(ruleId); + //Populate the Description Type Refset + final String newDescriptionTypeId = generateConceptId(); + final SnomedRefSetMemberIndexEntry descriptionFormatEntry1 = member(newDescriptionTypeId, SnomedTerminologyComponentConstants.CONCEPT_NUMBER, Concepts.REFSET_DESCRIPTION_TYPE) + .field(SnomedRf2Headers.FIELD_DESCRIPTION_LENGTH, 50) + .build(); + final SnomedRefSetMemberIndexEntry descriptionFormatEntry2 = member(Concepts.SYNONYM, SnomedTerminologyComponentConstants.CONCEPT_NUMBER, Concepts.REFSET_DESCRIPTION_TYPE) + .field(SnomedRf2Headers.FIELD_DESCRIPTION_LENGTH, 255) + .build(); + final SnomedRefSetMemberIndexEntry descriptionFormatEntry3 = member(Concepts.FULLY_SPECIFIED_NAME, SnomedTerminologyComponentConstants.CONCEPT_NUMBER, Concepts.REFSET_DESCRIPTION_TYPE) + .field(SnomedRf2Headers.FIELD_DESCRIPTION_LENGTH, 255) + .build(); + final SnomedRefSetMemberIndexEntry descriptionFormatEntry4 = member(Concepts.TEXT_DEFINITION, SnomedTerminologyComponentConstants.CONCEPT_NUMBER, Concepts.REFSET_DESCRIPTION_TYPE) + .field(SnomedRf2Headers.FIELD_DESCRIPTION_LENGTH, 4096) + .build(); + + //Create descriptions shorter and longer than the limit for each description type final SnomedDescriptionIndexEntry correctSynonym = description(generateDescriptionId(), Concepts.SYNONYM, "correct synonym length").build(); final SnomedDescriptionIndexEntry incorrectSynonym = description(generateDescriptionId(), Concepts.SYNONYM, generateTermOfLength(256)).build(); final SnomedDescriptionIndexEntry correctFsn = description(generateDescriptionId(), Concepts.FULLY_SPECIFIED_NAME, "correct FSN length(this is an fsn)").build(); final SnomedDescriptionIndexEntry incorrectFsn = description(generateDescriptionId(), Concepts.FULLY_SPECIFIED_NAME, generateTermOfLength(256)).build(); final SnomedDescriptionIndexEntry correctTextDefinition = description(generateDescriptionId(), Concepts.TEXT_DEFINITION, "Correct text definition length").build(); final SnomedDescriptionIndexEntry incorrectTextDefinition = description(generateDescriptionId(), Concepts.TEXT_DEFINITION, generateTermOfLength(4097)).build(); - final String newDescriptionTypeId = generateConceptId(); - final SnomedRefSetMemberIndexEntry descriptionFormatEntry = member(newDescriptionTypeId, SnomedTerminologyComponentConstants.CONCEPT_NUMBER, Concepts.REFSET_DESCRIPTION_TYPE) - .field(SnomedRf2Headers.FIELD_DESCRIPTION_LENGTH, 50) - .build(); final SnomedDescriptionIndexEntry newCorrectDescriptionTypedDesc = description(generateConceptId(), newDescriptionTypeId, "correct new description type length").build(); final SnomedDescriptionIndexEntry newIncorrectDescriptionTypedDesc = description(generateConceptId(), newDescriptionTypeId, generateTermOfLength(51)).build(); @@ -296,7 +323,10 @@ public void rule667() throws Exception { incorrectFsn, correctTextDefinition, incorrectTextDefinition, - descriptionFormatEntry, + descriptionFormatEntry1, + descriptionFormatEntry2, + descriptionFormatEntry3, + descriptionFormatEntry4, newCorrectDescriptionTypedDesc, newIncorrectDescriptionTypedDesc ); @@ -333,16 +363,19 @@ public void rule_mrcm_constraint() throws Exception { SnomedRefSetMemberIndexEntry axiomMember1 = member(Concepts.CONCEPT_MODEL_ATTRIBUTE, SnomedTerminologyComponentConstants.CONCEPT_NUMBER, Concepts.REFSET_OWL_AXIOM) .classAxiomRelationships(Lists.newArrayList(new SnomedOWLRelationshipDocument(Concepts.FINDING_SITE, Concepts.CONCEPT_MODEL_ATTRIBUTE, 0))) .owlExpression(String.format("ObjectSomeValuesFrom(:%s :%s)", Concepts.FINDING_SITE, Concepts.CONCEPT_MODEL_ATTRIBUTE)) + .referenceSetType(SnomedRefSetType.OWL_AXIOM) .build(); SnomedRefSetMemberIndexEntry axiomMember2 = member(Concepts.CONCEPT_MODEL_ATTRIBUTE, SnomedTerminologyComponentConstants.CONCEPT_NUMBER, Concepts.REFSET_OWL_AXIOM) .classAxiomRelationships(Lists.newArrayList(new SnomedOWLRelationshipDocument(Concepts.FINDING_SITE, Concepts.PHYSICAL_OBJECT, 0))) .owlExpression(String.format("ObjectSomeValuesFrom(:%s :%s)", Concepts.FINDING_SITE, Concepts.PHYSICAL_OBJECT)) + .referenceSetType(SnomedRefSetType.OWL_AXIOM) .build(); SnomedRefSetMemberIndexEntry axiomMember3 = member(Concepts.ROOT_CONCEPT, SnomedTerminologyComponentConstants.CONCEPT_NUMBER, Concepts.REFSET_OWL_AXIOM) .classAxiomRelationships(Lists.newArrayList(new SnomedOWLRelationshipDocument(Concepts.FINDING_SITE, Concepts.CONCEPT_MODEL_ATTRIBUTE, 0))) .owlExpression(String.format("ObjectSomeValuesFrom(:%s :%s)", Concepts.FINDING_SITE, Concepts.CONCEPT_MODEL_ATTRIBUTE)) + .referenceSetType(SnomedRefSetType.OWL_AXIOM) .build(); indexRevision(MAIN, relationship1, relationship2, relationship3, axiomMember1, axiomMember2, axiomMember3); @@ -363,7 +396,6 @@ public void rule_mrcm_constraint_type() throws Exception { final HierarchyDefinitionFragment predicateType1 = hierarchyConceptSetDefinition(Concepts.FINDING_SITE, HierarchyInclusionType.SELF); final HierarchyDefinitionFragment predicateRange1 = hierarchyConceptSetDefinition(Concepts.PHYSICAL_OBJECT, HierarchyInclusionType.SELF); final RelationshipPredicateFragment conceptModelPredicate1 = relationshipPredicate(predicateType1, predicateRange1); - final SnomedConstraintDocument attributeConstraint1 = attributeConstraint(conceptSetDefinition1, conceptModelPredicate1); //Second mrcm rule @@ -371,9 +403,7 @@ public void rule_mrcm_constraint_type() throws Exception { final HierarchyDefinitionFragment predicateType2 = hierarchyConceptSetDefinition(Concepts.HAS_ACTIVE_INGREDIENT, HierarchyInclusionType.SELF); final HierarchyDefinitionFragment predicateRange2 = hierarchyConceptSetDefinition(Concepts.TEXT_DEFINITION, HierarchyInclusionType.SELF); final RelationshipPredicateFragment conceptModelPredicate2 = relationshipPredicate(predicateType2, predicateRange2); - final SnomedConstraintDocument attributeConstraint2 = attributeConstraint(conceptSetDefinition2, conceptModelPredicate2); - //Relationships final SnomedRelationshipIndexEntry relationship1 = relationship(Concepts.CONCEPT_MODEL_ATTRIBUTE, Concepts.IS_A, Concepts.CONCEPT_MODEL_ATTRIBUTE) @@ -393,33 +423,26 @@ public void rule_mrcm_constraint_type() throws Exception { // OWL axioms SnomedRefSetMemberIndexEntry axiomMember1 = member(Concepts.CONCEPT_MODEL_ATTRIBUTE, SnomedTerminologyComponentConstants.CONCEPT_NUMBER, Concepts.REFSET_OWL_AXIOM) + .referenceSetType(SnomedRefSetType.OWL_AXIOM) .classAxiomRelationships(Lists.newArrayList(new SnomedOWLRelationshipDocument(Concepts.FINDING_SITE, Concepts.CONCEPT_MODEL_ATTRIBUTE, 0))) .owlExpression(String.format("ObjectSomeValuesFrom(:%s :%s)", Concepts.FINDING_SITE, Concepts.CONCEPT_MODEL_ATTRIBUTE)) .build(); SnomedRefSetMemberIndexEntry axiomMember2 = member(Concepts.TEXT_DEFINITION, SnomedTerminologyComponentConstants.CONCEPT_NUMBER, Concepts.REFSET_OWL_AXIOM) + .referenceSetType(SnomedRefSetType.OWL_AXIOM) .classAxiomRelationships(Lists.newArrayList(new SnomedOWLRelationshipDocument(Concepts.FINDING_SITE, Concepts.PHYSICAL_OBJECT, 0))) .owlExpression(String.format("ObjectSomeValuesFrom(:%s :%s)", Concepts.FINDING_SITE, Concepts.PHYSICAL_OBJECT)) .build(); SnomedRefSetMemberIndexEntry axiomMember3 = member(Concepts.ROOT_CONCEPT, SnomedTerminologyComponentConstants.CONCEPT_NUMBER, Concepts.REFSET_OWL_AXIOM) + .referenceSetType(SnomedRefSetType.OWL_AXIOM) .classAxiomRelationships(Lists.newArrayList(new SnomedOWLRelationshipDocument(Concepts.PHYSICAL_OBJECT, Concepts.CONCEPT_MODEL_ATTRIBUTE, 0))) .owlExpression(String.format("ObjectSomeValuesFrom(:%s :%s)", Concepts.PHYSICAL_OBJECT, Concepts.CONCEPT_MODEL_ATTRIBUTE)) .build(); - indexRevision( - MAIN, - attributeConstraint1, - attributeConstraint2, - relationship1, - relationship2, - relationship3, - relationship4, - relationship5, - axiomMember1, - axiomMember2, - axiomMember3 - ); + indexRevision(MAIN, attributeConstraint1, attributeConstraint2, + relationship1, relationship2, relationship3, relationship4, relationship5, + axiomMember1, axiomMember2, axiomMember3); ValidationIssues issues = validate(ruleId); Assertions.assertThat(issues.stream().map(ValidationIssue::getAffectedComponent).collect(Collectors.toSet())) @@ -446,7 +469,7 @@ public void rule_duplicate_members() throws Exception { indexRevision(MAIN, duplicateMember1, duplicateMember2, correctMember); final ValidationIssues issues = validate(ruleId); - + assertAffectedComponents(issues, ComponentIdentifier.of(SnomedTerminologyComponentConstants.CONCEPT_NUMBER, Concepts.IS_A)); } diff --git a/snomed/pom.xml b/snomed/pom.xml index 041bd598b54..05d02914391 100644 --- a/snomed/pom.xml +++ b/snomed/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT @@ -29,9 +29,14 @@ com.b2international.snowowl.snomed.reasoner.tests + com.b2international.snowowl.snomed.scg + com.b2international.snowowl.snomed.scg.tests com.b2international.snowowl.snomed.ecl - com.b2international.snowowl.snomed.ql com.b2international.snowowl.snomed.ecl.tests + com.b2international.snowowl.snomed.ql + com.b2international.snowowl.snomed.ql.tests + com.b2international.snowowl.snomed.etl + com.b2international.snowowl.snomed.etl.tests com.b2international.snowowl.snomed.core.feature @@ -43,19 +48,4 @@ com.b2international.snowowl.snomed.fhir - - - extras - - - com.b2international.snowowl.snomed.semanticengine - com.b2international.snowowl.snomed.semanticengine.test - com.b2international.snowowl.snomed.semanticengine.simpleast - com.b2international.snowowl.snomed.semanticengine.simpleast.test - com.b2international.snowowl.snomed.scg - com.b2international.snowowl.snomed.dsl - - - - \ No newline at end of file diff --git a/tests/com.b2international.restassured-all/pom.xml b/tests/com.b2international.restassured-all/pom.xml index 7a2f763ad2d..8c114239a80 100644 --- a/tests/com.b2international.restassured-all/pom.xml +++ b/tests/com.b2international.restassured-all/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl tests-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/tests/com.b2international.snowowl.test.commons/META-INF/MANIFEST.MF b/tests/com.b2international.snowowl.test.commons/META-INF/MANIFEST.MF index 873d03d175d..fcff39028a3 100644 --- a/tests/com.b2international.snowowl.test.commons/META-INF/MANIFEST.MF +++ b/tests/com.b2international.snowowl.test.commons/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Test Commons Bundle-SymbolicName: com.b2international.snowowl.test.commons -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2i Healthcare Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", org.junit;bundle-version="4.12.0";visibility:=reexport, @@ -10,10 +10,11 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", org.mockito;bundle-version="2.13.0";visibility:=reexport, org.apache.commons.lang;bundle-version="2.6.0", com.b2international.restassured-all;bundle-version="[3.2.0,3.3.0)";visibility:=reexport, - com.b2international.snowowl.snomed.reasoner, + com.b2international.snowowl.datastore;visibility:=reexport, com.b2international.snowowl.test.dependencies;visibility:=reexport, com.b2international.snowowl.snomed.common;visibility:=reexport, - org.eclipse.xtext.xbase.lib + com.b2international.snowowl.snomed.datastore, + org.eclipse.xtext.xbase.lib;bundle-version="2.18.0" Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Import-Package: ch.qos.logback.classic;version="1.2.3", diff --git a/tests/com.b2international.snowowl.test.commons/pom.xml b/tests/com.b2international.snowowl.test.commons/pom.xml index 7fdaecc4388..81423c5f7f2 100644 --- a/tests/com.b2international.snowowl.test.commons/pom.xml +++ b/tests/com.b2international.snowowl.test.commons/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl tests-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT diff --git a/tests/com.b2international.snowowl.test.commons/resources/snomed/SnomedCT_RF2Release_GB1000000_20200204_complex_block_map.zip b/tests/com.b2international.snowowl.test.commons/resources/snomed/SnomedCT_RF2Release_GB1000000_20200204_complex_block_map.zip new file mode 100644 index 0000000000000000000000000000000000000000..e1f1336295ad4a72d93a42b4c28cdb6eb36172d8 GIT binary patch literal 4409 zcmWIWW@Zs#U}9ikNUFN#0i@tS8psOH%g;?saSn+OO3g`4EKZGgcQP~p1N{J;8rAS? z401Dqnuf;=U82nhN=++HEkQC$sT$QErlcC>oS#>cnuly8deE4WYNStMUV3R_dMebJ z3=A9$7GW*{5$Dd<&H$R_&B(xzN4A+MsYOQd$&hdWMv!Y>dQN6>hD&NrNuq9Qo^E;) zBG%%K42%qb$V9KCqGWBaBiA7V0oUt-HeLyn{BEbbT~)1rLCszuV|LKu2XA}Djy8F> zN7l&k$9-W^Jn*#Qu%(~C-|Q~UpRYU4b&Ec1+QYkMhU_0rU+-Cl;!!2-s^6VulJ}MW ztGM8tA+=$0t-*vhk)8o(CwT~V%rTwSs^+I9k;_dk9nyuR+3JR)T&phcx2sbS=sSb&r=D2_(o)RM%M#F9j~nH&s!QM)|! ziX3nG0-cr$#Dyd~5oRVN8Z)8s=#pBTT$EW*l9`|9mS2>cSOShu95Ly8!jP-MfQR+M z&Zgx;EC(-gPk9#3tfpyLRTn6}{dlt13Q^S`hYmGOiB~hUD)*Tp^VOlI!I?Y5AamJ; zbWZoeyo1XY?|ky(JWp)$>)q0j;0Gnqi4&azdRqQNnr~l+v73 zm(+sPyp+_uIUnvhulj>8o!)+QMfBa1~vVt`-gW zHR;HX`8Q_BELHs1;A~uBxYK9hdb8K_Hu80Q)G4sdUe1n4R_N)#h-iO>q!#67=H=() zr&l6nWiDV=w*4LbDh6my6%a?0WnOV|iBUYT>`6{7D2c}#B%Poj5ny>O{O7dWl^N<0 zui206KG3Mv+WFp`O}bronq;cb`&9p`)2o(W2-BZC@w1|_aQF2Ep2-oHrhPIkzHRZG z!8oe9>!5?I)s(L(E4K7sk4X5Xd1K#-ZIuj&$QK5BN=Gw%?s=eR4gkw1P~yf@9UztJ z$bkg*6jEA-cnoi`w6y9 zO0K6gBO6U-rQWR66i8}${-yu@6vw=YQ?h4N)v$fqTEU~Us(k6}n08-Y1v{SN>4s^a z^19bwnJO~5{Al<8KPhXkR$blZrk{GIOX_ZhWqyiB)$&<$w_elLWqy`iD|g|2OVQVW zf5P+4O!;lUY3+7QJg>p%_*Uq@-Z}sHzw>8ZUMVQ3tkQq0>8kgdV9vf^U9IN19?Sg- z)?crl^)pW34XdMlUjoa)dz}TwPXrMmDhUkH1^o+~K_&hlAWk4ZM1d7(BB*F6&d4ml zn^t0dW4W3QcJ4HtxE$-epKefrx2C%Jt!^@;o@=bs4e&v??C zpe3;F!TPCe{OLOuoj!1RX2pD=_SkhE*^SQ+9XD=!-SEY3(^=i%DSTZzW#(c=+drNW zVUM@{waD zchZQpwL^qT923 z?EQ0Y%*Ph~&YrvZn8S^gzrQgDcr!AIFyL-e0sRLA0uTycmcnNcsEq{yAcHJ{n7F)& z&rDF83j#o9)&encX2M%w2!CU1gCUGQL8{S+78$|{^g!pDu7D=v0YN0VQ z*#n~wdmBv!YKH=l&L`Ura$9U%3?O?M7#JBO7-H8Q%Xheal@Uh&QDZ3Bdh049atvc@ zKYHfGBL+1ZKgWILPax)j;PPh6(>fLsitztx<2i0)#{S|8cP! kvb+5^+5Z5!6GnF^2z-aQn-v)G3=I50co7(uL7X5S07No1od5s; literal 0 HcmV?d00001 diff --git a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/Resources.java b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/Resources.java index 22677a30ecd..4ab0f81357b 100644 --- a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/Resources.java +++ b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/Resources.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,6 +39,7 @@ public static class Snomed { public static final String SNOMED_RESOURCES = createResourcePath(RESOURCES, "snomed"); public static final String MINI_RF2_INT = createResourcePath(SNOMED_RESOURCES, "SnomedCT_InternationalRF2_PRODUCTION_20180131T120000Z-minified.zip"); public static final String MINI_RF2_EXT = createResourcePath(SNOMED_RESOURCES, "SnomedCT_RF2Release_INT_20160501_B2i_cd_refsets.zip"); + public static final String MINI_RF2_COMPLEX_BLOCK_MAP = createResourcePath(SNOMED_RESOURCES, "SnomedCT_RF2Release_GB1000000_20200204_complex_block_map.zip"); private Snomed() { } diff --git a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/SnowOwlAppRule.java b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/SnowOwlAppRule.java index ce53e0a0f8d..89d02f92a46 100644 --- a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/SnowOwlAppRule.java +++ b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/SnowOwlAppRule.java @@ -66,7 +66,7 @@ public class SnowOwlAppRule extends ExternalResource { // private final static Logger LOGGER = LogManager.getLogger(SnowOwlAppRule.class); - private boolean clearResources = false; + private boolean clearResources = true; private Plugin[] plugins; private SnowOwl snowowl; diff --git a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/AbstractApiTest.java b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/AbstractApiTest.java new file mode 100644 index 00000000000..6665bdf672c --- /dev/null +++ b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/AbstractApiTest.java @@ -0,0 +1,131 @@ +/* + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.test.commons.rest; + +import java.util.Optional; +import java.util.Random; + +import org.junit.Rule; +import org.junit.rules.TestWatcher; +import org.junit.runner.Description; + +import com.b2international.snowowl.core.api.IBranchPath; +import com.b2international.snowowl.core.branch.Branch; +import com.b2international.snowowl.datastore.BranchPathUtils; +import com.b2international.snowowl.eventbus.IEventBus; +import com.b2international.snowowl.test.commons.Services; +import com.google.common.base.Joiner; + +/** + * @since 2.0 + */ +@BranchBase(Branch.MAIN_PATH) +public abstract class AbstractApiTest { + + public static final Joiner PATH_JOINER = Joiner.on('/'); + + private static final Random RANDOM = new Random(); + + private final class CustomTestWatcher extends TestWatcher { + + private final RepositoryBranchRestRequests branching; + + public CustomTestWatcher(RepositoryBranchRestRequests branching) { + this.branching = branching; + } + + @Override + protected void starting(Description description) { + System.out.println("===== Start of " + description + " ====="); + + Class testClass = description.getTestClass(); + BranchBase branchBaseAnnotation = getBranchBaseAnnotation(testClass); + String testBasePath = getTestBasePath(branchBaseAnnotation); + String testClassName = testClass.getSimpleName(); + + if (isolateTests(branchBaseAnnotation)) { + String testMethodName = description.getMethodName() + .replace("[", "_") // Remove special characters from parameterized test names + .replace("]", ""); + + // Also add a random suffix if it would go over the 50 character branch name limit + if (testMethodName.length() > 50) { + String suffix = Integer.toString(RANDOM.nextInt(Integer.MAX_VALUE), 36); + testMethodName = testMethodName.substring(0, 44) + suffix; + } + + branchPath = BranchPathUtils.createPath(PATH_JOINER.join(testBasePath, testClassName, testMethodName)); + } else { + branchPath = BranchPathUtils.createPath(PATH_JOINER.join(testBasePath, testClassName)); + } + + branching.createBranchRecursively(branchPath); + } + + @Override + protected void finished(Description description) { + System.out.println("===== End of " + description + " ====="); + } + + private BranchBase getBranchBaseAnnotation(Class type) { + if (type.isAnnotationPresent(BranchBase.class)) { + return type.getAnnotation(BranchBase.class); + } else { + if (type.getSuperclass() != null) { + BranchBase doc = getBranchBaseAnnotation(type.getSuperclass()); + if (doc != null) { + return doc; + } + } + + for (Class iface : type.getInterfaces()) { + BranchBase doc = getBranchBaseAnnotation(iface); + if (doc != null) { + return doc; + } + } + + return null; + } + } + + private String getTestBasePath(BranchBase branchBaseAnnotation) { + return Optional.ofNullable(branchBaseAnnotation) + .map(a -> a.value()) + .orElse(Branch.MAIN_PATH); + } + + private boolean isolateTests(BranchBase branchBaseAnnotation) { + return Optional.ofNullable(branchBaseAnnotation) + .map(a -> a.isolateTests()) + .orElse(true); + } + } + + protected IBranchPath branchPath; + + protected final IEventBus getBus() { + return Services.bus(); + } + + protected final RepositoryBranchRestRequests branching = new RepositoryBranchRestRequests(getApiBaseUrl()); + + @Rule + public final TestWatcher watcher = new CustomTestWatcher(branching); + + protected abstract String getApiBaseUrl(); + +} diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/BranchBase.java b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/BranchBase.java similarity index 94% rename from snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/BranchBase.java rename to tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/BranchBase.java index 5390fec22dc..e9cf21b20c2 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/BranchBase.java +++ b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/BranchBase.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.rest; +package com.b2international.snowowl.test.commons.rest; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchingRestRequests.java b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/RepositoryBranchRestRequests.java similarity index 67% rename from snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchingRestRequests.java rename to tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/RepositoryBranchRestRequests.java index a17c7e4dbd3..4997cc79423 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedBranchingRestRequests.java +++ b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/RepositoryBranchRestRequests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,9 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.b2international.snowowl.snomed.core.rest; +package com.b2international.snowowl.test.commons.rest; -import static com.b2international.snowowl.snomed.core.rest.SnomedApiTestConstants.SCT_API; import static com.b2international.snowowl.test.commons.rest.RestExtensions.givenAuthenticatedRequest; import static com.google.common.collect.Lists.newArrayList; @@ -34,49 +33,55 @@ * * @since 2.0 */ -public abstract class SnomedBranchingRestRequests { +public final class RepositoryBranchRestRequests { - public static ValidatableResponse createBranch(IBranchPath branchPath) { + private final String apiBaseUrl; + + public RepositoryBranchRestRequests(String apiBaseUrl) { + this.apiBaseUrl = apiBaseUrl; + } + + public ValidatableResponse createBranch(IBranchPath branchPath) { return createBranch(branchPath, ImmutableMap.of()); } - public static ValidatableResponse createBranch(IBranchPath branchPath, Map metadata) { + public ValidatableResponse createBranch(IBranchPath branchPath, Map metadata) { Map requestBody = ImmutableMap. builder() .put("parent", branchPath.getParentPath()) .put("name", branchPath.lastSegment()) .put("metadata", metadata) .build(); - return givenAuthenticatedRequest(SnomedApiTestConstants.SCT_API) + return givenAuthenticatedRequest(apiBaseUrl) .contentType(ContentType.JSON) .body(requestBody) .post("/branches") .then(); } - public static ValidatableResponse getBranch(IBranchPath branchPath) { - return givenAuthenticatedRequest(SnomedApiTestConstants.SCT_API) + public ValidatableResponse getBranch(IBranchPath branchPath) { + return givenAuthenticatedRequest(apiBaseUrl) .get("/branches/{path}", branchPath.getPath()) .then(); } - public static ValidatableResponse getAllBranches() { - return givenAuthenticatedRequest(SnomedApiTestConstants.SCT_API) + public ValidatableResponse getAllBranches() { + return givenAuthenticatedRequest(apiBaseUrl) .get("/branches?limit=" + Integer.MAX_VALUE) .then(); } - public static ValidatableResponse getBranchChildren(IBranchPath branchPath) { - return givenAuthenticatedRequest(SnomedApiTestConstants.SCT_API) + public ValidatableResponse getBranchChildren(IBranchPath branchPath) { + return givenAuthenticatedRequest(apiBaseUrl) .get("/branches/{path}/children", branchPath.getParentPath()) .then(); } - public static void createBranchRecursively(IBranchPath branchPath) { + public void createBranchRecursively(IBranchPath branchPath) { createBranchRecursively(branchPath, ImmutableMap.of()); } - public static void createBranchRecursively(IBranchPath branchPath, Map metadata) { + public void createBranchRecursively(IBranchPath branchPath, Map metadata) { IBranchPath currentPath = branchPath; ValidatableResponse response = getBranch(currentPath); List segmentsToCreate = newArrayList(); @@ -99,23 +104,20 @@ public static void createBranchRecursively(IBranchPath branchPath, Map met } } - public static ValidatableResponse updateBranch(IBranchPath branchPath, Map metadata) { + public ValidatableResponse updateBranch(IBranchPath branchPath, Map metadata) { Map requestBody = ImmutableMap.of("metadata", metadata); - return givenAuthenticatedRequest(SCT_API) + return givenAuthenticatedRequest(apiBaseUrl) .contentType(ContentType.JSON) .body(requestBody) .put("/branches/{path}", branchPath.getPath()) .then(); } - public static ValidatableResponse deleteBranch(IBranchPath branchPath) { - return givenAuthenticatedRequest(SnomedApiTestConstants.SCT_API) + public ValidatableResponse deleteBranch(IBranchPath branchPath) { + return givenAuthenticatedRequest(apiBaseUrl) .delete("/branches/{path}", branchPath.getPath()) .then(); } - private SnomedBranchingRestRequests() { - throw new UnsupportedOperationException("This class is not supposed to be instantiated."); - } } diff --git a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/RestExtensions.java b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/RestExtensions.java index ed74759189b..ee01352ccfe 100644 --- a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/RestExtensions.java +++ b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/rest/RestExtensions.java @@ -29,6 +29,7 @@ import com.b2international.commons.platform.PlatformUtil; import com.b2international.snowowl.test.commons.json.JsonExtensions; +import com.google.common.base.Charsets; import com.google.common.base.Joiner; import com.google.common.base.Preconditions; import com.google.common.base.Splitter; @@ -51,6 +52,9 @@ */ public class RestExtensions { + public static final Joiner COMMA_JOINER = Joiner.on(","); + public static final String JSON_UTF8 = ContentType.JSON.withCharset(Charsets.UTF_8); + // HTTP and REST API private static final AtomicBoolean INITIALIZE_ONCE = new AtomicBoolean(false); public static final String CONTEXT = "snowowl"; @@ -199,5 +203,11 @@ public static Response postJson(String api, Map json, String...segmen public static Response putJson(String api, Map json, String...segments) { return withJson(givenAuthenticatedRequest(api), json).put(asPath(Arrays.asList(segments))); } + + public static String assertCreated(ValidatableResponse response) { + return lastPathSegment(response.statusCode(201) + .extract() + .header("Location")); + } } diff --git a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/snomed/DocumentBuilders.java b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/snomed/DocumentBuilders.java index 91b654e9d59..7a184084ec2 100644 --- a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/snomed/DocumentBuilders.java +++ b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/snomed/DocumentBuilders.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,6 @@ import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; -import com.b2international.snowowl.snomed.core.domain.CaseSignificance; import com.b2international.snowowl.snomed.core.domain.constraint.ConstraintForm; import com.b2international.snowowl.snomed.core.domain.refset.DataType; import com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType; @@ -82,7 +81,7 @@ public static SnomedDescriptionIndexEntry.Builder description(final String id, f .typeId(type) .languageCode("en") .term(term) - .caseSignificanceId(CaseSignificance.INITIAL_CHARACTER_CASE_INSENSITIVE.getConceptId()) + .caseSignificanceId(Concepts.ONLY_INITIAL_CHARACTER_CASE_INSENSITIVE) .released(false); } diff --git a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/snomed/RandomSnomedIdentiferGenerator.java b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/snomed/RandomSnomedIdentiferGenerator.java index c9234f92a1e..3ab7e14d8cf 100644 --- a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/snomed/RandomSnomedIdentiferGenerator.java +++ b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/snomed/RandomSnomedIdentiferGenerator.java @@ -29,19 +29,30 @@ public abstract class RandomSnomedIdentiferGenerator { private RandomSnomedIdentiferGenerator() {} public final static String generateConceptId() { - return generateSnomedId(ComponentCategory.CONCEPT); + return generateConceptId(""); + } + + public final static String generateConceptId(String namespace) { + return generateSnomedId(ComponentCategory.CONCEPT, namespace); } public final static String generateDescriptionId() { - return generateSnomedId(ComponentCategory.DESCRIPTION); + return generateDescriptionId(""); + } + + public final static String generateDescriptionId(String namespace) { + return generateSnomedId(ComponentCategory.DESCRIPTION, namespace); } public final static String generateRelationshipId() { - return generateSnomedId(ComponentCategory.RELATIONSHIP); + return generateRelationshipId(""); + } + + public final static String generateRelationshipId(String namespace) { + return generateSnomedId(ComponentCategory.RELATIONSHIP, namespace); } - private static String generateSnomedId(ComponentCategory category) { - final String selectedNamespace = ""; + private static String generateSnomedId(ComponentCategory category, String selectedNamespace) { final StringBuilder builder = new StringBuilder(); // generate the SCT Item ID builder.append(new RandomItemIdGenerationStrategy().generateItemIds(selectedNamespace, category, 1, 1).stream().findFirst().get()); diff --git a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/snomed/TestBranchContext.java b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/snomed/TestBranchContext.java index d5e9a6762e2..bde3e2112dc 100644 --- a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/snomed/TestBranchContext.java +++ b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/snomed/TestBranchContext.java @@ -39,7 +39,6 @@ import com.b2international.snowowl.core.events.Request; import com.b2international.snowowl.datastore.BranchPathUtils; import com.b2international.snowowl.datastore.request.BranchRequest; -import com.b2international.snowowl.datastore.request.IndexReadRequest; import com.b2international.snowowl.datastore.request.RepositoryRequest; import com.b2international.snowowl.eventbus.EventBusUtil; import com.b2international.snowowl.eventbus.IEventBus; @@ -115,8 +114,7 @@ public static class Builder { bus.registerHandler(Request.ADDRESS, message -> { try { final RepositoryRequest repoReq = message.body(RepositoryRequest.class); - final IndexReadRequest indexReadReq = ReflectionUtils.getField(DelegatingRequest.class, repoReq, "next"); - final BranchRequest branchReq = ReflectionUtils.getField(DelegatingRequest.class, indexReadReq, "next"); + final BranchRequest branchReq = ReflectionUtils.getField(DelegatingRequest.class, repoReq, "next"); final Request innerReq = ReflectionUtils.getField(DelegatingRequest.class, branchReq, "next"); message.reply(innerReq.execute(context)); } catch (WrappedException e1) { diff --git a/tests/com.b2international.snowowl.test.dependencies/META-INF/MANIFEST.MF b/tests/com.b2international.snowowl.test.dependencies/META-INF/MANIFEST.MF index 5a6c4f6d24b..f343945aae6 100644 --- a/tests/com.b2international.snowowl.test.dependencies/META-INF/MANIFEST.MF +++ b/tests/com.b2international.snowowl.test.dependencies/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Test Dependencies Bundle-SymbolicName: com.b2international.snowowl.test.dependencies -Bundle-Version: 7.3.0.qualifier +Bundle-Version: 7.4.0.qualifier Bundle-Vendor: B2iHealthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ClassPath: ., diff --git a/tests/com.b2international.snowowl.test.dependencies/pom.xml b/tests/com.b2international.snowowl.test.dependencies/pom.xml index e6ddc1bab59..b44b9ec9bdf 100644 --- a/tests/com.b2international.snowowl.test.dependencies/pom.xml +++ b/tests/com.b2international.snowowl.test.dependencies/pom.xml @@ -6,7 +6,7 @@ 4.0.0 com.b2international.snowowl - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT tests-parent com.b2international.snowowl.test.dependencies diff --git a/tests/com.b2international.snowowl.test.feature/feature.xml b/tests/com.b2international.snowowl.test.feature/feature.xml index 636ca2cd6e6..4809371f3dc 100644 --- a/tests/com.b2international.snowowl.test.feature/feature.xml +++ b/tests/com.b2international.snowowl.test.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/tests/com.b2international.snowowl.test.feature/pom.xml b/tests/com.b2international.snowowl.test.feature/pom.xml index 08e3da0375a..da69ee9c6e3 100644 --- a/tests/com.b2international.snowowl.test.feature/pom.xml +++ b/tests/com.b2international.snowowl.test.feature/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl tests-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT com.b2international.snowowl.test.feature eclipse-feature diff --git a/tests/pom.xml b/tests/pom.xml index 3bfbe808ba3..592a0e2ebdc 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.3.0-SNAPSHOT + 7.4.0-SNAPSHOT From 3d244bca6a5869c19ab92293887fa6071ddc0e48 Mon Sep 17 00:00:00 2001 From: ivelina-yordanova <56301327+ivelina-yordanova@users.noreply.github.com> Date: Tue, 3 Mar 2020 10:54:27 +0000 Subject: [PATCH 3/7] [CHR-1516] - dockerizing and adding languages and ES config * chr-1516 - customize snowowl.yml, Dockerfile, create Makefile, adjust circleCi config * chr-1516 - for testing make circleCi run on all branches but the master * chr-1516 - for testing change circleCi * chr-1516 - fix inentation * chr-1516 -install maven * chr-1516 - install maven... * chr-1516 - install maven again * chr-1516 - install maven again ??? * chr-1516 - use wrapper... * chr-1516 - use wrapper and fix error... * chr-1516 - use wrapper and fix error... * chr-1516 - use wrapper and fix error... * chr-1516 - use wrapper and fix error... * chr-1516 - use wrapper and fix error... * chr-1516 - use wrapper and fix error... * chr-1516 - use wrapper and fix error... * chr-1516 - use wrapper and fix error... * chr-1516 - use wrapper and fix error... * chr-1516 - use wrapper and fix error... * chr-1516 - use wrapper and fix error... * chr-1516 - .. * chr-1516 - split builds... why is file not found?!?! * chr-1516 - split builds... why is file not found?!?! * chr-1516 - push docker * chr-1516 - test if this will move the docs files where they have to be * chr-1516 - test build in circle ci * chr-1516 - test build in circle ci * chr-1516 - test build in circle ci * chr-1516 - test build in circle ci again * chr-1516 - test build in circle ci again2 * chr-1516 - print debug * chr-1516 - print other debug info, not so detailed * chr-1516 - print other debug info, not so detailed * chr-1516 - replace mvn plugin * chr-1516 - replace mvn plugin * chr-1516 - try stable node version * chr-1516 - try stable node version without sudo * chr-1516 - try stable node version without sudo * chr-1516 - try updating node stuff * chr-1516 - try updating node stuff more * chr-1516 - try updating docker image * chr-1516 - try updating make.. * chr-1516 - install npm * chr-1516 - install npm * chr-1516 - release libs on merge to master, release docker on tag * chr-1516 - release to dev on master merge, release to staging on tag * chr-1516 - code review changes * chr-1516 - fix staging deploy step * chr-1516 - fix staging deploy step * chr-1516 - fix staging deploy step --- .circleci/config.yml | 91 +- Makefile | 54 + .../pom.xml | 74 +- .../snow-owl-api-docs/package-lock.json | 7176 ++++++++++------- .../snow-owl-api-docs/package.json | 10 +- docker/Dockerfile | 22 +- docker/config/snowowl.yml | 12 + 7 files changed, 4408 insertions(+), 3031 deletions(-) create mode 100644 Makefile diff --git a/.circleci/config.yml b/.circleci/config.yml index 28de92ce705..b7bdd84fe65 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,24 +3,37 @@ workflows: version: 2 flow: jobs: - - deploy: + - release-libraries: context: babylon filters: branches: only: - 7.x + - deploy-service-dev: + context: babylon + filters: + branches: + only: + - 7.x + - deploy-service-staging: + context: babylon + filters: + branches: + ignore: /.*/ + tags: + only: /bbl-.*/ env: &env working_directory: ~/project resource_class: large docker: - - image: docker:17.03.0-ce-git + - image: docker:19.03.6-git environment: JAVA_HOME: /usr/lib/jvm/java-11-openjdk environment: JAVA_HOME: /usr/lib/jvm/java-11-openjdk jobs: - deploy: + release-libraries: <<: *env steps: - checkout @@ -35,13 +48,8 @@ jobs: - run: name: Build prerequisites command: | - echo "${ARTIFACTORY_URL}" | sha512sum - echo "${ARTIFACTORY_USER_RW}" | sha512sum - echo "${ARTIFACTORY_PWD_RW}" | sha512sum - echo "$CIRCLE_SHA1" > .commit-keyId - docker --version docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" quay.io - apk add --no-cache make=4.2.1-r0 nodejs openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community + apk add --no-cache make=4.2.1-r2 nodejs npm openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community npm config set unsafe-perm true npm install -g npm - save_cache: @@ -50,9 +58,72 @@ jobs: - "~/.m2" - "/root/.m2" - run: - name: Build and deploy + name: Build and deploy libraries command: | echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $BASH_ENV source $BASH_ENV ./mvnw -s .circleci/settings.xml deploy -DskipTests -Dtycho.localArtifacts=$LOCAL_ARTIFACTS + deploy-service-dev: + <<: *env + steps: + - checkout + - setup_remote_docker + - restore_cache: + keys: + - snow-owl-mvn-cache-{{ checksum "pom.xml" }} + - snow-owl-mvn-cache- + paths: + - "~/.m2" + - "/root/.m2" + - run: + name: Build prerequisites + command: | + docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" quay.io + apk add --no-cache make=4.2.1-r2 nodejs npm openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community + npm config set unsafe-perm true + npm install -g npm + - save_cache: + key: snow-owl-mvn-cache-{{ checksum "pom.xml" }} + paths: + - "~/.m2" + - "/root/.m2" + - run: + name: Build and push docker image + command: | + echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $BASH_ENV + source $BASH_ENV + make build-project + export SNOWOWL_RPM_PACKAGE=`find ./releng/com.b2international.snowowl.server.update/target -name "snow-owl-oss*.rpm"` + cp "${SNOWOWL_RPM_PACKAGE}" ./docker/`basename "${SNOWOWL_RPM_PACKAGE}"` + export RELEASE_VERSION=`git describe --abbrev=0 --tags` + make build-docker + make push + - deploy: + name: Deploy dev + command: make deploy-dev + deploy-service-staging: + <<: *env + steps: + - checkout + - setup_remote_docker + - restore_cache: + keys: + - snow-owl-mvn-cache-{{ checksum "pom.xml" }} + - snow-owl-mvn-cache- + paths: + - "~/.gradle" + - "~/.m2" + - "/root/.gradle" + - run: + name: Build prerequisites + command: | + docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" quay.io + apk add --no-cache make=4.2.1-r2 nodejs npm openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community + - deploy: + name: Staging Deploy + command: | + make deploy-staging + + + diff --git a/Makefile b/Makefile new file mode 100644 index 00000000000..6003e23f32c --- /dev/null +++ b/Makefile @@ -0,0 +1,54 @@ +NAME=chr-terminology-server +GIT_VERSION=$(shell git rev-parse HEAD) +SEMVER_VERSION=$(shell git describe --abbrev=0 --tags) +REPO=quay.io/babylonhealth +DEPLOY_DEV_URL=http://dev-ai-deploy.babylontech.co.uk:5199/job/kube-deploy-dev/buildWithParameters +DEPLOY_STAGING_URL=http://dev-ai-deploy.babylontech.co.uk:5199/job/kube-deploy-staging/buildWithParameters +SNOWOWL_RPM_PACKAGE=$(shell find ./releng/com.b2international.snowowl.server.update/target -name "snow-owl-oss*.rpm") + + +build-project: + ./mvnw clean verify -DskipTests + +build-docker: + docker build ./docker \ + --build-arg SNOWOWL_RPM_PACKAGE=`basename "${SNOWOWL_RPM_PACKAGE}"` \ + --build-arg BUILD_TIMESTAMP=`date +%s` \ + --build-arg VERSION="${RELEASE_VERSION}" \ + --build-arg GIT_REVISION="${GIT_VERSION}" \ + -t $(REPO)/$(NAME):$(RELEASE_VERSION) + +push: + docker push $(REPO)/$(NAME):$(RELEASE_VERSION) + +pull: + docker pull $(REPO)/$(NAME):$(RELEASE_VERSION) + +run: + docker run --rm --name $(NAME) \ + --cpus="3" \ + --cpuset-cpus="3" \ + -d \ + -e ELASTICSEARCH_CLUSTER_URL="${ELASTICSEARCH_CLUSTER_URL}" \ + -e ELASTICSEARCH_CONNECT_TIMEOUT="${ELASTICSEARCH_CONNECT_TIMEOUT}" \ + -e ELASTICSEARCH_SOCKET_TIMEOUT="${ELASTICSEARCH_SOCKET_TIMEOUT}" \ + -p 8080:8080 $(REPO)/$(NAME):$(RELEASE_VERSION) + +tag-semver: + @if docker run --rm -e DOCKER_REPO=babylonhealth/$(NAME) -e DOCKER_TAG=$(SEMVER_VERSION) quay.io/babylonhealth/tag-exists; then \ + echo "Tag $(SEMVER_VERSION) already exists!" && exit 1; \ + else \ + docker tag $(REPO)/$(NAME):$(RELEASE_VERSION) $(REPO)/$(NAME):$(SEMVER_VERSION); \ + docker push $(REPO)/$(NAME):$(SEMVER_VERSION); \ + docker tag $(REPO)/$(NAME):$(SEMVER_VERSION) $(REPO)/$(NAME):master; \ + docker push $(REPO)/$(NAME):master; \ + fi + +deploy-dev: + @curl -vvv -XPOST "${DEPLOY_DEV_URL}?token=${JENKINS_DEV_TOKEN}&APP=chr-terminology-server&VERSION=${RELEASE_VERSION}" + +deploy-staging: + docker login -u "${DOCKER_USER}" -p "${DOCKER_PASS}" quay.io + make pull + make tag-semver + @curl -vvv -XPOST "${DEPLOY_STAGING_URL}?token=${JENKINS_STAGING_TOKEN}&APP=chr-terminology-server&VERSION=${SEMVER_VERSION}" diff --git a/core/com.b2international.snowowl.core.rest/pom.xml b/core/com.b2international.snowowl.core.rest/pom.xml index cc9f09b7ee7..4daba067618 100644 --- a/core/com.b2international.snowowl.core.rest/pom.xml +++ b/core/com.b2international.snowowl.core.rest/pom.xml @@ -129,46 +129,40 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + + npm install + + exec + + generate-resources + + npm + ${basedir}/snow-owl-api-docs + install + + + + npm build + + exec + + generate-resources + + npm + ${basedir}/snow-owl-api-docs + + run + build + + + + + org.apache.maven.plugins maven-resources-plugin diff --git a/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/package-lock.json b/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/package-lock.json index 381f09a70c1..2f9a7b93531 100644 --- a/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/package-lock.json +++ b/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/package-lock.json @@ -12,51 +12,74 @@ "tinycolor2": "^1.4.1" } }, - "@ant-design/create-react-context": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@ant-design/create-react-context/-/create-react-context-0.2.4.tgz", - "integrity": "sha512-8sw+/w6r+aEbd+OJ62ojoSE4zDt/3yfQydmbWFznoftjr8v/opOswGjM+/MU0rSaREbluqzOmZ6xdecHpSaS2w==", + "@ant-design/icons": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-4.0.2.tgz", + "integrity": "sha512-fs256mh5tQ0q+o2xNper5dThCZqmWRyQfstf+UrXhotAAv52K+6grh2tzdvsl60fk4GZPLReytwL5rJqATW3uA==", "requires": { - "gud": "^1.0.0", - "warning": "^4.0.3" + "@ant-design/colors": "^3.1.0", + "@ant-design/icons-svg": "^4.0.0", + "classnames": "^2.2.6", + "insert-css": "^2.0.0", + "rc-util": "^4.9.0" } }, - "@ant-design/icons": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-2.1.1.tgz", - "integrity": "sha512-jCH+k2Vjlno4YWl6g535nHR09PwCEmTBKAG6VqF+rhkrSPRLfgpU2maagwbZPLjaHuU5Jd1DFQ2KJpQuI6uG8w==" + "@ant-design/icons-svg": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@ant-design/icons-svg/-/icons-svg-4.0.0.tgz", + "integrity": "sha512-Nai+cd3XUrv/z50gSk1FI08j6rENZ1e93rhKeLTBGwa5WrmHvhn2vowa5+voZW2qkXJn1btS6tdvTEDB90M0Pw==" }, - "@ant-design/icons-react": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@ant-design/icons-react/-/icons-react-2.0.1.tgz", - "integrity": "sha512-r1QfoltMuruJZqdiKcbPim3d8LNsVPB733U0gZEUSxBLuqilwsW28K2rCTWSMTjmFX7Mfpf+v/wdiFe/XCqThw==", + "@ant-design/react-slick": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@ant-design/react-slick/-/react-slick-0.25.5.tgz", + "integrity": "sha512-fusHR9LkarCARvYTN6cG3yz2/Ogf+HTaJ2XEihIjsjgm6uE1aSXycRFEVDpOFP1Aib51Z2Iz3tgg/gL+WbK8rQ==", "requires": { - "@ant-design/colors": "^3.1.0", - "babel-runtime": "^6.26.0" + "classnames": "^2.2.5", + "json2mq": "^0.2.0", + "lodash": "^4.17.15", + "resize-observer-polyfill": "^1.5.0" } }, "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.8.3" + } + }, + "@babel/compat-data": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.8.6.tgz", + "integrity": "sha512-CurCIKPTkS25Mb8mz267vU95vy+TyUpnctEX2lV33xWNmHAfjruztgiPBbXZRh3xZZy1CYvGx6XfxyTVS+sk7Q==", + "requires": { + "browserslist": "^4.8.5", + "invariant": "^2.2.4", + "semver": "^5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } } }, "@babel/core": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.0.tgz", - "integrity": "sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw==", - "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.6.0", - "@babel/helpers": "^7.6.0", - "@babel/parser": "^7.6.0", - "@babel/template": "^7.6.0", - "@babel/traverse": "^7.6.0", - "@babel/types": "^7.6.0", - "convert-source-map": "^1.1.0", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.4.tgz", + "integrity": "sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helpers": "^7.8.4", + "@babel/parser": "^7.8.4", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.4", + "@babel/types": "^7.8.3", + "convert-source-map": "^1.7.0", "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", "json5": "^2.1.0", "lodash": "^4.17.13", "resolve": "^1.3.2", @@ -77,11 +100,11 @@ } }, "@babel/generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.4.tgz", - "integrity": "sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.6.tgz", + "integrity": "sha512-4bpOR5ZBz+wWcMeVtcf7FbjcFzCp+817z2/gHNncIRcM9MmKzUhtWCYAq27RAfUrAFwb+OCG1s9WEaVxfi6cjg==", "requires": { - "@babel/types": "^7.6.3", + "@babel/types": "^7.8.6", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" @@ -95,214 +118,244 @@ } }, "@babel/helper-annotate-as-pure": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", - "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz", + "integrity": "sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==", "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.8.3" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz", - "integrity": "sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz", + "integrity": "sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw==", "requires": { - "@babel/helper-explode-assignable-expression": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/helper-explode-assignable-expression": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-builder-react-jsx": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.3.0.tgz", - "integrity": "sha512-MjA9KgwCuPEkQd9ncSXvSyJ5y+j2sICHyrI0M3L+6fnS4wMSNDc1ARXsbTfbb2cXHn17VisSnU/sHFTCxVxSMw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.8.3.tgz", + "integrity": "sha512-JT8mfnpTkKNCboTqZsQTdGo3l3Ik3l7QIt9hh0O9DYiwVel37VoJpILKM4YFbP2euF32nkQSb+F9cUk9b7DDXQ==", "requires": { - "@babel/types": "^7.3.0", + "@babel/types": "^7.8.3", "esutils": "^2.0.0" } }, "@babel/helper-call-delegate": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz", - "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.8.3.tgz", + "integrity": "sha512-6Q05px0Eb+N4/GTyKPPvnkig7Lylw+QzihMpws9iiZQv7ZImf84ZsZpQH7QoWN4n4tm81SnSzPgHw2qtO0Zf3A==", "requires": { - "@babel/helper-hoist-variables": "^7.4.4", - "@babel/traverse": "^7.4.4", - "@babel/types": "^7.4.4" + "@babel/helper-hoist-variables": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.6.tgz", + "integrity": "sha512-UrJdk27hKVJSnibFcUWYLkCL0ZywTUoot8yii1lsHJcvwrypagmYKjHLMWivQPm4s6GdyygCL8fiH5EYLxhQwQ==", + "requires": { + "@babel/compat-data": "^7.8.6", + "browserslist": "^4.8.5", + "invariant": "^2.2.4", + "levenary": "^1.1.1", + "semver": "^5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } } }, "@babel/helper-create-class-features-plugin": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.6.0.tgz", - "integrity": "sha512-O1QWBko4fzGju6VoVvrZg0RROCVifcLxiApnGP3OWfWzvxRZFCoBD81K5ur5e3bVY2Vf/5rIJm8cqPKn8HUJng==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.6.tgz", + "integrity": "sha512-klTBDdsr+VFFqaDHm5rR69OpEQtO2Qv8ECxHS1mNhJJvaHArR6a1xTf5K/eZW7eZpJbhCx3NW1Yt/sKsLXLblg==", "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-member-expression-to-functions": "^7.5.5", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.5.5", - "@babel/helper-split-export-declaration": "^7.4.4" + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-member-expression-to-functions": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", + "@babel/helper-split-export-declaration": "^7.8.3" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.6.tgz", + "integrity": "sha512-bPyujWfsHhV/ztUkwGHz/RPV1T1TDEsSZDsN42JPehndA+p1KKTh3npvTadux0ZhCrytx9tvjpWNowKby3tM6A==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-regex": "^7.8.3", + "regexpu-core": "^4.6.0" } }, "@babel/helper-define-map": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz", - "integrity": "sha512-fTfxx7i0B5NJqvUOBBGREnrqbTxRh7zinBANpZXAVDlsZxYdclDp467G1sQ8VZYMnAURY3RpBUAgOYT9GfzHBg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz", + "integrity": "sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g==", "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/types": "^7.5.5", + "@babel/helper-function-name": "^7.8.3", + "@babel/types": "^7.8.3", "lodash": "^4.17.13" } }, "@babel/helper-explode-assignable-expression": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz", - "integrity": "sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz", + "integrity": "sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw==", "requires": { - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.8.3" } }, "@babel/helper-hoist-variables": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz", - "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz", + "integrity": "sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg==", "requires": { - "@babel/types": "^7.4.4" + "@babel/types": "^7.8.3" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz", - "integrity": "sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", + "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==", "requires": { - "@babel/types": "^7.5.5" + "@babel/types": "^7.8.3" } }, "@babel/helper-module-imports": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", - "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", + "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==", "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.8.3" } }, "@babel/helper-module-transforms": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.5.5.tgz", - "integrity": "sha512-jBeCvETKuJqeiaCdyaheF40aXnnU1+wkSiUs/IQg3tB85up1LyL8x77ClY8qJpuRJUcXQo+ZtdNESmZl4j56Pw==", - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/template": "^7.4.4", - "@babel/types": "^7.5.5", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.8.6.tgz", + "integrity": "sha512-RDnGJSR5EFBJjG3deY0NiL0K9TO8SXxS9n/MPsbPK/s9LbQymuLNtlzvDiNS7IpecuL45cMeLVkA+HfmlrnkRg==", + "requires": { + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", + "@babel/helper-simple-access": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/template": "^7.8.6", + "@babel/types": "^7.8.6", "lodash": "^4.17.13" } }, "@babel/helper-optimise-call-expression": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz", - "integrity": "sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", + "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==", "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.8.3" } }, "@babel/helper-plugin-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", - "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==" + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==" }, "@babel/helper-regex": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.5.5.tgz", - "integrity": "sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz", + "integrity": "sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==", "requires": { "lodash": "^4.17.13" } }, "@babel/helper-remap-async-to-generator": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz", - "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz", + "integrity": "sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA==", "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-wrap-function": "^7.1.0", - "@babel/template": "^7.1.0", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-wrap-function": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-replace-supers": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz", - "integrity": "sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz", + "integrity": "sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==", "requires": { - "@babel/helper-member-expression-to-functions": "^7.5.5", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.5.5", - "@babel/types": "^7.5.5" + "@babel/helper-member-expression-to-functions": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/traverse": "^7.8.6", + "@babel/types": "^7.8.6" } }, "@babel/helper-simple-access": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz", - "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", + "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==", "requires": { - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-split-export-declaration": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", "requires": { - "@babel/types": "^7.4.4" + "@babel/types": "^7.8.3" } }, "@babel/helper-wrap-function": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz", - "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", + "integrity": "sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ==", "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/template": "^7.1.0", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.2.0" + "@babel/helper-function-name": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helpers": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.6.2.tgz", - "integrity": "sha512-3/bAUL8zZxYs1cdX2ilEE0WobqbCmKWr/889lf2SS0PpDcpEIY8pb1CCyz0pEcX3pEb+MCbks1jIokz2xLtGTA==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.4.tgz", + "integrity": "sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w==", "requires": { - "@babel/template": "^7.6.0", - "@babel/traverse": "^7.6.2", - "@babel/types": "^7.6.0" + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.4", + "@babel/types": "^7.8.3" } }, "@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", "requires": { "chalk": "^2.0.0", "esutils": "^2.0.2", @@ -310,443 +363,501 @@ } }, "@babel/parser": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.4.tgz", - "integrity": "sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A==" + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.6.tgz", + "integrity": "sha512-trGNYSfwq5s0SgM1BMEB8hX3NDmO7EP2wsDGDexiaKMB92BaRpS+qZfpkMqUBhcsOTBwNy9B/jieo4ad/t/z2g==" }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz", - "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz", + "integrity": "sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.1.0", - "@babel/plugin-syntax-async-generators": "^7.2.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-remap-async-to-generator": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0" } }, "@babel/plugin-proposal-class-properties": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.5.tgz", - "integrity": "sha512-AF79FsnWFxjlaosgdi421vmYG6/jg79bVD0dpD44QdgobzHKuLZ6S3vl8la9qIeSwGi8i1fS0O1mfuDAAdo1/A==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz", + "integrity": "sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA==", "requires": { - "@babel/helper-create-class-features-plugin": "^7.5.5", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-create-class-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-proposal-decorators": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.6.0.tgz", - "integrity": "sha512-ZSyYw9trQI50sES6YxREXKu+4b7MAg6Qx2cvyDDYjP2Hpzd3FleOUwC9cqn1+za8d0A2ZU8SHujxFao956efUg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.8.3.tgz", + "integrity": "sha512-e3RvdvS4qPJVTe288DlXjwKflpfy1hr0j5dz5WpIYYeP7vQZg2WfAEIp8k5/Lwis/m5REXEteIz6rrcDtXXG7w==", "requires": { - "@babel/helper-create-class-features-plugin": "^7.6.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-decorators": "^7.2.0" + "@babel/helper-create-class-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-decorators": "^7.8.3" } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.5.0.tgz", - "integrity": "sha512-x/iMjggsKTFHYC6g11PL7Qy58IK8H5zqfm9e6hu4z1iH2IRyAp9u9dL80zA6R76yFovETFLKz2VJIC2iIPBuFw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz", + "integrity": "sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.2.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-dynamic-import": "^7.8.0" } }, "@babel/plugin-proposal-json-strings": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz", - "integrity": "sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz", + "integrity": "sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-json-strings": "^7.2.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz", + "integrity": "sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.6.2.tgz", - "integrity": "sha512-LDBXlmADCsMZV1Y9OQwMc0MyGZ8Ta/zlD9N67BfQT8uYwkRswiu2hU6nJKrjrt/58aH/vqfQlR/9yId/7A2gWw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-8qvuPwU/xxUCt78HocNlv0mXXo0wdh9VT1R04WU8HGOfaOob26pF+9P5/lYjN/q7DHOX1bvX60hnhOvuQUJdbA==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-object-rest-spread": "^7.2.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz", - "integrity": "sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.2.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.8.3.tgz", + "integrity": "sha512-QIoIR9abkVn+seDE3OjA08jWcs3eZ9+wJCKSRgo3WdEU2csFYgdScb+8qHB3+WXsGJD55u+5hWCISI7ejXS+kg==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.0" } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.6.2.tgz", - "integrity": "sha512-NxHETdmpeSCtiatMRYWVJo7266rrvAC3DTeG5exQBIH/fMIUK7ejDNznBbn3HQl/o9peymRRg7Yqkx6PdUXmMw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.3.tgz", + "integrity": "sha512-1/1/rEZv2XGweRwwSkLpY+s60za9OZ1hJs4YDqFHCw0kYWYwL5IFljVY1MYBL+weT1l9pokDO2uhSTLVxzoHkQ==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.4", - "regexpu-core": "^4.6.0" + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-syntax-async-generators": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz", - "integrity": "sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-decorators": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.2.0.tgz", - "integrity": "sha512-38QdqVoXdHUQfTpZo3rQwqQdWtCn5tMv4uV6r2RMfTqNBuv4ZBhz79SfaQWKTVmxHjeFv/DnXVC/+agHCklYWA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.8.3.tgz", + "integrity": "sha512-8Hg4dNNT9/LcA1zQlfwuKR8BUc/if7Q7NkTam9sGTcJphLwpf2g4S42uhspQrIrR+dpzE0dtTqBVFoHl8GtnnQ==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-syntax-dynamic-import": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz", - "integrity": "sha512-mVxuJ0YroI/h/tbFTPGZR8cv6ai+STMKNBq0f8hFxsxWjl94qqhsb+wXbpNMDPU3cfR1TIsVFzU3nXyZMqyK4w==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-flow": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.2.0.tgz", - "integrity": "sha512-r6YMuZDWLtLlu0kqIim5o/3TNRAlWb073HwT3e2nKf9I8IIvOggPrnILYPsrrKilmn/mYEMCf/Z07w3yQJF6dg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.8.3.tgz", + "integrity": "sha512-innAx3bUbA0KSYj2E2MNFSn9hiCeowOFLxlsuhXzw8hMQnzkDomUr9QCD7E9VF60NmnG1sNTuuv6Qf4f8INYsg==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-syntax-json-strings": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz", - "integrity": "sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-jsx": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.2.0.tgz", - "integrity": "sha512-VyN4QANJkRW6lDBmENzRszvZf3/4AXaj9YR7GwrWeeN9tEBPuXbmDYVU9bYBN0D70zCWVwUy0HWq2553VCb6Hw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.8.3.tgz", + "integrity": "sha512-WxdW9xyLgBdefoo0Ynn3MRSkhe5tFVxxKNVdnZSh318WrG2e2jH+E9wd/++JsqcLJZPfz87njQJ8j2Upjm0M0A==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz", + "integrity": "sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-syntax-object-rest-spread": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", - "integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz", - "integrity": "sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz", + "integrity": "sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g==", + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-syntax-typescript": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.3.3.tgz", - "integrity": "sha512-dGwbSMA1YhVS8+31CnPR7LB4pcbrzcV99wQzby4uAfrkZPYZlQ7ImwdpzLqi6Z6IL02b8IAL379CaMwo0x5Lag==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.8.3.tgz", + "integrity": "sha512-GO1MQ/SGGGoiEXY0e0bSpHimJvxqB7lktLLIq2pv8xG7WZ8IMEle74jIe1FhprHBWjwjZtXHkycDLZXIWM5Wfg==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz", - "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz", + "integrity": "sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.5.0.tgz", - "integrity": "sha512-mqvkzwIGkq0bEF1zLRRiTdjfomZJDV33AH3oQzHVGkI2VzEmXLpKKOBvEVaFZBJdN0XTyH38s9j/Kiqr68dggg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz", + "integrity": "sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ==", "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.1.0" + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-remap-async-to-generator": "^7.8.3" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz", - "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz", + "integrity": "sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.3.tgz", - "integrity": "sha512-7hvrg75dubcO3ZI2rjYTzUrEuh1E9IyDEhhB6qfcooxhDA33xx2MasuLVgdxzcP6R/lipAC6n9ub9maNW6RKdw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz", + "integrity": "sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-plugin-utils": "^7.8.3", "lodash": "^4.17.13" } }, "@babel/plugin-transform-classes": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.5.5.tgz", - "integrity": "sha512-U2htCNK/6e9K7jGyJ++1p5XRU+LJjrwtoiVn9SzRlDT2KubcZ11OOwy3s24TjHxPgxNwonCYP7U2K51uVYCMDg==", - "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-define-map": "^7.5.5", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.5.5", - "@babel/helper-split-export-declaration": "^7.4.4", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.6.tgz", + "integrity": "sha512-k9r8qRay/R6v5aWZkrEclEhKO6mc1CCQr2dLsVHBmOQiMpN6I2bpjX3vgnldUWeEI1GHVNByULVxZ4BdP4Hmdg==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-define-map": "^7.8.3", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", + "@babel/helper-split-export-declaration": "^7.8.3", "globals": "^11.1.0" } }, "@babel/plugin-transform-computed-properties": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz", - "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz", + "integrity": "sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-destructuring": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.6.0.tgz", - "integrity": "sha512-2bGIS5P1v4+sWTCnKNDZDxbGvEqi0ijeqM/YqHtVGrvG2y0ySgnEEhXErvE9dA0bnIzY9bIzdFK0jFA46ASIIQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.3.tgz", + "integrity": "sha512-H4X646nCkiEcHZUZaRkhE2XVsoz0J/1x3VVujnn96pSoGCtKPA99ZZA+va+gK+92Zycd6OBKCD8tDb/731bhgQ==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.6.2.tgz", - "integrity": "sha512-KGKT9aqKV+9YMZSkowzYoYEiHqgaDhGmPNZlZxX6UeHC4z30nC1J9IrZuGqbYFB1jaIGdv91ujpze0exiVK8bA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz", + "integrity": "sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.4", - "regexpu-core": "^4.6.0" + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.5.0.tgz", - "integrity": "sha512-igcziksHizyQPlX9gfSjHkE2wmoCH3evvD2qR5w29/Dk0SMKE/eOI7f1HhBdNhR/zxJDqrgpoDTq5YSLH/XMsQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz", + "integrity": "sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz", - "integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz", + "integrity": "sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ==", "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-flow-strip-types": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.4.4.tgz", - "integrity": "sha512-WyVedfeEIILYEaWGAUWzVNyqG4sfsNooMhXWsu/YzOvVGcsnPb5PguysjJqI3t3qiaYj0BR8T2f5njdjTGe44Q==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.8.3.tgz", + "integrity": "sha512-g/6WTWG/xbdd2exBBzMfygjX/zw4eyNC4X8pRaq7aRHRoDUCzAIu3kGYIXviOv8BjCuWm8vDBwjHcjiRNgXrPA==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-flow": "^7.2.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-flow": "^7.8.3" } }, "@babel/plugin-transform-for-of": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz", - "integrity": "sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.6.tgz", + "integrity": "sha512-M0pw4/1/KI5WAxPsdcUL/w2LJ7o89YHN3yLkzNjg7Yl15GlVGgzHyCU+FMeAxevHGsLVmUqbirlUIKTafPmzdw==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-function-name": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz", - "integrity": "sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz", + "integrity": "sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ==", "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-literals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz", - "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz", + "integrity": "sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz", - "integrity": "sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz", + "integrity": "sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.5.0.tgz", - "integrity": "sha512-n20UsQMKnWrltocZZm24cRURxQnWIvsABPJlw/fvoy9c6AgHZzoelAIzajDHAQrDpuKFFPPcFGd7ChsYuIUMpg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.8.3.tgz", + "integrity": "sha512-MadJiU3rLKclzT5kBH4yxdry96odTUwuqrZM+GllFI/VhxfPz+k9MshJM+MwhfkCdxxclSbSBbUGciBngR+kEQ==", "requires": { - "@babel/helper-module-transforms": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.6.0.tgz", - "integrity": "sha512-Ma93Ix95PNSEngqomy5LSBMAQvYKVe3dy+JlVJSHEXZR5ASL9lQBedMiCyVtmTLraIDVRE3ZjTZvmXXD2Ozw3g==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.8.3.tgz", + "integrity": "sha512-JpdMEfA15HZ/1gNuB9XEDlZM1h/gF/YOH7zaZzQu2xCFRfwc01NXBMHHSTT6hRjlXJJs5x/bfODM3LiCk94Sxg==", "requires": { - "@babel/helper-module-transforms": "^7.4.4", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0", + "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-simple-access": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.5.0.tgz", - "integrity": "sha512-Q2m56tyoQWmuNGxEtUyeEkm6qJYFqs4c+XyXH5RAuYxObRNz9Zgj/1g2GMnjYp2EUyEy7YTrxliGCXzecl/vJg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.8.3.tgz", + "integrity": "sha512-8cESMCJjmArMYqa9AO5YuMEkE4ds28tMpZcGZB/jl3n0ZzlsxOAi3mC+SKypTfT8gjMupCnd3YiXCkMjj2jfOg==", "requires": { - "@babel/helper-hoist-variables": "^7.4.4", - "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-hoist-variables": "^7.8.3", + "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz", - "integrity": "sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.8.3.tgz", + "integrity": "sha512-evhTyWhbwbI3/U6dZAnx/ePoV7H6OUG+OjiJFHmhr9FPn0VShjwC2kdxqIuQ/+1P50TMrneGzMeyMTFOjKSnAw==", "requires": { - "@babel/helper-module-transforms": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.3.tgz", - "integrity": "sha512-jTkk7/uE6H2s5w6VlMHeWuH+Pcy2lmdwFoeWCVnvIrDUnB5gQqTVI8WfmEAhF2CDEarGrknZcmSFg1+bkfCoSw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz", + "integrity": "sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==", "requires": { - "regexpu-core": "^4.6.0" + "@babel/helper-create-regexp-features-plugin": "^7.8.3" } }, "@babel/plugin-transform-new-target": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz", - "integrity": "sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz", + "integrity": "sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-object-super": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.5.5.tgz", - "integrity": "sha512-un1zJQAhSosGFBduPgN/YFNvWVpRuHKU7IHBglLoLZsGmruJPOo6pbInneflUdmq7YvSVqhpPs5zdBvLnteltQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz", + "integrity": "sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.5.5" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.3" } }, "@babel/plugin-transform-parameters": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz", - "integrity": "sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.4.tgz", + "integrity": "sha512-IsS3oTxeTsZlE5KqzTbcC2sV0P9pXdec53SU+Yxv7o/6dvGM5AkTotQKhoSffhNgZ/dftsSiOoxy7evCYJXzVA==", "requires": { - "@babel/helper-call-delegate": "^7.4.4", - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-call-delegate": "^7.8.3", + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-property-literals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz", - "integrity": "sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz", + "integrity": "sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-react-constant-elements": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.6.3.tgz", - "integrity": "sha512-1/YogSSU7Tby9rq2VCmhuRg+6pxsHy2rI7w/oo8RKoBt6uBUFG+mk6x13kK+FY1/ggN92HAfg7ADd1v1+NCOKg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.8.3.tgz", + "integrity": "sha512-glrzN2U+egwRfkNFtL34xIBYTxbbUF2qJTP8HD3qETBBqzAWSeNB821X0GjU06+dNpq/UyCIjI72FmGE5NNkQQ==", "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-react-display-name": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.2.0.tgz", - "integrity": "sha512-Htf/tPa5haZvRMiNSQSFifK12gtr/8vwfr+A9y69uF0QcU77AVu4K7MiHEkTxF7lQoHOL0F9ErqgfNEAKgXj7A==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.8.3.tgz", + "integrity": "sha512-3Jy/PCw8Fe6uBKtEgz3M82ljt+lTg+xJaM4og+eyu83qLT87ZUSckn0wy7r31jflURWLO83TW6Ylf7lyXj3m5A==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-react-jsx": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.3.0.tgz", - "integrity": "sha512-a/+aRb7R06WcKvQLOu4/TpjKOdvVEKRLWFpKcNuHhiREPgGRB4TQJxq07+EZLS8LFVYpfq1a5lDUnuMdcCpBKg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.8.3.tgz", + "integrity": "sha512-r0h+mUiyL595ikykci+fbwm9YzmuOrUBi0b+FDIKmi3fPQyFokWVEMJnRWHJPPQEjyFJyna9WZC6Viv6UHSv1g==", "requires": { - "@babel/helper-builder-react-jsx": "^7.3.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.2.0" + "@babel/helper-builder-react-jsx": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-jsx": "^7.8.3" } }, "@babel/plugin-transform-react-jsx-self": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.2.0.tgz", - "integrity": "sha512-v6S5L/myicZEy+jr6ielB0OR8h+EH/1QFx/YJ7c7Ua+7lqsjj/vW6fD5FR9hB/6y7mGbfT4vAURn3xqBxsUcdg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.8.3.tgz", + "integrity": "sha512-01OT7s5oa0XTLf2I8XGsL8+KqV9lx3EZV+jxn/L2LQ97CGKila2YMroTkCEIE0HV/FF7CMSRsIAybopdN9NTdg==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.2.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-jsx": "^7.8.3" } }, "@babel/plugin-transform-react-jsx-source": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.5.0.tgz", - "integrity": "sha512-58Q+Jsy4IDCZx7kqEZuSDdam/1oW8OdDX8f+Loo6xyxdfg1yF0GE2XNJQSTZCaMol93+FBzpWiPEwtbMloAcPg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.8.3.tgz", + "integrity": "sha512-PLMgdMGuVDtRS/SzjNEQYUT8f4z1xb2BAT54vM1X5efkVuYBf5WyGUMbpmARcfq3NaglIwz08UVQK4HHHbC6ag==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.2.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-jsx": "^7.8.3" } }, "@babel/plugin-transform-regenerator": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz", - "integrity": "sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.3.tgz", + "integrity": "sha512-qt/kcur/FxrQrzFR432FGZznkVAjiyFtCOANjkAKwCbt465L6ZCiUQh2oMYGU3Wo8LRFJxNDFwWn106S5wVUNA==", "requires": { "regenerator-transform": "^0.14.0" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz", - "integrity": "sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz", + "integrity": "sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-runtime": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.6.0.tgz", - "integrity": "sha512-Da8tMf7uClzwUm/pnJ1S93m/aRXmoYNDD7TkHua8xBDdaAs54uZpTWvEt6NGwmoVMb9mZbntfTqmG2oSzN/7Vg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.8.3.tgz", + "integrity": "sha512-/vqUt5Yh+cgPZXXjmaG9NT8aVfThKk7G4OqkVhrXqwsC5soMn/qTCxs36rZ2QFhpfTJcjw4SNDIZ4RUb8OL4jQ==", "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", "resolve": "^1.8.1", "semver": "^5.5.1" }, @@ -759,121 +870,127 @@ } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz", - "integrity": "sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz", + "integrity": "sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-spread": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.6.2.tgz", - "integrity": "sha512-DpSvPFryKdK1x+EDJYCy28nmAaIMdxmhot62jAXF/o99iA33Zj2Lmcp3vDmz+MUh0LNYVPvfj5iC3feb3/+PFg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz", + "integrity": "sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz", - "integrity": "sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz", + "integrity": "sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-regex": "^7.8.3" } }, "@babel/plugin-transform-template-literals": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz", - "integrity": "sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz", + "integrity": "sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ==", "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz", - "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz", + "integrity": "sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-typescript": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.6.3.tgz", - "integrity": "sha512-aiWINBrPMSC3xTXRNM/dfmyYuPNKY/aexYqBgh0HBI5Y+WO5oRAqW/oROYeYHrF4Zw12r9rK4fMk/ZlAmqx/FQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.8.3.tgz", + "integrity": "sha512-Ebj230AxcrKGZPKIp4g4TdQLrqX95TobLUWKd/CwG7X1XHUH1ZpkpFvXuXqWbtGRWb7uuEWNlrl681wsOArAdQ==", "requires": { - "@babel/helper-create-class-features-plugin": "^7.6.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-typescript": "^7.2.0" + "@babel/helper-create-class-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-typescript": "^7.8.3" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.6.2.tgz", - "integrity": "sha512-orZI6cWlR3nk2YmYdb0gImrgCUwb5cBUwjf6Ks6dvNVvXERkwtJWOQaEOjPiu0Gu1Tq6Yq/hruCZZOOi9F34Dw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz", + "integrity": "sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.4", - "regexpu-core": "^4.6.0" + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/preset-env": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.6.3.tgz", - "integrity": "sha512-CWQkn7EVnwzlOdR5NOm2+pfgSNEZmvGjOhlCHBDq0J8/EStr+G+FvPEiz9B56dR6MoiUFjXhfE4hjLoAKKJtIQ==", - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-async-generator-functions": "^7.2.0", - "@babel/plugin-proposal-dynamic-import": "^7.5.0", - "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.6.2", - "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.6.2", - "@babel/plugin-syntax-async-generators": "^7.2.0", - "@babel/plugin-syntax-dynamic-import": "^7.2.0", - "@babel/plugin-syntax-json-strings": "^7.2.0", - "@babel/plugin-syntax-object-rest-spread": "^7.2.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", - "@babel/plugin-transform-arrow-functions": "^7.2.0", - "@babel/plugin-transform-async-to-generator": "^7.5.0", - "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.6.3", - "@babel/plugin-transform-classes": "^7.5.5", - "@babel/plugin-transform-computed-properties": "^7.2.0", - "@babel/plugin-transform-destructuring": "^7.6.0", - "@babel/plugin-transform-dotall-regex": "^7.6.2", - "@babel/plugin-transform-duplicate-keys": "^7.5.0", - "@babel/plugin-transform-exponentiation-operator": "^7.2.0", - "@babel/plugin-transform-for-of": "^7.4.4", - "@babel/plugin-transform-function-name": "^7.4.4", - "@babel/plugin-transform-literals": "^7.2.0", - "@babel/plugin-transform-member-expression-literals": "^7.2.0", - "@babel/plugin-transform-modules-amd": "^7.5.0", - "@babel/plugin-transform-modules-commonjs": "^7.6.0", - "@babel/plugin-transform-modules-systemjs": "^7.5.0", - "@babel/plugin-transform-modules-umd": "^7.2.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.6.3", - "@babel/plugin-transform-new-target": "^7.4.4", - "@babel/plugin-transform-object-super": "^7.5.5", - "@babel/plugin-transform-parameters": "^7.4.4", - "@babel/plugin-transform-property-literals": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.4.5", - "@babel/plugin-transform-reserved-words": "^7.2.0", - "@babel/plugin-transform-shorthand-properties": "^7.2.0", - "@babel/plugin-transform-spread": "^7.6.2", - "@babel/plugin-transform-sticky-regex": "^7.2.0", - "@babel/plugin-transform-template-literals": "^7.4.4", - "@babel/plugin-transform-typeof-symbol": "^7.2.0", - "@babel/plugin-transform-unicode-regex": "^7.6.2", - "@babel/types": "^7.6.3", - "browserslist": "^4.6.0", - "core-js-compat": "^3.1.1", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.8.6.tgz", + "integrity": "sha512-M5u8llV9DIVXBFB/ArIpqJuvXpO+ymxcJ6e8ZAmzeK3sQeBNOD1y+rHvHCGG4TlEmsNpIrdecsHGHT8ZCoOSJg==", + "requires": { + "@babel/compat-data": "^7.8.6", + "@babel/helper-compilation-targets": "^7.8.6", + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-proposal-async-generator-functions": "^7.8.3", + "@babel/plugin-proposal-dynamic-import": "^7.8.3", + "@babel/plugin-proposal-json-strings": "^7.8.3", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-proposal-object-rest-spread": "^7.8.3", + "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", + "@babel/plugin-proposal-optional-chaining": "^7.8.3", + "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.8.3", + "@babel/plugin-transform-arrow-functions": "^7.8.3", + "@babel/plugin-transform-async-to-generator": "^7.8.3", + "@babel/plugin-transform-block-scoped-functions": "^7.8.3", + "@babel/plugin-transform-block-scoping": "^7.8.3", + "@babel/plugin-transform-classes": "^7.8.6", + "@babel/plugin-transform-computed-properties": "^7.8.3", + "@babel/plugin-transform-destructuring": "^7.8.3", + "@babel/plugin-transform-dotall-regex": "^7.8.3", + "@babel/plugin-transform-duplicate-keys": "^7.8.3", + "@babel/plugin-transform-exponentiation-operator": "^7.8.3", + "@babel/plugin-transform-for-of": "^7.8.6", + "@babel/plugin-transform-function-name": "^7.8.3", + "@babel/plugin-transform-literals": "^7.8.3", + "@babel/plugin-transform-member-expression-literals": "^7.8.3", + "@babel/plugin-transform-modules-amd": "^7.8.3", + "@babel/plugin-transform-modules-commonjs": "^7.8.3", + "@babel/plugin-transform-modules-systemjs": "^7.8.3", + "@babel/plugin-transform-modules-umd": "^7.8.3", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", + "@babel/plugin-transform-new-target": "^7.8.3", + "@babel/plugin-transform-object-super": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.8.4", + "@babel/plugin-transform-property-literals": "^7.8.3", + "@babel/plugin-transform-regenerator": "^7.8.3", + "@babel/plugin-transform-reserved-words": "^7.8.3", + "@babel/plugin-transform-shorthand-properties": "^7.8.3", + "@babel/plugin-transform-spread": "^7.8.3", + "@babel/plugin-transform-sticky-regex": "^7.8.3", + "@babel/plugin-transform-template-literals": "^7.8.3", + "@babel/plugin-transform-typeof-symbol": "^7.8.4", + "@babel/plugin-transform-unicode-regex": "^7.8.3", + "@babel/types": "^7.8.6", + "browserslist": "^4.8.5", + "core-js-compat": "^3.6.2", "invariant": "^2.2.2", - "js-levenshtein": "^1.1.3", + "levenary": "^1.1.1", "semver": "^5.5.0" }, "dependencies": { @@ -885,80 +1002,80 @@ } }, "@babel/preset-react": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.6.3.tgz", - "integrity": "sha512-07yQhmkZmRAfwREYIQgW0HEwMY9GBJVuPY4Q12UC72AbfaawuupVWa8zQs2tlL+yun45Nv/1KreII/0PLfEsgA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.8.3.tgz", + "integrity": "sha512-9hx0CwZg92jGb7iHYQVgi0tOEHP/kM60CtWJQnmbATSPIQQ2xYzfoCI3EdqAhFBeeJwYMdWQuDUHMsuDbH9hyQ==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-transform-react-display-name": "^7.0.0", - "@babel/plugin-transform-react-jsx": "^7.0.0", - "@babel/plugin-transform-react-jsx-self": "^7.0.0", - "@babel/plugin-transform-react-jsx-source": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-transform-react-display-name": "^7.8.3", + "@babel/plugin-transform-react-jsx": "^7.8.3", + "@babel/plugin-transform-react-jsx-self": "^7.8.3", + "@babel/plugin-transform-react-jsx-source": "^7.8.3" } }, "@babel/preset-typescript": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.6.0.tgz", - "integrity": "sha512-4xKw3tTcCm0qApyT6PqM9qniseCE79xGHiUnNdKGdxNsGUc2X7WwZybqIpnTmoukg3nhPceI5KPNzNqLNeIJww==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.8.3.tgz", + "integrity": "sha512-qee5LgPGui9zQ0jR1TeU5/fP9L+ovoArklEqY12ek8P/wV5ZeM/VYSQYwICeoT6FfpJTekG9Ilay5PhwsOpMHA==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-transform-typescript": "^7.6.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-transform-typescript": "^7.8.3" } }, "@babel/runtime": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.0.tgz", - "integrity": "sha512-89eSBLJsxNxOERC0Op4vd+0Bqm6wRMqMbFtV3i0/fbaWw/mJ8Q3eBvgX0G4SyrOOLCtbu98HspF8o09MRT+KzQ==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.4.tgz", + "integrity": "sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==", "requires": { "regenerator-runtime": "^0.13.2" } }, "@babel/runtime-corejs2": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.7.2.tgz", - "integrity": "sha512-GfVnHchOBvIMsweQ13l4jd9lT4brkevnavnVOej5g2y7PpTRY+R4pcQlCjWMZoUla5rMLFzaS/Ll2s59cB1TqQ==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.8.4.tgz", + "integrity": "sha512-7jU2FgNqNHX6yTuU/Dr/vH5/O8eVL9U85MG5aDw1LzGfCvvhXC1shdXfVzCQDsoY967yrAKeLujRv7l8BU+dZA==", "requires": { "core-js": "^2.6.5", "regenerator-runtime": "^0.13.2" }, "dependencies": { "core-js": { - "version": "2.6.10", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", - "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==" + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" } } }, "@babel/template": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz", - "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", + "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.6.0", - "@babel/types": "^7.6.0" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" } }, "@babel/traverse": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.3.tgz", - "integrity": "sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw==", - "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.6.3", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.6.3", - "@babel/types": "^7.6.3", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.6.tgz", + "integrity": "sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.6", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" } }, "@babel/types": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz", - "integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.6.tgz", + "integrity": "sha512-wqz7pgWMIrht3gquyEFPVXeXCti72Rm8ep9b5tQKz9Yg9LzJA3HxosF1SB3Kc81KD1A3XBkkVYtJvCKS2Z/QrA==", "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -971,9 +1088,9 @@ "integrity": "sha512-GcIY79elgB+azP74j8vqkiXz8xLFfIzbQJdlwOPisgbKT00tviJQuEghOXSMVxJ00HoYJbGswr4kcllUc4xCcg==" }, "@cnakazawa/watch": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.3.tgz", - "integrity": "sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", + "integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==", "requires": { "exec-sh": "^0.3.2", "minimist": "^1.2.0" @@ -985,14 +1102,14 @@ "integrity": "sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==" }, "@csstools/normalize.css": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-9.0.1.tgz", - "integrity": "sha512-6It2EVfGskxZCQhuykrfnALg7oVeiI6KclWSmGDqB0AiInVrTGB9Jp9i4/Ad21u9Jde/voVQz6eFX/eSg/UsPA==" + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-10.1.0.tgz", + "integrity": "sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg==" }, "@hapi/address": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.2.tgz", - "integrity": "sha512-O4QDrx+JoGKZc6aN64L04vqa7e41tIiLU+OvKdcYaEMP97UttL0f9GIi9/0A4WAMx0uBd6SidDIhktZhgOcN8Q==" + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", + "integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==" }, "@hapi/bourne": { "version": "1.3.2", @@ -1000,9 +1117,9 @@ "integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==" }, "@hapi/hoek": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.4.0.tgz", - "integrity": "sha512-JLK+vNrtZSQy1PiAAvtaPGiZhFQo+BLywJkD4EHG8vCzlW9w7Y9yfb2be1GFKnZKczLgzHBpgMOBUZs1qBNB5g==" + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", + "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" }, "@hapi/joi": { "version": "15.1.1", @@ -1066,6 +1183,13 @@ "rimraf": "^2.5.4", "slash": "^2.0.0", "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==" + } } }, "@jest/environment": { @@ -1310,24 +1434,24 @@ } }, "@svgr/webpack": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@svgr/webpack/-/webpack-4.3.2.tgz", - "integrity": "sha512-F3VE5OvyOWBEd2bF7BdtFRyI6E9it3mN7teDw0JQTlVtc4HZEYiiLSl+Uf9Uub6IYHVGc+qIrxxDyeedkQru2w==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@svgr/webpack/-/webpack-4.3.3.tgz", + "integrity": "sha512-bjnWolZ6KVsHhgyCoYRFmbd26p8XVbulCzSG53BDQqAr+JOAderYK7CuYrB3bDjHJuF6LJ7Wrr42+goLRV9qIg==", "requires": { "@babel/core": "^7.4.5", "@babel/plugin-transform-react-constant-elements": "^7.0.0", "@babel/preset-env": "^7.4.5", "@babel/preset-react": "^7.0.0", - "@svgr/core": "^4.3.2", - "@svgr/plugin-jsx": "^4.3.2", + "@svgr/core": "^4.3.3", + "@svgr/plugin-jsx": "^4.3.3", "@svgr/plugin-svgo": "^4.3.1", "loader-utils": "^1.2.3" } }, "@types/babel__core": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.3.tgz", - "integrity": "sha512-8fBo0UR2CcwWxeX7WIIgJ7lXjasFxoYgRnFHUj+hRvKkpiBJbxhdAPTCY6/ZKM0uxANFVzt4yObSLuTiTnazDA==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.6.tgz", + "integrity": "sha512-tTnhWszAqvXnhW7m5jQU9PomXSiKXk2sFxpahXvI20SZKu9ylPi8WtIxueZ6ehDWikPT0jeFujMj3X4ZHuf3Tg==", "requires": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0", @@ -1337,9 +1461,9 @@ } }, "@types/babel__generator": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.0.tgz", - "integrity": "sha512-c1mZUu4up5cp9KROs/QAw0gTeHrw/x7m52LcnvMxxOZ03DmLwPV0MlGmlgzV3cnSdjhJOZsj7E7FHeioai+egw==", + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.1.tgz", + "integrity": "sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew==", "requires": { "@babel/types": "^7.0.0" } @@ -1354,27 +1478,47 @@ } }, "@types/babel__traverse": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.7.tgz", - "integrity": "sha512-CeBpmX1J8kWLcDEnI3Cl2Eo6RfbGvzUctA+CjZUhOKDFbLfcr7fc4usEqLNWetrlJd7RhAkyYe2czXop4fICpw==", + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.9.tgz", + "integrity": "sha512-jEFQ8L1tuvPjOI8lnpaf73oCJe+aoxL6ygqSy6c8LcW98zaC+4mzWuQIRCEvKeCOu+lbqdXcg4Uqmm1S8AP1tw==", "requires": { "@babel/types": "^7.3.0" } }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" + }, "@types/eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==" }, + "@types/events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", + "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==" + }, + "@types/glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", + "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", + "requires": { + "@types/events": "*", + "@types/minimatch": "*", + "@types/node": "*" + } + }, "@types/istanbul-lib-coverage": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", "integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==" }, "@types/istanbul-lib-report": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz", - "integrity": "sha512-3BUTyMzbZa2DtDI2BkERNC6jJw2Mr2Y0oGI7mRxYNBPxppbtEK1F66u3bKwU2g+wxwWI7PAoRpJnOY1grJqzHg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", "requires": { "@types/istanbul-lib-coverage": "*" } @@ -1389,9 +1533,24 @@ } }, "@types/json-schema": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.3.tgz", - "integrity": "sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A==" + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", + "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==" + }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" + }, + "@types/node": { + "version": "13.7.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.7.tgz", + "integrity": "sha512-Uo4chgKbnPNlxQwoFmYIwctkQVkMMmsAoGGU4JKwLuvBefF0pCq4FybNSnfkfRCpC7ZW7kttcC/TrRtAJsvGtg==" + }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, "@types/q": { "version": "1.5.2", @@ -1402,78 +1561,74 @@ "version": "16.4.6", "resolved": "https://registry.npmjs.org/@types/react/-/react-16.4.6.tgz", "integrity": "sha512-9LDZdhsuKSc+DjY65SjBkA958oBWcTWSVWAd2cD9XqKBjhGw1KzAkRhWRw2eIsXvaIE/TOTjjKMFVC+JA1iU4g==", + "optional": true, "requires": { "csstype": "^2.2.0" } }, - "@types/react-slick": { - "version": "0.23.4", - "resolved": "https://registry.npmjs.org/@types/react-slick/-/react-slick-0.23.4.tgz", - "integrity": "sha512-vXoIy4GUfB7/YgqubR4H7RALo+pRdMYCeLgWwV3MPwl5pggTlEkFBTF19R7u+LJc85uMqC7RfsbkqPLMQ4ab+A==", - "requires": { - "@types/react": "*" - } - }, "@types/stack-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", "integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==" }, "@types/yargs": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.3.tgz", - "integrity": "sha512-K8/LfZq2duW33XW/tFwEAfnZlqIfVsoyRB3kfXdPXYhl0nfM8mmh7GS0jg7WrX2Dgq/0Ha/pR1PaR+BvmWwjiQ==", + "version": "13.0.8", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.8.tgz", + "integrity": "sha512-XAvHLwG7UQ+8M4caKIH0ZozIOYay5fQkAgyIXegXT9jPtdIGdhga+sUEdAr1CiG46aB+c64xQEYyEzlwWVTNzA==", "requires": { "@types/yargs-parser": "*" } }, "@types/yargs-parser": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-13.1.0.tgz", - "integrity": "sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg==" + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-15.0.0.tgz", + "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==" }, "@typescript-eslint/eslint-plugin": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.3.2.tgz", - "integrity": "sha512-tcnpksq1bXzcIRbYLeXkgp6l+ggEMXXUcl1wsSvL807fRtmvVQKygElwEUf4hBA76dNag3VAK1q2m3vd7qJaZA==", + "version": "2.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.22.0.tgz", + "integrity": "sha512-BvxRLaTDVQ3N+Qq8BivLiE9akQLAOUfxNHIEhedOcg8B2+jY8Rc4/D+iVprvuMX1AdezFYautuGDwr9QxqSxBQ==", "requires": { - "@typescript-eslint/experimental-utils": "2.3.2", - "eslint-utils": "^1.4.2", + "@typescript-eslint/experimental-utils": "2.22.0", + "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", - "regexpp": "^2.0.1", + "regexpp": "^3.0.0", "tsutils": "^3.17.1" } }, "@typescript-eslint/experimental-utils": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.3.2.tgz", - "integrity": "sha512-t+JGdTT6dRbmvKDlhlVkEueoZa0fhJNfG6z2cpnRPLwm3VwYr2BjR//acJGC1Yza0I9ZNcDfRY7ubQEvvfG6Jg==", + "version": "2.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.22.0.tgz", + "integrity": "sha512-sJt1GYBe6yC0dWOQzXlp+tiuGglNhJC9eXZeC8GBVH98Zv9jtatccuhz0OF5kC/DwChqsNfghHx7OlIDQjNYAQ==", "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.3.2", + "@typescript-eslint/typescript-estree": "2.22.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/parser": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.3.2.tgz", - "integrity": "sha512-nq1UQeNGdKdqdgF6Ww+Ov2OidWgiL96+JYdXXZ2rkP/OWyc6KMNSbs6MpRCpI8q+PmDa7hBnHNQIo7w/drYccA==", + "version": "2.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.22.0.tgz", + "integrity": "sha512-FaZKC1X+nvD7qMPqKFUYHz3H0TAioSVFGvG29f796Nc5tBluoqfHgLbSFKsh7mKjRoeTm8J9WX2Wo9EyZWjG7w==", "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.3.2", - "@typescript-eslint/typescript-estree": "2.3.2", + "@typescript-eslint/experimental-utils": "2.22.0", + "@typescript-eslint/typescript-estree": "2.22.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.3.2.tgz", - "integrity": "sha512-eZNEAai16nwyhIVIEaWQlaUgAU3S9CkQ58qvK0+3IuSdLJD3W1PNuehQFMIhW/mTP1oFR9GNoTcLg7gtXz6lzA==", + "version": "2.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.22.0.tgz", + "integrity": "sha512-2HFZW2FQc4MhIBB8WhDm9lVFaBDy6h9jGrJ4V2Uzxe/ON29HCHBTj3GkgcsgMWfsl2U5as+pTOr30Nibaw7qRQ==", "requires": { - "glob": "^7.1.4", + "debug": "^4.1.1", + "eslint-visitor-keys": "^1.1.0", + "glob": "^7.1.6", "is-glob": "^4.0.1", - "lodash.unescape": "4.0.1", - "semver": "^6.3.0" + "lodash": "^4.17.15", + "semver": "^6.3.0", + "tsutils": "^3.17.1" } }, "@webassemblyjs/ast": { @@ -1645,9 +1800,9 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, "abab": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.2.tgz", - "integrity": "sha512-2scffjvioEmNz0OyDSLGWDfKCVwaKc6l9Pm9kOIREU13ClXZvHpg/nRL5xyjSSSLhOnXqft2HpsAzNEEA8cFFg==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz", + "integrity": "sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==" }, "accepts": { "version": "1.3.7", @@ -1659,9 +1814,9 @@ } }, "acorn": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", - "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==" + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==" }, "acorn-globals": { "version": "4.3.4", @@ -1673,16 +1828,16 @@ }, "dependencies": { "acorn": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", - "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==" + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", + "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==" } } }, "acorn-jsx": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", - "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==" + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==" }, "acorn-walk": { "version": "6.2.0", @@ -1718,15 +1873,47 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==" + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } } } }, + "aggregate-error": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", + "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", + "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" @@ -1753,9 +1940,19 @@ "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==" }, "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==" + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "requires": { + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==" + } + } }, "ansi-html": { "version": "0.0.7", @@ -1763,9 +1960,9 @@ "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=" }, "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { "version": "3.2.1", @@ -1776,61 +1973,53 @@ } }, "antd": { - "version": "3.25.0", - "resolved": "https://registry.npmjs.org/antd/-/antd-3.25.0.tgz", - "integrity": "sha512-FJH2w59dwMykwzsLcl6IQqLTUwQSU8AUQCkVpIQt5yBIneqQI3V8Xip/zCPBQhAIQ20IbV4uqhUwW6LUsAPcYg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/antd/-/antd-4.0.0.tgz", + "integrity": "sha512-sfaxNqqtaGg+5JWucSPM0Nr3eBh5gUBlmsH5RqdtpcP5qTM2NOxcmhx3I8KlSs5O39jAZ6nRVmjubjpw3GS5oQ==", "requires": { - "@ant-design/create-react-context": "^0.2.4", - "@ant-design/icons": "~2.1.1", - "@ant-design/icons-react": "~2.0.1", - "@types/react-slick": "^0.23.4", + "@ant-design/icons": "^4.0.0-rc.0", + "@ant-design/react-slick": "~0.25.5", "array-tree-filter": "^2.1.0", - "babel-runtime": "6.x", "classnames": "~2.2.6", "copy-to-clipboard": "^3.2.0", "css-animation": "^1.5.0", - "dom-closest": "^0.2.0", - "enquire.js": "^2.1.6", "lodash": "^4.17.13", "moment": "^2.24.0", "omit.js": "^1.0.2", "prop-types": "^15.7.2", "raf": "^3.4.1", - "rc-animate": "^2.8.3", - "rc-calendar": "~9.15.5", - "rc-cascader": "~0.17.4", + "rc-animate": "~2.10.2", + "rc-cascader": "~1.0.0", "rc-checkbox": "~2.1.6", "rc-collapse": "~1.11.3", - "rc-dialog": "~7.5.2", - "rc-drawer": "~3.0.0", - "rc-dropdown": "~2.4.1", - "rc-editor-mention": "^1.1.13", - "rc-form": "^2.4.5", - "rc-input-number": "~4.5.0", - "rc-mentions": "~0.4.0", - "rc-menu": "~7.5.1", - "rc-notification": "~3.3.1", - "rc-pagination": "~1.20.5", + "rc-dialog": "~7.6.0", + "rc-drawer": "~3.1.1", + "rc-dropdown": "~3.0.0", + "rc-field-form": "~1.0.0", + "rc-input-number": "~4.5.4", + "rc-mentions": "~1.0.0", + "rc-menu": "~8.0.1", + "rc-notification": "~4.0.0", + "rc-pagination": "~2.0.1", + "rc-picker": "~1.1.0", "rc-progress": "~2.5.0", - "rc-rate": "~2.5.0", + "rc-rate": "~2.5.1", "rc-resize-observer": "^0.1.0", - "rc-select": "~9.2.0", - "rc-slider": "~8.7.1", + "rc-select": "~10.0.0", + "rc-slider": "~9.2.1", "rc-steps": "~3.5.0", "rc-switch": "~1.9.0", - "rc-table": "~6.9.4", - "rc-tabs": "~9.6.4", - "rc-time-picker": "~3.7.1", - "rc-tooltip": "~3.7.3", - "rc-tree": "~2.1.0", - "rc-tree-select": "~2.9.1", - "rc-trigger": "^2.6.2", - "rc-upload": "~2.9.1", - "rc-util": "^4.10.0", - "react-lazy-load": "^3.0.13", - "react-lifecycles-compat": "^3.0.4", - "react-slick": "~0.25.2", + "rc-table": "~7.0.0", + "rc-tabs": "~10.0.0", + "rc-tooltip": "~4.0.0", + "rc-tree": "~3.0.0", + "rc-tree-select": "~3.0.0", + "rc-trigger": "~4.0.0", + "rc-upload": "~3.0.0", + "rc-util": "^4.20.0", + "rc-virtual-list": "~1.0.0", "resize-observer-polyfill": "^1.5.1", + "scroll-into-view-if-needed": "^2.2.20", "shallowequal": "^1.1.0", "warning": "~4.0.3" } @@ -1897,12 +2086,13 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==" }, "array-includes": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", - "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", + "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.7.0" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0", + "is-string": "^1.0.5" } }, "array-tree-filter": { @@ -1928,6 +2118,15 @@ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, + "array.prototype.flat": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", + "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -2003,9 +2202,9 @@ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" }, "async-validator": { - "version": "1.11.5", - "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.11.5.tgz", - "integrity": "sha512-XNtCsMAeAH1pdLMEg1z8/Bb3a8cdCbui9QbJATRFHHHW5kT6+NPI3zSVQUXgikTFITzsg+kYY5NTWhM2Orwt9w==" + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-3.2.3.tgz", + "integrity": "sha512-yMJ4i3x5qEGVgEMowZiBkx+rjDrsXf64BWdHENCtHLgyPiEE+2r8jvqMF1cghCgdGo4sWVLJ7MDwPQgGSPDCcw==" }, "asynckit": { "version": "0.4.0", @@ -2026,24 +2225,17 @@ } }, "autoprefixer": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.0.tgz", - "integrity": "sha512-j2IRvaCfrUxIiZun9ba4mhJ2omhw4OY88/yVzLO+lHhGBumAAK72PgM6gkbSN8iregPOn1ZlxGkmZh2CQ7X4AQ==", + "version": "9.7.4", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.4.tgz", + "integrity": "sha512-g0Ya30YrMBAEZk60lp+qfX5YQllG+S5W3GYCFvyHTvhOki0AEQJLPEcIuGRsqVwLi8FvXPVtwTGhfr38hVpm0g==", "requires": { - "browserslist": "^4.7.2", - "caniuse-lite": "^1.0.30001004", + "browserslist": "^4.8.3", + "caniuse-lite": "^1.0.30001020", "chalk": "^2.4.2", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", - "postcss": "^7.0.19", + "postcss": "^7.0.26", "postcss-value-parser": "^4.0.2" - }, - "dependencies": { - "postcss-value-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", - "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==" - } } }, "aws-sign2": { @@ -2052,17 +2244,14 @@ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", + "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==" }, "axobject-query": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.0.2.tgz", - "integrity": "sha512-MCeek8ZH7hKyO1rWUbKNQBbl4l2eY0ntk7OGi+q0RlafrCnfPxC06WZA+uebCfmYp4mNU9jRBP1AhGyf8+W3ww==", - "requires": { - "ast-types-flow": "0.0.7" - } + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.1.2.tgz", + "integrity": "sha512-ICt34ZmrVt8UQnvPl6TVyDTkmhXmAyAT4Jh5ugfGUX4MOrZ+U/ZY6/sdylRw3qGNr9Ub5AJsaHeDMzNLehRdOQ==" }, "babel-code-frame": { "version": "6.26.0", @@ -2197,19 +2386,63 @@ } }, "babel-plugin-macros": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.6.1.tgz", - "integrity": "sha512-6W2nwiXme6j1n2erPOnmRiWfObUhWH7Qw1LMi9XZy8cj+KtESu3T6asZvtk5bMQQjX8te35o7CFueiSdL/2NmQ==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz", + "integrity": "sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==", "requires": { - "@babel/runtime": "^7.4.2", - "cosmiconfig": "^5.2.0", - "resolve": "^1.10.0" + "@babel/runtime": "^7.7.2", + "cosmiconfig": "^6.0.0", + "resolve": "^1.12.0" + }, + "dependencies": { + "cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + } + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "parse-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", + "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1", + "lines-and-columns": "^1.1.6" + } + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + } } }, "babel-plugin-named-asset-import": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.4.tgz", - "integrity": "sha512-S6d+tEzc5Af1tKIMbsf2QirCcPdQ+mKUCY2H1nJj1DyA1ShwpsoxEOAwbWsG5gcXNV/olpvQd9vrUWRx4bnhpw==" + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.6.tgz", + "integrity": "sha512-1aGDUfL1qOOIoqk9QKGIo2lANk+C7ko/fqH0uIyC71x3PEGz0uVP8ISgfEsFuG+FKmjHTvFK/nNM8dowpmUxLA==" }, "babel-plugin-syntax-object-rest-spread": { "version": "6.13.0", @@ -2240,106 +2473,89 @@ } }, "babel-preset-react-app": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-react-app/-/babel-preset-react-app-9.0.2.tgz", - "integrity": "sha512-aXD+CTH8Chn8sNJr4tO/trWKqe5sSE4hdO76j9fhVezJSzmpWYWUSc5JoPmdSxADwef5kQFNGKXd433vvkd2VQ==", - "requires": { - "@babel/core": "7.6.0", - "@babel/plugin-proposal-class-properties": "7.5.5", - "@babel/plugin-proposal-decorators": "7.6.0", - "@babel/plugin-proposal-object-rest-spread": "7.5.5", - "@babel/plugin-syntax-dynamic-import": "7.2.0", - "@babel/plugin-transform-destructuring": "7.6.0", - "@babel/plugin-transform-flow-strip-types": "7.4.4", - "@babel/plugin-transform-react-display-name": "7.2.0", - "@babel/plugin-transform-runtime": "7.6.0", - "@babel/preset-env": "7.6.0", - "@babel/preset-react": "7.0.0", - "@babel/preset-typescript": "7.6.0", - "@babel/runtime": "7.6.0", - "babel-plugin-dynamic-import-node": "2.3.0", - "babel-plugin-macros": "2.6.1", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/babel-preset-react-app/-/babel-preset-react-app-9.1.1.tgz", + "integrity": "sha512-YkWP2UwY//TLltNlEBRngDOrYhvSLb+CA330G7T9M5UhGEMWe+JK/8IXJc5p2fDTSfSiETf+PY0+PYXFMix81Q==", + "requires": { + "@babel/core": "7.8.4", + "@babel/plugin-proposal-class-properties": "7.8.3", + "@babel/plugin-proposal-decorators": "7.8.3", + "@babel/plugin-proposal-numeric-separator": "7.8.3", + "@babel/plugin-transform-flow-strip-types": "7.8.3", + "@babel/plugin-transform-react-display-name": "7.8.3", + "@babel/plugin-transform-runtime": "7.8.3", + "@babel/preset-env": "7.8.4", + "@babel/preset-react": "7.8.3", + "@babel/preset-typescript": "7.8.3", + "@babel/runtime": "7.8.4", + "babel-plugin-macros": "2.8.0", "babel-plugin-transform-react-remove-prop-types": "0.4.24" }, "dependencies": { - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz", - "integrity": "sha512-F2DxJJSQ7f64FyTVl5cw/9MWn6naXGdk3Q3UhDbFEEHv+EilCPoeRD3Zh/Utx1CJz4uyKlQ4uH+bJPbEhMV7Zw==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-object-rest-spread": "^7.2.0" - } - }, "@babel/preset-env": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.6.0.tgz", - "integrity": "sha512-1efzxFv/TcPsNXlRhMzRnkBFMeIqBBgzwmZwlFDw5Ubj0AGLeufxugirwZmkkX/ayi3owsSqoQ4fw8LkfK9SYg==", - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-async-generator-functions": "^7.2.0", - "@babel/plugin-proposal-dynamic-import": "^7.5.0", - "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.5.5", - "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-syntax-async-generators": "^7.2.0", - "@babel/plugin-syntax-dynamic-import": "^7.2.0", - "@babel/plugin-syntax-json-strings": "^7.2.0", - "@babel/plugin-syntax-object-rest-spread": "^7.2.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", - "@babel/plugin-transform-arrow-functions": "^7.2.0", - "@babel/plugin-transform-async-to-generator": "^7.5.0", - "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.6.0", - "@babel/plugin-transform-classes": "^7.5.5", - "@babel/plugin-transform-computed-properties": "^7.2.0", - "@babel/plugin-transform-destructuring": "^7.6.0", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/plugin-transform-duplicate-keys": "^7.5.0", - "@babel/plugin-transform-exponentiation-operator": "^7.2.0", - "@babel/plugin-transform-for-of": "^7.4.4", - "@babel/plugin-transform-function-name": "^7.4.4", - "@babel/plugin-transform-literals": "^7.2.0", - "@babel/plugin-transform-member-expression-literals": "^7.2.0", - "@babel/plugin-transform-modules-amd": "^7.5.0", - "@babel/plugin-transform-modules-commonjs": "^7.6.0", - "@babel/plugin-transform-modules-systemjs": "^7.5.0", - "@babel/plugin-transform-modules-umd": "^7.2.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.6.0", - "@babel/plugin-transform-new-target": "^7.4.4", - "@babel/plugin-transform-object-super": "^7.5.5", - "@babel/plugin-transform-parameters": "^7.4.4", - "@babel/plugin-transform-property-literals": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.4.5", - "@babel/plugin-transform-reserved-words": "^7.2.0", - "@babel/plugin-transform-shorthand-properties": "^7.2.0", - "@babel/plugin-transform-spread": "^7.2.0", - "@babel/plugin-transform-sticky-regex": "^7.2.0", - "@babel/plugin-transform-template-literals": "^7.4.4", - "@babel/plugin-transform-typeof-symbol": "^7.2.0", - "@babel/plugin-transform-unicode-regex": "^7.4.4", - "@babel/types": "^7.6.0", - "browserslist": "^4.6.0", - "core-js-compat": "^3.1.1", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.8.4.tgz", + "integrity": "sha512-HihCgpr45AnSOHRbS5cWNTINs0TwaR8BS8xIIH+QwiW8cKL0llV91njQMpeMReEPVs+1Ao0x3RLEBLtt1hOq4w==", + "requires": { + "@babel/compat-data": "^7.8.4", + "@babel/helper-compilation-targets": "^7.8.4", + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-proposal-async-generator-functions": "^7.8.3", + "@babel/plugin-proposal-dynamic-import": "^7.8.3", + "@babel/plugin-proposal-json-strings": "^7.8.3", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-proposal-object-rest-spread": "^7.8.3", + "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", + "@babel/plugin-proposal-optional-chaining": "^7.8.3", + "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.8.3", + "@babel/plugin-transform-arrow-functions": "^7.8.3", + "@babel/plugin-transform-async-to-generator": "^7.8.3", + "@babel/plugin-transform-block-scoped-functions": "^7.8.3", + "@babel/plugin-transform-block-scoping": "^7.8.3", + "@babel/plugin-transform-classes": "^7.8.3", + "@babel/plugin-transform-computed-properties": "^7.8.3", + "@babel/plugin-transform-destructuring": "^7.8.3", + "@babel/plugin-transform-dotall-regex": "^7.8.3", + "@babel/plugin-transform-duplicate-keys": "^7.8.3", + "@babel/plugin-transform-exponentiation-operator": "^7.8.3", + "@babel/plugin-transform-for-of": "^7.8.4", + "@babel/plugin-transform-function-name": "^7.8.3", + "@babel/plugin-transform-literals": "^7.8.3", + "@babel/plugin-transform-member-expression-literals": "^7.8.3", + "@babel/plugin-transform-modules-amd": "^7.8.3", + "@babel/plugin-transform-modules-commonjs": "^7.8.3", + "@babel/plugin-transform-modules-systemjs": "^7.8.3", + "@babel/plugin-transform-modules-umd": "^7.8.3", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", + "@babel/plugin-transform-new-target": "^7.8.3", + "@babel/plugin-transform-object-super": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.8.4", + "@babel/plugin-transform-property-literals": "^7.8.3", + "@babel/plugin-transform-regenerator": "^7.8.3", + "@babel/plugin-transform-reserved-words": "^7.8.3", + "@babel/plugin-transform-shorthand-properties": "^7.8.3", + "@babel/plugin-transform-spread": "^7.8.3", + "@babel/plugin-transform-sticky-regex": "^7.8.3", + "@babel/plugin-transform-template-literals": "^7.8.3", + "@babel/plugin-transform-typeof-symbol": "^7.8.4", + "@babel/plugin-transform-unicode-regex": "^7.8.3", + "@babel/types": "^7.8.3", + "browserslist": "^4.8.5", + "core-js-compat": "^3.6.2", "invariant": "^2.2.2", - "js-levenshtein": "^1.1.3", + "levenary": "^1.1.1", "semver": "^5.5.0" } }, - "@babel/preset-react": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.0.0.tgz", - "integrity": "sha512-oayxyPS4Zj+hF6Et11BwuBkmpgT/zMxyuZgFrMeZID6Hdh3dGlk4sHCAhdBCpuCKW2ppBfl2uCCetlrUIJRY3w==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-transform-react-display-name": "^7.0.0", - "@babel/plugin-transform-react-jsx": "^7.0.0", - "@babel/plugin-transform-react-jsx-self": "^7.0.0", - "@babel/plugin-transform-react-jsx-source": "^7.0.0" - } - }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -2427,9 +2643,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" } } }, @@ -2457,14 +2673,23 @@ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" }, "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==" + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } }, "bluebird": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.1.tgz", - "integrity": "sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg==" + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "bn.js": { "version": "4.11.8", @@ -2653,13 +2878,13 @@ } }, "browserslist": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.2.tgz", - "integrity": "sha512-uZavT/gZXJd2UTi9Ov7/Z340WOSQ3+m1iBVRUknf+okKxonL9P83S3ctiBDtuRmRu8PiCHjqyueqQ9HYlJhxiw==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.9.1.tgz", + "integrity": "sha512-Q0DnKq20End3raFulq6Vfp1ecB9fh8yUNV55s8sekaDDeqBaCtWlRHCUdaWyUeSSBJM7IbM6HcsyaeYqgeDhnw==", "requires": { - "caniuse-lite": "^1.0.30001004", - "electron-to-chromium": "^1.3.295", - "node-releases": "^1.1.38" + "caniuse-lite": "^1.0.30001030", + "electron-to-chromium": "^1.3.363", + "node-releases": "^1.1.50" } }, "bser": { @@ -2676,9 +2901,9 @@ "integrity": "sha1-PkC4FmP4HS3WWWpMtxSo3BbPq+A=" }, "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", "requires": { "base64-js": "^1.0.2", "ieee754": "^1.1.4", @@ -2711,25 +2936,38 @@ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" }, "cacache": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", - "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz", + "integrity": "sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w==", "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", + "chownr": "^1.1.2", "figgy-pudding": "^3.5.1", + "fs-minipass": "^2.0.0", "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "infer-owner": "^1.0.3", + "graceful-fs": "^4.2.2", + "infer-owner": "^1.0.4", "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", + "minipass": "^3.0.0", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", "mkdirp": "^0.5.1", "move-concurrently": "^1.0.1", + "p-map": "^3.0.0", "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" + "rimraf": "^2.7.1", + "ssri": "^7.0.0", + "unique-filename": "^1.1.1" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + } } }, "cache-base": { @@ -2775,12 +3013,12 @@ "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" }, "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.1.tgz", + "integrity": "sha512-7fa2WcG4fYFkclIvEmxBbTvmibwF2/agfEBc6q3lOpVu0A13ltLsA+Hr/8Hp6kp5f+G7hKi6t8lys6XxP+1K6Q==", "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" + "pascal-case": "^3.1.1", + "tslib": "^1.10.0" } }, "camelcase": { @@ -2800,9 +3038,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001006", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001006.tgz", - "integrity": "sha512-MXnUVX27aGs/QINz+QG1sWSLDr3P1A3Hq5EUWoIt0T7K24DuvMxZEnh3Y5aHlJW6Bz2aApJdSewdYLd8zQnUuw==" + "version": "1.0.30001031", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001031.tgz", + "integrity": "sha512-DpAP5a1NGRLgYfaNCaXIRyGARi+3tJA2quZXNNA1Du26VyVkqvy2tznNu5ANyN1Y5aX44QDotZSVSUSi2uMGjg==" }, "capture-exit": { "version": "2.0.0", @@ -2813,9 +3051,9 @@ } }, "case-sensitive-paths-webpack-plugin": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.2.0.tgz", - "integrity": "sha512-u5ElzokS8A1pm9vM3/iDgTcI3xqHxuCao94Oz8etI3cf0Tio0p8izkDYbTIn09uP3yUUr6+veaE6IkjnTYS46g==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.3.0.tgz", + "integrity": "sha512-/4YgnZS8y1UXXmC02xD5rRrBEu6T5ub+mQHLNRj0fzTRbgdBYhsNo2V5EqwgqrExjxsjtF/OpAKAMkKsxbD5XQ==" }, "caseless": { "version": "0.12.0", @@ -2838,535 +3076,69 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" }, "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz", + "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==", "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.3.0" }, "dependencies": { - "fsevents": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", - "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", - "optional": true, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "debug": { - "version": "4.1.1", - "bundled": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "optional": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "optional": true - }, - "needle": { - "version": "2.3.0", - "bundled": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.12.0", - "bundled": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.1", - "bundled": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "optional": true - }, - "semver": { - "version": "5.7.0", - "bundled": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "optional": true - } + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "requires": { - "is-extglob": "^2.1.0" - } - } + "fill-range": "^7.0.1" } }, - "normalize-path": { + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } } } }, "chownr": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz", - "integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, "chrome-trace-event": { "version": "1.0.2", @@ -3417,19 +3189,24 @@ "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" }, "clean-css": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", - "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", + "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", "requires": { "source-map": "~0.6.0" } }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + }, "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "requires": { - "restore-cursor": "^2.0.0" + "restore-cursor": "^3.1.0" } }, "cli-width": { @@ -3447,6 +3224,16 @@ "wrap-ansi": "^5.1.0" }, "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -3581,11 +3368,18 @@ } }, "compressible": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz", - "integrity": "sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "requires": { - "mime-db": ">= 1.40.0 < 2" + "mime-db": ">= 1.43.0 < 2" + }, + "dependencies": { + "mime-db": { + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" + } } }, "compression": { @@ -3622,6 +3416,11 @@ } } }, + "compute-scroll-into-view": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.13.tgz", + "integrity": "sha512-o+w9w7A98aAFi/GjK8cxSV+CdASuPa2rR5UWs3+yHkJzWqaKoBEufFNWYaXInCSmUfDCVhesG+v9MTWqOjsxFg==" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -3692,9 +3491,9 @@ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "requires": { "safe-buffer": "~5.1.1" }, @@ -3735,25 +3534,32 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "copy-to-clipboard": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.2.0.tgz", - "integrity": "sha512-eOZERzvCmxS8HWzugj4Uxl8OJxa7T2k1Gi0X5qavwydHIfuSHq2dTD09LOg/XyGq4Zpb5IsR/2OJ5lbOegz78w==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz", + "integrity": "sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw==", "requires": { "toggle-selection": "^1.0.6" } }, "core-js": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", - "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" }, "core-js-compat": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.3.5.tgz", - "integrity": "sha512-44ZORuapx0MUht0MUk0p9lcQPh7n/LDXehimTmjCs0CYblpKZcqVd5w0OQDUDq5OQjEbazWObHDQJWvvHYPNTg==", + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.4.tgz", + "integrity": "sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA==", "requires": { - "browserslist": "^4.7.2", - "semver": "^6.3.0" + "browserslist": "^4.8.3", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==" + } } }, "core-util-is": { @@ -3938,21 +3744,22 @@ } }, "css-loader": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-2.1.1.tgz", - "integrity": "sha512-OcKJU/lt232vl1P9EEDamhoO9iKY3tIjY5GU+XDLblAykTdgs6Ux9P1hTHve8nFKy5KPpOXOsVI/hIwi3841+w==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.4.2.tgz", + "integrity": "sha512-jYq4zdZT0oS0Iykt+fqnzVLRIeiPWhka+7BqPn+oSIpWJAHak5tmB/WZrJ2a21JhCeFyNnnlroSl8c+MtVndzA==", "requires": { - "camelcase": "^5.2.0", - "icss-utils": "^4.1.0", + "camelcase": "^5.3.1", + "cssesc": "^3.0.0", + "icss-utils": "^4.1.1", "loader-utils": "^1.2.3", "normalize-path": "^3.0.0", - "postcss": "^7.0.14", + "postcss": "^7.0.23", "postcss-modules-extract-imports": "^2.0.0", - "postcss-modules-local-by-default": "^2.0.6", - "postcss-modules-scope": "^2.1.0", - "postcss-modules-values": "^2.0.0", - "postcss-value-parser": "^3.3.0", - "schema-utils": "^1.0.0" + "postcss-modules-local-by-default": "^3.0.2", + "postcss-modules-scope": "^2.1.1", + "postcss-modules-values": "^3.0.0", + "postcss-value-parser": "^4.0.2", + "schema-utils": "^2.6.0" }, "dependencies": { "normalize-path": { @@ -3971,12 +3778,12 @@ } }, "css-select": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.0.2.tgz", - "integrity": "sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", + "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", "requires": { "boolbase": "^1.0.0", - "css-what": "^2.1.2", + "css-what": "^3.2.1", "domutils": "^1.7.0", "nth-check": "^1.0.2" } @@ -3995,15 +3802,10 @@ "source-map": "^0.6.1" } }, - "css-unit-converter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.1.tgz", - "integrity": "sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=" - }, "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.2.1.tgz", + "integrity": "sha512-WwOrosiQTvyms+Ti5ZC5vGEK0Vod3FTt1ca+payZqvKuGJF+dq7bG63DstxtN0dpm6FxY27a/zS3Wten+gEtGw==" }, "css.escape": { "version": "1.5.1", @@ -4113,9 +3915,10 @@ } }, "csstype": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.7.tgz", - "integrity": "sha512-9Mcn9sFbGBAdmimWb2gLVDtFJzeKtDGIr76TUqmjZrw9LFXBMSU70lcs+C0/7fyCd6iBDqmksUcCOUIkisPHsQ==" + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.9.tgz", + "integrity": "sha512-xz39Sb4+OaTsULgUERcCk+TJj8ylkL4aSVDQiX/ksxbELSqwkgt4d4RD7fovIdgJGSuNYqwZEiVjYY5l0ask+Q==", + "optional": true }, "cyclist": { "version": "1.0.1", @@ -4132,9 +3935,9 @@ } }, "damerau-levenshtein": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.5.tgz", - "integrity": "sha512-CBCRqFnpu715iPmw1KrdOrzRqbdFwQTwAWyyyYS42+iAgHCuXZ+/TdMgQkUENPomxEz9z1BEzuQU2Xw0kUuAgA==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz", + "integrity": "sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug==" }, "dashdash": { "version": "1.14.1", @@ -4166,6 +3969,11 @@ } } }, + "dayjs": { + "version": "1.8.21", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.21.tgz", + "integrity": "sha512-1kbWK0hziklUHkGgiKr7xm59KwAg/K3Tp7H/8X+f58DnNCwY3pKYjOCJpIlVs125FRBukGVZdKZojC073D0IeQ==" + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -4260,23 +4068,24 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" } } }, "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", + "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", "requires": { + "@types/glob": "^7.1.1", "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" + "is-path-cwd": "^2.0.0", + "is-path-in-cwd": "^2.0.0", + "p-map": "^2.0.0", + "pify": "^4.0.1", + "rimraf": "^2.6.3" }, "dependencies": { "globby": { @@ -4297,6 +4106,16 @@ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } + }, + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" } } }, @@ -4311,9 +4130,9 @@ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", "requires": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" @@ -4413,17 +4232,9 @@ } }, "dom-align": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.10.2.tgz", - "integrity": "sha512-AYZUzLepy05E9bCY4ExoqHrrIlM49PEak9oF93JEFoibqKL0F7w5DLM70/rosLOawerWZ3MlepQcl+EmHskOyw==" - }, - "dom-closest": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/dom-closest/-/dom-closest-0.2.0.tgz", - "integrity": "sha1-69n5HRvyLo1vR3h2u80+yQIWwM8=", - "requires": { - "dom-matches": ">=1.0.1" - } + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.10.4.tgz", + "integrity": "sha512-wytDzaru67AmqFOY4B9GUb/hrwWagezoYYK97D/vpK+ezg+cnuZO0Q2gltUPa7KfNmIqfRIYVCF8UhRDEHAmgQ==" }, "dom-converter": { "version": "0.2.0", @@ -4433,20 +4244,10 @@ "utila": "~0.4" } }, - "dom-matches": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-matches/-/dom-matches-2.0.0.tgz", - "integrity": "sha1-0nKLQWqHUzmA6wibhI0lPPI6dYw=" - }, - "dom-scroll-into-view": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/dom-scroll-into-view/-/dom-scroll-into-view-1.2.1.tgz", - "integrity": "sha1-6PNnMt0ImwIBqI14Fdw/iObWbH4=" - }, "dom-serializer": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.1.tgz", - "integrity": "sha512-sK3ujri04WyjwQXVoK4PU3y8ula1stq10GJZpqHIUgoGZdsGzAGu65BnU3d08aTVSvO7mGPZUc0wTEDL+qGE0Q==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", "requires": { "domelementtype": "^2.0.1", "entities": "^2.0.0" @@ -4486,9 +4287,9 @@ } }, "dompurify": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.7.tgz", - "integrity": "sha512-S3O0lk6rFJtO01ZTzMollCOGg+WAtCwS3U5E2WSDY/x/sy7q70RjEC4Dmrih5/UqzLLB9XoKJ8KqwBxaNvBu4A==" + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.8.tgz", + "integrity": "sha512-vIOSyOXkMx81ghEalh4MLBtDHMx1bhKlaqHDMqM2yeitJ996SLOk5mGdDpI9ifJAgokred8Rmu219fX4OltqXw==" }, "domutils": { "version": "1.7.0", @@ -4499,41 +4300,33 @@ "domelementtype": "1" } }, + "dot-case": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.3.tgz", + "integrity": "sha512-7hwEmg6RiSQfm/GwPL4AAWXKy3YNNZA3oFv2Pdiey0mwkRCPZ9x6SZbkLcn8Ma5PYeVokzoD4Twv2n7LKp5WeA==", + "requires": { + "no-case": "^3.0.3", + "tslib": "^1.10.0" + } + }, "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", + "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", "requires": { - "is-obj": "^1.0.0" + "is-obj": "^2.0.0" } }, "dotenv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", - "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==" + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" }, "dotenv-expand": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==" }, - "draft-js": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/draft-js/-/draft-js-0.10.5.tgz", - "integrity": "sha512-LE6jSCV9nkPhfVX2ggcRLA4FKs6zWq9ceuO/88BpXdNCS7mjRTgs0NsV6piUCJX9YxMsB9An33wnkMmU2sD2Zg==", - "requires": { - "fbjs": "^0.8.15", - "immutable": "~3.7.4", - "object-assign": "^4.1.0" - }, - "dependencies": { - "immutable": { - "version": "3.7.6", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz", - "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks=" - } - } - }, "duplexer": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", @@ -4565,14 +4358,14 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.296", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.296.tgz", - "integrity": "sha512-s5hv+TSJSVRsxH190De66YHb50pBGTweT9XGWYu/LMR20KX6TsjFzObo36CjVAzM+PUeeKSBRtm/mISlCzeojQ==" + "version": "1.3.365", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.365.tgz", + "integrity": "sha512-LQGbIvLWEOQ1xblY2pXxVoaAYd5T5h5f8m3h3hTEYonWY3Zrec0gy8TVz2tXdaUz+4qXwVThIbLvl/Dll3CdLQ==" }, "elliptic": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz", - "integrity": "sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", + "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -4589,14 +4382,14 @@ "integrity": "sha1-Bl4tvtaVm/RwZ57avq95gdEAOrY=" }, "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, "encode-3986": { "version": "1.0.0", @@ -4645,11 +4438,6 @@ } } }, - "enquire.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/enquire.js/-/enquire.js-2.1.6.tgz", - "integrity": "sha1-PoeAybi4NQhMP2DhZtvDwqPImBQ=" - }, "entities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", @@ -4672,26 +4460,37 @@ } }, "es-abstract": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz", - "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", + "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", "requires": { - "es-to-primitive": "^1.2.0", + "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.0", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-inspect": "^1.6.0", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", "object-keys": "^1.1.1", - "string.prototype.trimleft": "^2.1.0", - "string.prototype.trimright": "^2.1.0" + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + }, + "dependencies": { + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "requires": { + "has": "^1.0.3" + } + } } }, "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "requires": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -4749,28 +4548,21 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "escodegen": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.12.0.tgz", - "integrity": "sha512-TuA+EhsanGcme5T3R0L80u4t8CpbXQjegRmf7+FPTJrtCTErXFeelblRgHQa1FofEzqYYJmJ/OqjTwREp9qgmg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.1.tgz", + "integrity": "sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ==", "requires": { - "esprima": "^3.1.3", + "esprima": "^4.0.1", "estraverse": "^4.2.0", "esutils": "^2.0.2", "optionator": "^0.8.1", "source-map": "~0.6.1" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - } } }, "eslint": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.5.1.tgz", - "integrity": "sha512-32h99BoLYStT1iq1v2P9uwpyznQ4M2jRiFB6acitKz52Gqn+vPaMDUTB1bYi1WN4Nquj2w+t+bimYUG83DC55A==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", "requires": { "@babel/code-frame": "^7.0.0", "ajv": "^6.10.0", @@ -4779,19 +4571,19 @@ "debug": "^4.0.1", "doctrine": "^3.0.0", "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.2", + "eslint-utils": "^1.4.3", "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.1", + "espree": "^6.1.2", "esquery": "^1.0.1", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", - "globals": "^11.7.0", + "globals": "^12.1.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^6.4.1", + "inquirer": "^7.0.0", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", @@ -4800,7 +4592,7 @@ "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.2", + "optionator": "^0.8.3", "progress": "^2.0.0", "regexpp": "^2.0.1", "semver": "^6.1.2", @@ -4811,15 +4603,28 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { + "globals": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", + "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "requires": { + "type-fest": "^0.8.1" + } + }, "import-fresh": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", - "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" + }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -4828,20 +4633,20 @@ } }, "eslint-config-react-app": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-5.0.2.tgz", - "integrity": "sha512-VhlESAQM83uULJ9jsvcKxx2Ab0yrmjUt8kDz5DyhTQufqWE0ssAnejlWri5LXv25xoXfdqOyeDPdfJS9dXKagQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-5.2.0.tgz", + "integrity": "sha512-WrHjoGpKr1kLLiWDD81tme9jMM0hk5cMxasLSdyno6DdPt+IfLOrDJBVo6jN7tn4y1nzhs43TmUaZWO6Sf0blw==", "requires": { "confusing-browser-globals": "^1.0.9" } }, "eslint-import-resolver-node": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", - "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz", + "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==", "requires": { "debug": "^2.6.9", - "resolve": "^1.5.0" + "resolve": "^1.13.1" }, "dependencies": { "debug": { @@ -4860,44 +4665,23 @@ } }, "eslint-loader": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-3.0.2.tgz", - "integrity": "sha512-S5VnD+UpVY1PyYRqeBd/4pgsmkvSokbHqTXAQMpvCyRr3XN2tvSLo9spm2nEpqQqh9dezw3os/0zWihLeOg2Rw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-3.0.3.tgz", + "integrity": "sha512-+YRqB95PnNvxNp1HEjQmvf9KNvCin5HXYYseOXVC2U0KEcw4IkQ2IQEBG46j7+gW39bMzeu0GsUhVbBY3Votpw==", "requires": { "fs-extra": "^8.1.0", "loader-fs-cache": "^1.0.2", "loader-utils": "^1.2.3", - "object-hash": "^1.3.1", - "schema-utils": "^2.2.0" - }, - "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "schema-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.5.0.tgz", - "integrity": "sha512-32ISrwW2scPXHUSusP8qMg5dLUawKkyV+/qIEV9JdXKx+rsM6mi8vZY8khg2M69Qom16rtroWXD3Ybtiws38gQ==", - "requires": { - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1" - } - } + "object-hash": "^2.0.1", + "schema-utils": "^2.6.1" } }, "eslint-module-utils": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", - "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz", + "integrity": "sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q==", "requires": { - "debug": "^2.6.8", + "debug": "^2.6.9", "pkg-dir": "^2.0.0" }, "dependencies": { @@ -4963,29 +4747,30 @@ } }, "eslint-plugin-flowtype": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.13.0.tgz", - "integrity": "sha512-bhewp36P+t7cEV0b6OdmoRWJCBYRiHFlqPZAG1oS3SF+Y0LQkeDvFSM4oxoxvczD1OdONCXMlJfQFiWLcV9urw==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.6.0.tgz", + "integrity": "sha512-W5hLjpFfZyZsXfo5anlu7HM970JBDqbEshAJUkeczP6BFCIfJXuiIBQXyberLRtOStT0OGPF8efeTbxlHk4LpQ==", "requires": { "lodash": "^4.17.15" } }, "eslint-plugin-import": { - "version": "2.18.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", - "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.0.tgz", + "integrity": "sha512-NK42oA0mUc8Ngn4kONOPsPB1XhbUvNHqF+g307dPV28aknPoiNnKLFd9em4nkswwepdF5ouieqv5Th/63U7YJQ==", "requires": { "array-includes": "^3.0.3", + "array.prototype.flat": "^1.2.1", "contains-path": "^0.1.0", "debug": "^2.6.9", "doctrine": "1.5.0", "eslint-import-resolver-node": "^0.3.2", - "eslint-module-utils": "^2.4.0", + "eslint-module-utils": "^2.4.1", "has": "^1.0.3", "minimatch": "^3.0.4", "object.values": "^1.1.0", "read-pkg-up": "^2.0.0", - "resolve": "^1.11.0" + "resolve": "^1.12.0" }, "dependencies": { "debug": { @@ -5115,22 +4900,29 @@ "emoji-regex": "^7.0.2", "has": "^1.0.3", "jsx-ast-utils": "^2.2.1" + }, + "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + } } }, "eslint-plugin-react": { - "version": "7.14.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz", - "integrity": "sha512-EzdyyBWC4Uz2hPYBiEJrKCUi2Fn+BJ9B/pJQcjw5X+x/H2Nm59S4MJIvL4O5NEE0+WbnQwEBxWY03oUk+Bc3FA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.18.0.tgz", + "integrity": "sha512-p+PGoGeV4SaZRDsXqdj9OWcOrOpZn8gXoGPcIQTzo2IDMbAKhNDnME9myZWqO3Ic4R3YmwAZ1lDjWl2R2hMUVQ==", "requires": { - "array-includes": "^3.0.3", + "array-includes": "^3.1.1", "doctrine": "^2.1.0", "has": "^1.0.3", - "jsx-ast-utils": "^2.1.0", - "object.entries": "^1.1.0", - "object.fromentries": "^2.0.0", - "object.values": "^1.1.0", + "jsx-ast-utils": "^2.2.3", + "object.entries": "^1.1.1", + "object.fromentries": "^2.0.2", + "object.values": "^1.1.1", "prop-types": "^15.7.2", - "resolve": "^1.10.1" + "resolve": "^1.14.2" }, "dependencies": { "doctrine": { @@ -5171,12 +4963,12 @@ "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==" }, "espree": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", - "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.0.tgz", + "integrity": "sha512-Xs8airJ7RQolnDIbLtRutmfvSsAe0xqMMAantCN/GMoqf81TFbeI1T7Jpd56qYu1uuh32dOG5W/X9uO+ghPXzA==", "requires": { "acorn": "^7.1.0", - "acorn-jsx": "^5.1.0", + "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.1.0" } }, @@ -5186,9 +4978,9 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz", + "integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==", "requires": { "estraverse": "^4.0.0" } @@ -5230,15 +5022,10 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==" }, - "eventlistener": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/eventlistener/-/eventlistener-0.0.1.tgz", - "integrity": "sha1-7Suqu4UiJ68rz4iRUscsY8pTLrg=" - }, "events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", + "integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==" }, "eventsource": { "version": "1.0.7", @@ -5258,9 +5045,9 @@ } }, "exec-sh": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.2.tgz", - "integrity": "sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg==" + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.4.tgz", + "integrity": "sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A==" }, "execa": { "version": "1.0.0", @@ -5508,9 +5295,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" } } }, @@ -5520,9 +5307,9 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" }, "fast-glob": { "version": "2.2.7", @@ -5567,9 +5354,9 @@ } }, "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "fast-levenshtein": { "version": "2.0.6", @@ -5577,19 +5364,19 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, "faye-websocket": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", - "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", "requires": { "websocket-driver": ">=0.5.1" } }, "fb-watchman": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", - "integrity": "sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", + "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", "requires": { - "bser": "^2.0.0" + "bser": "2.1.1" } }, "fbjs": { @@ -5627,9 +5414,9 @@ "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==" }, "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "requires": { "escape-string-regexp": "^1.0.5" } @@ -5643,18 +5430,24 @@ } }, "file-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-3.0.1.tgz", - "integrity": "sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-4.3.0.tgz", + "integrity": "sha512-aKrYPYjF1yG3oX0kWRrqrSMfgftm7oJW5M+m4owoldH5C51C0RkIwB++JbRvEW3IU6/ZG5n8UvEcdgwOt2UOWA==", "requires": { - "loader-utils": "^1.0.2", - "schema-utils": "^1.0.0" + "loader-utils": "^1.2.3", + "schema-utils": "^2.5.0" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "optional": true + }, "filesize": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", - "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==" + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.0.1.tgz", + "integrity": "sha512-u4AYWPgbI5GBhs6id1KdImZWn5yfyFrrQ8OWZdN7ZMfA8Bf4HcO0BGo9bmUIEV8yrp8I1xVfJ/dn90GtFNNJcg==" }, "fill-range": { "version": "4.0.0", @@ -5740,9 +5533,9 @@ "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==" }, "flatten": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", - "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz", + "integrity": "sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==" }, "flush-write-stream": { "version": "1.1.1", @@ -5754,9 +5547,9 @@ } }, "follow-redirects": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", - "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.10.0.tgz", + "integrity": "sha512-4eyLK6s6lH32nOvLLwlIOnr9zrL8Sm+OvW4pVTJNoXeGzYIkHVf+pADQi+OJ0E67hiuSLezPVPyBcIZO50TmmQ==", "requires": { "debug": "^3.0.0" }, @@ -5790,13 +5583,13 @@ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "fork-ts-checker-webpack-plugin": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.5.0.tgz", - "integrity": "sha512-zEhg7Hz+KhZlBhILYpXy+Beu96gwvkROWJiTXOCyOOMMrdBIRPvsBpBqgTI4jfJGrJXcqGwJR8zsBGDmzY0jsA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-3.1.1.tgz", + "integrity": "sha512-DuVkPNrM12jR41KM2e+N+styka0EgLkTnXmNcXdgOM37vtGeY+oCBK/Jx0hzSeEU6memFCtWb4htrHPMDfwwUQ==", "requires": { "babel-code-frame": "^6.22.0", "chalk": "^2.4.1", - "chokidar": "^2.0.4", + "chokidar": "^3.3.0", "micromatch": "^3.1.10", "minimatch": "^3.0.4", "semver": "^5.6.0", @@ -5849,15 +5642,23 @@ } }, "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "requires": { - "graceful-fs": "^4.1.2", + "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "requires": { + "minipass": "^3.0.0" + } + }, "fs-write-stream-atomic": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", @@ -5875,9 +5676,9 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.0.7.tgz", - "integrity": "sha512-a7YT0SV3RB+DjYcppwVDLtn13UQnmg0SWZS7ezZD0UjnLwXmy8Zm21GMVGLaFGimIqcvyMQaOJBrop8MyOp1kQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", + "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", "optional": true }, "function-bind": { @@ -5890,15 +5691,20 @@ "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==" + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-own-enumerable-property-symbols": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.1.tgz", - "integrity": "sha512-09/VS4iek66Dh2bctjRkowueRJbY1JDGR1L/zRxO1Qk8Uxs6PnqaNSqalpizPT+CDjre3hnEsuzvhgomz9qYrA==" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==" }, "get-stream": { "version": "4.1.0", @@ -5922,9 +5728,9 @@ } }, "glob": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.5.tgz", - "integrity": "sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -5966,9 +5772,9 @@ }, "dependencies": { "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" } } }, @@ -6013,11 +5819,6 @@ "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=" }, - "gud": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", - "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==" - }, "gulp-header": { "version": "1.8.12", "resolved": "https://registry.npmjs.org/gulp-header/-/gulp-header-1.8.12.tgz", @@ -6054,17 +5855,6 @@ "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==" }, - "handlebars": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.1.tgz", - "integrity": "sha512-C29UoFzHe9yM61lOsIlCE5/mQVGrnIOrOq7maQl76L7tYPCgC1og0Ajt6uWnX4ZTxBPnjw+CUvawphwCfJgUnA==", - "requires": { - "neo-async": "^2.6.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - } - }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -6113,9 +5903,9 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" }, "has-value": { "version": "1.0.0", @@ -6185,17 +5975,14 @@ } }, "hoist-non-react-statics": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz", - "integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==", - "requires": { - "react-is": "^16.7.0" - } + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" }, "hosted-git-info": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", - "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==" + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==" }, "hpack.js": { "version": "2.1.6", @@ -6236,38 +6023,54 @@ "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" }, - "html-minifier": { - "version": "3.5.21", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz", - "integrity": "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==", + "html-escaper": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.0.tgz", + "integrity": "sha512-a4u9BeERWGu/S8JiWEAQcdrg9v4QArtP9keViQjGMdff20fBdd8waotXaNmODqBe6uZ3Nafi7K/ho4gCQHV3Ig==" + }, + "html-minifier-terser": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-5.0.4.tgz", + "integrity": "sha512-fHwmKQ+GzhlqdxEtwrqLT7MSuheiA+rif5/dZgbz3GjoMXJzcRzy1L9NXoiiyxrnap+q5guSiv8Tz5lrh9g42g==", "requires": { - "camel-case": "3.0.x", - "clean-css": "4.2.x", - "commander": "2.17.x", - "he": "1.2.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.4.x" + "camel-case": "^4.1.1", + "clean-css": "^4.2.3", + "commander": "^4.1.1", + "he": "^1.2.0", + "param-case": "^3.0.3", + "relateurl": "^0.2.7", + "terser": "^4.6.3" }, "dependencies": { "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" } } }, "html-webpack-plugin": { - "version": "4.0.0-beta.5", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.0.0-beta.5.tgz", - "integrity": "sha512-y5l4lGxOW3pz3xBTFdfB9rnnrWRPVxlAhX6nrBYIcW+2k2zC3mSp/3DxlWVCMBfnO6UAnoF8OcFn0IMy6kaKAQ==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.0.0-beta.11.tgz", + "integrity": "sha512-4Xzepf0qWxf8CGg7/WQM5qBB2Lc/NFI7MhU59eUDTkuQp3skZczH4UA1d6oQyDEIoMDgERVhRyTdtUPZ5s5HBg==", "requires": { - "html-minifier": "^3.5.20", - "loader-utils": "^1.1.0", - "lodash": "^4.17.11", + "html-minifier-terser": "^5.0.1", + "loader-utils": "^1.2.3", + "lodash": "^4.17.15", "pretty-error": "^2.1.1", - "tapable": "^1.1.0", + "tapable": "^1.1.3", "util.promisify": "1.0.0" + }, + "dependencies": { + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + } } }, "htmlparser2": { @@ -6289,9 +6092,9 @@ "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" }, "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -6373,11 +6176,6 @@ "safer-buffer": ">= 2.1.2 < 3" } }, - "icss-replace-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=" - }, "icss-utils": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-4.1.1.tgz", @@ -6458,6 +6256,11 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" + }, "indexes-of": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", @@ -6488,25 +6291,84 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "inquirer": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", - "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.5.tgz", + "integrity": "sha512-6Z5cP+LAO0rzNE7xWjWtT84jxKa5ScLEGLgegPXeO3dGeU8lNe5Ii7SlXH6KVtLGlDuaEhsvsFjrjWjw8j5lFg==", "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", + "ansi-escapes": "^4.2.1", + "chalk": "^3.0.0", + "cli-cursor": "^3.1.0", "cli-width": "^2.0.0", "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.5.3", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", "through": "^2.3.6" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "requires": { + "has-flag": "^4.0.0" + } + } } }, + "insert-css": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/insert-css/-/insert-css-2.0.0.tgz", + "integrity": "sha1-610Ql7dUL0x56jBg067gfQU4gPQ=" + }, "internal-ip": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", @@ -6540,9 +6402,9 @@ "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" }, "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" }, "is-absolute-url": { "version": "2.1.0", @@ -6568,11 +6430,11 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "requires": { - "binary-extensions": "^1.0.0" + "binary-extensions": "^2.0.0" } }, "is-buffer": { @@ -6581,9 +6443,9 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==" }, "is-ci": { "version": "2.0.0", @@ -6641,6 +6503,11 @@ "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" }, + "is-docker": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.0.0.tgz", + "integrity": "sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ==" + }, "is-dom": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-dom/-/is-dom-1.1.0.tgz", @@ -6661,9 +6528,9 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "is-generator-fn": { "version": "2.1.0", @@ -6687,9 +6554,9 @@ } }, "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" }, "is-object": { "version": "1.0.1", @@ -6697,24 +6564,24 @@ "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" }, "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==" }, "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", + "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", "requires": { - "is-path-inside": "^1.0.0" + "is-path-inside": "^2.1.0" } }, "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", + "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", "requires": { - "path-is-inside": "^1.0.1" + "path-is-inside": "^1.0.2" } }, "is-plain-obj": { @@ -6763,6 +6630,11 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" + }, "is-svg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", @@ -6772,11 +6644,11 @@ } }, "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "requires": { - "has-symbols": "^1.0.0" + "has-symbols": "^1.0.1" } }, "is-typedarray": { @@ -6900,11 +6772,11 @@ } }, "istanbul-reports": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", - "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz", + "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", "requires": { - "handlebars": "^4.1.2" + "html-escaper": "^2.0.0" } }, "jest": { @@ -7017,19 +6889,22 @@ } }, "jest-environment-jsdom-fourteen": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom-fourteen/-/jest-environment-jsdom-fourteen-0.1.0.tgz", - "integrity": "sha512-4vtoRMg7jAstitRzL4nbw83VmGH8Rs13wrND3Ud2o1fczDhMUF32iIrNKwYGgeOPUdfvZU4oy8Bbv+ni1fgVCA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom-fourteen/-/jest-environment-jsdom-fourteen-1.0.1.tgz", + "integrity": "sha512-DojMX1sY+at5Ep+O9yME34CdidZnO3/zfPh8UW+918C5fIZET5vCjfkegixmsi7AtdYfkr4bPlIzmWnlvQkP7Q==", "requires": { - "jest-mock": "^24.5.0", - "jest-util": "^24.5.0", - "jsdom": "^14.0.0" + "@jest/environment": "^24.3.0", + "@jest/fake-timers": "^24.3.0", + "@jest/types": "^24.3.0", + "jest-mock": "^24.0.0", + "jest-util": "^24.0.0", + "jsdom": "^14.1.0" }, "dependencies": { "acorn": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", - "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==" + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", + "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==" }, "jsdom": { "version": "14.1.0", @@ -7126,13 +7001,14 @@ }, "dependencies": { "fsevents": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", - "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", + "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", "optional": true, "requires": { + "bindings": "^1.5.0", "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" + "node-pre-gyp": "*" }, "dependencies": { "abbrev": { @@ -7174,7 +7050,7 @@ } }, "chownr": { - "version": "1.1.1", + "version": "1.1.3", "bundled": true, "optional": true }, @@ -7199,7 +7075,7 @@ "optional": true }, "debug": { - "version": "4.1.1", + "version": "3.2.6", "bundled": true, "optional": true, "requires": { @@ -7222,11 +7098,11 @@ "optional": true }, "fs-minipass": { - "version": "1.2.5", + "version": "1.2.7", "bundled": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "^2.6.0" } }, "fs.realpath": { @@ -7250,7 +7126,7 @@ } }, "glob": { - "version": "7.1.3", + "version": "7.1.6", "bundled": true, "optional": true, "requires": { @@ -7276,7 +7152,7 @@ } }, "ignore-walk": { - "version": "3.0.1", + "version": "3.0.3", "bundled": true, "optional": true, "requires": { @@ -7293,7 +7169,7 @@ } }, "inherits": { - "version": "2.0.3", + "version": "2.0.4", "bundled": true, "optional": true }, @@ -7329,7 +7205,7 @@ "optional": true }, "minipass": { - "version": "2.3.5", + "version": "2.9.0", "bundled": true, "optional": true, "requires": { @@ -7338,11 +7214,11 @@ } }, "minizlib": { - "version": "1.2.1", + "version": "1.3.3", "bundled": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "^2.9.0" } }, "mkdirp": { @@ -7354,22 +7230,22 @@ } }, "ms": { - "version": "2.1.1", + "version": "2.1.2", "bundled": true, "optional": true }, "needle": { - "version": "2.3.0", + "version": "2.4.0", "bundled": true, "optional": true, "requires": { - "debug": "^4.1.0", + "debug": "^3.2.6", "iconv-lite": "^0.4.4", "sax": "^1.2.4" } }, "node-pre-gyp": { - "version": "0.12.0", + "version": "0.14.0", "bundled": true, "optional": true, "requires": { @@ -7382,7 +7258,7 @@ "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", - "tar": "^4" + "tar": "^4.4.2" } }, "nopt": { @@ -7395,12 +7271,20 @@ } }, "npm-bundled": { - "version": "1.0.6", + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", "bundled": true, "optional": true }, "npm-packlist": { - "version": "1.4.1", + "version": "1.4.7", "bundled": true, "optional": true, "requires": { @@ -7462,7 +7346,7 @@ "optional": true }, "process-nextick-args": { - "version": "2.0.0", + "version": "2.0.1", "bundled": true, "optional": true }, @@ -7499,7 +7383,7 @@ } }, "rimraf": { - "version": "2.6.3", + "version": "2.7.1", "bundled": true, "optional": true, "requires": { @@ -7522,7 +7406,7 @@ "optional": true }, "semver": { - "version": "5.7.0", + "version": "5.7.1", "bundled": true, "optional": true }, @@ -7568,17 +7452,17 @@ "optional": true }, "tar": { - "version": "4.4.8", + "version": "4.4.13", "bundled": true, "optional": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" } }, "util-deprecate": { @@ -7600,7 +7484,7 @@ "optional": true }, "yallist": { - "version": "3.0.3", + "version": "3.1.1", "bundled": true, "optional": true } @@ -7827,26 +7711,19 @@ } }, "jest-watch-typeahead": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/jest-watch-typeahead/-/jest-watch-typeahead-0.4.0.tgz", - "integrity": "sha512-bJR/HPNgOQnkmttg1OkBIrYFAYuxFxExtgQh67N2qPvaWGVC8TCkedRNPKBfmZfVXFD3u2sCH+9OuS5ApBfCgA==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/jest-watch-typeahead/-/jest-watch-typeahead-0.4.2.tgz", + "integrity": "sha512-f7VpLebTdaXs81rg/oj4Vg/ObZy2QtGzAmGLNsqUS5G5KtSN68tFcIsbvNODfNyQxU78g7D8x77o3bgfBTR+2Q==", "requires": { "ansi-escapes": "^4.2.1", "chalk": "^2.4.1", + "jest-regex-util": "^24.9.0", "jest-watcher": "^24.3.0", "slash": "^3.0.0", "string-length": "^3.1.0", "strip-ansi": "^5.0.0" }, "dependencies": { - "ansi-escapes": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.2.1.tgz", - "integrity": "sha512-Cg3ymMAdN10wOk/VYfLV7KCQyv7EDirJ64500sU7n9UlmioEtDuU5Gd+hj73hXSU/ex7tHJSssmyftDdkMLO8Q==", - "requires": { - "type-fest": "^0.5.2" - } - }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -7875,6 +7752,13 @@ "chalk": "^2.0.1", "jest-util": "^24.9.0", "string-length": "^2.0.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==" + } } }, "jest-worker": { @@ -7897,14 +7781,9 @@ } }, "js-file-download": { - "version": "0.4.8", - "resolved": "https://registry.npmjs.org/js-file-download/-/js-file-download-0.4.8.tgz", - "integrity": "sha512-8xygX/IkjQbr/2nWqJnyc0IWOMvA1R/78HQVyexB22YZDBAEz2MG59s+ieLFKOkDFzyDDk3bezKXEjyGW5HPCw==" - }, - "js-levenshtein": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", - "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==" + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/js-file-download/-/js-file-download-0.4.10.tgz", + "integrity": "sha512-kX4J3mEFdiQ1w4YarrO940hpwuEhxcpzL5FZoA3WLR3D+/FPJtu04I7PesC4nJDdrQYM6xeckBiULGUxvxZluQ==" }, "js-tokens": { "version": "4.0.0", @@ -8107,6 +7986,14 @@ "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==" }, + "levenary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", + "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", + "requires": { + "leven": "^3.1.0" + } + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -8116,6 +8003,11 @@ "type-check": "~0.3.2" } }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" + }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -8179,12 +8071,12 @@ "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==" }, "loader-utils": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", - "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", "requires": { "big.js": "^5.2.2", - "emojis-list": "^2.0.0", + "emojis-list": "^3.0.0", "json5": "^1.0.1" }, "dependencies": { @@ -8217,11 +8109,6 @@ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.15.tgz", "integrity": "sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==" }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=" - }, "lodash._reinterpolate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", @@ -8232,26 +8119,6 @@ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=" - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=" - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -8279,25 +8146,15 @@ "lodash._reinterpolate": "^3.0.0" } }, - "lodash.throttle": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", - "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=" - }, - "lodash.unescape": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", - "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=" - }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" }, "loglevel": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.4.tgz", - "integrity": "sha512-p0b6mOGKcGa+7nnmKbpzR6qloPbrgLcnio++E+14Vo/XffOGwZtRpUhr8dTH/x2oCMmEoIU0Zwm3ZauhvYD17g==" + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.7.tgz", + "integrity": "sha512-cY2eLFrQSAfVPhCgH1s7JI73tMbg9YC3v3+ZHVW67sBS7UxWzNEk/ZBbSfLykBWHp33dqqtOv82gjhKEi81T/A==" }, "loose-envify": { "version": "1.4.0", @@ -8308,9 +8165,12 @@ } }, "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.1.tgz", + "integrity": "sha512-LiWgfDLLb1dwbFQZsSglpRj+1ctGnayXz3Uv0/WO8n558JycT5fg6zkNcnW0G68Nn0aEldTFeEfmjCfmqry/rQ==", + "requires": { + "tslib": "^1.10.0" + } }, "lru-cache": { "version": "5.1.1", @@ -8318,6 +8178,13 @@ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "requires": { "yallist": "^3.0.2" + }, + "dependencies": { + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + } } }, "lru-queue": { @@ -8411,13 +8278,6 @@ "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", "p-is-promise": "^2.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" - } } }, "memoizee": { @@ -8500,9 +8360,9 @@ }, "dependencies": { "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" } } }, @@ -8534,19 +8394,31 @@ } }, "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, "mini-css-extract-plugin": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.8.0.tgz", - "integrity": "sha512-MNpRGbNA52q6U92i0qbVpQNsgk7LExy41MdAlG84FeytfDOtRIf/mCHdEgG8rpTKOaNKiqUnZdlptF469hxqOw==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz", + "integrity": "sha512-lp3GeY7ygcgAmVIcRPBVhIkf8Us7FZjA+ILpal44qLdSu11wmjKQ3d9k15lfD7pO4esu9eUIAW7qiYIBppv40A==", "requires": { "loader-utils": "^1.1.0", "normalize-url": "1.9.1", "schema-utils": "^1.0.0", "webpack-sources": "^1.1.0" + }, + "dependencies": { + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } } }, "mini-store": { @@ -8558,13 +8430,6 @@ "prop-types": "^15.6.0", "react-lifecycles-compat": "^3.0.4", "shallowequal": "^1.0.2" - }, - "dependencies": { - "hoist-non-react-statics": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", - "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" - } } }, "minimalistic-assert": { @@ -8590,6 +8455,38 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, + "minipass": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.1.tgz", + "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==", + "requires": { + "yallist": "^4.0.0" + } + }, + "minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-pipeline": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.2.tgz", + "integrity": "sha512-3JS5A2DKhD2g0Gg8x3yamO0pj7YeKGwVlDS90pF++kxptwx/F+B//roxf9SqYil5tQo65bijy+dAuAFZmYOouA==", + "requires": { + "minipass": "^3.0.0" + } + }, "mississippi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", @@ -8694,15 +8591,10 @@ "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=" }, - "mutationobserver-shim": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/mutationobserver-shim/-/mutationobserver-shim-0.3.3.tgz", - "integrity": "sha512-gciOLNN8Vsf7YzcqRjKzlAJ6y7e+B86u7i3KXes0xfxx/nfLmozlW1Vn+Sc9x3tPIePFgc1AeIFhtRgkqTjzDQ==" - }, "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" }, "nan": { "version": "2.14.0", @@ -8729,9 +8621,9 @@ }, "dependencies": { "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" } } }, @@ -8761,11 +8653,12 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.3.tgz", + "integrity": "sha512-ehY/mVQCf9BL0gKfsJBvFJen+1V//U+0HQMPrWct40ixE4jnv0bfvxDbWtAHL9EcaPEOJHVVYKoQn1TlZUB8Tw==", "requires": { - "lower-case": "^1.1.1" + "lower-case": "^2.0.1", + "tslib": "^1.10.0" } }, "node-fetch": { @@ -8862,9 +8755,9 @@ } }, "node-releases": { - "version": "1.1.39", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.39.tgz", - "integrity": "sha512-8MRC/ErwNCHOlAFycy9OPca46fQYUjbJRDcZTHVWIGXIjYLM73k70vv3WkYutVnM4cCo4hE0MqBVVZjP6vjISA==", + "version": "1.1.50", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.50.tgz", + "integrity": "sha512-lgAmPv9eYZ0bGwUYAKlr8MG6K4CvWliWqnkcT2P8mMAgVrH3lqfBPorFlxiG1pHQnqmavJZ9vbMXUTNyMLbrgQ==", "requires": { "semver": "^6.3.0" } @@ -8938,9 +8831,9 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nwsapi": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.4.tgz", - "integrity": "sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==" }, "oauth-sign": { "version": "0.9.0", @@ -8973,14 +8866,14 @@ } }, "object-hash": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", - "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.3.tgz", + "integrity": "sha512-JPKn0GMu+Fa3zt3Bmr66JhokJU5BaNBIh4ZeTlaCBzrBsOeXzwcKKAK1tbLiPKgvwmPXsDvvLHoWh5Bm7ofIYg==" }, "object-inspect": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", - "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==" + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==" }, "object-is": { "version": "1.0.1", @@ -9017,34 +8910,34 @@ } }, "object.entries": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.0.tgz", - "integrity": "sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.1.tgz", + "integrity": "sha512-ilqR7BgdyZetJutmDPfXCDffGa0/Yzl2ivVNpbx/g4UeWrCdRnFDUBrKJGLhGieRHDATnyZXWBeCb29k9CJysQ==", "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.12.0", + "es-abstract": "^1.17.0-next.1", "function-bind": "^1.1.1", "has": "^1.0.3" } }, "object.fromentries": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.1.tgz", - "integrity": "sha512-PUQv8Hbg3j2QX0IQYv3iAGCbGcu4yY4KQ92/dhA4sFSixBmSmp13UpDLs6jGK8rBtbmhNNIK99LD2k293jpiGA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.2.tgz", + "integrity": "sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ==", "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.15.0", + "es-abstract": "^1.17.0-next.1", "function-bind": "^1.1.1", "has": "^1.0.3" } }, "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" } }, "object.pick": { @@ -9056,12 +8949,12 @@ } }, "object.values": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", - "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", + "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.12.0", + "es-abstract": "^1.17.0-next.1", "function-bind": "^1.1.1", "has": "^1.0.3" } @@ -9101,19 +8994,27 @@ } }, "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "^2.1.0" } }, "open": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz", - "integrity": "sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.0.2.tgz", + "integrity": "sha512-70E/pFTPr7nZ9nLDPNTcj3IVqnNvKuP4VsBmoKV9YGTnChe0mlS3C4qM7qKarhZ8rGaHKLfo+vBTHXDp6ZSyLQ==", "requires": { - "is-wsl": "^1.1.0" + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "dependencies": { + "is-wsl": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.1.1.tgz", + "integrity": "sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog==" + } } }, "opn": { @@ -9124,27 +9025,6 @@ "is-wsl": "^1.1.0" } }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" - } - } - }, "optimize-css-assets-webpack-plugin": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.3.tgz", @@ -9155,16 +9035,16 @@ } }, "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "requires": { "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", + "fast-levenshtein": "~2.0.6", "levn": "~0.3.0", "prelude-ls": "~1.1.2", "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "word-wrap": "~1.2.3" } }, "original": { @@ -9219,9 +9099,9 @@ "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" }, "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", "requires": { "p-try": "^2.0.0" } @@ -9235,24 +9115,35 @@ } }, "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "requires": { + "aggregate-error": "^3.0.0" + } }, "p-reduce": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=" }, + "p-retry": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", + "integrity": "sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==", + "requires": { + "retry": "^0.12.0" + } + }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, "parallel-transform": { "version": "1.2.0", @@ -9265,11 +9156,12 @@ } }, "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.3.tgz", + "integrity": "sha512-VWBVyimc1+QrzappRs7waeN2YmoZFCGXWASRYX1/rGHtXqEcrGEIDm+jqIwFa2fRXNgQEwrxaYuIrX0WcAguTA==", "requires": { - "no-case": "^2.2.0" + "dot-case": "^3.0.3", + "tslib": "^1.10.0" } }, "parent-module": { @@ -9319,6 +9211,15 @@ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, + "pascal-case": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.1.tgz", + "integrity": "sha512-XIeHKqIrsquVTQL2crjq3NfJUxmdLasn3TYOU0VBM+UX2a6ztAWBlJQBePLGY7VHW8+2dRadeIPK5+KImwTxQA==", + "requires": { + "no-case": "^3.0.3", + "tslib": "^1.10.0" + } + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -9389,6 +9290,11 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "picomatch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", + "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==" + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -9424,51 +9330,11 @@ } }, "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", + "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", "requires": { - "find-up": "^2.1.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - } + "find-up": "^3.0.0" } }, "pn": { @@ -9477,9 +9343,9 @@ "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==" }, "pnp-webpack-plugin": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.5.0.tgz", - "integrity": "sha512-jd9olUr9D7do+RN8Wspzhpxhgp1n6Vd0NtQ4SFkmIACZoEL1nkyAdW9Ygrinjec0vgDcWjscFQQ1gDW8rsfKTg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.0.tgz", + "integrity": "sha512-ZcMGn/xF/fCOq+9kWMP9vVVxjIkMCja72oy3lziR7UHy0hHFZ57iVpQ71OtveVbmzeCmphBg8pxNdk/hlK99aQ==", "requires": { "ts-pnp": "^1.1.2" } @@ -9510,9 +9376,9 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss": { - "version": "7.0.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.21.tgz", - "integrity": "sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ==", + "version": "7.0.27", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.27.tgz", + "integrity": "sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ==", "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -9530,65 +9396,30 @@ } }, "postcss-attribute-case-insensitive": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-4.0.1.tgz", - "integrity": "sha512-L2YKB3vF4PetdTIthQVeT+7YiSzMoNMLLYxPXXppOOP7NoazEAy45sh2LvJ8leCQjfBcfkYQs8TtCcQjeZTp8A==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-4.0.2.tgz", + "integrity": "sha512-clkFxk/9pcdb4Vkn0hAHq3YnxBQ2p0CGD1dy24jN+reBck+EWxMbxSUqN4Yj7t0w8csl87K6p0gxBe1utkJsYA==", "requires": { "postcss": "^7.0.2", - "postcss-selector-parser": "^5.0.0" - }, - "dependencies": { - "cssesc": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz", - "integrity": "sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==" - }, - "postcss-selector-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz", - "integrity": "sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ==", - "requires": { - "cssesc": "^2.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } + "postcss-selector-parser": "^6.0.2" } }, "postcss-browser-comments": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-browser-comments/-/postcss-browser-comments-2.0.0.tgz", - "integrity": "sha512-xGG0UvoxwBc4Yx4JX3gc0RuDl1kc4bVihCzzk6UC72YPfq5fu3c717Nu8Un3nvnq1BJ31gBnFXIG/OaUTnpHgA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-browser-comments/-/postcss-browser-comments-3.0.0.tgz", + "integrity": "sha512-qfVjLfq7HFd2e0HW4s1dvU8X080OZdG46fFbIBFjW7US7YPDcWfRvdElvwMJr2LI6hMmD+7LnH2HcmXTs+uOig==", "requires": { - "postcss": "^7.0.2" + "postcss": "^7" } }, "postcss-calc": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.1.tgz", - "integrity": "sha512-oXqx0m6tb4N3JGdmeMSc/i91KppbYsFZKdH0xMOqK8V1rJlzrKlTdokz8ozUXLVejydRN6u2IddxpcijRj2FqQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.2.tgz", + "integrity": "sha512-rofZFHUg6ZIrvRwPeFktv06GdbDYLcGqh9EwiMutZg+a0oePCCw1zHOEiji6LCpyRcjTREtPASuUqeAvYlEVvQ==", "requires": { - "css-unit-converter": "^1.1.1", - "postcss": "^7.0.5", - "postcss-selector-parser": "^5.0.0-rc.4", - "postcss-value-parser": "^3.3.1" - }, - "dependencies": { - "cssesc": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz", - "integrity": "sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==" - }, - "postcss-selector-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz", - "integrity": "sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ==", - "requires": { - "cssesc": "^2.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } + "postcss": "^7.0.27", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.2" } }, "postcss-color-functional-notation": { @@ -9648,6 +9479,13 @@ "has": "^1.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-convert-values": { @@ -9657,6 +9495,13 @@ "requires": { "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-custom-media": { @@ -9828,9 +9673,9 @@ } }, "postcss-initial": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/postcss-initial/-/postcss-initial-3.0.1.tgz", - "integrity": "sha512-I2Sz83ZSHybMNh02xQDK609lZ1/QOyYeuizCjzEhlMgeV/HcDJapQiH4yTqLjZss0X6/6VvKFXUeObaHpJoINw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/postcss-initial/-/postcss-initial-3.0.2.tgz", + "integrity": "sha512-ugA2wKonC0xeNHgirR4D3VWHs2JcU08WAi1KFLVcnb7IN89phID6Qtg2RIctWbnvp1TM2BOmDtX8GGLCKdR8YA==", "requires": { "lodash.template": "^4.5.0", "postcss": "^7.0.2" @@ -9864,6 +9709,18 @@ "postcss": "^7.0.0", "postcss-load-config": "^2.0.0", "schema-utils": "^1.0.0" + }, + "dependencies": { + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } } }, "postcss-logical": { @@ -9891,6 +9748,13 @@ "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0", "stylehacks": "^4.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-merge-rules": { @@ -9907,11 +9771,11 @@ }, "dependencies": { "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", "requires": { - "dot-prop": "^4.1.1", + "dot-prop": "^5.2.0", "indexes-of": "^1.0.1", "uniq": "^1.0.1" } @@ -9925,6 +9789,13 @@ "requires": { "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-minify-gradients": { @@ -9936,6 +9807,13 @@ "is-color-stop": "^1.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-minify-params": { @@ -9949,6 +9827,13 @@ "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0", "uniqs": "^2.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-minify-selectors": { @@ -9963,11 +9848,11 @@ }, "dependencies": { "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", "requires": { - "dot-prop": "^4.1.1", + "dot-prop": "^5.2.0", "indexes-of": "^1.0.1", "uniq": "^1.0.1" } @@ -9983,30 +9868,31 @@ } }, "postcss-modules-local-by-default": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-2.0.6.tgz", - "integrity": "sha512-oLUV5YNkeIBa0yQl7EYnxMgy4N6noxmiwZStaEJUSe2xPMcdNc8WmBQuQCx18H5psYbVxz8zoHk0RAAYZXP9gA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.2.tgz", + "integrity": "sha512-jM/V8eqM4oJ/22j0gx4jrp63GSvDH6v86OqyTHHUvk4/k1vceipZsaymiZ5PvocqZOl5SFHiFJqjs3la0wnfIQ==", "requires": { - "postcss": "^7.0.6", - "postcss-selector-parser": "^6.0.0", - "postcss-value-parser": "^3.3.1" + "icss-utils": "^4.1.1", + "postcss": "^7.0.16", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.0" } }, "postcss-modules-scope": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.1.0.tgz", - "integrity": "sha512-91Rjps0JnmtUB0cujlc8KIKCsJXWjzuxGeT/+Q2i2HXKZ7nBUeF9YQTZZTNvHVoNYj1AthsjnGLtqDUE0Op79A==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.1.1.tgz", + "integrity": "sha512-OXRUPecnHCg8b9xWvldG/jUpRIGPNRka0r4D4j0ESUU2/5IOnpsjfPPmDprM3Ih8CgZ8FXjWqaniK5v4rWt3oQ==", "requires": { "postcss": "^7.0.6", "postcss-selector-parser": "^6.0.0" } }, "postcss-modules-values": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-2.0.0.tgz", - "integrity": "sha512-Ki7JZa7ff1N3EIMlPnGTZfUMe69FFwiQPnVSXC9mnn3jozCRBYIxiZd44yJOV2AmabOo4qFf8s0dC/+lweG7+w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz", + "integrity": "sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg==", "requires": { - "icss-replace-symbols": "^1.1.0", + "icss-utils": "^4.0.0", "postcss": "^7.0.6" } }, @@ -10019,14 +9905,15 @@ } }, "postcss-normalize": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize/-/postcss-normalize-7.0.1.tgz", - "integrity": "sha512-NOp1fwrG+6kVXWo7P9SizCHX6QvioxFD/hZcI2MLxPmVnFJFC0j0DDpIuNw2tUDeCFMni59gCVgeJ1/hYhj2OQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize/-/postcss-normalize-8.0.1.tgz", + "integrity": "sha512-rt9JMS/m9FHIRroDDBGSMsyW1c0fkvOJPy62ggxSHUldJO7B195TqFMqIf+lY5ezpDcYOV4j86aUp3/XbxzCCQ==", "requires": { - "@csstools/normalize.css": "^9.0.1", - "browserslist": "^4.1.1", - "postcss": "^7.0.2", - "postcss-browser-comments": "^2.0.0" + "@csstools/normalize.css": "^10.1.0", + "browserslist": "^4.6.2", + "postcss": "^7.0.17", + "postcss-browser-comments": "^3.0.0", + "sanitize.css": "^10.0.0" } }, "postcss-normalize-charset": { @@ -10045,6 +9932,13 @@ "cssnano-util-get-match": "^4.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-normalize-positions": { @@ -10056,6 +9950,13 @@ "has": "^1.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-normalize-repeat-style": { @@ -10067,6 +9968,13 @@ "cssnano-util-get-match": "^4.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-normalize-string": { @@ -10077,6 +9985,13 @@ "has": "^1.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-normalize-timing-functions": { @@ -10087,6 +10002,13 @@ "cssnano-util-get-match": "^4.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-normalize-unicode": { @@ -10097,6 +10019,13 @@ "browserslist": "^4.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-normalize-url": { @@ -10114,6 +10043,11 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==" + }, + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" } } }, @@ -10124,6 +10058,13 @@ "requires": { "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-ordered-values": { @@ -10134,6 +10075,13 @@ "cssnano-util-get-arguments": "^4.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-overflow-shorthand": { @@ -10251,6 +10199,13 @@ "has": "^1.0.0", "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-replace-overflow-wrap": { @@ -10306,6 +10261,13 @@ "postcss": "^7.0.0", "postcss-value-parser": "^3.0.0", "svgo": "^1.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + } } }, "postcss-unique-selectors": { @@ -10319,9 +10281,9 @@ } }, "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz", + "integrity": "sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg==" }, "postcss-values-parser": { "version": "2.0.1", @@ -10396,9 +10358,9 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, "promise": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/promise/-/promise-8.0.3.tgz", - "integrity": "sha512-HeRDUL1RJiLhyA0/grn+PTShlBAcLuh/1BJGtrvjwbvRDCTLLMEz9rOGCV+R3vHY4MixIuoMEd9Yq/XvsTPcjw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", + "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", "requires": { "asap": "~2.0.6" } @@ -10409,12 +10371,12 @@ "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" }, "prompts": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.2.1.tgz", - "integrity": "sha512-VObPvJiWPhpZI6C5m60XOzTfnYg/xc/an+r9VYymj9WJW3B/DIH+REzjpAACPf8brwPeP+7vz3bIim3S+AaMjw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.3.1.tgz", + "integrity": "sha512-qIP2lQyCwYbdzcqHIUi2HAxiWixhoM9OdLCWf8txXsapC/X9YdsCoeyRIXE/GP+Q0J37Q7+XN/MFqbUa7IzXNA==", "requires": { "kleur": "^3.0.3", - "sisteransi": "^1.0.3" + "sisteransi": "^1.0.4" } }, "prop-types": { @@ -10428,12 +10390,12 @@ } }, "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", "requires": { "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" + "ipaddr.js": "1.9.1" } }, "prr": { @@ -10442,9 +10404,9 @@ "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" }, "psl": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.4.0.tgz", - "integrity": "sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==" + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz", + "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==" }, "public-encrypt": { "version": "4.0.3", @@ -10582,55 +10544,38 @@ } }, "rc-align": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/rc-align/-/rc-align-2.4.5.tgz", - "integrity": "sha512-nv9wYUYdfyfK+qskThf4BQUSIadeI/dCsfaMZfNEoxm9HwOIioQ+LyqmMK6jWHAZQgOzMLaqawhuBXlF63vgjw==", + "version": "3.0.0-rc.1", + "resolved": "https://registry.npmjs.org/rc-align/-/rc-align-3.0.0-rc.1.tgz", + "integrity": "sha512-GbofumhCUb7SxP410j/fbtR2M9Zml+eoZSdaliZh6R3NhfEj5zP4jcO3HG3S9C9KIcXQQtd/cwVHkb9Y0KU7Hg==", "requires": { - "babel-runtime": "^6.26.0", + "classnames": "2.x", "dom-align": "^1.7.0", - "prop-types": "^15.5.8", - "rc-util": "^4.0.4" + "rc-util": "^4.12.0", + "resize-observer-polyfill": "^1.5.1" } }, "rc-animate": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/rc-animate/-/rc-animate-2.10.1.tgz", - "integrity": "sha512-yfP3g5fNf8wB5eh85nim2IGrqNu5u7TKrrSh710+1vlUqZvnI2R5YHK99IBCQNgkLCAWjT0sHtkcYdynjly39w==", + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/rc-animate/-/rc-animate-2.10.3.tgz", + "integrity": "sha512-A9qQ5Y8BLlM7EhuCO3fWb/dChndlbWtY/P5QvPqBU7h4r5Q2QsvsbpTGgdYZATRDZbTRnJXXfVk9UtlyS7MBLg==", "requires": { "babel-runtime": "6.x", "classnames": "^2.2.6", "css-animation": "^1.3.2", "prop-types": "15.x", "raf": "^3.4.0", - "rc-util": "^4.8.0", - "react-lifecycles-compat": "^3.0.4" - } - }, - "rc-calendar": { - "version": "9.15.6", - "resolved": "https://registry.npmjs.org/rc-calendar/-/rc-calendar-9.15.6.tgz", - "integrity": "sha512-TJD4cUXsBAjyCzo7BaGb86nZyJetBUt/Rpu0H1WWhp9AJc+Tl7aj7TCD3TM5Y8Ak/yxsA8WDBMuKw1XdQMsM5g==", - "requires": { - "babel-runtime": "6.x", - "classnames": "2.x", - "moment": "2.x", - "prop-types": "^15.5.8", - "rc-trigger": "^2.2.0", - "rc-util": "^4.1.1", + "rc-util": "^4.15.3", "react-lifecycles-compat": "^3.0.4" } }, "rc-cascader": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/rc-cascader/-/rc-cascader-0.17.5.tgz", - "integrity": "sha512-WYMVcxU0+Lj+xLr4YYH0+yXODumvNXDcVEs5i7L1mtpWwYkubPV/zbQpn+jGKFCIW/hOhjkU4J1db8/P/UKE7A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rc-cascader/-/rc-cascader-1.0.1.tgz", + "integrity": "sha512-3mk33+YKJBP1XSrTYbdVLuCC73rUDq5STNALhvua5i8vyIgIxtb5fSl96JdWWq1Oj8tIBoHnCgoEoOYnIXkthQ==", "requires": { "array-tree-filter": "^2.1.0", - "prop-types": "^15.5.8", - "rc-trigger": "^2.2.0", + "rc-trigger": "^4.0.0", "rc-util": "^4.0.4", - "react-lifecycles-compat": "^3.0.4", - "shallow-equal": "^1.0.0", "warning": "^4.0.1" } }, @@ -10646,9 +10591,9 @@ } }, "rc-collapse": { - "version": "1.11.7", - "resolved": "https://registry.npmjs.org/rc-collapse/-/rc-collapse-1.11.7.tgz", - "integrity": "sha512-ge3EEzIFtrDGuPX4bxXdQqwb91JnPIdj3B+FU88yNOUeOroNuA2q9kVK+UatpQ1Eft5hNo/ICTDrVFi8+685ng==", + "version": "1.11.8", + "resolved": "https://registry.npmjs.org/rc-collapse/-/rc-collapse-1.11.8.tgz", + "integrity": "sha512-8EhfPyScTYljkbRuIoHniSwZagD5UPpZ3CToYgoNYWC85L2qCbPYF7+OaC713FOrIkp6NbfNqXsITNxmDAmxog==", "requires": { "classnames": "2.x", "css-animation": "1.x", @@ -10660,85 +10605,43 @@ } }, "rc-dialog": { - "version": "7.5.12", - "resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-7.5.12.tgz", - "integrity": "sha512-FsZQfHBXYjBwuxUN9Cd+0n7YRSyemDtRJ9jX2a1HvIf4ajBJK9WVUiWm2+K1vZBZOciA+jm6gQETqyXzDKnwzQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-7.6.0.tgz", + "integrity": "sha512-N48vBPW8I53WycFHI4KXhuTUkB4mx+hixq1a9tcFMLoE7EhkAjbHvs0vGg+Bh/uFg5V00jmZBgQOIEbhcNal/A==", "requires": { "babel-runtime": "6.x", "rc-animate": "2.x", - "rc-util": "^4.8.1" + "rc-util": "^4.16.1" } }, "rc-drawer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rc-drawer/-/rc-drawer-3.0.2.tgz", - "integrity": "sha512-oPScGXB/8/ov9gEFLxPH8RBv/9jLTZboZtyF/GgrrnCAvbFwUxXdELH6n6XIowmuDKKvTGIMgZdnao0T46Yv3A==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/rc-drawer/-/rc-drawer-3.1.3.tgz", + "integrity": "sha512-2z+RdxmzXyZde/1OhVMfDR1e/GBswFeWSZ7FS3Fdd0qhgVdpV1wSzILzzxRaT481ItB5hOV+e8pZT07vdJE8kg==", "requires": { - "babel-runtime": "^6.26.0", "classnames": "^2.2.6", - "rc-util": "^4.11.2", + "rc-util": "^4.16.1", "react-lifecycles-compat": "^3.0.4" } }, "rc-dropdown": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/rc-dropdown/-/rc-dropdown-2.4.1.tgz", - "integrity": "sha512-p0XYn0wrOpAZ2fUGE6YJ6U8JBNc5ASijznZ6dkojdaEfQJAeZtV9KMEewhxkVlxGSbbdXe10ptjBlTEW9vEwEg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/rc-dropdown/-/rc-dropdown-3.0.1.tgz", + "integrity": "sha512-TbfTvJwFAaP1vPX/A/uxS07vbn2OqbHak9KJIL6Tdb0sV+sFXaIRo0udJixljkplbgPkLiasy8Xqnk1MGMfa0Q==", "requires": { "babel-runtime": "^6.26.0", "classnames": "^2.2.6", - "prop-types": "^15.5.8", - "rc-trigger": "^2.5.1", - "react-lifecycles-compat": "^3.0.2" - } - }, - "rc-editor-core": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/rc-editor-core/-/rc-editor-core-0.8.10.tgz", - "integrity": "sha512-T3aHpeMCIYA1sdAI7ynHHjXy5fqp83uPlD68ovZ0oClTSc3tbHmyCxXlA+Ti4YgmcpCYv7avF6a+TIbAka53kw==", - "requires": { - "babel-runtime": "^6.26.0", - "classnames": "^2.2.5", - "draft-js": "^0.10.0", - "immutable": "^3.7.4", - "lodash": "^4.16.5", - "prop-types": "^15.5.8", - "setimmediate": "^1.0.5" - } - }, - "rc-editor-mention": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/rc-editor-mention/-/rc-editor-mention-1.1.13.tgz", - "integrity": "sha512-3AOmGir91Fi2ogfRRaXLtqlNuIwQpvla7oUnGHS1+3eo7b+fUp5IlKcagqtwUBB5oDNofoySXkLBxzWvSYNp/Q==", - "requires": { - "babel-runtime": "^6.23.0", - "classnames": "^2.2.5", - "dom-scroll-into-view": "^1.2.0", - "draft-js": "~0.10.0", - "immutable": "~3.7.4", - "prop-types": "^15.5.8", - "rc-animate": "^2.3.0", - "rc-editor-core": "~0.8.3" - }, - "dependencies": { - "immutable": { - "version": "3.7.6", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz", - "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks=" - } + "rc-trigger": "^4.0.0" } }, - "rc-form": { - "version": "2.4.9", - "resolved": "https://registry.npmjs.org/rc-form/-/rc-form-2.4.9.tgz", - "integrity": "sha512-uu6wtJqSQWTFOgv1NcYJIPf7TlJHmQHbDJTBQQuQsKKap8CiW6aeAfvOZpThQuWwV/NeznP4WKeOJurIw4zzlA==", + "rc-field-form": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-1.0.1.tgz", + "integrity": "sha512-0m9ydH+XQtEwdTOrUgGqv0q6WCDQKNqwHiUB4fKZUdpLze/7i7gGIDVAc6CUNiTMb2Y5+V+wPtYhF4rBPhsX3g==", "requires": { - "async-validator": "~1.11.3", - "babel-runtime": "6.x", - "create-react-class": "^15.5.3", - "dom-scroll-into-view": "1.x", - "hoist-non-react-statics": "^3.3.0", - "lodash": "^4.17.4", + "@babel/runtime": "^7.8.4", + "async-validator": "^3.0.3", + "rc-util": "^4.17.0", "warning": "^4.0.3" } }, @@ -10753,9 +10656,9 @@ } }, "rc-input-number": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-4.5.1.tgz", - "integrity": "sha512-grO7/Lau7iv3NyHVyCajE1LuGLqGkG1tEAAZSwm9M0esYfrwXVSip4qhb5sF+8g6ACsiI20sOVLIihXuhSoifA==", + "version": "4.5.6", + "resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-4.5.6.tgz", + "integrity": "sha512-AXbL4gtQ1mSQnu6v/JtMv3UbGRCzLvQznmf0a7U/SAtZ8+dCEAqD4JpJhkjv73Wog53eRYhw4l7ApdXflc9ymg==", "requires": { "babel-runtime": "6.x", "classnames": "^2.2.0", @@ -10765,55 +10668,59 @@ } }, "rc-mentions": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/rc-mentions/-/rc-mentions-0.4.1.tgz", - "integrity": "sha512-XSJp6kcEPydUaM0I/gnxpXggiKgA5FjgFPKZCMQBDQJYUjXpQNyg5ogNkOJt1/4B2P7pwbYPZXgxP/30yZVahA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rc-mentions/-/rc-mentions-1.0.1.tgz", + "integrity": "sha512-EgXFYsNHk44ifwDcbtd3zX7rJc3lHplfVEVEf8oxZeeyyIzFD0GLs0Z0LWHNs6Gm4wTAHvcR0j4Pd5M7fLtBoA==", "requires": { - "@ant-design/create-react-context": "^0.2.4", "classnames": "^2.2.6", - "rc-menu": "^7.4.22", - "rc-trigger": "^2.6.2", - "rc-util": "^4.6.0", - "react-lifecycles-compat": "^3.0.4" + "rc-menu": "^8.0.1", + "rc-trigger": "^4.0.0", + "rc-util": "^4.6.0" } }, "rc-menu": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-7.5.3.tgz", - "integrity": "sha512-H/jUyGbJxZI/iuVdC6Iu9KHfz7tucoqK0Vn8ahDnv+ppc1PnKb4SkBbXn5LrmUyaj7thCBiaktBxVnUXSmNE2g==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-8.0.2.tgz", + "integrity": "sha512-0zae6+LVQf+XTBepSMwwn2Wu+CvRf0eAVh62xl0UcjFBvyA0uGz+dAE0SVR6oUA0q9X+/G14CV1ItZFdwaP6/g==", "requires": { "classnames": "2.x", - "dom-scroll-into-view": "1.x", "mini-store": "^2.0.0", - "mutationobserver-shim": "^0.3.2", "rc-animate": "^2.10.1", - "rc-trigger": "^2.3.0", + "rc-trigger": "^4.0.0", "rc-util": "^4.13.0", "resize-observer-polyfill": "^1.5.0", + "scroll-into-view-if-needed": "^2.2.20", "shallowequal": "^1.1.0" } }, "rc-notification": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/rc-notification/-/rc-notification-3.3.1.tgz", - "integrity": "sha512-U5+f4BmBVfMSf3OHSLyRagsJ74yKwlrQAtbbL5ijoA0F2C60BufwnOcHG18tVprd7iaIjzZt1TKMmQSYSvgrig==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rc-notification/-/rc-notification-4.0.0.tgz", + "integrity": "sha512-In9FimkJY+JSIq3/eopPfBpQQr2Zugq5i9Aw9vdiNCGCsAsSO9bGq2dPsn8bamOydNrhc3djljGfmxUUMbcZnA==", "requires": { - "babel-runtime": "6.x", "classnames": "2.x", - "prop-types": "^15.5.8", "rc-animate": "2.x", "rc-util": "^4.0.4" } }, "rc-pagination": { - "version": "1.20.10", - "resolved": "https://registry.npmjs.org/rc-pagination/-/rc-pagination-1.20.10.tgz", - "integrity": "sha512-Kp50tLNxzOYzQmwsnwWnz92XCYRrs1zPcje1RStLvBGibbTYKJYVQdQSK82G0zYMHzunFfo3jBw9UNfsgap3eg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/rc-pagination/-/rc-pagination-2.0.1.tgz", + "integrity": "sha512-jvLb05p1OEBUxRobWFjnrj6vRyvhG8XHouK6qh+eepCHPo7HDzUHHztvUUAWr5f+WnKldAXqdPcGgbM4rCH1OA==", "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.6", - "prop-types": "^15.5.7", - "react-lifecycles-compat": "^3.0.4" + "classnames": "^2.2.1" + } + }, + "rc-picker": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-1.1.2.tgz", + "integrity": "sha512-B4z1cqla4bZlVUcMuyeFmyPPx9eumpYd06gYFzLKsl5Yz3h1jTmW40hW1uxxUgPkeg6ym1X5TjUoB3ZOveHuMQ==", + "requires": { + "classnames": "^2.2.1", + "dayjs": "^1.8.18", + "moment": "^2.24.0", + "rc-trigger": "^4.0.0", + "rc-util": "^4.17.0" } }, "rc-progress": { @@ -10826,9 +10733,9 @@ } }, "rc-rate": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/rc-rate/-/rc-rate-2.5.0.tgz", - "integrity": "sha512-aXX5klRqbVZxvLghcKnLqqo7LvLVCHswEDteWsm5Gb7NBIPa1YKTcAbvb5SZ4Z4i4EeRoZaPwygRAWsQgGtbKw==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/rc-rate/-/rc-rate-2.5.1.tgz", + "integrity": "sha512-3iJkNJT8xlHklPCdeZtUZmJmRVUbr6AHRlfSsztfYTXVlHrv2TcPn3XkHsH+12j812WVB7gvilS2j3+ffjUHXg==", "requires": { "classnames": "^2.2.5", "prop-types": "^15.5.8", @@ -10847,35 +10754,28 @@ } }, "rc-select": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-9.2.1.tgz", - "integrity": "sha512-nW/Zr2OCgxN26OX8ff3xcO1wK0e1l5ixnEfyN15Rbdk7TNI/rIPJIjPCQAoihRpk9A2C/GH8pahjlvKV1Vj++g==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-10.0.2.tgz", + "integrity": "sha512-lRgb0eHQOTZ3VZWfAJzQ771wGO32w4mwZXDP4ELzsyFr2fBjtNu52wl9R8Zxpnzy9z8IqmaLUt+kq444vqt0jg==", "requires": { - "babel-runtime": "^6.23.0", "classnames": "2.x", - "component-classes": "1.x", - "dom-scroll-into-view": "1.x", - "prop-types": "^15.5.8", - "raf": "^3.4.0", - "rc-animate": "2.x", - "rc-menu": "^7.3.0", - "rc-trigger": "^2.5.4", - "rc-util": "^4.0.4", - "react-lifecycles-compat": "^3.0.2", - "warning": "^4.0.2" + "rc-animate": "^2.10.0", + "rc-trigger": "^4.0.0", + "rc-util": "^4.20.0", + "rc-virtual-list": "^1.0.0", + "warning": "^4.0.3" } }, "rc-slider": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-8.7.1.tgz", - "integrity": "sha512-WMT5mRFUEcrLWwTxsyS8jYmlaMsTVCZIGENLikHsNv+tE8ThU2lCoPfi/xFNUfJFNFSBFP3MwPez9ZsJmNp13g==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-9.2.2.tgz", + "integrity": "sha512-WwdNHb/cvnQXMhp8cRhxOM0pGnVG4fPoaFE31yVkyJUAZiHq3siQgwzAeYl11fyszwhrEXkpGU7tEAfClh0AaQ==", "requires": { "babel-runtime": "6.x", "classnames": "^2.2.5", "prop-types": "^15.5.4", - "rc-tooltip": "^3.7.0", + "rc-tooltip": "^4.0.0", "rc-util": "^4.0.4", - "react-lifecycles-compat": "^3.0.4", "shallowequal": "^1.1.0", "warning": "^4.0.3" } @@ -10902,26 +10802,27 @@ } }, "rc-table": { - "version": "6.9.5", - "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-6.9.5.tgz", - "integrity": "sha512-STL6387A/izVh6r9F1WDiIIZ0QeubCdTgIlzMeGTSl/bXhB0VqjAZEikvoijPoauTjJIkIzVuQEIDjOhAWbpkQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.0.0.tgz", + "integrity": "sha512-XVoRsJ1r3Oh1zl8vxVNBD/+4ZFL5hpHcEwEBpJLJ+I+N2uM/fnAYASHqYEkBdvCRv7l0nG0qTeFOB4dQQAHuLA==", "requires": { "classnames": "^2.2.5", "component-classes": "^1.2.6", "lodash": "^4.17.5", "mini-store": "^2.0.0", "prop-types": "^15.5.8", - "rc-util": "^4.13.0", + "raf": "^3.4.1", + "rc-resize-observer": "^0.1.2", + "rc-util": "^4.19.0", "react-lifecycles-compat": "^3.0.2", - "shallowequal": "^1.0.2" + "shallowequal": "^1.1.0" } }, "rc-tabs": { - "version": "9.6.7", - "resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-9.6.7.tgz", - "integrity": "sha512-OXbDOgaqv2MGK9QaDi6cdva6bNz3XGw+M9BHQpm1gTGmVQEGx5VcclDClH/3xobIzooxy8hrxg/s0rTlgDnC2w==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-10.0.0.tgz", + "integrity": "sha512-kpYho3S8GqHVKuFvsYyShN4GSM+f3RMfgwxmR4lpXA79lzPmIlaLamCGtTnMAOXOVTS3JEltWQCWC8LYY4ITIg==", "requires": { - "@ant-design/create-react-context": "^0.2.4", "babel-runtime": "6.x", "classnames": "2.x", "lodash": "^4.17.5", @@ -10929,174 +10830,97 @@ "raf": "^3.4.1", "rc-hammerjs": "~0.6.0", "rc-util": "^4.0.4", - "react-lifecycles-compat": "^3.0.4", "resize-observer-polyfill": "^1.5.1", "warning": "^4.0.3" } }, - "rc-time-picker": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/rc-time-picker/-/rc-time-picker-3.7.2.tgz", - "integrity": "sha512-UVWO9HXGyZoM4I2THlJsEAFcZQz+tYwdcpoHXCEFZsRLz9L2+7vV4EMp9Wa3UrtzMFEt83qSAX/90dCJeKl9sg==", - "requires": { - "classnames": "2.x", - "moment": "2.x", - "prop-types": "^15.5.8", - "raf": "^3.4.1", - "rc-trigger": "^2.2.0", - "react-lifecycles-compat": "^3.0.4" - } - }, "rc-tooltip": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-3.7.3.tgz", - "integrity": "sha512-dE2ibukxxkrde7wH9W8ozHKUO4aQnPZ6qBHtrTH9LoO836PjDdiaWO73fgPB05VfJs9FbZdmGPVEbXCeOP99Ww==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-4.0.1.tgz", + "integrity": "sha512-R+Ift6SwD2bJKhlYgKXyklvurnYwGzNMfRIPBqv0qoG0SYcVJDVuECL73dcRm2+CCik3YYn1ZGZLPjRRrUkAIw==", "requires": { - "babel-runtime": "6.x", - "prop-types": "^15.5.8", - "rc-trigger": "^2.2.2" + "rc-trigger": "^4.0.0" } }, "rc-tree": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-2.1.3.tgz", - "integrity": "sha512-COvV65spQ6omrHBUhHRKqKNL5+ddXjlS+qWZchaL9FFuQNvjM5pjp9RnmMWK4fJJ5kBhhpLneh6wh9Vh3kSMXQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-3.0.1.tgz", + "integrity": "sha512-v0B/aN8vikPGAcQoMm5jhxJ5eXj3V0HSHAoHJYXgdad4nqBVyWMDvSWDbZumdFQlBfKhpdGK02LnSgWx4W2SSA==", "requires": { - "@ant-design/create-react-context": "^0.2.4", "classnames": "2.x", "prop-types": "^15.5.8", - "rc-animate": "^2.6.0", - "rc-util": "^4.5.1", - "react-lifecycles-compat": "^3.0.4", - "warning": "^4.0.3" + "rc-animate": "^2.9.2", + "rc-util": "^4.11.0", + "rc-virtual-list": "^1.0.0", + "react-lifecycles-compat": "^3.0.4" } }, "rc-tree-select": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/rc-tree-select/-/rc-tree-select-2.9.1.tgz", - "integrity": "sha512-AfJQC1ZzaeH+Onmx84TtVLUL2guBZe7exA8XSfj1RRB1doDbYGTtybzpP3CEw/tuSftSRnz+iPt+iaxRTrgXRw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rc-tree-select/-/rc-tree-select-3.0.2.tgz", + "integrity": "sha512-xowQdNWEUAxtEfJa5X2jcO5iRB/25YlecLwcyPGn04EC0Idwmn94yaji8fM+2QSKWKqvoImppaiRJpA1uljAHg==", "requires": { - "classnames": "^2.2.1", - "dom-scroll-into-view": "^1.2.1", - "prop-types": "^15.5.8", - "raf": "^3.4.0", - "rc-animate": "^2.8.2", - "rc-tree": "~2.0.0", - "rc-trigger": "^3.0.0-rc.2", - "rc-util": "^4.5.0", - "react-lifecycles-compat": "^3.0.4", - "shallowequal": "^1.0.2", - "warning": "^4.0.1" - }, - "dependencies": { - "rc-tree": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-2.0.0.tgz", - "integrity": "sha512-DAT/jsbnFbHqG9Df9OaVG93CAVtTsJVnJiwKX+wqsG8TChpty3s6QX3zJZ+gBgjkq4ikLbu1kuFJtX63EKhSAA==", - "requires": { - "babel-runtime": "^6.23.0", - "classnames": "2.x", - "prop-types": "^15.5.8", - "rc-animate": "^2.6.0", - "rc-util": "^4.5.1", - "react-lifecycles-compat": "^3.0.4", - "warning": "^3.0.0" - }, - "dependencies": { - "warning": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", - "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", - "requires": { - "loose-envify": "^1.0.0" - } - } - } - }, - "rc-trigger": { - "version": "3.0.0-rc.3", - "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-3.0.0-rc.3.tgz", - "integrity": "sha512-4vB6cpxcUdm2qO5VtB9q1TZz0MoWm9BzFLvGknulphGrl1qI6uxUsPDCvqnmujdpDdAKGGfjxntFpA7RtAwkFQ==", - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.6", - "prop-types": "15.x", - "raf": "^3.4.0", - "rc-align": "^2.4.1", - "rc-animate": "^3.0.0-rc.1", - "rc-util": "^4.4.0" - }, - "dependencies": { - "rc-animate": { - "version": "3.0.0-rc.6", - "resolved": "https://registry.npmjs.org/rc-animate/-/rc-animate-3.0.0-rc.6.tgz", - "integrity": "sha512-oBLPpiT6Q4t6YvD/pkLcmofBP1p01TX0Otse8Q4+Mxt8J+VSDflLZGIgf62EwkvRwsQUkLPjZVFBsldnPKLzjg==", - "requires": { - "babel-runtime": "6.x", - "classnames": "^2.2.5", - "component-classes": "^1.2.6", - "fbjs": "^0.8.16", - "prop-types": "15.x", - "raf": "^3.4.0", - "rc-util": "^4.5.0", - "react-lifecycles-compat": "^3.0.4" - } - } - } - } + "classnames": "2.x", + "rc-select": "^10.0.0", + "rc-tree": "^3.0.0", + "rc-util": "^4.17.0" } }, "rc-trigger": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-2.6.5.tgz", - "integrity": "sha512-m6Cts9hLeZWsTvWnuMm7oElhf+03GOjOLfTuU0QmdB9ZrW7jR2IpI5rpNM7i9MvAAlMAmTx5Zr7g3uu/aMvZAw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-4.0.0.tgz", + "integrity": "sha512-wOr2i4UrhsLjPhT9/k3p8l5yktC0BjOIBk2afze78a9ieql4GEw19Qo6iqSBmX/KqD9V4VXQxD4Ebt7U7IDrIw==", "requires": { - "babel-runtime": "6.x", "classnames": "^2.2.6", "prop-types": "15.x", - "rc-align": "^2.4.0", - "rc-animate": "2.x", - "rc-util": "^4.4.0", - "react-lifecycles-compat": "^3.0.4" + "raf": "^3.4.1", + "rc-align": "^3.0.0-rc.0", + "rc-animate": "^2.10.2", + "rc-util": "^4.15.2" } }, "rc-upload": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-2.9.1.tgz", - "integrity": "sha512-yMepUpgLS41BKkzzC2D14rFogzO1QAVrEgBu3t4ZT2deyo6IDcygz2kgfBGRK9qHVF6kOTW6gzbdXj3v1Bn3oQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-3.0.0.tgz", + "integrity": "sha512-GTmLJ2Habrgon26xwtF8nx1FBxu8KUjRC6QW/7a+NVZ6qXIo+s7HnjqwseuG42kz6xGCoSLNpHgIoHW55EwpxA==", "requires": { "babel-runtime": "6.x", - "classnames": "^2.2.5", - "prop-types": "^15.5.7", - "warning": "4.x" + "classnames": "^2.2.5" } }, "rc-util": { - "version": "4.14.4", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-4.14.4.tgz", - "integrity": "sha512-GQgEn6ywJYZq1NEoZ6NZzeaE2U6mT6DhdqrtRV5IBNM3yTZZW8HRjIiMOpXOhTEUj10bnHnKWKZpC36RoNmS9Q==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-4.20.0.tgz", + "integrity": "sha512-rUqk4RqtDe4OfTsSk2GpbvIQNVtfmmebw4Rn7ZAA1TO1zLMLfyOF78ZyrEKqs8RDwoE3S1aXp0AX0ogLfSxXrQ==", "requires": { "add-dom-event-listener": "^1.1.0", "babel-runtime": "6.x", "prop-types": "^15.5.10", + "react-is": "^16.12.0", "react-lifecycles-compat": "^3.0.4", - "shallowequal": "^0.2.2" + "shallowequal": "^1.1.0" }, "dependencies": { - "shallowequal": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-0.2.2.tgz", - "integrity": "sha1-HjL9W8q2rWiKSBLLDMBO/HXHAU4=", - "requires": { - "lodash.keys": "^3.1.2" - } + "react-is": { + "version": "16.13.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.0.tgz", + "integrity": "sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA==" } } }, + "rc-virtual-list": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-1.0.1.tgz", + "integrity": "sha512-lqee1WuBXz6wUGr77g5bB1BHO9JQH+R1DX1oU0JbTLQs7bJl5JWk0xlX6UbB7VMtUss15+XiV7cyvlXVq6xzjg==", + "requires": { + "classnames": "^2.2.6", + "rc-util": "^4.8.0" + } + }, "react": { - "version": "16.11.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.11.0.tgz", - "integrity": "sha512-M5Y8yITaLmU0ynd0r1Yvfq98Rmll6q8AxaEe88c8e7LxO8fZ2cNgmFt0aGAS9wzf1Ao32NKXtCl+/tVVtkxq6g==", + "version": "16.13.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.13.0.tgz", + "integrity": "sha512-TSavZz2iSLkq5/oiE7gnFzmURKZMltmi193rm5HEoUDAXpzT9Kzw6oNZnGoai/4+fUnm7FqS5dwgUL34TujcWQ==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -11104,16 +10928,16 @@ } }, "react-app-polyfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-1.0.4.tgz", - "integrity": "sha512-5Vte6ki7jpNsNCUKaboyofAhmURmCn2Y6Hu7ydJ6Iu4dct1CIGoh/1FT7gUZKAbowVX2lxVPlijvp1nKxfAl4w==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-1.0.6.tgz", + "integrity": "sha512-OfBnObtnGgLGfweORmdZbyEz+3dgVePQBb3zipiaDsMHV1NpWm0rDFYIVXFV/AK+x4VIIfWHhrdMIeoTLyRr2g==", "requires": { - "core-js": "3.2.1", - "object-assign": "4.1.1", - "promise": "8.0.3", - "raf": "3.4.1", - "regenerator-runtime": "0.13.3", - "whatwg-fetch": "3.0.0" + "core-js": "^3.5.0", + "object-assign": "^4.1.1", + "promise": "^8.0.3", + "raf": "^3.4.1", + "regenerator-runtime": "^0.13.3", + "whatwg-fetch": "^3.0.0" } }, "react-debounce-input": { @@ -11126,84 +10950,207 @@ } }, "react-dev-utils": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-9.1.0.tgz", - "integrity": "sha512-X2KYF/lIGyGwP/F/oXgGDF24nxDA2KC4b7AFto+eqzc/t838gpSGiaU8trTqHXOohuLxxc5qi1eDzsl9ucPDpg==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-10.2.0.tgz", + "integrity": "sha512-MwrvQW2TFjLblhqpDNeqCXHBkz3G5vc7k4wntgutAJZX4ia3o07eGKo6uYGhUOeJ0hfOxcpJFNFk7+4XCc1S8g==", "requires": { - "@babel/code-frame": "7.5.5", + "@babel/code-frame": "7.8.3", "address": "1.1.2", - "browserslist": "4.7.0", + "browserslist": "4.8.6", "chalk": "2.4.2", - "cross-spawn": "6.0.5", + "cross-spawn": "7.0.1", "detect-port-alt": "1.1.6", - "escape-string-regexp": "1.0.5", - "filesize": "3.6.1", - "find-up": "3.0.0", - "fork-ts-checker-webpack-plugin": "1.5.0", + "escape-string-regexp": "2.0.0", + "filesize": "6.0.1", + "find-up": "4.1.0", + "fork-ts-checker-webpack-plugin": "3.1.1", "global-modules": "2.0.0", "globby": "8.0.2", "gzip-size": "5.1.1", "immer": "1.10.0", - "inquirer": "6.5.0", + "inquirer": "7.0.4", "is-root": "2.1.0", "loader-utils": "1.2.3", - "open": "^6.3.0", - "pkg-up": "2.0.0", - "react-error-overlay": "^6.0.3", + "open": "^7.0.2", + "pkg-up": "3.1.0", + "react-error-overlay": "^6.0.6", "recursive-readdir": "2.2.2", "shell-quote": "1.7.2", - "sockjs-client": "1.4.0", - "strip-ansi": "5.2.0", + "strip-ansi": "6.0.0", "text-table": "0.2.0" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, "browserslist": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.0.tgz", - "integrity": "sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA==", + "version": "4.8.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.6.tgz", + "integrity": "sha512-ZHao85gf0eZ0ESxLfCp73GG9O/VTytYDIkIiZDlURppLTI9wErSM/5yAKEq6rcUdxBLjMELmrYUJGg5sxGKMHg==", "requires": { - "caniuse-lite": "^1.0.30000989", - "electron-to-chromium": "^1.3.247", - "node-releases": "^1.1.29" + "caniuse-lite": "^1.0.30001023", + "electron-to-chromium": "^1.3.341", + "node-releases": "^1.1.47" } }, - "inquirer": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.0.tgz", - "integrity": "sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA==", + "cross-spawn": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", + "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } - } - } - }, + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" + }, + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==" + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "inquirer": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.4.tgz", + "integrity": "sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==", + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^2.4.2", + "cli-cursor": "^3.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", + "run-async": "^2.2.0", + "rxjs": "^6.5.3", + "string-width": "^4.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "dependencies": { + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + } + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "react-dom": { - "version": "16.11.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.11.0.tgz", - "integrity": "sha512-nrRyIUE1e7j8PaXSPtyRKtz+2y9ubW/ghNgqKFHHAHaeP0fpF5uXR+sq8IMRHC+ZUxw7W9NyCDTBtwWxvkb0iA==", + "version": "16.13.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.0.tgz", + "integrity": "sha512-y09d2c4cG220DzdlFkPTnVvGTszVvNpC73v+AaLGLHbkpy3SSgvYq8x0rNwPJ/Rk/CicTNgk0hbHNw1gMEZAXg==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.17.0" + "scheduler": "^0.19.0" } }, "react-error-overlay": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.3.tgz", - "integrity": "sha512-bOUvMWFQVk5oz8Ded9Xb7WVdEi3QGLC8tH7HmYP0Fdp4Bn3qw0tRFmr5TW6mvahzvmrK4a6bqWGfCevBflP+Xw==" + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.6.tgz", + "integrity": "sha512-Yzpno3enVzSrSCnnljmr4b/2KUQSMZaPuqmS26t9k4nW7uwJk6STWmH9heNjPuvqUTO3jOSPkHoKgO4+Dw7uIw==" }, "react-immutable-proptypes": { "version": "2.1.0", @@ -11233,17 +11180,6 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.10.1.tgz", "integrity": "sha512-BXUMf9sIOPXXZWqr7+c5SeOKJykyVr2u0UDzEf4LNGc6taGkQe1A9DFD07umCIXz45RLr9oAAwZbAJ0Pkknfaw==" }, - "react-lazy-load": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/react-lazy-load/-/react-lazy-load-3.0.13.tgz", - "integrity": "sha1-OwqS0zbUPT8Nc8vm81sXBQsIuCQ=", - "requires": { - "eventlistener": "0.0.1", - "lodash.debounce": "^4.0.0", - "lodash.throttle": "^4.0.0", - "prop-types": "^15.5.8" - } - }, "react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", @@ -11277,89 +11213,76 @@ "lodash": "^4.17.11", "loose-envify": "^1.4.0", "prop-types": "^15.7.2" + }, + "dependencies": { + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "requires": { + "react-is": "^16.7.0" + } + } } }, "react-scripts": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.2.0.tgz", - "integrity": "sha512-6LzuKbE2B4eFQG6i1FnTScn9HDcWBfXXnOwW9xKFPJ/E3rK8i1ufbOZ0ocKyRPxJAKdN7iqg3i7lt0+oxkSVOA==", - "requires": { - "@babel/core": "7.6.0", - "@svgr/webpack": "4.3.2", - "@typescript-eslint/eslint-plugin": "^2.2.0", - "@typescript-eslint/parser": "^2.2.0", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.4.0.tgz", + "integrity": "sha512-pBqaAroFoHnFAkuX+uSK9Th1uEh2GYdGY2IG1I9/7HmuEf+ls3lLCk1p2GFYRSrLMz6ieQR/SyN6TLIGK3hKRg==", + "requires": { + "@babel/core": "7.8.4", + "@svgr/webpack": "4.3.3", + "@typescript-eslint/eslint-plugin": "^2.10.0", + "@typescript-eslint/parser": "^2.10.0", "babel-eslint": "10.0.3", "babel-jest": "^24.9.0", "babel-loader": "8.0.6", - "babel-plugin-named-asset-import": "^0.3.4", - "babel-preset-react-app": "^9.0.2", - "camelcase": "^5.2.0", - "case-sensitive-paths-webpack-plugin": "2.2.0", - "css-loader": "2.1.1", - "dotenv": "6.2.0", + "babel-plugin-named-asset-import": "^0.3.6", + "babel-preset-react-app": "^9.1.1", + "camelcase": "^5.3.1", + "case-sensitive-paths-webpack-plugin": "2.3.0", + "css-loader": "3.4.2", + "dotenv": "8.2.0", "dotenv-expand": "5.1.0", - "eslint": "^6.1.0", - "eslint-config-react-app": "^5.0.2", - "eslint-loader": "3.0.2", - "eslint-plugin-flowtype": "3.13.0", - "eslint-plugin-import": "2.18.2", + "eslint": "^6.6.0", + "eslint-config-react-app": "^5.2.0", + "eslint-loader": "3.0.3", + "eslint-plugin-flowtype": "4.6.0", + "eslint-plugin-import": "2.20.0", "eslint-plugin-jsx-a11y": "6.2.3", - "eslint-plugin-react": "7.14.3", + "eslint-plugin-react": "7.18.0", "eslint-plugin-react-hooks": "^1.6.1", - "file-loader": "3.0.1", - "fs-extra": "7.0.1", - "fsevents": "2.0.7", - "html-webpack-plugin": "4.0.0-beta.5", + "file-loader": "4.3.0", + "fs-extra": "^8.1.0", + "fsevents": "2.1.2", + "html-webpack-plugin": "4.0.0-beta.11", "identity-obj-proxy": "3.0.0", - "is-wsl": "^1.1.0", "jest": "24.9.0", - "jest-environment-jsdom-fourteen": "0.1.0", + "jest-environment-jsdom-fourteen": "1.0.1", "jest-resolve": "24.9.0", - "jest-watch-typeahead": "0.4.0", - "mini-css-extract-plugin": "0.8.0", + "jest-watch-typeahead": "0.4.2", + "mini-css-extract-plugin": "0.9.0", "optimize-css-assets-webpack-plugin": "5.0.3", - "pnp-webpack-plugin": "1.5.0", + "pnp-webpack-plugin": "1.6.0", "postcss-flexbugs-fixes": "4.1.0", "postcss-loader": "3.0.0", - "postcss-normalize": "7.0.1", + "postcss-normalize": "8.0.1", "postcss-preset-env": "6.7.0", "postcss-safe-parser": "4.0.1", - "react-app-polyfill": "^1.0.4", - "react-dev-utils": "^9.1.0", - "resolve": "1.12.0", - "resolve-url-loader": "3.1.0", - "sass-loader": "7.2.0", + "react-app-polyfill": "^1.0.6", + "react-dev-utils": "^10.2.0", + "resolve": "1.15.0", + "resolve-url-loader": "3.1.1", + "sass-loader": "8.0.2", "semver": "6.3.0", - "style-loader": "1.0.0", - "terser-webpack-plugin": "1.4.1", - "ts-pnp": "1.1.4", - "url-loader": "2.1.0", - "webpack": "4.41.0", - "webpack-dev-server": "3.2.1", - "webpack-manifest-plugin": "2.1.1", + "style-loader": "0.23.1", + "terser-webpack-plugin": "2.3.4", + "ts-pnp": "1.1.5", + "url-loader": "2.3.0", + "webpack": "4.41.5", + "webpack-dev-server": "3.10.2", + "webpack-manifest-plugin": "2.2.0", "workbox-webpack-plugin": "4.3.1" - }, - "dependencies": { - "resolve": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", - "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, - "react-slick": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/react-slick/-/react-slick-0.25.2.tgz", - "integrity": "sha512-8MNH/NFX/R7zF6W/w+FS5VXNyDusF+XDW1OU0SzODEU7wqYB+ZTGAiNJ++zVNAVqCAHdyCybScaUB+FCZOmBBw==", - "requires": { - "classnames": "^2.2.5", - "enquire.js": "^2.1.6", - "json2mq": "^0.2.0", - "lodash.debounce": "^4.0.8", - "resize-observer-polyfill": "^1.5.0" } }, "read-pkg": { @@ -11411,13 +11334,11 @@ } }, "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", + "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==", "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" + "picomatch": "^2.0.7" } }, "realpath-native": { @@ -11504,9 +11425,9 @@ } }, "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", + "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==" }, "regexpu-core": { "version": "4.6.0", @@ -11527,9 +11448,9 @@ "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==" }, "regjsparser": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz", - "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.3.tgz", + "integrity": "sha512-8uZvYbnfAtEm9Ab8NTb3hdLwL4g/LQzEYP7Xs27T96abJCCE2d6r3cPZPQEsLKy0vRSGVNG+/zVGtLr86HQduA==", "requires": { "jsesc": "~0.5.0" }, @@ -11588,6 +11509,11 @@ "nth-check": "~1.0.1" } }, + "css-what": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", + "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==" + }, "domutils": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", @@ -11618,9 +11544,9 @@ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -11629,7 +11555,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -11639,46 +11565,32 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" }, "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - } } } }, "request-promise-core": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", - "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz", + "integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==", "requires": { - "lodash": "^4.17.11" + "lodash": "^4.17.15" } }, "request-promise-native": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", - "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.8.tgz", + "integrity": "sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ==", "requires": { - "request-promise-core": "1.1.2", + "request-promise-core": "1.1.3", "stealthy-require": "^1.1.1", "tough-cookie": "^2.3.3" } @@ -11709,9 +11621,9 @@ "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" }, "resolve": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", - "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.0.tgz", + "integrity": "sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw==", "requires": { "path-parse": "^1.0.6" } @@ -11735,31 +11647,49 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" }, "resolve-url-loader": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.0.tgz", - "integrity": "sha512-2QcrA+2QgVqsMJ1Hn5NnJXIGCX1clQ1F6QJTqOeiaDw9ACo1G2k+8/shq3mtqne03HOFyskAClqfxKyFBriXZg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.1.tgz", + "integrity": "sha512-K1N5xUjj7v0l2j/3Sgs5b8CjrrgtC70SmdCuZiJ8tSyb5J+uk3FoeZ4b7yTnH6j7ngI+Bc5bldHJIa8hYdu2gQ==", "requires": { "adjust-sourcemap-loader": "2.0.0", - "camelcase": "5.0.0", + "camelcase": "5.3.1", "compose-function": "3.0.3", - "convert-source-map": "1.6.0", + "convert-source-map": "1.7.0", "es6-iterator": "2.0.3", "loader-utils": "1.2.3", - "postcss": "7.0.14", + "postcss": "7.0.21", "rework": "1.0.1", "rework-visit": "1.0.0", "source-map": "0.6.1" }, "dependencies": { - "camelcase": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", - "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==" + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } }, "postcss": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", - "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "version": "7.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.21.tgz", + "integrity": "sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ==", "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -11777,11 +11707,11 @@ } }, "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "requires": { - "onetime": "^2.0.0", + "onetime": "^5.1.0", "signal-exit": "^3.0.2" } }, @@ -11790,6 +11720,11 @@ "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" + }, "rework": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/rework/-/rework-1.0.1.tgz", @@ -11853,9 +11788,9 @@ "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==" }, "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", + "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", "requires": { "is-promise": "^2.1.0" } @@ -11869,9 +11804,9 @@ } }, "rxjs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", - "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", + "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", "requires": { "tslib": "^1.9.0" } @@ -11910,16 +11845,21 @@ "walker": "~1.0.5" } }, + "sanitize.css": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/sanitize.css/-/sanitize.css-10.0.0.tgz", + "integrity": "sha512-vTxrZz4dX5W86M6oVWVdOVe72ZiPs41Oi7Z6Km4W5Turyz28mrXSJhhEBZoRtzJWIv3833WKVwLSDWWkEfupMg==" + }, "sass-loader": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.2.0.tgz", - "integrity": "sha512-h8yUWaWtsbuIiOCgR9fd9c2lRXZ2uG+h8Dzg/AGNj+Hg/3TO8+BBAW9mEP+mh8ei+qBKqSJ0F1FLlYjNBc61OA==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.2.tgz", + "integrity": "sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==", "requires": { "clone-deep": "^4.0.1", - "loader-utils": "^1.0.1", - "neo-async": "^2.5.0", - "pify": "^4.0.1", - "semver": "^5.5.0" + "loader-utils": "^1.2.3", + "neo-async": "^2.6.1", + "schema-utils": "^2.6.1", + "semver": "^6.3.0" }, "dependencies": { "clone-deep": { @@ -11933,19 +11873,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" }, "shallow-clone": { "version": "3.0.1", @@ -11971,22 +11901,29 @@ } }, "scheduler": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.17.0.tgz", - "integrity": "sha512-7rro8Io3tnCPuY4la/NuI5F2yfESpnfZyT6TtkXnSWVkcu0BCDJ+8gk5ozUaFaxpIyNuWAPXrH0yFcSi28fnDA==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.0.tgz", + "integrity": "sha512-xowbVaTPe9r7y7RUejcK73/j8tt2jfiyTednOvHbA8JoClvMYCp+r8QegLwK/n8zWQAtZb1fFnER4XLBZXrCxA==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" } }, "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.4.tgz", + "integrity": "sha512-VNjcaUxVnEeun6B2fiiUDjXXBtD4ZSH7pdbfIu1pOFwgptDPLMo/z9jr4sUfsjFVPqDCEin/F7IYlq7/E6yDbQ==", + "requires": { + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1" + } + }, + "scroll-into-view-if-needed": { + "version": "2.2.24", + "resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.24.tgz", + "integrity": "sha512-vsC6SzyIZUyJG8o4nbUDCiIwsPdH6W/FVmjT2avR2hp/yzS53JjGmg/bKD20TkoNajbu5dAQN4xR7yes4qhwtQ==", "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" + "compute-scroll-into-view": "^1.0.13" } }, "select-hose": { @@ -12060,9 +11997,9 @@ "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=" }, "serialize-javascript": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", - "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", + "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==" }, "serve-index": { "version": "1.9.1", @@ -12196,11 +12133,6 @@ } } }, - "shallow-equal": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shallow-equal/-/shallow-equal-1.2.0.tgz", - "integrity": "sha512-Z21pVxR4cXsfwpMKMhCEIO1PCi5sp7KEp+CmOpBQ+E8GpHwKOw2sEzk7sgblM3d/j4z4gakoWEoPcjK0VJQogA==" - }, "shallowequal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", @@ -12250,9 +12182,9 @@ } }, "sisteransi": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.3.tgz", - "integrity": "sha512-SbEG75TzH8G7eVXFSN5f9EExILKfly7SUvVY5DhhYLvfhKqhDFY0OzevWa/zwak0RLRfWS5AvfMWpd9gJvr5Yg==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.4.tgz", + "integrity": "sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig==" }, "slash": { "version": "2.0.0", @@ -12267,6 +12199,13 @@ "ansi-styles": "^3.2.0", "astral-regex": "^1.0.0", "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + } } }, "snapdragon": { @@ -12365,9 +12304,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" } } }, @@ -12386,16 +12325,6 @@ "requires": { "faye-websocket": "^0.10.0", "uuid": "^3.0.1" - }, - "dependencies": { - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "requires": { - "websocket-driver": ">=0.5.1" - } - } } }, "sockjs-client": { @@ -12418,6 +12347,14 @@ "requires": { "ms": "^2.1.1" } + }, + "faye-websocket": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", + "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", + "requires": { + "websocket-driver": ">=0.5.1" + } } } }, @@ -12440,11 +12377,11 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", "requires": { - "atob": "^2.1.1", + "atob": "^2.1.2", "decode-uri-component": "^0.2.0", "resolve-url": "^0.2.1", "source-map-url": "^0.4.0", @@ -12519,9 +12456,9 @@ }, "dependencies": { "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -12560,11 +12497,12 @@ } }, "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-7.1.0.tgz", + "integrity": "sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g==", "requires": { - "figgy-pudding": "^3.5.1" + "figgy-pudding": "^3.5.1", + "minipass": "^3.1.1" } }, "stable": { @@ -12645,9 +12583,9 @@ } }, "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" }, "strict-uri-encode": { "version": "1.1.0", @@ -12668,6 +12606,11 @@ "strip-ansi": "^4.0.0" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -12679,37 +12622,38 @@ } }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" }, "dependencies": { "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^5.0.0" } } } }, "string.prototype.trimleft": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", - "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", + "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", "requires": { "define-properties": "^1.1.3", "function-bind": "^1.1.1" } }, "string.prototype.trimright": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", - "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", + "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", "requires": { "define-properties": "^1.1.3", "function-bind": "^1.1.1" @@ -12731,6 +12675,13 @@ "get-own-enumerable-property-symbols": "^3.0.0", "is-obj": "^1.0.1", "is-regexp": "^1.0.0" + }, + "dependencies": { + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + } } }, "strip-ansi": { @@ -12773,21 +12724,22 @@ "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==" }, "style-loader": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.0.0.tgz", - "integrity": "sha512-B0dOCFwv7/eY31a5PCieNwMgMhVGFe9w+rh7s/Bx8kfFkrth9zfTZquoYvdw8URgiqxObQKcpW51Ugz1HjfdZw==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.1.tgz", + "integrity": "sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==", "requires": { - "loader-utils": "^1.2.3", - "schema-utils": "^2.0.1" + "loader-utils": "^1.1.0", + "schema-utils": "^1.0.0" }, "dependencies": { "schema-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.5.0.tgz", - "integrity": "sha512-32ISrwW2scPXHUSusP8qMg5dLUawKkyV+/qIEV9JdXKx+rsM6mi8vZY8khg2M69Qom16rtroWXD3Ybtiws38gQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", "requires": { - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1" + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" } } } @@ -12803,11 +12755,11 @@ }, "dependencies": { "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", "requires": { - "dot-prop": "^4.1.1", + "dot-prop": "^5.2.0", "indexes-of": "^1.0.1", "uniq": "^1.0.1" } @@ -12823,9 +12775,9 @@ } }, "svg-parser": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.2.tgz", - "integrity": "sha512-1gtApepKFweigFZj3sGO8KT8LvVZK8io146EzXrpVuWCDAbISz/yMucco3hWTkpZNoPabM+dnMOpy6Swue68Zg==" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", + "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==" }, "svgo": { "version": "1.3.2", @@ -12848,9 +12800,9 @@ } }, "swagger-client": { - "version": "3.9.5", - "resolved": "https://registry.npmjs.org/swagger-client/-/swagger-client-3.9.5.tgz", - "integrity": "sha512-DQa4NNnA4fOW2xwEuEIptww3zVr5uWe5ryMq1ZLkYbEsOh5aIeFzEadIEA6xzkwvD3PV694csOmbjOmnapwpKA==", + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/swagger-client/-/swagger-client-3.10.0.tgz", + "integrity": "sha512-XUvqO/jeF+P5gYklN+ThEFq1++XnXV9RTdOpS65B5Y0dHnamxO8v0wG8geVEwIIqKjCYbKQ2Vd67DZMZMeaNvg==", "requires": { "@babel/runtime-corejs2": "^7.0.0", "@kyleshockey/object-assign-deep": "^0.4.0", @@ -12894,9 +12846,9 @@ } }, "swagger-ui-react": { - "version": "3.24.2", - "resolved": "https://registry.npmjs.org/swagger-ui-react/-/swagger-ui-react-3.24.2.tgz", - "integrity": "sha512-d7XrBLZvUh5em69KkYJCHXZZCOpbKplzsa92JV0c91AB89XNA3QEazNj3pxi9Nzme0ujPA64yCpVD/EFmx5VbA==", + "version": "3.25.0", + "resolved": "https://registry.npmjs.org/swagger-ui-react/-/swagger-ui-react-3.25.0.tgz", + "integrity": "sha512-2MMk3p42Q3x/E91vIqitvXJLAvDsBwxW8DLt3FfI0H6YPnWGqafsU4kP6unVriQqJqafcQII5suDwmycdmqSdw==", "requires": { "@babel/runtime-corejs2": "^7.5.5", "@braintree/sanitize-url": "^3.0.0", @@ -12928,16 +12880,16 @@ "reselect": "^2.5.4", "serialize-error": "^2.1.0", "sha.js": "^2.4.11", - "swagger-client": "^3.9.5", + "swagger-client": "^3.10.0", "url-parse": "^1.4.7", "xml-but-prettier": "^1.0.1", "zenscroll": "^4.0.2" }, "dependencies": { "core-js": { - "version": "2.6.10", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", - "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==" + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" } } }, @@ -12962,6 +12914,16 @@ "string-width": "^3.0.0" }, "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -12980,9 +12942,9 @@ "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==" }, "terser": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.3.9.tgz", - "integrity": "sha512-NFGMpHjlzmyOtPL+fDw3G7+6Ueh/sz4mkaUYa4lJCxOPTNzd0Uj0aZJOmsDYoSQyfuVoWDMSWTPU3huyOm2zdA==", + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.4.tgz", + "integrity": "sha512-5fqgBPLgVHZ/fVvqRhhUp9YUiGXhFJ9ZkrZWD9vQtFBR4QIGTnbsb+/kKqSqfgp3WnBwGWAFnedGTtmX1YTn0w==", "requires": { "commander": "^2.20.0", "source-map": "~0.6.1", @@ -12990,40 +12952,120 @@ } }, "terser-webpack-plugin": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz", - "integrity": "sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==", - "requires": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^1.7.0", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.4.tgz", + "integrity": "sha512-Nv96Nws2R2nrFOpbzF6IxRDpIkkIfmhvOws+IqMvYdFLO7o6wAILWFKONFgaYy8+T4LVz77DQW0f7wOeDEAjrg==", + "requires": { + "cacache": "^13.0.1", + "find-cache-dir": "^3.2.0", + "jest-worker": "^25.1.0", + "p-limit": "^2.2.2", + "schema-utils": "^2.6.4", + "serialize-javascript": "^2.1.2", "source-map": "^0.6.1", - "terser": "^4.1.2", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" - } - }, - "test-exclude": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", - "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", - "requires": { - "glob": "^7.1.3", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^2.0.0" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" - }, - "throat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", + "terser": "^4.4.3", + "webpack-sources": "^1.4.3" + }, + "dependencies": { + "find-cache-dir": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.0.tgz", + "integrity": "sha512-PtXtQb7IrD8O+h6Cq1dbpJH5NzD8+9keN1zZ0YlpDzl1PwXEJEBj6u1Xa92t1Hwluoozd9TNKul5Hi2iqpsWwg==", + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "jest-worker": { + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-25.1.0.tgz", + "integrity": "sha512-ZHhHtlxOWSxCoNOKHGbiLzXnl42ga9CxDr27H36Qn+15pQZd3R/F24jrmjDelw9j/iHUIWMWs08/u2QN50HHOg==", + "requires": { + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "make-dir": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", + "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", + "requires": { + "semver": "^6.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "requires": { + "find-up": "^4.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "test-exclude": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", + "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "requires": { + "glob": "^7.1.3", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^2.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "throat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=" }, "through": { @@ -13156,14 +13198,14 @@ "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" }, "ts-pnp": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.1.4.tgz", - "integrity": "sha512-1J/vefLC+BWSo+qe8OnJQfWTYRS6ingxjwqmHMqaMxXMj7kFtKLgAaYW3JeX3mktjgUL+etlU8/B4VUAUI9QGw==" + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.1.5.tgz", + "integrity": "sha512-ti7OGMOUOzo66wLF3liskw6YQIaSsBgc4GOAlWRnIEj8htCxJUxskanMUoJOD6MDCRAXo36goXJZch+nOS0VMA==" }, "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==" }, "tsutils": { "version": "3.17.1", @@ -13205,9 +13247,9 @@ } }, "type-fest": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.5.2.tgz", - "integrity": "sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==" + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" }, "type-is": { "version": "1.6.18", @@ -13224,25 +13266,9 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "ua-parser-js": { - "version": "0.7.20", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.20.tgz", - "integrity": "sha512-8OaIKfzL5cpx8eCMAhhvTlft8GYF8b2eQr6JkCyVdrgjcytyOmPCXrqXFcUnhonRpLlh5yxEZVohm6mzaowUOw==" - }, - "uglify-js": { - "version": "3.4.10", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", - "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", - "requires": { - "commander": "~2.19.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==" - } - } + "version": "0.7.21", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.21.tgz", + "integrity": "sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ==" }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", @@ -13361,11 +13387,6 @@ "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" - }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -13396,24 +13417,13 @@ } }, "url-loader": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-2.1.0.tgz", - "integrity": "sha512-kVrp/8VfEm5fUt+fl2E0FQyrpmOYgMEkBsv8+UDP1wFhszECq5JyGF33I7cajlVY90zRZ6MyfgKXngLvHYZX8A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-2.3.0.tgz", + "integrity": "sha512-goSdg8VY+7nPZKUEChZSEtW5gjbS66USIGCeSJ1OVOJ7Yfuh/36YxCwMi5HVEJh6mqUYOoy3NJ0vlOMrWsSHog==", "requires": { "loader-utils": "^1.2.3", "mime": "^2.4.4", - "schema-utils": "^2.0.0" - }, - "dependencies": { - "schema-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.5.0.tgz", - "integrity": "sha512-32ISrwW2scPXHUSusP8qMg5dLUawKkyV+/qIEV9JdXKx+rsM6mi8vZY8khg2M69Qom16rtroWXD3Ybtiws38gQ==", - "requires": { - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1" - } - } + "schema-utils": "^2.5.0" } }, "url-parse": { @@ -13436,9 +13446,9 @@ "integrity": "sha1-EWsCVEjJtQAIHN+/H01sbDfYg30=" }, "utfstring": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/utfstring/-/utfstring-2.0.0.tgz", - "integrity": "sha512-/ugBfyvIoLe9xqkFHio3CxXnpUKQ1p2LfTxPr6QTRj6GiwpHo73YGdh03UmAzDQNOWpNIE0J5nLss00L4xlWgg==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/utfstring/-/utfstring-2.0.1.tgz", + "integrity": "sha512-x8lx0NGB2OUxOOvFE3z4feOpJWrVrllGRzJq4h6H70bh3sincW+LAlexHBFD5jzV9sZ5qcabZcCwA7ZD6MdUkg==" }, "util": { "version": "0.10.3", @@ -13461,12 +13471,14 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", + "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.2", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.0" } }, "utila": { @@ -13480,9 +13492,9 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, "v8-compile-cache": { "version": "2.1.0", @@ -13504,9 +13516,9 @@ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, "vendors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.3.tgz", - "integrity": "sha512-fOi47nsJP5Wqefa43kyWSg80qF+Q3XA6MUkgi7Hp1HQaKDQW4cQrK2D0P7mmbFtsV1N89am55Yru/nyEwRubcw==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", + "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==" }, "verror": { "version": "1.10.0", @@ -13519,9 +13531,9 @@ } }, "vm-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", - "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" }, "w3c-hr-time": { "version": "1.0.1", @@ -13565,170 +13577,1332 @@ "chokidar": "^2.0.2", "graceful-fs": "^4.1.2", "neo-async": "^2.5.0" - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==" - }, - "webpack": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.41.0.tgz", - "integrity": "sha512-yNV98U4r7wX1VJAj5kyMsu36T8RPPQntcb5fJLOsMz/pt/WrKC0Vp1bAlqPLkA1LegSwQwf6P+kAbyhRKVQ72g==", - "requires": { - "@webassemblyjs/ast": "1.8.5", - "@webassemblyjs/helper-module-context": "1.8.5", - "@webassemblyjs/wasm-edit": "1.8.5", - "@webassemblyjs/wasm-parser": "1.8.5", - "acorn": "^6.2.1", - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.3", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.4.0", - "loader-utils": "^1.2.3", - "memory-fs": "^0.4.1", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.1", - "neo-async": "^2.6.1", - "node-libs-browser": "^2.2.1", - "schema-utils": "^1.0.0", - "tapable": "^1.1.3", - "terser-webpack-plugin": "^1.4.1", - "watchpack": "^1.6.0", - "webpack-sources": "^1.4.1" }, "dependencies": { - "acorn": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", - "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==" + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "fsevents": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", + "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1", + "node-pre-gyp": "*" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.3", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "debug": { + "version": "3.2.6", + "bundled": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.7", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.6", + "bundled": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.3", + "bundled": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "bundled": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "optional": true + }, + "minipass": { + "version": "2.9.0", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "needle": { + "version": "2.4.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.14.0", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4.4.2" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.7", + "bundled": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.7.1", + "bundled": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "optional": true + }, + "semver": { + "version": "5.7.1", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "4.4.13", + "bundled": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "yallist": { + "version": "3.1.1", + "bundled": true, + "optional": true + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + } + } + }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==" + }, + "webpack": { + "version": "4.41.5", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.41.5.tgz", + "integrity": "sha512-wp0Co4vpyumnp3KlkmpM5LWuzvZYayDwM2n17EHFr4qxBBbRokC7DJawPJC7TfSFZ9HZ6GsdH40EBj4UV0nmpw==", + "requires": { + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-module-context": "1.8.5", + "@webassemblyjs/wasm-edit": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5", + "acorn": "^6.2.1", + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^4.1.0", + "eslint-scope": "^4.0.3", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.4.0", + "loader-utils": "^1.2.3", + "memory-fs": "^0.4.1", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.1", + "neo-async": "^2.6.1", + "node-libs-browser": "^2.2.1", + "schema-utils": "^1.0.0", + "tapable": "^1.1.3", + "terser-webpack-plugin": "^1.4.3", + "watchpack": "^1.6.0", + "webpack-sources": "^1.4.1" + }, + "dependencies": { + "acorn": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", + "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==" + }, + "cacache": { + "version": "12.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", + "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "ssri": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "terser-webpack-plugin": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", + "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", + "requires": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^2.1.2", + "source-map": "^0.6.1", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + } + } + } + }, + "webpack-dev-middleware": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz", + "integrity": "sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw==", + "requires": { + "memory-fs": "^0.4.1", + "mime": "^2.4.4", + "mkdirp": "^0.5.1", + "range-parser": "^1.2.1", + "webpack-log": "^2.0.0" + } + }, + "webpack-dev-server": { + "version": "3.10.2", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.10.2.tgz", + "integrity": "sha512-pxZKPYb+n77UN8u9YxXT4IaIrGcNtijh/mi8TXbErHmczw0DtPnMTTjHj+eNjkqLOaAZM/qD7V59j/qJsEiaZA==", + "requires": { + "ansi-html": "0.0.7", + "bonjour": "^3.5.0", + "chokidar": "^2.1.8", + "compression": "^1.7.4", + "connect-history-api-fallback": "^1.6.0", + "debug": "^4.1.1", + "del": "^4.1.1", + "express": "^4.17.1", + "html-entities": "^1.2.1", + "http-proxy-middleware": "0.19.1", + "import-local": "^2.0.0", + "internal-ip": "^4.3.0", + "ip": "^1.1.5", + "is-absolute-url": "^3.0.3", + "killable": "^1.0.1", + "loglevel": "^1.6.6", + "opn": "^5.5.0", + "p-retry": "^3.0.1", + "portfinder": "^1.0.25", + "schema-utils": "^1.0.0", + "selfsigned": "^1.10.7", + "semver": "^6.3.0", + "serve-index": "^1.9.1", + "sockjs": "0.3.19", + "sockjs-client": "1.4.0", + "spdy": "^4.0.1", + "strip-ansi": "^3.0.1", + "supports-color": "^6.1.0", + "url": "^0.11.0", + "webpack-dev-middleware": "^3.7.2", + "webpack-log": "^2.0.0", + "ws": "^6.2.1", + "yargs": "12.0.5" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "fsevents": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", + "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1", + "node-pre-gyp": "*" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.3", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "debug": { + "version": "3.2.6", + "bundled": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.7", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.6", + "bundled": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.3", + "bundled": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "bundled": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "optional": true + }, + "minipass": { + "version": "2.9.0", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "needle": { + "version": "2.4.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.14.0", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4.4.2" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.7", + "bundled": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.7.1", + "bundled": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "optional": true + }, + "semver": { + "version": "5.7.1", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "4.4.13", + "bundled": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "yallist": { + "version": "3.1.1", + "bundled": true, + "optional": true + } } - } - } - }, - "webpack-dev-middleware": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz", - "integrity": "sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw==", - "requires": { - "memory-fs": "^0.4.1", - "mime": "^2.4.4", - "mkdirp": "^0.5.1", - "range-parser": "^1.2.1", - "webpack-log": "^2.0.0" - } - }, - "webpack-dev-server": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.2.1.tgz", - "integrity": "sha512-sjuE4mnmx6JOh9kvSbPYw3u/6uxCLHNWfhWaIPwcXWsvWOPN+nc5baq4i9jui3oOBRXGonK9+OI0jVkaz6/rCw==", - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.0.0", - "compression": "^1.5.2", - "connect-history-api-fallback": "^1.3.0", - "debug": "^4.1.1", - "del": "^3.0.0", - "express": "^4.16.2", - "html-entities": "^1.2.0", - "http-proxy-middleware": "^0.19.1", - "import-local": "^2.0.0", - "internal-ip": "^4.2.0", - "ip": "^1.1.5", - "killable": "^1.0.0", - "loglevel": "^1.4.1", - "opn": "^5.1.0", - "portfinder": "^1.0.9", - "schema-utils": "^1.0.0", - "selfsigned": "^1.9.1", - "semver": "^5.6.0", - "serve-index": "^1.7.2", - "sockjs": "0.3.19", - "sockjs-client": "1.3.0", - "spdy": "^4.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^6.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "^3.5.1", - "webpack-log": "^2.0.0", - "yargs": "12.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { - "ansi-regex": "^3.0.0" + "is-extglob": "^2.1.0" } } } }, - "decamelize": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", - "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", + "is-absolute-url": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", + "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==" + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "requires": { - "xregexp": "4.0.0" + "binary-extensions": "^1.0.0" } }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" - }, "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", "requires": { - "number-is-nan": "^1.0.0" + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" } }, "require-main-filename": { @@ -13736,30 +14910,36 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } }, - "sockjs-client": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.3.0.tgz", - "integrity": "sha512-R9jxEzhnnrdxLCNln0xg5uGHqMnkhPSTzUZH2eXcR03S/On9Yvoq2wyUZILRUhZCNVu2PmwWVoyuiPz8th8zbg==", + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "debug": "^3.2.5", - "eventsource": "^1.0.7", - "faye-websocket": "~0.11.1", - "inherits": "^2.0.3", - "json3": "^3.3.2", - "url-parse": "^1.4.3" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "ms": "^2.1.1" + "ansi-regex": "^3.0.0" } } } @@ -13789,6 +14969,14 @@ "strip-ansi": "^3.0.1" }, "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -13801,13 +14989,21 @@ } } }, + "ws": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "requires": { + "async-limiter": "~1.0.0" + } + }, "yargs": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz", - "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==", + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", "requires": { "cliui": "^4.0.0", - "decamelize": "^2.0.0", + "decamelize": "^1.2.0", "find-up": "^3.0.0", "get-caller-file": "^1.0.1", "os-locale": "^3.0.0", @@ -13817,15 +15013,16 @@ "string-width": "^2.0.0", "which-module": "^2.0.0", "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^10.1.0" + "yargs-parser": "^11.1.1" } }, "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", "requires": { - "camelcase": "^4.1.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } @@ -13840,14 +15037,26 @@ } }, "webpack-manifest-plugin": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/webpack-manifest-plugin/-/webpack-manifest-plugin-2.1.1.tgz", - "integrity": "sha512-2zqJ6mvc3yoiqfDjghAIpljhLSDh/G7vqGrzYcYqqRCd/ZZZCAuc/YPE5xG0LGpLgDJRhUNV1H+znyyhIxahzA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/webpack-manifest-plugin/-/webpack-manifest-plugin-2.2.0.tgz", + "integrity": "sha512-9S6YyKKKh/Oz/eryM1RyLVDVmy3NSPV0JXMRhZ18fJsq+AwGxUY34X54VNwkzYcEmEkDwNxuEOboCZEebJXBAQ==", "requires": { "fs-extra": "^7.0.0", "lodash": ">=3.5 <5", "object.entries": "^1.1.0", "tapable": "^1.0.0" + }, + "dependencies": { + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } } }, "webpack-sources": { @@ -13915,10 +15124,10 @@ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" }, "workbox-background-sync": { "version": "4.3.1", @@ -14107,6 +15316,16 @@ "strip-ansi": "^5.0.0" }, "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -14168,11 +15387,6 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, - "xregexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz", - "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==" - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -14184,9 +15398,17 @@ "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "yaml": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.7.2.tgz", + "integrity": "sha512-qXROVp90sb83XtAoqE8bP9RwAkTTZbugRUTm5YeFCBfNRPEp2YzTeqWiz7m5OORHzEvrA/qcGS8hp/E+MMROYw==", + "requires": { + "@babel/runtime": "^7.6.3" + } }, "yargs": { "version": "13.3.0", @@ -14205,6 +15427,16 @@ "yargs-parser": "^13.1.1" }, "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", diff --git a/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/package.json b/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/package.json index 7d3222804ef..61ab2aab39e 100644 --- a/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/package.json +++ b/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/package.json @@ -4,11 +4,11 @@ "private": true, "homepage": "./site", "dependencies": { - "antd": "^3.25.0", - "react": "^16.11.0", - "react-dom": "^16.11.0", - "react-scripts": "3.2.0", - "swagger-ui-react": "^3.10.0" + "antd": "^4.0.0", + "react": "^16.13.0", + "react-dom": "^16.13.0", + "react-scripts": "^3.4.0", + "swagger-ui-react": "^3.25.0" }, "scripts": { "start": "react-scripts start", diff --git a/docker/Dockerfile b/docker/Dockerfile index 6c7cabc9a1d..72f80a53769 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,11 +5,25 @@ ARG BUILD_TIMESTAMP ARG VERSION ARG GIT_REVISION +ENV container docker +RUN yum -y update; yum clean all +RUN yum -y install systemd; yum clean all; \ +(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ +rm -f /lib/systemd/system/multi-user.target.wants/*;\ +rm -f /etc/systemd/system/*.wants/*;\ +rm -f /lib/systemd/system/local-fs.target.wants/*; \ +rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ +rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ +rm -f /lib/systemd/system/basic.target.wants/*;\ +rm -f /lib/systemd/system/anaconda.target.wants/*; +VOLUME [ "/sys/fs/cgroup" ] +CMD ["/usr/sbin/init"] + # Install java-11-openjdk as a pre requirement -RUN rpmkeys --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 && \ - yum update --setopt=tsflags=nodocs -y -q -e 0 && \ - yum install --setopt=tsflags=nodocs -y -q -e 0 java-11-openjdk && \ - yum clean all +RUN rpmkeys --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 +RUN yum update --setopt=tsflags=nodocs -y -q -e 0 +RUN yum install --setopt=tsflags=nodocs -y -q -e 0 java-11-openjdk +RUN yum clean all # Set JAVA_HOME environment variable ENV JAVA_HOME /etc/alternatives/jre diff --git a/docker/config/snowowl.yml b/docker/config/snowowl.yml index e974b8831ed..26afc765751 100644 --- a/docker/config/snowowl.yml +++ b/docker/config/snowowl.yml @@ -28,7 +28,19 @@ snomed: - code: en-gb refSetIds: ["900000000000508004"] + - + code: en-x-999001261000000100 + refSetIds: ["999001261000000100"] + - + code: en-x-999000671000001103 + refSetIds: ["999000671000001103"] monitoring: enabled: true +repository: + index: + clusterUrl: "${ELASTICSEARCH_CLUSTER_URL}" + connectTimeout: "${ELASTICSEARCH_CONNECT_TIMEOUT}" + socketTimeout: "${ELASTICSEARCH_SOCKET_TIMEOUT}" + From 1f42cf6388f85507f55676947773b8698f154dd5 Mon Sep 17 00:00:00 2001 From: ivelina-yordanova <56301327+ivelina-yordanova@users.noreply.github.com> Date: Tue, 3 Mar 2020 12:47:22 +0000 Subject: [PATCH 4/7] [CHR-1516] - add curl (#6) * chr-1516 - fix deployment - install curl + debug it * chr-1516 - fix release version * chr-1516 - get rid of unnecessary env var * chr-1516 - add langs again * chr-1516 - revert debug config --- .circleci/config.yml | 12 ++++-------- Makefile | 4 ++-- .../src/configuration/snowowl.yml | 6 ++++++ .../src/configuration/snowowl.yml | 6 ++++++ .../assembly/common/configuration/snowowl.yml | 6 ++++++ .../src/configuration/snowowl.yml | 6 ++++++ 6 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b7bdd84fe65..83679491d86 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -79,7 +79,7 @@ jobs: name: Build prerequisites command: | docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" quay.io - apk add --no-cache make=4.2.1-r2 nodejs npm openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community + apk add --no-cache make=4.2.1-r2 nodejs npm curl openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community npm config set unsafe-perm true npm install -g npm - save_cache: @@ -95,12 +95,12 @@ jobs: make build-project export SNOWOWL_RPM_PACKAGE=`find ./releng/com.b2international.snowowl.server.update/target -name "snow-owl-oss*.rpm"` cp "${SNOWOWL_RPM_PACKAGE}" ./docker/`basename "${SNOWOWL_RPM_PACKAGE}"` - export RELEASE_VERSION=`git describe --abbrev=0 --tags` make build-docker make push - deploy: name: Deploy dev - command: make deploy-dev + command: | + make deploy-dev deploy-service-staging: <<: *env steps: @@ -118,12 +118,8 @@ jobs: name: Build prerequisites command: | docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" quay.io - apk add --no-cache make=4.2.1-r2 nodejs npm openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community + apk add --no-cache make=4.2.1-r2 nodejs npm curl openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community - deploy: name: Staging Deploy command: | make deploy-staging - - - - diff --git a/Makefile b/Makefile index 6003e23f32c..234a7e2bafe 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ NAME=chr-terminology-server -GIT_VERSION=$(shell git rev-parse HEAD) +RELEASE_VERSION=$(shell git rev-parse HEAD) SEMVER_VERSION=$(shell git describe --abbrev=0 --tags) REPO=quay.io/babylonhealth DEPLOY_DEV_URL=http://dev-ai-deploy.babylontech.co.uk:5199/job/kube-deploy-dev/buildWithParameters @@ -15,7 +15,7 @@ build-docker: --build-arg SNOWOWL_RPM_PACKAGE=`basename "${SNOWOWL_RPM_PACKAGE}"` \ --build-arg BUILD_TIMESTAMP=`date +%s` \ --build-arg VERSION="${RELEASE_VERSION}" \ - --build-arg GIT_REVISION="${GIT_VERSION}" \ + --build-arg GIT_REVISION="${RELEASE_VERSION}" \ -t $(REPO)/$(NAME):$(RELEASE_VERSION) push: diff --git a/core/com.b2international.snowowl.core.rest.tests/src/configuration/snowowl.yml b/core/com.b2international.snowowl.core.rest.tests/src/configuration/snowowl.yml index a5f1311ce7d..a5c3453ffd2 100644 --- a/core/com.b2international.snowowl.core.rest.tests/src/configuration/snowowl.yml +++ b/core/com.b2international.snowowl.core.rest.tests/src/configuration/snowowl.yml @@ -21,3 +21,9 @@ snomed: - code: en-gb refSetIds: ["900000000000508004"] + - + code: en-x-999001261000000100 + refSetIds: ["999001261000000100"] + - + code: en-x-999000671000001103 + refSetIds: ["999000671000001103"] diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/src/configuration/snowowl.yml b/fhir/com.b2international.snowowl.fhir.rest.tests/src/configuration/snowowl.yml index 9f69bcbf9cb..f02706bad0c 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/src/configuration/snowowl.yml +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/src/configuration/snowowl.yml @@ -21,3 +21,9 @@ snomed: - code: en-gb refSetIds: ["900000000000508004"] + - + code: en-x-999001261000000100 + refSetIds: ["999001261000000100"] + - + code: en-x-999000671000001103 + refSetIds: ["999000671000001103"] diff --git a/releng/com.b2international.snowowl.server.update/assembly/common/configuration/snowowl.yml b/releng/com.b2international.snowowl.server.update/assembly/common/configuration/snowowl.yml index c5e98e6ddb9..97022836032 100644 --- a/releng/com.b2international.snowowl.server.update/assembly/common/configuration/snowowl.yml +++ b/releng/com.b2international.snowowl.server.update/assembly/common/configuration/snowowl.yml @@ -36,6 +36,12 @@ snomed: - code: en-gb refSetIds: ["900000000000508004"] + - + code: en-x-999001261000000100 + refSetIds: ["999001261000000100"] + - + code: en-x-999000671000001103 + refSetIds: ["999000671000001103"] # Request execution metrics (response-time, jvm, gc, etc.) #monitoring: diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/configuration/snowowl.yml b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/configuration/snowowl.yml index 23260d9ed0e..5eabf202be4 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/configuration/snowowl.yml +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/configuration/snowowl.yml @@ -21,6 +21,12 @@ snomed: - code: en-gb refSetIds: ["900000000000508004"] + - + code: en-x-999001261000000100 + refSetIds: ["999001261000000100"] + - + code: en-x-999000671000001103 + refSetIds: ["999000671000001103"] # Disable concrete domains, we are going to import the required concepts to an extension concreteDomainSupport: false maxReasonerCount: 1 From 4848126fe66892336f9e1ea5a58999649361cffe Mon Sep 17 00:00:00 2001 From: ivelina-yordanova <56301327+ivelina-yordanova@users.noreply.github.com> Date: Wed, 4 Mar 2020 09:31:37 +0000 Subject: [PATCH 5/7] [CHR-1516] - merge from master B2ihealthcare 7.x (#8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * SO-3892: Change member status to active if refset already contains ... ...the inactive concept, do not duplicate members. * SO-3881: Regenerate ECL grammar - renamed the following rules to be in sync with the specification and to avoid collision when ECL is mixed with other grammars: - Refinement -> EclRefinement - FocusConcept -> EclFocusConcept - ConceptReference -> EclConceptReference - AttributeGroup -> EclAttributeGroup - AttributeSet -> EclAttributeSet - removed unused terminal '!' https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Regenerate QL grammar due to ECL changes https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Share basic parser tests for Query Language https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Remove unused files https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Regenerate SCG grammar to synchronize terminal names ... among existing grammar definitions - removed Xtend stubs https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Replace AND, OR, MINUS and COMMA with grammar terminals - this is necessary to avoid collision with other derived language terminals https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Replace AND, OR, MINUS and COMMA with grammar terminals - add 'Filter' suffix to Conjunction, Disjunction and Exclusion grammar rules to distinguish rules and terminals * SO-3881: Share initial Xtext definition of ETL https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Share parser tests for ETL https://snowowl.atlassian.net/browse/SO-3881 * SO-3892: Handle MemberChangeKind.CHANGE as added * SO-3881: Prefer upper case version of AND / OR / MINUS in case of ... ECL serialization - generated extendable Xtext serializer classes - added parsing tests https://snowowl.atlassian.net/browse/SO-3881 * [core] Allow customization of component adjustment during publication * SO-3881: Fix various issues in ETL grammar definition - allow slot name to be unquoted with certain restrictions - fix whitespace in TokenReplacementSlot - introduce custom cardinality rule compared to Ecl.Cardinality - make exclusive terminals optional in integer and decimal ranges https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Add ETL parsing tests to parent pom https://snowowl.atlassian.net/browse/SO-3881 * [history] Ignore many-valued features altogether in HistoryInfoProvider Copy scalar fields to an "empty" CDO revision instead of cloning the original and unsetting the many-valued properties (which can cause an exception, if uninitialized EAttribute lists are present on the revision). * SO-3864: report method not allowed errors properly * SO-3881: Fix issues in ETL grammar definition - rename concept replacement slots for better readability - fix slot integer and slot decimal types - simplify StringReplacementSlot values https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Implement detailed ETL parser tests - added all IHTSDO templates as well https://snowowl.atlassian.net/browse/SO-3881 * [tests] add more specific concept reactivation test cases * SO-3893 #resolve Fix incorrect parentage values when reactivating concept's relationships first then the concept in two different commits. * [export] Create general ExportResult class (filename, UUID pair) * [releng] update changelog with 6.24.0 changes * SO-3881: Remove xtend generated files https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Prevent xtend generated files to be committed https://snowowl.atlassian.net/browse/SO-3881 * SO-3881: Share current ABNF syntax for ECL, SCG and ETL https://snowowl.atlassian.net/browse/SO-3881 * [snomed] accept all SctId statuses when publishing them * [releng] update changelog with 6.24.0 changes * SO-3858: Allow specifying namespace in random id generation * [releng] release 6.24.0 * [releng] prepare 6.25.0-SNAPSHOT * SO-3858: Fix generic validation rules, tests, test setup * SO-3858: Extract language member function variable to helper method * [cis] fix config file name of CIS product * [core] support unprotected routes/requests * [snomed] Update remaining references to Rf2ExportResult * SO-3893: Relocate fix for issue to Taxonomies class (7.x, partial). Stated OWL axiom handling is still missing. * [tests] add more specific concept reactivation test cases (7.x) * SO-3853: Register ValueSet and MappingSet to contribute (7.x) * [snomed.import] Set code system shortname in import details (7.x) * [validation] Add reference set type to OWL axiom members in... (7.x) ...GenericValidationRuleTest * [export] Wrap reads into an IndexReadRequest in SnomedRf2ExportRequest * [core] allow multiple unprotected requests to execute in bulk * [core] always include responseTime metric in request log entries * SO-3881: add ETL and SCG core bundles to snomed.core.feature * SO-3864: set clearResources to true by default in SnowOwlAppRule * [core] merge IndexReadRequest functionality into RepositoryRequest * [mrcm] Remove remaining checked in source files from mrcm.model project * [documentation] Remove non-existent project references from MANIFEST.MF * [releng] update changelog with 7.3.0 changes * [releng] release 7.3.0 * [releng] release 7.3.0 * [releng] update README.md with 7.3.0 release links * [releng] prepare 7.4.0-SNAPSHOT * [core] Ensure that all TerminologyRepositoryPlugin subclasses provide... ...a terminology repository initializer instance (used for initializing a default code system entry for each tooling). * [core] Fix AccessControl subclass on RepositoryClearRequest, move... ...factory method of request builder to RepositoryRequests * [core] Implement RepositoryTransactionContext#clearContents The implementation calls stageRemove on all instances of Revision and subclasses that are visible on the context branch using a matchAll query, at the time of method invocation. * [snomed] convert NumberFormatException to BadRequestException * [oomph] Add preference settings for .* package and static imports * SO-3882: Add ability to define additional component deletion policies... ... in implementations of TerminologyRepositoryConfigurers https://snowowl.atlassian.net/browse/SO-3882 * SO-3882: Fix license header https://snowowl.atlassian.net/browse/SO-3882 * SO-3882: Fix invalid type in deletion policy rule https://snowowl.atlassian.net/browse/SO-3882 * [snomed] add support for module() expand * [api] change type of SnomedConcept.definitionStatus to SnomedConcept Support expansion of definition status concept via definitionStatus() expand parameter. Remove DefinitionStatus enum literal. * Update core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/id/IDs.java Co-Authored-By: András Péteri * [core] update javadoc suggested in #472 https://github.com/b2ihealthcare/snow-owl/pull/472#discussion_r373996831 * [api] add `id` filter to `commits` API Related to #473. * [api] support `affectedComponentId` details() expand parameter Related to #473. * Cast to distinguish from Map parameter. * SO-3889: Move Charmatcher for invalid file name characters to FileUtils https://snowowl.atlassian.net/browse/SO-3889 * [snomed] remove unnecessary definitionStatusId field from SnomedConcept * [snomed] fix possible definitionStatus NPE when using field selection * SO-3123: Add support for "complex map with map block" type reference sets (#474) - Add SnomedRefSetType enum literal for complex block map - Handle complex block maps in SnomedRefSetUtil methods - Add new "map block" field and refset header to SnomedRf2Headers - Specify supported referenced component type for complex block maps in class RefSetSupport - Add support for complex block map import; update index format - Extend refset member create and update requests with complex block map support; ensure that class cast exceptions are translated to bad requests when inspecting member properties. - Add support for exporting complex block maps to RF2 - Add SnomedDsvExportItemType literal for "map block" field - Add SCTID of complex block map identifier parent concept - Add complex block map type test cases to SNOMED e2e tests - Update FHIR's SnomedConceptMapApiProvider - Update FHIR concept map test cases * Exchanged descriptions. * [core] remove IComponent.ID_FUNCTION * [snomed] fix definitionStatus() expansion issues * [snomed] add acceptabilities() expansion to /descriptions API * [snomed] remove CaseSignificance enum literals * [snomed] support caseSignificance() expansion on descriptions * [core] fix unauthorized issue when executing console commands * SO-3123: Convert mapBlock field to an Integer when importing * SO-3858: Add support for nested, and reverse nested aggregation * [snomed] remove CharacteristicType enum literals * [snomed] remove RelationshipModifier enum literals * [snomed] support characteristicType() and modifier() expansion... ...on relationships * [qa] fix lgtm issue https://lgtm.com/rules/1511220334423/ * Revert "[qa] fix lgtm issue https://lgtm.com/rules/1511220334423/" This reverts commit 628bad4703b82f7af6564e49e9e57fec279e4983. * [snomed] run effective time restore only in non-import scenarios * [qa] suppress lgtm warning https://lgtm.com/rules/1511220334423/ * Upgrade to Elasticsearch 7.x (#478) * [index] bump version to Elasticsearch 7.5.2 * [index] fix tokenizer/analyzer compile errors * [index] use indices level when fetching cluster health * [index] fix EsNode initialization * [index] fix client compile errors * Fix type and other warnings printed by ES API. * [index] add CMS GC config to index tests * Fixes [parent] data too large issues during tests. * [rf2] reduce RF2 exporter scroll timeout to 1m * [tests] fix negative scores in SortIndexTest * [api] remove scrollId and scrollKeepAlive from Java API * Use searchAfter + branch@timestamp for efficient data snapshot paging/scrolling. * [core] remove scrollId from core models and API * [snomed] remove scrollId from snomed models and API * [rest] remove scrollId from core REST API * [snomed] remove scrollId from snomed REST API * [rf2] use branch@timestamp for RF2 exports * [build] add CMS GC settings to all tycho surefire executions * [launch] add CMS GC settings to all test launch configs * [qa] fix lgtm issues https://lgtm.com/rules/2049510531/ * [index] use bool query with should clauses for term filters with more than the configured index.max_terms_count. * Also make it possible to configure both maxTermsCount and resultWindow values from snowowl.yml (repository.index config). * [index] fix some of the type_removal warnings reported by ES * The remaining warnings thrown by the Mapping API, but we cannot remove it yet, due to our dependency to the TCP client infrastructure. Those warnings will be eliminated once ES 8 is out and we decide to upgrade to that (which will remove the TCP client functionality entirely). Fix some java compile warnings as well. And also add some serialVersionUIDs. * [index] fix nested field name in terms queries. Also fix decimal value conversion when number of terms is less than the max_terms_count. * [index] searches should always track total hits accurately * [core] update comments in SearchResourceRequestIterator * [index] aggregations should always track total hits accurately * [index] fix typo * [docker] bump elasticsearch-oss image version to 7.5.2 * [index] prevent unnecessary mapping updates during startup * [qa] fix lgtm issue https://lgtm.com/rules/1930000368/ * [qa] fix lgtm issue https://lgtm.com/rules/9990077/ * [qa] fix lgtm issue https://lgtm.com/rules/11000068/ * [qa] fix lgtm issue https://lgtm.com/rules/9990077/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] fix lgtm issue https://lgtm.com/rules/2049510531/ * [qa] ignore lgtm issue https://lgtm.com/rules/1954750296/ in Base64 * [qa] ignore lgtm issue https://lgtm.com/rules/1954750296/ (JavaBinCodec) * [qa] fix lgtm issue https://lgtm.com/rules/1507082716110/ * [snomed] remove InactivationIndicator and AssociationType enum literals Use new InactivationProperties object to specify indicator and association target values during component inactivation. Make processInactivation method generic in SnomedComponentUpdateRequest. * [index] Reorder classpath entries, remove source attachment paths * [dev] fix launch configurations * [ecl] add a handy `Ecl.or(expressions)` helper method * [build] fix snomed.validation.snomed build.properties * [api] fix incorrect conversion of null values to empty filter values... ...in refset API (refSetType, referencedComponentType and mapTargetComponentType filters). Fixes #482. * [validation] fix setScrollId call in rule666 * [tests] add missing scripting.groovy fragment * [auth] support pre-7.x LDAP permissions * [snomed] Fix permission level of SNOMED component create requests * [core] Make CLI-authorized IEventBus accessible to console scripts * [validation] use index bulk delete in ValidationIssueDeleteRequest * [snomed] Unset effective time for members inactivated by... ...ComponentInactivationChangeProcessor (activated by the inactivation of referenced core components and containing reference sets). * [snomed] Add filter to inactivate currently active components only * [validation] use dash characters to separate relationships label parts * [commons] Re-introduce JDBC helper class and H2 library * [api] support unpublished effectiveTime filter in REST API (fixes #485) * [snomed] restrict http-core lib to 4.5.3,4.5.4 * [snomed] do not report unauthorized and forbidden errors in the log * [tests] reduce extra tp requirement redundancy in test plugins * [qa] remove unused, deprecated, obsolete classes and functionality * [api] allow descriptions to be created without any lang refset members * [snomed] Don't inactivate referring members which have staged changes This causes problems for eg. existing inactivation indicator members. * SO-3917: Create CIS status update bash script * [index] fix calculation of RevisionCompare added/changed/removed numbers * [cis] fix API endpoint call in change_id_status script * [tests] disable snomed validation tests in TRAVIS env * [commons] Fix potential ResultSet resource leak in JdbcUtils * [validation.snomed] Skip Travis CI tests using a profile * [core] rename numberOfWorkers configuration key to maxThreads Change its default value to `200`. Change EventBus thread pool configuration to be not fixed, keep Runtime.availableProcessor() or maxThreads (at least 1) as core threads, and the configured maxThreads as maximum number of allowed event bus threads. Deprecate getNumberOfWorkers() and setNumberOfWorkers(), keeping it for compatibility reasons. * [cis] use Assigned for the -a option * [core] keep excess threads available for 1 minute before terminating * [tests] reduce maxThreads to 8 in snomed.core.rest.tests * [build] enable travis-ci profile in .travis.yml * [docs] upgrade api-docs dependencies to latest version * [tests] disable EclSerializerTest temporarily * [api] fix incorrect paramType value for nested query parameters Fixes #441 * [eventbus] remove unnecessary finalize method (unsupported from java9) * [snomed] use Promise chaining in SnomedEclRefinementEvaluator * [tests] enable EclSerializerTest * [api] make sure we time out from ECL evaluations after 3 minutes * [core] change default REST API timeout to 2 minutes in most of the... ...endpoints Add timeout values to server side Promise.getSync calls. * [snomed] fix OWL expression conversion issue * [build] skip validation test execution via skip xml node * [tests] increase max number of threads in snomed tests * [core] constrain concurrency level to the 1-4 range * [ci] setup maven GitHub action workflow * [ci] add Java CI GitHub action badge to README * [doc] replace Travis shield badge... ...with GitHub workflow badge * [ci] add .m2 cache step * [core] use custom queue implementation and rejection policy... ...to properly scale eventbus worker thread pool to the configured maxThreads. Additional info: https://stackoverflow.com/questions/15485840/threadpoolexecutor-with-unbounded-queue-not-creating-new-threads * [ci] run mvn clean verify in GH workflow * [ci] cache core.rest/api-docs npm dependencies * [tests] use default-test execution instead of custom execution... ...in validation.snomed module tests. Fixes build failures in Travis and GH Workflow. * [test] remove unnecessary maxThreads configuration key from snomed tests * [ci] add back snomed.core.rest.tests module * [core] Add ApiError JSON object to errored out remote jobs where the... ...source is not an instance of ApiException * [snomed] Allow filtering reference set members by complex map block * [ci] add missing project to dist project Reports code coverage from tests ql.tests, etl.tests, scg.tests modules. * [ci] remove unnecessary travis-ci profile from script * [request] Remove unnecessary method override * SO-3885: Allow SnomedBulkRequest instantiation outside of package https://snowowl.atlassian.net/browse/SO-3885 * SO-3916 #resolve Set definitionStatusId to primitive when inactivating concept. Also, support definitionStatusId declaration when creating concept. * [index] use list instead of treeset in mergeSources COMMIT script param * [compare] Avoid counting versioning among new compnents * [commons] Extend constructor to find resources relative to class ... ... in case the test bundle is a fragment * [datastore] Clean up CompositeComponentDeletionPolicy * Test plugins optional. * [snomed] Allow external configuration of namespace-module assigners * SO-3882: Refactor CompositeComponentDeletionPolicy - use ComponentDeletionPolicy instead of Predicate - add mergeWith method to combine multiple composite policies https://snowowl.atlassian.net/browse/SO-3882 * [config] remove unnecessary systemUser configuration key * [api] fix bug details() expansion affectedComponentId filtering Fixes #473. * [core] fix RevisionSegment.withEnd(newEnd) logic Do not extend the segment to later timestamps than the currently set end value. Fixes branch@timestamp scenarios where multiple parent branches are participating in the search. * [index] increase embedded Elasticsearch max_buckets to 1.500.000... ...temporarily A proper fix for large aggregations using composite agg is planned for v7.5.0. * Revert "[core] fix RevisionSegment.withEnd(newEnd) logic" This reverts commit 7db86acac27f5c65241dd01650b6ebb46a0410de. * [core] use new RevisionSegment.restrictEnd(restrictTo) method... ...to restrict segments to certain timestamp value. Fixes branch@timestamp scenarios where multiple parent branches with shorter segments are participating in the search. * [core] remove diagnostic code statement * [cis] allow ID registration of already published IDs * [cis] remove unnecessary validation of incoming ID status changes Changing ID status should work in a best effort manner and it should not fail and report back any IDs that cannot be transitioned to the desired state. * [tests] fix failed DefaultSnomedIdentifierServiceTest case * [releng] update changelog with 7.4.0 changes * Bump netty.version from 4.1.43.Final to 4.1.45.Final Bumps `netty.version` from 4.1.43.Final to 4.1.45.Final. Updates `netty-buffer` from 4.1.43.Final to 4.1.45.Final - [Release notes](https://github.com/netty/netty/releases) - [Commits](https://github.com/netty/netty/compare/netty-4.1.43.Final...netty-4.1.45.Final) Updates `netty-codec` from 4.1.43.Final to 4.1.45.Final - [Release notes](https://github.com/netty/netty/releases) - [Commits](https://github.com/netty/netty/compare/netty-4.1.43.Final...netty-4.1.45.Final) Updates `netty-codec-http` from 4.1.43.Final to 4.1.45.Final - [Release notes](https://github.com/netty/netty/releases) - [Commits](https://github.com/netty/netty/compare/netty-4.1.43.Final...netty-4.1.45.Final) Updates `netty-common` from 4.1.43.Final to 4.1.45.Final - [Release notes](https://github.com/netty/netty/releases) - [Commits](https://github.com/netty/netty/compare/netty-4.1.43.Final...netty-4.1.45.Final) Updates `netty-handler` from 4.1.43.Final to 4.1.45.Final - [Release notes](https://github.com/netty/netty/releases) - [Commits](https://github.com/netty/netty/compare/netty-4.1.43.Final...netty-4.1.45.Final) Updates `netty-resolver` from 4.1.43.Final to 4.1.45.Final - [Release notes](https://github.com/netty/netty/releases) - [Commits](https://github.com/netty/netty/compare/netty-4.1.43.Final...netty-4.1.45.Final) Updates `netty-transport` from 4.1.43.Final to 4.1.45.Final - [Release notes](https://github.com/netty/netty/releases) - [Commits](https://github.com/netty/netty/compare/netty-4.1.43.Final...netty-4.1.45.Final) Signed-off-by: dependabot[bot] * [ci] add codecov upload step to maven workflow * Update maven.yml * [ci] trigger the build workflow on pull request * [ci] trigger build only when... ...push, pr changes against the 7.x branch * [commons] Make set of invalid resource characters visible * [config] remove deprecated `snomed.ids` configuration key * [classify] refactor namespace and module assignment logic Require module and namespace to be specified in SaveJobRequests. Remove defaultModule and defaultNamespace from snowowl.yml configuratio file. Allow multiple assigner instances from the same type, fixes parallel classification issues in different extension branches. Add mandatory `module` and `namespace` parameters to classification save endpoint. * [classify] add NotEmpty annotation to ClassificationRunRestUpdate * [classify] remove 'default' assigner type from classification run update * [releng] change commons.logging require-bundle directives to... ...import-package statements * [releng] add commons-logging jar dependency to core.rest module * [releng] release 7.4.0 * [core] Remove SNAPSHOT suffix from logback.config * [releng] release 7.4.0 (update links) * [releng] prepare 7.5.0-SNAPSHOT * [docs] add from-6x migration guide * [scripts] remove db related scripts from assembly * [docs] add backup guide * [docs] update JDK links * [api] fix malformed Location header values Fixes #500 * [api] fix possible NPE when not supplying any acceptability values * revert package-lock.json * regenerate lock * chr-1516- get rid of the github config, duplicate of circleCi or unnecessary Co-authored-by: Gabriella Deak <45433791+adeakgabi@users.noreply.github.com> Co-authored-by: Gábor Nagy Co-authored-by: Mark Czotter Co-authored-by: András Péteri Co-authored-by: AAAlinaaa Co-authored-by: Balazs Banfai Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/stale.yml | 15 - CHANGELOG.md | 74 + README.md | 14 +- SUMMARY.md | 3 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../common/scripts/change_id_status.sh | 25 + .../pom.xml | 2 +- .../snow-owl-cis.product | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 8 +- .../pom.xml | 2 +- .../snowowl/snomed/cis/client/CisClient.java | 7 +- .../DefaultSnomedIdentifierService.java | 26 +- cis/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../com.b2international.commons.base/pom.xml | 2 +- .../b2international/commons/FileUtils.java | 8 + .../META-INF/MANIFEST.MF | 2 +- .../com.b2international.commons.test/pom.xml | 2 +- .../com.b2international.commons/.classpath | 3 +- .../META-INF/MANIFEST.MF | 14 +- commons/com.b2international.commons/pom.xml | 14 +- .../b2international/commons/db/JdbcUtils.java | 429 ++++ .../commons/db/RuntimeSQLException.java | 59 + .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../com.b2international.index.tests/pom.xml | 13 +- .../META-INF/MANIFEST.MF | 4 +- commons/com.b2international.index/pom.xml | 2 +- .../index/es/EsDocumentWriter.java | 2 +- .../com/b2international/index/es/EsNode.java | 7 + .../index/revision/RevisionBranchRef.java | 5 +- .../index/revision/RevisionCompare.java | 29 +- .../index/revision/RevisionSegment.java | 10 +- .../index/revision/StagingArea.java | 2 +- commons/com.b2international.mapdb/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../com.b2international.scripting.api/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- commons/pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 17 +- .../src/configuration/snowowl.yml | 3 - .../.classpath | 1 + .../META-INF/MANIFEST.MF | 6 +- .../pom.xml | 493 ++--- .../snow-owl-api-docs/package-lock.json | 737 ++++++- .../core/rest/AbstractRestService.java | 10 +- .../codesystem/CodeSystemRestService.java | 7 +- .../rest/codesystem/CodeSystemService.java | 7 +- .../codesystem/CodeSystemVersionService.java | 9 +- .../ModelAttributeParameterExpanderExt.java | 29 +- .../validation/ValidationRestService.java | 8 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- core/com.b2international.snowowl.core/pom.xml | 2 +- .../snowowl/core/SimpleFamilyJob.java | 50 - .../core/api/AlreadyLoggedInException.java | 34 - .../api/ITerminologyComponentIdProvider.java | 30 - .../snowowl/core/api/IdComponent.java | 52 - .../core/api/Net4jProtocolConstants.java | 65 - .../snowowl/core/api/NullComponent.java | 70 - .../core/config/SnowOwlConfiguration.java | 14 +- .../snowowl/core/date/EffectiveTimes.java | 22 +- .../core/domain/CollectionResource.java | 2 +- .../snowowl/core/events/util/Promise.java | 6 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 19 +- .../src/configuration/logback-maven.xml | 3 + .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../core/commit/CommitInfoConverter.java | 7 +- .../core/console/CodeSystemsCommand.java | 9 +- .../snowowl/core/console/ScriptsCommand.java | 24 +- .../CompositeComponentDeletionPolicy.java | 68 + .../core/repository/RepositoryBuilder.java | 4 + .../core/repository/RepositoryPlugin.java | 13 +- .../TerminologyRepositoryConfigurer.java | 5 + .../issue/ValidationIssueDeleteRequest.java | 39 +- .../config/RepositoryConfiguration.java | 31 +- .../datastore/remotejobs/RemoteJob.java | 13 +- .../request/compare/BranchCompareRequest.java | 17 +- .../CodeSystemVersionCreateRequest.java | 7 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../identity/ldap/LdapIdentityProvider.java | 8 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../feature.xml | 23 +- .../pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- core/pom.xml | 2 +- dist/pom.xml | 50 +- docs/backup/index.md | 11 +- docs/migration/from-6x.md | 53 + documentation/META-INF/MANIFEST.MF | 2 +- documentation/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 17 +- .../src/configuration/snowowl.yml | 3 - .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- fhir/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 3 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../snowowl/internal/eventbus/EventBus.java | 19 +- .../WorkerExecutorServiceFactory.java | 85 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- net4j/com.b2international.snowowl.rpc/pom.xml | 2 +- net4j/pom.xml | 2 +- pom.xml | 1841 ++++++++--------- .../assembly/common/scripts/snowbackup.sh | 505 ----- .../common/scripts/snowowl-install.sh | 1168 ----------- .../scripts/snowowl_cold_backup_mysql.sh | 141 -- .../common/scripts/snowowl_create_db.sh | 48 - .../scripts/snowowl_hot_backup_mysql.sh | 376 ---- .../common/scripts/snowowl_load_db.sh | 47 - .../category.xml | 16 +- .../pom.xml | 2 +- .../snow-owl-oss.product | 2 +- releng/pom.xml | 2 +- releng/target-platform/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 17 +- .../snomed/core/issue/EclSerializerTest.java | 3 +- .../SnomedClassificationRestRequests.java | 7 +- ...edReferenceSetDeletionPerformanceTest.java | 3 +- .../rest/components/SnomedConceptApiTest.java | 21 +- .../core/rest/io/SnomedExportApiTest.java | 69 +- .../src/configuration/snowowl.yml | 1 - .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../rest/SnomedClassificationRestService.java | 18 +- .../core/rest/SnomedConceptRestService.java | 8 +- .../rest/SnomedDescriptionRestService.java | 6 +- .../core/rest/SnomedExportRestService.java | 6 +- .../SnomedReferenceSetMemberRestService.java | 6 +- .../rest/SnomedReferenceSetRestService.java | 9 +- .../rest/SnomedRelationshipRestService.java | 6 +- ...t.java => ClassificationRunRestInput.java} | 6 +- .../domain/ClassificationRunRestUpdate.java | 45 +- .../rest/domain/SnomedConceptRestInput.java | 15 +- .../rest/services/DescriptionService.java | 42 - .../rest/services/FsnJoinerOperation.java | 87 - .../rest/services/SnomedRf2ImportService.java | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 17 +- .../id/AbstractIdentifierServiceTest.java | 20 +- .../cis/CisSnomedIdentifierServiceTest.java | 23 +- .../DefaultSnomedIdentifierServiceTest.java | 2 +- .../META-INF/MANIFEST.MF | 4 +- .../plugin.xml | 10 - .../pom.xml | 2 +- .../snomedNamespaceAndModuleAssigner.exsd | 111 - .../snowowl/snomed/core/SnomedPlugin.java | 8 +- .../core/domain/RelationshipRefinability.java | 82 - .../ecl/SnomedEclRefinementEvaluator.java | 12 +- .../core/label/SnomedConceptNameProvider.java | 71 - .../datastore/AlwalysComplexMapAttribute.java | 49 - .../datastore/IComplexMapAttribute.java | 37 - .../snomed/datastore/IdStorageKeyPair.java | 78 - .../IfAvailableComplexMapAttribute.java | 50 - ...ilableOrDescendantComplexMapAttribute.java | 35 - .../IfExistsComplexMapAttribute.java | 51 - .../snowowl/snomed/datastore/MapSetType.java | 103 - .../snomed/datastore/NormalFormWrapper.java | 94 - .../datastore/PlainComplexMapAttribute.java | 52 - .../datastore/SnomedDeletionPlanMessages.java | 37 - .../snomed/datastore/SnomedMapSetSetting.java | 208 -- .../snomed/datastore/SnomedRefSetUtil.java | 170 +- .../UnspecifiedAlwaysComplexMapAttribute.java | 51 - ...nspecifiedIfExistsComplexMapAttribute.java | 53 - .../config/SnomedCoreConfiguration.java | 52 +- .../converter/SnomedConceptConverter.java | 80 +- .../DefaultNamespaceAndModuleAssigner.java | 38 +- .../ExtensionNamespaceAndModuleAssigner.java | 35 +- .../SnomedNamespaceAndModuleAssigner.java | 60 +- ...medNamespaceAndModuleAssignerProvider.java | 57 - .../datastore/index/SnomedHierarchy.java | 343 --- ...ntEffectiveTimeRestoreChangeProcessor.java | 5 +- .../ComponentInactivationChangeProcessor.java | 14 +- .../change/SnomedRepositoryPreCommitHook.java | 6 +- .../constraint/SnomedConstraintDocument.java | 11 +- .../entry/SnomedRefSetMemberIndexEntry.java | 10 +- .../internal/rf2/SnomedExporterUtil.java | 76 - .../request/DescriptionRequestHelper.java | 307 --- .../datastore/request/SnomedBulkRequest.java | 2 +- .../request/SnomedComponentCreateRequest.java | 2 +- .../request/SnomedComponentUpdateRequest.java | 68 +- .../request/SnomedConceptSearchRequest.java | 7 +- .../request/SnomedConceptUpdateRequest.java | 8 + .../SnomedDescriptionCreateRequest.java | 11 +- ...SnomedDescriptionCreateRequestBuilder.java | 4 +- .../SnomedRefSetMemberSearchRequest.java | 3 + .../SnomedRefSetSearchRequestBuilder.java | 15 +- .../SnomedRepositoryCommitRequestBuilder.java | 22 - .../request/SnomedSearchRequest.java | 3 +- .../request/SnomedSearchRequestBuilder.java | 6 +- .../request/rf2/SnomedRf2ExportRequest.java | 3 +- .../rf2/exporter/Rf2RefSetExporter.java | 11 +- .../SnomedValidationIssueDetailExtension.java | 4 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 3 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../snowowl/snomed/ecl/Ecl.java | 15 +- .../.project | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 3 +- .../.classpath | 2 +- .../.project | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../etl/validation/AbstractEtlValidator.java | 6 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../.project | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 3 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 17 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../snomed/reasoner/SnomedReasonerPlugin.java | 8 + .../request/ClassificationSaveRequest.java | 9 + .../ClassificationSaveRequestBuilder.java | 9 +- .../reasoner/request/SaveJobRequest.java | 27 +- .../request/SaveJobRequestBuilder.java | 9 +- .../.classpath | 2 +- .../.project | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 3 +- .../.project | 8 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../.launch/validation-snomed-tests.launch | 45 + .../META-INF/MANIFEST.MF | 10 +- .../build.properties | 7 +- .../pom.xml | 37 +- .../src/main/resources/scripts/rule666.groovy | 1 - snomed/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../test/commons/SnomedContentRule.java | 6 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- tests/pom.xml | 2 +- 291 files changed, 3676 insertions(+), 6978 deletions(-) delete mode 100644 .github/stale.yml create mode 100644 cis/com.b2international.snowowl.snomed.cis.product/assembly/common/scripts/change_id_status.sh create mode 100644 commons/com.b2international.commons/src/com/b2international/commons/db/JdbcUtils.java create mode 100644 commons/com.b2international.commons/src/com/b2international/commons/db/RuntimeSQLException.java delete mode 100644 core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/SimpleFamilyJob.java delete mode 100644 core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/AlreadyLoggedInException.java delete mode 100644 core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/ITerminologyComponentIdProvider.java delete mode 100644 core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/IdComponent.java delete mode 100644 core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/Net4jProtocolConstants.java delete mode 100644 core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/NullComponent.java create mode 100644 core/com.b2international.snowowl.datastore.server.tests/src/configuration/logback-maven.xml create mode 100644 core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/CompositeComponentDeletionPolicy.java create mode 100644 docs/migration/from-6x.md delete mode 100644 releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowbackup.sh delete mode 100644 releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl-install.sh delete mode 100644 releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_cold_backup_mysql.sh delete mode 100644 releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_create_db.sh delete mode 100644 releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_hot_backup_mysql.sh delete mode 100644 releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_load_db.sh rename snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/{ClassificationRestInput.java => ClassificationRunRestInput.java} (92%) delete mode 100644 snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/DescriptionService.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/schema/snomedNamespaceAndModuleAssigner.exsd delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/RelationshipRefinability.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/label/SnomedConceptNameProvider.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/AlwalysComplexMapAttribute.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IComplexMapAttribute.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IdStorageKeyPair.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IfAvailableComplexMapAttribute.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IfAvailableOrDescendantComplexMapAttribute.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IfExistsComplexMapAttribute.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/MapSetType.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/NormalFormWrapper.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/PlainComplexMapAttribute.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedDeletionPlanMessages.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedMapSetSetting.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/UnspecifiedAlwaysComplexMapAttribute.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/UnspecifiedIfExistsComplexMapAttribute.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/SnomedNamespaceAndModuleAssignerProvider.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/SnomedHierarchy.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/internal/rf2/SnomedExporterUtil.java delete mode 100644 snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/DescriptionRequestHelper.java create mode 100644 snomed/com.b2international.snowowl.validation.snomed/.launch/validation-snomed-tests.launch diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 1d8d4d440a2..00000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 60 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 7 -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - security -# Label to use when marking an issue as stale -staleLabel: wontfix -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e50a1d45a3..dab7a0cd0f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,69 @@ # Change Log All notable changes to this project will be documented in this file. +## 7.4.0 + +### Changes from 6.x stream since 7.3.0 release + +All changes from the `6.x` stream (the 6.25.0 release) have been merged into the `7.4.0` release. See changelog entry `6.25.0` for details. + +### Elasticsearch 7.x upgrade +The supported Elasticsearch version has been upgraded to `7.5.2` (see #478, e19ed34). +Elasticsearch 7.5.2 is backwards compatible with Elasticsearch 6.x, so any dataset that has been created with an earlier Snow Owl 7.x release should be compatible with this release. + +### New Swagger Documentation +From Snow Owl 7.4.0, the API documentation can be found at the URL `http://localhost:8080/snowowl`. (see 418feef) +This new documentation will gather and render all available groups from all available modules. + +### Core +- Add `id` filter to `/commits` API (121d15a, #473) +- Support `affectedComponentId` in `GET /commits` `details()` expand parameter (af8da80, #473) +- Implement RepositoryTransactionContext#clearContents (a540784) +- Change default REST API timeout to 2 minutes in most of the endpoints (ee51b29) + +### Configuration +- Introduce `repository.maxThreads` configuration key (90ddade) + * Replaces `numberOfWorkers` configuration key + * Default value is set to `200` + * The underlying worker pool will start with less threads and grow/shrink based on the number of incoming requests + * Excess threads will terminate after 1 minute (4577b2a) +- Remove unnecessary `systemUser` configuration key, mostly used by tests (24d3785) + +### SNOMED CT +- Add support for "complex map with map block" type reference (b0ce5ce, 824c3b8) +- Allow filtering reference set members by complex `mapBlock` property (4a03c51) +- Support for `module()` expand in all component API endpoints (cd3e5b3) +- Support expansion of `definitionStatus()` in `GET /concept` API (f4ba3e6, 97f1ff9) +- Support `acceptabilities()` expansion in `GET /descriptions` APIs (ecba5d6) +- Support `caseSignificance()` expansion in `GET /descriptions` APIs (81659ce) +- Support `characteristicType()` expansion in `GET /relationships` APIs (a0cd98f) +- Support `modifier()` expansion in `GET /relationships` APIs (a0cd98f) +- Redesign `inactivationProperties` in component endpoints (c0abbdc) +- Support unpublished effectiveTime filter in REST API via `-1` and `Unpublished` values (#485, ebd5521) +- Allow descriptions to be created without any language reference set members (e2fa3c5) +- Change type of `SnomedConcept.definitionStatus` to `SnomedConcept` (f4ba3e6, 2435c7c) +- Migrate validation rule from `6.x` stream to `7.x` (#471) +- Make sure we time out from ECL evaluations after 3 minutes (09293f4) + +### FHIR +- Change ValueSet `compose` property cardinality to `0..1` (e4c4407) + +### Bugs/Improvements +- [core] increase embedded Elasticsearch max_buckets to `1.500.000` temporarily (e164183) +- [core] fix unauthorized issue when executing console commands (14fe6b2) +- [core] prevent unnecessary mapping updates during startup (9f14138) +- [core] fix calculation of RevisionCompare added/changed/removed numbers (9384003) +- [core] fix incorrect paramType value for nested query parameters (5222a5f, #441) +- [core] fix RevisionSegment.withEnd(newEnd) logic, fixes `branch@timestamp` queries in certain deep branching scenarios (4651965) +- [core] respond with HTTP Method Not Allowed properly in REST API (5a16c02) +- [core] improve performance of deletion of huge amounts of validation issues (b5a9f16) +- [snomed] run effective time restore only in non-import scenarios (2eb05b2) +- [snomed] fix OWL expression conversion issue (c49ed26) +- [snomed] fix incorrect conversion of `null` values to empty filter values in refset API (refSetType, referencedComponentType and mapTargetComponentType filters) (f737c14, #482) +- [snomed] unset effective time of inactivated members properly during save (inactivated by another component inactivation) (307879a, b60acf1, eb988de) +- [lgtm] fix errors/warnings reported by LGTM (eacca94, 61f79f5, 4659b04, 0d00a34, c63c1a2, c4d3995, 37b4685, 8f331c2, 5497d95, e018278, a438fe1, e3fdf56, c6368dc, 72faec7, 5456f5a, 204632c, cb17a33, b808eed, 7d8fb27, 325ce93, e02857b, 64623ef, a7226e1, fc2e4b1, 0b769ac) + + ## 7.3.0 ### Changes from 6.x stream since 7.2.0 release @@ -230,6 +293,17 @@ The new improved and shiny Snow Owl 7.x documentation is available at `https://d * Removed `database` configuration options from `repository` node * Removed `revisionCache` configuration option from `repository` node +## 6.25.0 + +### API +- Support `definitionStatusId` in `POST /concepts` endpoint (8552b99) +- Set definitionStatus to primitive automatically when inactivating a concept (8552b99) + +### Bugs/Improvements +- [cis] allow ID registration of already published IDs (ccc225d) +- [cis] do not report unauthorized and forbidden errors in the log (28ac77a) +- [cis] add CIS SCTID status update bash script (96776cc, f78ea65) + ## 6.24.0 ### API diff --git a/README.md b/README.md index dcc24a24281..45ddf6223c3 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Snow Owl® is a highly scalable, open source terminology server with revision-control capabilities and collaborative authoring platform features. It allows you to store, search and author high volumes of terminology artifacts quickly and efficiently. -[![build status](https://img.shields.io/travis/b2ihealthcare/snow-owl/7.x.svg?style=flat-square)](https://travis-ci.org/b2ihealthcare/snow-owl) -[![latest release](https://img.shields.io/github/tag/b2ihealthcare/snow-owl.svg?style=flat-square)](https://github.com/b2ihealthcare/snow-owl/releases/tag/v7.3.0) +[![build status](https://img.shields.io/github/workflow/status/b2ihealthcare/snow-owl/Java%20CI/7.x?style=flat-square)](https://github.com/b2ihealthcare/snow-owl/actions) +[![latest release](https://img.shields.io/github/tag/b2ihealthcare/snow-owl.svg?style=flat-square)](https://github.com/b2ihealthcare/snow-owl/releases/tag/v7.4.0) [![downloads](https://img.shields.io/github/downloads/b2ihealthcare/snow-owl/total.svg?style=flat-square)](https://github.com/b2ihealthcare/snow-owl/releases/) [![Docker](https://img.shields.io/docker/pulls/b2ihealthcare/snow-owl-oss?style=flat-square)](https://hub.docker.com/r/b2ihealthcare/snow-owl-oss) [![GitHub](https://img.shields.io/github/license/b2ihealthcare/snow-owl.svg?style=flat-square)](https://github.com/b2ihealthcare/snow-owl/blob/7.x/LICENSE) @@ -32,16 +32,16 @@ Features include: # Download -* [WINDOWS](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.zip) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.zip.sha512) -* [MACOS/LINUX](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.tar.gz) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.tar.gz.sha512) -* [RPM](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.rpm) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.rpm.sha512) -* [DEB](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.deb) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.3.0/snow-owl-oss-7.3.0.deb.sha512) +* [WINDOWS](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.4.0/snow-owl-oss-7.4.0.zip) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.4.0/snow-owl-oss-7.4.0.zip.sha512) +* [MACOS/LINUX](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.4.0/snow-owl-oss-7.4.0.tar.gz) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.4.0/snow-owl-oss-7.4.0.tar.gz.sha512) +* [RPM](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.4.0/snow-owl-oss-7.4.0.rpm) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.4.0/snow-owl-oss-7.4.0.rpm.sha512) +* [DEB](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.4.0/snow-owl-oss-7.4.0.deb) - [sha](https://github.com/b2ihealthcare/snow-owl/releases/download/v7.4.0/snow-owl-oss-7.4.0.deb.sha512) {% hint style="info" %} This distribution only includes features licensed under the Apache 2.0 license. To get access to the full set of features, please contact [B2i Healthcare](mailto:info@b2i.sg). {% endhint %} -View the detailed release notes [here](https://github.com/b2ihealthcare/snow-owl/releases/tag/v7.3.0). +View the detailed release notes [here](https://github.com/b2ihealthcare/snow-owl/releases/tag/v7.4.0). Not the version you're looking for? View [past releases](https://github.com/b2ihealthcare/snow-owl/releases). diff --git a/SUMMARY.md b/SUMMARY.md index 2eaf74108fb..e37c0164a68 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -55,4 +55,5 @@ * [CodeSystem](docs/api/fhir/codesystems.md) * [ValueSet](docs/api/fhir/valuesets.md) * [ConceptMap](docs/api/fhir/conceptmaps.md) -* [Backup and Restore](docs/backup/index.md) \ No newline at end of file +* [Backup and Restore](docs/backup/index.md) +* [Migrate from 6.x](docs/migration/from-6x.md) \ No newline at end of file diff --git a/cis/com.b2international.snowowl.snomed.cis.feature/feature.xml b/cis/com.b2international.snowowl.snomed.cis.feature/feature.xml index 0aef3ebce3d..7ec3bb79b4b 100644 --- a/cis/com.b2international.snowowl.snomed.cis.feature/feature.xml +++ b/cis/com.b2international.snowowl.snomed.cis.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/cis/com.b2international.snowowl.snomed.cis.feature/pom.xml b/cis/com.b2international.snowowl.snomed.cis.feature/pom.xml index b3591bc91bf..aa3c8b3062a 100644 --- a/cis/com.b2international.snowowl.snomed.cis.feature/pom.xml +++ b/cis/com.b2international.snowowl.snomed.cis.feature/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl cis-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.cis.feature eclipse-feature diff --git a/cis/com.b2international.snowowl.snomed.cis.product/assembly/common/scripts/change_id_status.sh b/cis/com.b2international.snowowl.snomed.cis.product/assembly/common/scripts/change_id_status.sh new file mode 100644 index 00000000000..30732312d74 --- /dev/null +++ b/cis/com.b2international.snowowl.snomed.cis.product/assembly/common/scripts/change_id_status.sh @@ -0,0 +1,25 @@ +#!/bin/bash +new_status='' + +print_usage() { + echo "Usage: + -a: Sets id status to assigned + -p: Sets id status to published + " +} + +while getopts 'ap' flag; do + case "${flag}" in + a) new_status='Assigned' ;; + p) new_status='Published' ;; + *) print_usage + exit 1 ;; + esac +done + +for i in `cat idlist`; do + curl \ + -H "Content-Type: application/json" \ + "http://localhost:9200/snomedids-sctid/sctid/${i}/_update?refresh" \ + -d "{ \"doc\": { \"status\": \"${new_status}\" } }" +done \ No newline at end of file diff --git a/cis/com.b2international.snowowl.snomed.cis.product/pom.xml b/cis/com.b2international.snowowl.snomed.cis.product/pom.xml index f048c7a5704..8e17c301f90 100644 --- a/cis/com.b2international.snowowl.snomed.cis.product/pom.xml +++ b/cis/com.b2international.snowowl.snomed.cis.product/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl cis-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/cis/com.b2international.snowowl.snomed.cis.product/snow-owl-cis.product b/cis/com.b2international.snowowl.snomed.cis.product/snow-owl-cis.product index 8f0f9c74357..1bfe6f0f2ff 100644 --- a/cis/com.b2international.snowowl.snomed.cis.product/snow-owl-cis.product +++ b/cis/com.b2international.snowowl.snomed.cis.product/snow-owl-cis.product @@ -1,7 +1,7 @@ - + diff --git a/cis/com.b2international.snowowl.snomed.cis.rest/META-INF/MANIFEST.MF b/cis/com.b2international.snowowl.snomed.cis.rest/META-INF/MANIFEST.MF index 407e9a0a51d..e4c39718beb 100644 --- a/cis/com.b2international.snowowl.snomed.cis.rest/META-INF/MANIFEST.MF +++ b/cis/com.b2international.snowowl.snomed.cis.rest/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Component Identifier Service Bundle-SymbolicName: com.b2international.snowowl.snomed.cis.rest;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Automatic-Module-Name: com.b2international.snowowl.snomed.cis.rest Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/cis/com.b2international.snowowl.snomed.cis.rest/pom.xml b/cis/com.b2international.snowowl.snomed.cis.rest/pom.xml index 528845980a7..2b267d99393 100644 --- a/cis/com.b2international.snowowl.snomed.cis.rest/pom.xml +++ b/cis/com.b2international.snowowl.snomed.cis.rest/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl cis-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.cis.rest diff --git a/cis/com.b2international.snowowl.snomed.cis/META-INF/MANIFEST.MF b/cis/com.b2international.snowowl.snomed.cis/META-INF/MANIFEST.MF index c217dcac6db..8de9ac68af2 100644 --- a/cis/com.b2international.snowowl.snomed.cis/META-INF/MANIFEST.MF +++ b/cis/com.b2international.snowowl.snomed.cis/META-INF/MANIFEST.MF @@ -2,16 +2,16 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT CIS Bundle-SymbolicName: com.b2international.snowowl.snomed.cis;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Automatic-Module-Name: com.b2international.snowowl.snomed.cis Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", com.b2international.snowowl.datastore;visibility:=reexport, - org.apache.httpcomponents.httpasyncclient;bundle-version="4.1.4", - org.apache.httpcomponents.httpclient;bundle-version="4.5.3", - org.apache.httpcomponents.httpcore;bundle-version="4.4.10" + org.apache.httpcomponents.httpasyncclient;bundle-version="[4.1.4,4.1.5)", + org.apache.httpcomponents.httpclient;bundle-version="[4.5.3,4.5.4)", + org.apache.httpcomponents.httpcore;bundle-version="[4.4.10,4.4.11)" Import-Package: org.slf4j;version="1.7.25" Export-Package: com.b2international.snowowl.snomed.cis, com.b2international.snowowl.snomed.cis.action, diff --git a/cis/com.b2international.snowowl.snomed.cis/pom.xml b/cis/com.b2international.snowowl.snomed.cis/pom.xml index ec7c7b4fedc..59afefc0eca 100644 --- a/cis/com.b2international.snowowl.snomed.cis/pom.xml +++ b/cis/com.b2international.snowowl.snomed.cis/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl cis-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.cis eclipse-plugin diff --git a/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/client/CisClient.java b/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/client/CisClient.java index 6ba456a48f1..b72b50c734d 100644 --- a/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/client/CisClient.java +++ b/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/client/CisClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -131,7 +131,10 @@ private void checkResponseStatus(final HttpResponse response) { final String reasonPhrase = statusLine.getReasonPhrase(); if (statusCode != HttpStatus.SC_OK) { - LOGGER.error("{} {}", statusCode, reasonPhrase); + // log non-authentication related errors + if (statusCode != HttpStatus.SC_UNAUTHORIZED && statusCode != HttpStatus.SC_FORBIDDEN) { + LOGGER.error("{} {}", statusCode, reasonPhrase); + } throw new CisClientException(statusCode, reasonPhrase); } } diff --git a/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/memory/DefaultSnomedIdentifierService.java b/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/memory/DefaultSnomedIdentifierService.java index 4c1a76a2e73..2c504b19854 100644 --- a/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/memory/DefaultSnomedIdentifierService.java +++ b/cis/com.b2international.snowowl.snomed.cis/src/com/b2international/snowowl/snomed/cis/memory/DefaultSnomedIdentifierService.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -113,14 +113,6 @@ public Map register(final Set componentIds) { LOGGER.debug("Registering {} component IDs.", componentIds.size()); final Map sctIds = getSctIds(componentIds); - final Map problemSctIds = ImmutableMap.copyOf(Maps.filterValues(sctIds, Predicates.not(Predicates.or( - SctId::isAvailable, - SctId::isReserved, - SctId::isAssigned)))); - - if (!problemSctIds.isEmpty()) { - throw new SctIdStatusException("Cannot register %s component IDs because they are not available, reserved, or already assigned.", problemSctIds); - } final Map availableOrReservedSctIds = ImmutableMap.copyOf(Maps.filterValues(sctIds, Predicates.or( SctId::isAvailable, @@ -159,14 +151,6 @@ public Map release(final Set componentIds) { LOGGER.debug("Releasing {} component IDs.", componentIds.size()); final Map sctIds = newHashMap(getSctIds(componentIds)); - final Map problemSctIds = ImmutableMap.copyOf(Maps.filterValues(sctIds, Predicates.not(Predicates.or( - SctId::isAssigned, - SctId::isReserved, - SctId::isAvailable)))); - - if (!problemSctIds.isEmpty()) { - throw new SctIdStatusException("Cannot release %s component IDs because they are not assigned, reserved, or already available.", problemSctIds); - } final Map assignedOrReservedSctIds = ImmutableMap.copyOf(Maps.filterValues(sctIds, Predicates.or( SctId::isAssigned, @@ -183,14 +167,6 @@ public Map deprecate(final Set componentIds) { LOGGER.debug("Deprecating {} component IDs.", componentIds.size()); final Map sctIds = getSctIds(componentIds); - final Map problemSctIds = ImmutableMap.copyOf(Maps.filterValues(sctIds, Predicates.not(Predicates.or( - SctId::isAssigned, - SctId::isPublished, - SctId::isDeprecated)))); - - if (!problemSctIds.isEmpty()) { - throw new SctIdStatusException("Cannot deprecate %s component IDs because they are not assigned, published, or already deprecated.", problemSctIds); - } final Map assignedOrPublishedSctIds = ImmutableMap.copyOf(Maps.filterValues(sctIds, Predicates.or( SctId::isAssigned, diff --git a/cis/pom.xml b/cis/pom.xml index 0bd7121fd0a..714b3982553 100644 --- a/cis/pom.xml +++ b/cis/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/commons/com.b2international.collections.api/META-INF/MANIFEST.MF b/commons/com.b2international.collections.api/META-INF/MANIFEST.MF index f1c1b811dfb..acfaba739c5 100644 --- a/commons/com.b2international.collections.api/META-INF/MANIFEST.MF +++ b/commons/com.b2international.collections.api/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Collections API Bundle-SymbolicName: com.b2international.collections.api;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy diff --git a/commons/com.b2international.collections.api/pom.xml b/commons/com.b2international.collections.api/pom.xml index bf675d62680..b4566a7eb40 100644 --- a/commons/com.b2international.collections.api/pom.xml +++ b/commons/com.b2international.collections.api/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.collections.api eclipse-plugin diff --git a/commons/com.b2international.collections.fastutil/META-INF/MANIFEST.MF b/commons/com.b2international.collections.fastutil/META-INF/MANIFEST.MF index 83a24d12f50..4b39e4237a5 100644 --- a/commons/com.b2international.collections.fastutil/META-INF/MANIFEST.MF +++ b/commons/com.b2international.collections.fastutil/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Fastutil based implementation of Collections API Bundle-SymbolicName: com.b2international.collections.fastutil;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 Fragment-Host: com.b2international.collections.api Export-Package: com.b2international.collections, diff --git a/commons/com.b2international.collections.fastutil/pom.xml b/commons/com.b2international.collections.fastutil/pom.xml index d70278d60ad..5aaebb7d3f1 100644 --- a/commons/com.b2international.collections.fastutil/pom.xml +++ b/commons/com.b2international.collections.fastutil/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.collections.fastutil eclipse-plugin diff --git a/commons/com.b2international.collections.jackson/META-INF/MANIFEST.MF b/commons/com.b2international.collections.jackson/META-INF/MANIFEST.MF index 9aef0555bcc..ba79deffa1d 100644 --- a/commons/com.b2international.collections.jackson/META-INF/MANIFEST.MF +++ b/commons/com.b2international.collections.jackson/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Jackson Module for Primitive Collections API Bundle-SymbolicName: com.b2international.collections.jackson;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Require-Bundle: com.b2international.collections.api, diff --git a/commons/com.b2international.collections.jackson/pom.xml b/commons/com.b2international.collections.jackson/pom.xml index ea318335ad1..076aa2f9c30 100644 --- a/commons/com.b2international.collections.jackson/pom.xml +++ b/commons/com.b2international.collections.jackson/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.collections.jackson eclipse-plugin diff --git a/commons/com.b2international.commons.base/META-INF/MANIFEST.MF b/commons/com.b2international.commons.base/META-INF/MANIFEST.MF index 7654bcca86c..2c685748e4a 100644 --- a/commons/com.b2international.commons.base/META-INF/MANIFEST.MF +++ b/commons/com.b2international.commons.base/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: B2i Commons Base Bundle-SymbolicName: com.b2international.commons.base;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Export-Package: com.b2international.commons, diff --git a/commons/com.b2international.commons.base/pom.xml b/commons/com.b2international.commons.base/pom.xml index b045e91eade..86c41c889bf 100644 --- a/commons/com.b2international.commons.base/pom.xml +++ b/commons/com.b2international.commons.base/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.commons.base eclipse-plugin diff --git a/commons/com.b2international.commons.base/src/com/b2international/commons/FileUtils.java b/commons/com.b2international.commons.base/src/com/b2international/commons/FileUtils.java index 54e9185f909..4af95c41391 100644 --- a/commons/com.b2international.commons.base/src/com/b2international/commons/FileUtils.java +++ b/commons/com.b2international.commons.base/src/com/b2international/commons/FileUtils.java @@ -40,6 +40,7 @@ import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; +import com.google.common.base.CharMatcher; import com.google.common.io.ByteSource; import com.google.common.io.Files; @@ -48,6 +49,13 @@ public final class FileUtils { private static final int DEFAULT_BUFFER_SIZE = 4096; public static final String TEMP_DIR_PROPERTY = "java.io.tmpdir"; + + public static final char[] INVALID_RESOURCE_CHARACTERS = { '\\', '/', ':', '*', '?', '"', '<', '>', '|', '\0' }; + + public static final CharMatcher INVALID_RESOURCE_MATCHER = CharMatcher.whitespace() + .or(CharMatcher.anyOf(String.valueOf(INVALID_RESOURCE_CHARACTERS))) + .or(CharMatcher.javaIsoControl()) + .precomputed(); public static String readToString(final File file) throws IOException { return readToString(new FileReader(file)); diff --git a/commons/com.b2international.commons.test/META-INF/MANIFEST.MF b/commons/com.b2international.commons.test/META-INF/MANIFEST.MF index b84225152ea..dafd04a932c 100644 --- a/commons/com.b2international.commons.test/META-INF/MANIFEST.MF +++ b/commons/com.b2international.commons.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: B2i Commons Test Bundle-SymbolicName: com.b2international.commons.test -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Fragment-Host: com.b2international.commons;bundle-version="3.9.0" diff --git a/commons/com.b2international.commons.test/pom.xml b/commons/com.b2international.commons.test/pom.xml index 8087f4681e6..3205ca56635 100644 --- a/commons/com.b2international.commons.test/pom.xml +++ b/commons/com.b2international.commons.test/pom.xml @@ -6,7 +6,7 @@ com.b2international.snowowl commons-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.commons.test eclipse-test-plugin diff --git a/commons/com.b2international.commons/.classpath b/commons/com.b2international.commons/.classpath index 4e55cfe6e7d..7fa5009e617 100644 --- a/commons/com.b2international.commons/.classpath +++ b/commons/com.b2international.commons/.classpath @@ -1,6 +1,5 @@ - @@ -10,6 +9,7 @@ + @@ -22,5 +22,6 @@ + diff --git a/commons/com.b2international.commons/META-INF/MANIFEST.MF b/commons/com.b2international.commons/META-INF/MANIFEST.MF index cdfc96f54d3..210eec288f7 100644 --- a/commons/com.b2international.commons/META-INF/MANIFEST.MF +++ b/commons/com.b2international.commons/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: B2i Commons Bundle-SymbolicName: com.b2international.commons;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Export-Package: com.b2international.commons, @@ -11,6 +11,7 @@ Export-Package: com.b2international.commons, com.b2international.commons.collect, com.b2international.commons.concurrent.equinox, com.b2international.commons.config, + com.b2international.commons.db, com.b2international.commons.emf, com.b2international.commons.exceptions, com.b2international.commons.extension, @@ -102,16 +103,15 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", com.fasterxml.classmate;bundle-version="1.3.4", javax.el;bundle-version="2.2.0", com.sun.el;bundle-version="2.2.0", - jaxb-api;bundle-version="2.3.0" + jaxb-api;bundle-version="2.3.0", + ch.qos.logback.classic;bundle-version="[1.2.3,2.0.0)", + ch.qos.logback.core;bundle-version="[1.2.3,2.0.0)" Bundle-Activator: com.b2international.commons.CommonsActivator -Import-Package: ch.qos.logback.classic;version="[1.1.3,2.0.0)", - ch.qos.logback.classic.turbo;version="[1.1.3,2.0.0)", - ch.qos.logback.core;version="[1.1.3,2.0.0)", - ch.qos.logback.core.spi;version="[1.1.3,2.0.0)", - org.slf4j;version="1.7.25" +Import-Package: org.slf4j;version="1.7.25" Bundle-ClassPath: ., lib/LatencyUtils-2.0.3.jar, lib/bucket4j-core-4.4.1.jar, + lib/h2-1.4.199.jar, lib/hibernate-validator-5.1.1.Final.jar, lib/jboss-logging-3.1.3.GA.jar, lib/jgrapht-core-1.3.0.jar, diff --git a/commons/com.b2international.commons/pom.xml b/commons/com.b2international.commons/pom.xml index 7903b85177b..d53b671ccc5 100644 --- a/commons/com.b2international.commons/pom.xml +++ b/commons/com.b2international.commons/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl commons-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.commons eclipse-plugin @@ -23,6 +23,7 @@ 1.1.0.Final 4.4.1 1.3.1 + 1.4.199 @@ -79,7 +80,13 @@ javax.annotation-api ${javax.annotation.version} provided - + + + com.h2database + h2 + ${h2.version} + provided + @@ -112,7 +119,8 @@ jgrapht-core, jheaps, bucket4j-core, - javax.annotation-api + javax.annotation-api, + h2 ${basedir}/lib diff --git a/commons/com.b2international.commons/src/com/b2international/commons/db/JdbcUtils.java b/commons/com.b2international.commons/src/com/b2international/commons/db/JdbcUtils.java new file mode 100644 index 00000000000..cae3a015d41 --- /dev/null +++ b/commons/com.b2international.commons/src/com/b2international/commons/db/JdbcUtils.java @@ -0,0 +1,429 @@ +/* + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.commons.db; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Provides utility methods for issuing database queries and updates using the + * JDBC API. + *

          + * Where not otherwise specified, caught {@link SQLException} instances will be + * wrapped into {@link RuntimeSQLException}s and then re-thrown. + * + */ +public class JdbcUtils { + + private static final Logger LOGGER = LoggerFactory.getLogger(JdbcUtils.class); + + /** The class name of the H2 JDBC driver */ + public static final String JDBC_DRIVER_H2 = "org.h2.Driver"; + + /** + * Opens and initializes a connection to a database with the specified + * parameters. + *

          + * The method triggers JDBC driver class loading by invoking the given + * class' parameterless constructor reflectively, then uses + * {@link DriverManager} to return a database connection. A + * {@link RuntimeException} will be thrown in case the driver class is not + * available, or if its constructor is not accessible or throws an exception + * upon invocation. + * + * @param driverClassName + * the name of the JDBC driver to use + * + * @param url + * the JDBC database URL, eg. jdbc:h2:mem:test + * + * @param username + * the database user name for the connection + * + * @param password + * the connection password + * + * @return an initialized {@link Connection} instance + */ + public static Connection createConnection(final String driverClassName, final String url, final String username, final String password) { + + try { + + Class.forName(driverClassName) + .getDeclaredConstructor() + .newInstance(); + + } catch (final Exception e) { + /* + * XXX: newInstance() propagates all exception (also the checked + * ones) from the invoked constructor, we have to catch and wrap all + * exceptions here + */ + throw new RuntimeException("An error occurred while initializing JDBC driver '" + + driverClassName + "'.", e); + } + + Connection connection = null; + + try { + + connection = DriverManager.getConnection(url, username, password); + connection.setAutoCommit(false); + connection.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); + + } catch (final SQLException e) { + + close(connection); // In case the actual connection succeeded but the initialization didn't + throw new RuntimeSQLException("Couldn't initialize connection to database '" + url + "'.", e); + } + + LOGGER.info("Connected to database '" + url + "'."); + return connection; + } + + /** + * Closes a database connection silently; issues a warning for any SQL + * exception that occurs during closing. + * + * @param connection + * the connection to close (may be null or an + * already closed connection) + */ + public static void close(final Connection connection) { + + if (connection == null) { + return; + } + + try { + connection.close(); + } catch (final SQLException e) { + LOGGER.warn("Caught exception while closing connection '" + connection + "', ignoring.", e); + } + } + + /** + * Closes the specified statement silently; issues a warning for any SQL + * exception that occurs during closing. + *

          + * If the given statement has currently a {@link ResultSet} open, it will be + * closed as well. + * + * @param statement + * the statement to close (may be null or an already + * closed statement) + */ + public static void close(final Statement statement) { + + if (statement == null) { + return; + } + + try { + statement.close(); + } catch (final SQLException e) { + LOGGER.warn("Caught exception while closing statement '" + statement + "', ignoring.", e); + } + } + + /** + * Closes the given result set silently; issues a warning for any SQL + * exception that occurs during closing. + * + * @param resultSet + * the result set to close (may be null or a result + * set which is already closed) + */ + public static void close(final ResultSet resultSet) { + + if (resultSet == null) { + return; + } + + try { + resultSet.close(); + } catch (final SQLException e) { + LOGGER.warn("Caught exception while closing result set '" + resultSet + "', ignoring.", e); + } + } + + /** + * Commits the current transaction represented by the specified connection + * instance. If the connection is set to auto-commit mode, this operation + * does nothing. + * + * @param connection + * the connection linked to the transaction to commit + */ + public static void commit(final Connection connection) { + + try { + + if (!connection.getAutoCommit()) { + connection.commit(); + } + + } catch (final SQLException e) { + + throw new RuntimeSQLException("Couldn't commit transaction on connection '" + + connection + "'.", e); + } + } + + /** + * Prepares a (possibly parameterized) SQL statement and populates it with + * the given parameters, using the JDBC standard mapping of Java objects. + * + * @param connection + * the database connection to use + * + * @param sql + * the SQL statement text, containing zero or more '?' + * placeholders + * + * @param parameters + * the variable number of statement parameters + * + * @return an initialized {@link PreparedStatement} instance + */ + public static PreparedStatement prepareStatement(final Connection connection, final String sql, final Object... parameters) { + + PreparedStatement statement; + + try { + statement = connection.prepareStatement(sql); + } catch (final SQLException e) { + throw new RuntimeSQLException("Couldn't prepare statement for query '" + sql + "'.", e); + } + + try { + + for (int i = 0; i < parameters.length; i++) { + statement.setObject(i + 1, parameters[i]); + } + + } catch (final SQLException e) { + close(statement); + throw new RuntimeSQLException("Couldn't set parameter for query '" + sql + "'.", e); + } + + return statement; + } + + /** + * Initializes and executes the specified statement (typically an INSERT, + * UPDATE, or DELETE statement, or a DDL statement that modifies database + * structure). + * + * @param connection + * the connection to use + * + * @param sql + * the SQL statement text + * + * @param parameters + * the variable number of statement parameters + * + * @return the affected row count + */ + public static int executeUpdate(final Connection connection, final String sql, final Object... parameters) { + + PreparedStatement statement = null; + + try { + + statement = prepareStatement(connection, sql, parameters); + final int updateCount = statement.executeUpdate(); + return updateCount; + + } catch (final SQLException e) { + throw new RuntimeSQLException("Couldn't execute update for statement '" + sql + "'.", e); + } finally { + JdbcUtils.close(statement); + } + } + + /** + * Executes a query that is expected to return a single integer value. + * + * @param connection + * the connection to use + * + * @param sql + * the SQL statement text + * + * @param parameters + * the variable number of statement parameters + * + * @return the integer value of the first column of the first result set row, + * or null if an empty result set is returned from the + * query + */ + public static Integer executeIntQuery(final Connection connection, final String sql, final Object... parameters) { + + PreparedStatement statement = null; + ResultSet resultSet = null; + + try { + + statement = prepareStatement(connection, sql, parameters); + resultSet = statement.executeQuery(); + + if (resultSet.next()) { + final int value = resultSet.getInt(1); + return value; + } else { + return null; + } + + } catch (final SQLException e) { + throw new RuntimeSQLException("Couldn't execute Integer query for statement '" + sql + "'.", e); + } finally { + JdbcUtils.close(resultSet); + JdbcUtils.close(statement); + } + } + + /** + * Executes a query that is expected to return a single long value. + * + * @param connection + * the connection to use + * + * @param sql + * the SQL statement text + * + * @param parameters + * the variable number of statement parameters + * + * @return the long value of the first column of the first result set row, + * or null if an empty result set is returned from the + * query + */ + public static Long executeLongQuery(final Connection connection, final String sql, final Object... parameters) { + + PreparedStatement statement = null; + ResultSet resultSet = null; + + try { + + statement = prepareStatement(connection, sql, parameters); + resultSet = statement.executeQuery(); + + if (resultSet.next()) { + final long value = resultSet.getLong(1); + return value; + } else { + return null; + } + + } catch (final SQLException e) { + throw new RuntimeSQLException("Couldn't execute Long query for statement '" + sql + "'.", e); + } finally { + JdbcUtils.close(resultSet); + JdbcUtils.close(statement); + } + } + + /** + * Executes a query that is expected to return a single string. + * + * @param connection + * the connection to use + * + * @param sql + * the SQL statement text + * + * @param parameters + * the variable number of statement parameters + * + * @return the string value of the first column of the first result set row, + * or null if an empty result set is returned from the + * query + */ + public static String executeStringQuery(final Connection connection, final String sql, final Object... parameters) { + + PreparedStatement statement = null; + ResultSet resultSet = null; + + try { + + statement = prepareStatement(connection, sql, parameters); + resultSet = statement.executeQuery(); + + if (resultSet.next()) { + final String value = resultSet.getString(1); + return value; + } else { + return null; + } + + } catch (final SQLException e) { + throw new RuntimeSQLException("Couldn't execute String query for statement '" + sql + "'.", e); + } finally { + JdbcUtils.close(resultSet); + JdbcUtils.close(statement); + } + } + + /** + * Executes a query that is expected to return a single boolean value. + * + * @param connection + * the connection to use + * + * @param sql + * the SQL statement text + * + * @param parameters + * the variable number of statement parameters + * + * @return the boolean value of the first column of the first result set row, + * or null if an empty result set is returned from the + * query + */ + public static Boolean executeBooleanQuery(final Connection connection, final String sql, final Object... parameters) { + + PreparedStatement statement = null; + ResultSet resultSet = null; + + try { + + statement = prepareStatement(connection, sql, parameters); + resultSet = statement.executeQuery(); + + if (resultSet.next()) { + final boolean value = resultSet.getBoolean(1); + return value; + } else { + return null; + } + + } catch (final SQLException e) { + throw new RuntimeSQLException("Couldn't execute Boolean query for statement '" + sql + "'.", e); + } finally { + JdbcUtils.close(resultSet); + JdbcUtils.close(statement); + } + } +} diff --git a/commons/com.b2international.commons/src/com/b2international/commons/db/RuntimeSQLException.java b/commons/com.b2international.commons/src/com/b2international/commons/db/RuntimeSQLException.java new file mode 100644 index 00000000000..cf3dc9866d7 --- /dev/null +++ b/commons/com.b2international.commons/src/com/b2international/commons/db/RuntimeSQLException.java @@ -0,0 +1,59 @@ +/* + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.commons.db; + +import static com.google.common.base.Preconditions.checkArgument; + +import java.sql.SQLException; + +/** + * Wraps a checked {@link SQLException} into a runtime exception, so SQL + * dependent operations don't need to specify a throws clause in + * their method signature. + * + */ +public class RuntimeSQLException extends RuntimeException { + + private static final long serialVersionUID = 3008437115208630482L; + + public RuntimeSQLException() { + super(); + } + + public RuntimeSQLException(String message, SQLException cause) { + super(message, cause); + } + + public RuntimeSQLException(String message) { + super(message); + } + + public RuntimeSQLException(SQLException cause) { + super(cause); + } + + @Override + public synchronized Throwable initCause(Throwable cause) { + checkArgument((cause == null || cause instanceof SQLException), + "cause must be null or an instance of SQLException."); + return super.initCause(cause); + } + + @Override + public SQLException getCause() { + return (SQLException) super.getCause(); + } +} \ No newline at end of file diff --git a/commons/com.b2international.index.tests.tools/META-INF/MANIFEST.MF b/commons/com.b2international.index.tests.tools/META-INF/MANIFEST.MF index 91365bf0bc4..d62b915f83e 100644 --- a/commons/com.b2international.index.tests.tools/META-INF/MANIFEST.MF +++ b/commons/com.b2international.index.tests.tools/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Test tools for tests based on Index API Bundle-SymbolicName: com.b2international.index.tests.tools;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Require-Bundle: com.b2international.index, diff --git a/commons/com.b2international.index.tests.tools/pom.xml b/commons/com.b2international.index.tests.tools/pom.xml index cddb7666bbf..8cbc6a9e43a 100644 --- a/commons/com.b2international.index.tests.tools/pom.xml +++ b/commons/com.b2international.index.tests.tools/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.index.tests.tools eclipse-plugin diff --git a/commons/com.b2international.index.tests/META-INF/MANIFEST.MF b/commons/com.b2international.index.tests/META-INF/MANIFEST.MF index 5983a0057a0..f07dd1e01cf 100644 --- a/commons/com.b2international.index.tests/META-INF/MANIFEST.MF +++ b/commons/com.b2international.index.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Generic Index API Test Suite Bundle-SymbolicName: com.b2international.index.tests;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy diff --git a/commons/com.b2international.index.tests/pom.xml b/commons/com.b2international.index.tests/pom.xml index 93e0007c40f..e418d384a21 100644 --- a/commons/com.b2international.index.tests/pom.xml +++ b/commons/com.b2international.index.tests/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.index.tests eclipse-test-plugin @@ -18,16 +18,6 @@ - - eclipse-plugin - ch.qos.logback.classic - ${logback.versionRange} - - - eclipse-plugin - ch.qos.logback.core - ${logback.versionRange} - eclipse-plugin com.b2international.collections.fastutil @@ -40,7 +30,6 @@ org.eclipse.tycho tycho-surefire-plugin - ${tycho.version} default-test diff --git a/commons/com.b2international.index/META-INF/MANIFEST.MF b/commons/com.b2international.index/META-INF/MANIFEST.MF index fabb32834f1..8d4837d9f27 100644 --- a/commons/com.b2international.index/META-INF/MANIFEST.MF +++ b/commons/com.b2international.index/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Search Indexing Bundle-SymbolicName: com.b2international.index;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", @@ -50,7 +50,7 @@ Export-Package: com.b2international.index, org.tartarus.snowball, org.tartarus.snowball.ext Import-Package: javax.management, - org.apache.commons.logging;version="[1.1.0,1.3.0)", + org.apache.commons.logging;version="1.2.0", org.osgi.framework;version="1.6.0", org.slf4j;version="1.7.2", org.slf4j.helpers;version="1.7.2", diff --git a/commons/com.b2international.index/pom.xml b/commons/com.b2international.index/pom.xml index 51c06aea870..9695760c9a2 100644 --- a/commons/com.b2international.index/pom.xml +++ b/commons/com.b2international.index/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.index eclipse-plugin diff --git a/commons/com.b2international.index/src/com/b2international/index/es/EsDocumentWriter.java b/commons/com.b2international.index/src/com/b2international/index/es/EsDocumentWriter.java index 5afbdcbf151..0013ef74eb4 100644 --- a/commons/com.b2international.index/src/com/b2international/index/es/EsDocumentWriter.java +++ b/commons/com.b2international.index/src/com/b2international/index/es/EsDocumentWriter.java @@ -150,6 +150,7 @@ public void commit() throws IOException { Futures.allAsList(updateFutures).get(); executor.awaitTermination(10, TimeUnit.SECONDS); } catch (InterruptedException | ExecutionException e) { + admin.log().error("Couldn't execute bulk updates", e); throw new IndexException("Couldn't execute bulk updates", e); } @@ -238,7 +239,6 @@ public void afterBulk(long executionId, BulkRequest request, BulkResponse respon // Remaining delete operations can be executed on their own for (Class type : ImmutableSet.copyOf(deleteOperations.keySet())) { final DocumentMapping mapping = admin.mappings().getMapping(type); - final String typeString = mapping.typeAsString(); final String typeIndex = admin.getTypeIndex(mapping); mappingsToRefresh.add(mapping); diff --git a/commons/com.b2international.index/src/com/b2international/index/es/EsNode.java b/commons/com.b2international.index/src/com/b2international/index/es/EsNode.java index 3273a802574..5c0f8331062 100644 --- a/commons/com.b2international.index/src/com/b2international/index/es/EsNode.java +++ b/commons/com.b2international.index/src/com/b2international/index/es/EsNode.java @@ -129,10 +129,17 @@ private static Settings configureSettings(String clusterName, Path configPath, P putSettingIfAbsent(esSettings, "http.cors.allow-origin", "/https?:\\/\\/localhost(:[0-9]+)?/"); putSettingIfAbsent(esSettings, "rest.action.multi.allow_explicit_index", false); putSettingIfAbsent(esSettings, "discovery.type", "single-node"); + putSettingIfAbsent(esSettings, "search.max_buckets", 1_500_000); // TODO hardcoded max buckets value to allow large aggregations to complete, fix and remove the config in 7.5 return esSettings.build(); } + private static void putSettingIfAbsent(Settings.Builder settings, String key, int value) { + if (!settings.keys().contains(key)) { + settings.put(key, value); + } + } + private static void putSettingIfAbsent(Settings.Builder settings, String key, String value) { if (!settings.keys().contains(key)) { settings.put(key, value); diff --git a/commons/com.b2international.index/src/com/b2international/index/revision/RevisionBranchRef.java b/commons/com.b2international.index/src/com/b2international/index/revision/RevisionBranchRef.java index 3dc18f6587f..b53dad10b96 100644 --- a/commons/com.b2international.index/src/com/b2international/index/revision/RevisionBranchRef.java +++ b/commons/com.b2international.index/src/com/b2international/index/revision/RevisionBranchRef.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,6 @@ final class RevisionBranchRef { public RevisionBranchRef(long branchId, String branchPath, SortedSet segments) { this.branchId = branchId; this.branchPath = branchPath; -// checkArgument(!segments.isEmpty(), "At least one revision segment must be specified"); this.segments = segments; } @@ -200,7 +199,7 @@ public RevisionBranchRef restrictTo(long timestamp) { return new RevisionBranchRef(branchId(), path(), segments() .stream() .filter(segment -> segment.isBefore(timestamp)) // consider segments that are before the currently desired timestamp - .map(segment -> segment.withEnd(timestamp)) + .map(segment -> segment.restrictEnd(timestamp)) .collect(Collectors.toCollection(TreeSet::new))); } diff --git a/commons/com.b2international.index/src/com/b2international/index/revision/RevisionCompare.java b/commons/com.b2international.index/src/com/b2international/index/revision/RevisionCompare.java index ee964a859df..8091977329a 100644 --- a/commons/com.b2international.index/src/com/b2international/index/revision/RevisionCompare.java +++ b/commons/com.b2international.index/src/com/b2international/index/revision/RevisionCompare.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,17 +82,6 @@ public Builder apply(Commit commit) { } details.forEach(compareDetail -> { - switch (compareDetail.getOp()) { - case ADD: - added++; - break; - case CHANGE: - changed++; - break; - case REMOVE: - removed++; - break; - } detailsByComponent.merge(compareDetail.key(), compareDetail, (oldV, newV) -> oldV.merge(newV)); }); } @@ -101,10 +90,24 @@ public Builder apply(Commit commit) { } public RevisionCompare build() { + final List details = ImmutableList.copyOf(detailsByComponent.values()); + details.forEach(compareDetail -> { + switch (compareDetail.getOp()) { + case ADD: + added++; + break; + case CHANGE: + changed++; + break; + case REMOVE: + removed++; + break; + } + }); return new RevisionCompare( base, compare, - ImmutableList.copyOf(detailsByComponent.values()), + details, added, changed, removed); diff --git a/commons/com.b2international.index/src/com/b2international/index/revision/RevisionSegment.java b/commons/com.b2international.index/src/com/b2international/index/revision/RevisionSegment.java index 1f1fdbde1ee..61e1bde9c54 100644 --- a/commons/com.b2international.index/src/com/b2international/index/revision/RevisionSegment.java +++ b/commons/com.b2international.index/src/com/b2international/index/revision/RevisionSegment.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -111,6 +111,14 @@ public String getEndAddress() { public RevisionSegment withEnd(long newEnd) { return new RevisionSegment(branchId, start, newEnd); } + + public RevisionSegment restrictEnd(long restrictTo) { + if (end <= restrictTo) { + return this; + } else { + return withEnd(restrictTo); + } + } @Override public int hashCode() { diff --git a/commons/com.b2international.index/src/com/b2international/index/revision/StagingArea.java b/commons/com.b2international.index/src/com/b2international/index/revision/StagingArea.java index a85eca324e5..9adb77fc659 100644 --- a/commons/com.b2international.index/src/com/b2international/index/revision/StagingArea.java +++ b/commons/com.b2international.index/src/com/b2international/index/revision/StagingArea.java @@ -431,7 +431,7 @@ private Commit doCommit(String commitGroupId, long timestamp, String author, Str if (mergeSources != null && !mergeSources.isEmpty()) { toBranchUpdateParams = ImmutableMap.of( "headTimestamp", timestamp, - "mergeSources", mergeSources.stream().map(RevisionBranchPoint::toIpAddress).collect(Collectors.toCollection(TreeSet::new)), + "mergeSources", mergeSources.stream().map(RevisionBranchPoint::toIpAddress).collect(Collectors.toList()), "squash", squashMerge ); } else { diff --git a/commons/com.b2international.mapdb/pom.xml b/commons/com.b2international.mapdb/pom.xml index 7adb4b7ad2e..b7231df097e 100644 --- a/commons/com.b2international.mapdb/pom.xml +++ b/commons/com.b2international.mapdb/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.mapdb eclipse-plugin diff --git a/commons/com.b2international.scripting.api/META-INF/MANIFEST.MF b/commons/com.b2international.scripting.api/META-INF/MANIFEST.MF index 358d98dcba1..bd971da7cf0 100644 --- a/commons/com.b2international.scripting.api/META-INF/MANIFEST.MF +++ b/commons/com.b2international.scripting.api/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Scripting Module Bundle-SymbolicName: com.b2international.scripting.api;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy diff --git a/commons/com.b2international.scripting.api/pom.xml b/commons/com.b2international.scripting.api/pom.xml index 2e9e5f3f45e..1623369b351 100644 --- a/commons/com.b2international.scripting.api/pom.xml +++ b/commons/com.b2international.scripting.api/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.scripting.api eclipse-plugin diff --git a/commons/com.b2international.scripting.groovy/META-INF/MANIFEST.MF b/commons/com.b2international.scripting.groovy/META-INF/MANIFEST.MF index fa359b7ddf4..5899e983809 100644 --- a/commons/com.b2international.scripting.groovy/META-INF/MANIFEST.MF +++ b/commons/com.b2international.scripting.groovy/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Scripting Groovy Module Bundle-SymbolicName: com.b2international.scripting.groovy;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.scripting.api;bundle-version="6.1.0" Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/commons/com.b2international.scripting.groovy/pom.xml b/commons/com.b2international.scripting.groovy/pom.xml index 49b71b65d43..b2623b1372d 100644 --- a/commons/com.b2international.scripting.groovy/pom.xml +++ b/commons/com.b2international.scripting.groovy/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl commons-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.scripting.groovy eclipse-plugin diff --git a/commons/pom.xml b/commons/pom.xml index 453e34d0432..43835fff9d7 100644 --- a/commons/pom.xml +++ b/commons/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/core/com.b2international.snowowl.core.rest.feature/feature.xml b/core/com.b2international.snowowl.core.rest.feature/feature.xml index 212ea1ef3ae..ca4745e39b3 100644 --- a/core/com.b2international.snowowl.core.rest.feature/feature.xml +++ b/core/com.b2international.snowowl.core.rest.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/core/com.b2international.snowowl.core.rest.feature/pom.xml b/core/com.b2international.snowowl.core.rest.feature/pom.xml index 9bb973c6ae3..e0b45eba31e 100644 --- a/core/com.b2international.snowowl.core.rest.feature/pom.xml +++ b/core/com.b2international.snowowl.core.rest.feature/pom.xml @@ -4,7 +4,7 @@ 4.0.0 core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl com.b2international.snowowl.core.rest.feature diff --git a/core/com.b2international.snowowl.core.rest.tests/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.core.rest.tests/META-INF/MANIFEST.MF index c8df3f1194f..05247c6b2c2 100644 --- a/core/com.b2international.snowowl.core.rest.tests/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.core.rest.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Administrative RESTful API Tests Bundle-SymbolicName: com.b2international.snowowl.core.rest.tests -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.junit;bundle-version="4.12.0", diff --git a/core/com.b2international.snowowl.core.rest.tests/pom.xml b/core/com.b2international.snowowl.core.rest.tests/pom.xml index 678e769631e..474cd43e6dc 100644 --- a/core/com.b2international.snowowl.core.rest.tests/pom.xml +++ b/core/com.b2international.snowowl.core.rest.tests/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT @@ -25,16 +25,6 @@ org.eclipse.jetty.osgi.boot 0.0.0 - - eclipse-plugin - ch.qos.logback.classic - ${logback.versionRange} - - - eclipse-plugin - ch.qos.logback.core - ${logback.versionRange} - eclipse-plugin com.b2international.snowowl.identity.file @@ -45,11 +35,6 @@ com.b2international.collections.fastutil 0.0.0 - - eclipse-plugin - com.sun.el - 0.0.0 - diff --git a/core/com.b2international.snowowl.core.rest.tests/src/configuration/snowowl.yml b/core/com.b2international.snowowl.core.rest.tests/src/configuration/snowowl.yml index a5c3453ffd2..e91c6f0c979 100644 --- a/core/com.b2international.snowowl.core.rest.tests/src/configuration/snowowl.yml +++ b/core/com.b2international.snowowl.core.rest.tests/src/configuration/snowowl.yml @@ -2,9 +2,6 @@ # Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg # -# necessary to connect one user to the system otherwise Snow Owl startup fails -systemUser: true - identity: providers: - file: diff --git a/core/com.b2international.snowowl.core.rest/.classpath b/core/com.b2international.snowowl.core.rest/.classpath index 4da9c8d1ab3..640f352c220 100644 --- a/core/com.b2international.snowowl.core.rest/.classpath +++ b/core/com.b2international.snowowl.core.rest/.classpath @@ -25,5 +25,6 @@ + diff --git a/core/com.b2international.snowowl.core.rest/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.core.rest/META-INF/MANIFEST.MF index 4d3a45bd8ed..90a96849af4 100644 --- a/core/com.b2international.snowowl.core.rest/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.core.rest/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl REST API Module Bundle-SymbolicName: com.b2international.snowowl.core.rest;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Automatic-Module-Name: com.b2international.snowowl.rest Bundle-RequiredExecutionEnvironment: JavaSE-11 @@ -25,7 +25,8 @@ Bundle-ClassPath: ., WEB-INF/lib/springfox-spi-2.9.2.jar, WEB-INF/lib/springfox-spring-web-2.9.2.jar, WEB-INF/lib/springfox-swagger-common-2.9.2.jar, - WEB-INF/lib/springfox-swagger2-2.9.2.jar + WEB-INF/lib/springfox-swagger2-2.9.2.jar, + WEB-INF/lib/commons-logging-1.2.jar Require-Bundle: org.eclipse.equinox.security;bundle-version="1.3.200", com.fasterxml.jackson.core.jackson-annotations;bundle-version="2.9.9", com.fasterxml.jackson.core.jackson-core;bundle-version="2.9.9", @@ -33,7 +34,6 @@ Require-Bundle: org.eclipse.equinox.security;bundle-version="1.3.200", com.fasterxml.jackson.dataformat.jackson-dataformat-csv;bundle-version="2.9.9", com.fasterxml.jackson.dataformat.jackson-dataformat-xml;bundle-version="2.9.9", com.fasterxml.jackson.module.jackson-module-jaxb-annotations;bundle-version="2.9.9", - org.apache.commons.logging;bundle-version="[1.2.0,1.3.0)", com.fasterxml.classmate;bundle-version="1.3.4", org.mapstruct;bundle-version="1.2.0", net.bytebuddy.byte-buddy;bundle-version="1.9.0", diff --git a/core/com.b2international.snowowl.core.rest/pom.xml b/core/com.b2international.snowowl.core.rest/pom.xml index 4daba067618..6f0cc296a2b 100644 --- a/core/com.b2international.snowowl.core.rest/pom.xml +++ b/core/com.b2international.snowowl.core.rest/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.core.rest @@ -19,249 +19,250 @@ v12.13.0 - - - - io.springfox - springfox-swagger2 - ${springfox.version} - provided - - - org.reflections - reflections - - - - - org.springframework - spring-webmvc - ${spring.version} - provided - - - org.springframework.security - spring-security-config - ${spring.security.version} - provided - - - org.springframework.security - spring-security-web - ${spring.security.version} - provided - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 3.1.0 - - - clean-folders - generate-sources - - clean - - - - - WEB-INF/lib - - .gitignore - - - - site - - .gitignore - - - - snow-owl-api-docs/node_modules - - - snow-owl-api-docs/build - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.1.1 - - - copy-runtime-dependencies - generate-sources - - copy-dependencies - - - - - spring-aop, - spring-beans, - spring-context, - spring-core, - spring-expression, - spring-plugin-core, - spring-plugin-metadata, - spring-security-config, - spring-security-core, - spring-security-web, - spring-web, - spring-webmvc, - springfox-core, - springfox-schema, - springfox-spi, - springfox-spring-web, - springfox-swagger-common, - springfox-swagger2, - - WEB-INF/lib - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - npm install - - exec - - generate-resources - - npm - ${basedir}/snow-owl-api-docs - install - - - - npm build - - exec - - generate-resources - - npm - ${basedir}/snow-owl-api-docs - - run - build - - - - - - - org.apache.maven.plugins - maven-resources-plugin - 3.1.0 - - - copy-static-resources - generate-resources - - copy-resources - - - ${basedir}/site - true - - - ${basedir}/snow-owl-api-docs/build - - - - - - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [3.0.2,) - - copy-dependencies - - - - - false - - - - - - org.apache.maven.plugins - maven-clean-plugin - [3.1.0,) - - clean - - - - - - - - - com.github.eirslett - frontend-maven-plugin - [1.8.0,) - - install-node-and-npm - npm - - - - - false - - - - - - org.apache.maven.plugins - maven-resources-plugin - [3.1.0,) - - copy-resources - - - - - false - - - - - - - - - - + + + + io.springfox + springfox-swagger2 + ${springfox.version} + provided + + + org.reflections + reflections + + + + + org.springframework + spring-webmvc + ${spring.version} + provided + + + org.springframework.security + spring-security-config + ${spring.security.version} + provided + + + org.springframework.security + spring-security-web + ${spring.security.version} + provided + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 3.1.0 + + + clean-folders + generate-sources + + clean + + + + + WEB-INF/lib + + .gitignore + + + + site + + .gitignore + + + + snow-owl-api-docs/node_modules + + + snow-owl-api-docs/build + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.1 + + + copy-runtime-dependencies + generate-sources + + copy-dependencies + + + + + spring-aop, + spring-beans, + spring-context, + spring-core, + spring-expression, + spring-plugin-core, + spring-plugin-metadata, + spring-security-config, + spring-security-core, + spring-security-web, + spring-web, + spring-webmvc, + springfox-core, + springfox-schema, + springfox-spi, + springfox-spring-web, + springfox-swagger-common, + springfox-swagger2, + commons-logging + + WEB-INF/lib + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + + npm install + + exec + + generate-resources + + npm + ${basedir}/snow-owl-api-docs + install + + + + npm build + + exec + + generate-resources + + npm + ${basedir}/snow-owl-api-docs + + run + build + + + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.1.0 + + + copy-static-resources + generate-resources + + copy-resources + + + ${basedir}/site + true + + + ${basedir}/snow-owl-api-docs/build + + + + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.maven.plugins + maven-dependency-plugin + [3.0.2,) + + copy-dependencies + + + + + false + + + + + + org.apache.maven.plugins + maven-clean-plugin + [3.1.0,) + + clean + + + + + + + + + com.github.eirslett + frontend-maven-plugin + [1.8.0,) + + install-node-and-npm + npm + + + + + false + + + + + + org.apache.maven.plugins + maven-resources-plugin + [3.1.0,) + + copy-resources + + + + + false + + + + + + + + + + diff --git a/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/package-lock.json b/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/package-lock.json index 2f9a7b93531..2d43c9f4252 100644 --- a/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/package-lock.json +++ b/core/com.b2international.snowowl.core.rest/snow-owl-api-docs/package-lock.json @@ -1239,6 +1239,13 @@ "slash": "^2.0.0", "source-map": "^0.6.0", "string-length": "^2.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "@jest/source-map": { @@ -1255,6 +1262,11 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, @@ -1300,6 +1312,13 @@ "slash": "^2.0.0", "source-map": "^0.6.1", "write-file-atomic": "2.4.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "@jest/types": { @@ -1557,15 +1576,6 @@ "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==" }, - "@types/react": { - "version": "16.4.6", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.4.6.tgz", - "integrity": "sha512-9LDZdhsuKSc+DjY65SjBkA958oBWcTWSVWAd2cD9XqKBjhGw1KzAkRhWRw2eIsXvaIE/TOTjjKMFVC+JA1iU4g==", - "optional": true, - "requires": { - "csstype": "^2.2.0" - } - }, "@types/stack-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", @@ -2573,9 +2583,9 @@ }, "dependencies": { "core-js": { - "version": "2.6.10", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", - "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==" + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" }, "regenerator-runtime": { "version": "0.11.1", @@ -2730,6 +2740,11 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" } } }, @@ -3194,6 +3209,13 @@ "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", "requires": { "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "clean-stack": { @@ -3373,13 +3395,6 @@ "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "requires": { "mime-db": ">= 1.43.0 < 2" - }, - "dependencies": { - "mime-db": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", - "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" - } } }, "compression": { @@ -3435,6 +3450,35 @@ "inherits": "^2.0.3", "readable-stream": "^2.2.2", "typedarray": "^0.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "concat-with-sourcemaps": { @@ -3443,6 +3487,13 @@ "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", "requires": { "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "confusing-browser-globals": { @@ -3541,11 +3592,6 @@ "toggle-selection": "^1.0.6" } }, - "core-js": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", - "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" - }, "core-js-compat": { "version": "3.6.4", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.4.tgz", @@ -3684,6 +3730,13 @@ "source-map": "^0.6.1", "source-map-resolve": "^0.5.2", "urix": "^0.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "css-animation": { @@ -3800,6 +3853,13 @@ "requires": { "mdn-data": "2.0.4", "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "css-what": { @@ -3993,9 +4053,9 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, "deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.0.tgz", - "integrity": "sha512-ZbfWJq/wN1Z273o7mUSjILYqehAktR2NVoSrOukDkU9kg2v/Uv89yU4Cvz8seJeAmtN5oqiefKq8FPuXOboqLw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", "requires": { "is-arguments": "^1.0.4", "is-date-object": "^1.0.1", @@ -4341,6 +4401,35 @@ "inherits": "^2.0.1", "readable-stream": "^2.0.0", "stream-shift": "^1.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "ecc-jsbn": { @@ -4435,6 +4524,33 @@ "errno": "^0.1.3", "readable-stream": "^2.0.1" } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } } } }, @@ -4498,13 +4614,13 @@ } }, "es5-ext": { - "version": "0.10.51", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz", - "integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==", + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", "requires": { "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "^1.0.0" + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" } }, "es6-iterator": { @@ -4557,6 +4673,14 @@ "esutils": "^2.0.2", "optionator": "^0.8.1", "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true + } } }, "eslint": { @@ -5544,6 +5668,35 @@ "requires": { "inherits": "^2.0.3", "readable-stream": "^2.3.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "follow-redirects": { @@ -5639,6 +5792,35 @@ "requires": { "inherits": "^2.0.1", "readable-stream": "^2.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "fs-extra": { @@ -5668,6 +5850,35 @@ "iferr": "^0.1.5", "imurmurhash": "^0.1.4", "readable-stream": "1 || 2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "fs.realpath": { @@ -5974,11 +6185,6 @@ "minimalistic-crypto-utils": "^1.0.1" } }, - "hoist-non-react-statics": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", - "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" - }, "hosted-git-info": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", @@ -5993,6 +6199,35 @@ "obuf": "^1.0.0", "readable-stream": "^2.0.1", "wbuf": "^1.1.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "hsl-regex": { @@ -6769,6 +7004,13 @@ "make-dir": "^2.1.0", "rimraf": "^2.6.3", "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "istanbul-reports": { @@ -7694,6 +7936,11 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, @@ -8302,6 +8549,35 @@ "requires": { "errno": "^0.1.3", "readable-stream": "^2.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "merge-deep": { @@ -8381,16 +8657,16 @@ "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==" }, "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" }, "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "version": "2.1.26", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", "requires": { - "mime-db": "1.40.0" + "mime-db": "1.43.0" } }, "mimic-fn": { @@ -8430,6 +8706,13 @@ "prop-types": "^15.6.0", "react-lifecycles-compat": "^3.0.4", "shallowequal": "^1.0.2" + }, + "dependencies": { + "hoist-non-react-statics": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" + } } }, "minimalistic-assert": { @@ -8720,12 +9003,48 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, "util": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", "requires": { "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } } } } @@ -9153,6 +9472,35 @@ "cyclist": "^1.0.1", "inherits": "^2.0.3", "readable-stream": "^2.1.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "param-case": { @@ -9385,6 +9733,11 @@ "supports-color": "^6.1.0" }, "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", @@ -10357,14 +10710,6 @@ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, - "promise": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", - "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", - "requires": { - "asap": "~2.0.6" - } - }, "promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", @@ -10864,6 +11209,23 @@ "rc-select": "^10.0.0", "rc-tree": "^3.0.0", "rc-util": "^4.17.0" + }, + "dependencies": { + "rc-animate": { + "version": "3.0.0-rc.6", + "resolved": "https://registry.npmjs.org/rc-animate/-/rc-animate-3.0.0-rc.6.tgz", + "integrity": "sha512-oBLPpiT6Q4t6YvD/pkLcmofBP1p01TX0Otse8Q4+Mxt8J+VSDflLZGIgf62EwkvRwsQUkLPjZVFBsldnPKLzjg==", + "requires": { + "babel-runtime": "6.x", + "classnames": "^2.2.5", + "component-classes": "^1.2.6", + "fbjs": "^0.8.16", + "prop-types": "15.x", + "raf": "^3.4.0", + "rc-util": "^4.5.0", + "react-lifecycles-compat": "^3.0.4" + } + } } }, "rc-trigger": { @@ -10938,6 +11300,26 @@ "raf": "^3.4.1", "regenerator-runtime": "^0.13.3", "whatwg-fetch": "^3.0.0" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + }, + "promise": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.0.3.tgz", + "integrity": "sha512-HeRDUL1RJiLhyA0/grn+PTShlBAcLuh/1BJGtrvjwbvRDCTLLMEz9rOGCV+R3vHY4MixIuoMEd9Yq/XvsTPcjw==", + "requires": { + "asap": "~2.0.6" + } + }, + "regenerator-runtime": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" + } } }, "react-debounce-input": { @@ -11163,6 +11545,17 @@ "integrity": "sha512-kNy2A/fDrSuR8TKwB+4ynmItmp1vgF87tWxxfmadwDYo2J3ANipHqTjDIBvJvJ7libvuh76jIbvmK0krjtKH1g==", "requires": { "@types/react": "16.4.6" + }, + "dependencies": { + "@types/react": { + "version": "16.4.6", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.4.6.tgz", + "integrity": "sha512-9LDZdhsuKSc+DjY65SjBkA958oBWcTWSVWAd2cD9XqKBjhGw1KzAkRhWRw2eIsXvaIE/TOTjjKMFVC+JA1iU4g==", + "optional": true, + "requires": { + "csstype": "^2.2.0" + } + } } }, "react-inspector": { @@ -11176,9 +11569,9 @@ } }, "react-is": { - "version": "16.10.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.10.1.tgz", - "integrity": "sha512-BXUMf9sIOPXXZWqr7+c5SeOKJykyVr2u0UDzEf4LNGc6taGkQe1A9DFD07umCIXz45RLr9oAAwZbAJ0Pkknfaw==" + "version": "16.12.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz", + "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==" }, "react-lifecycles-compat": { "version": "3.0.4", @@ -11304,35 +11697,6 @@ "read-pkg": "^3.0.0" } }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, "readdirp": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", @@ -11374,6 +11738,13 @@ "integrity": "sha1-yvvWhuBxEmERm5wolgk13EeknQo=", "requires": { "immutable": "^3.8.1" + }, + "dependencies": { + "immutable": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", + "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=" + } } }, "regenerate": { @@ -11417,11 +11788,12 @@ "integrity": "sha512-8t6074A68gHfU8Neftl0Le6KTDwfGAj7IyjPIMSfikI2wJUTHDMaIq42bUsfVnj8mhx0R+45rdUXHGpN164avA==" }, "regexp.prototype.flags": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", - "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", + "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", "requires": { - "define-properties": "^1.1.2" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" } }, "regexpp": { @@ -11696,6 +12068,11 @@ "supports-color": "^6.1.0" } }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", @@ -12371,11 +12748,6 @@ "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, "source-map-resolve": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", @@ -12395,6 +12767,13 @@ "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "source-map-url": { @@ -12559,6 +12938,35 @@ "requires": { "inherits": "~2.0.1", "readable-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "stream-each": { @@ -12580,6 +12988,35 @@ "readable-stream": "^2.3.6", "to-arraybuffer": "^1.0.0", "xtend": "^4.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "stream-shift": { @@ -12665,6 +13102,13 @@ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "requires": { "safe-buffer": "~5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + } } }, "stringify-object": { @@ -12949,6 +13393,13 @@ "commander": "^2.20.0", "source-map": "~0.6.1", "source-map-support": "~0.5.12" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "terser-webpack-plugin": { @@ -13037,6 +13488,11 @@ "find-up": "^4.0.0" } }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, "supports-color": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", @@ -13080,6 +13536,35 @@ "requires": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "thunky": { @@ -14125,6 +14610,20 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, "readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", @@ -14134,6 +14633,19 @@ "micromatch": "^3.1.10", "readable-stream": "^2.0.2" } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } } } }, @@ -14226,6 +14738,11 @@ "ajv-keywords": "^3.1.0" } }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, "ssri": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", @@ -14895,6 +15412,20 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, "readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", @@ -14910,6 +15441,11 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, "schema-utils": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", @@ -14944,6 +15480,14 @@ } } }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -15066,6 +15610,13 @@ "requires": { "source-list-map": "^2.0.0", "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "websocket-driver": { diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/AbstractRestService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/AbstractRestService.java index ed3223ae556..e587a398fcf 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/AbstractRestService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/AbstractRestService.java @@ -47,9 +47,9 @@ public abstract class AbstractRestService { /** - * Two minutes timeout value for commit requests in milliseconds. + * Two minutes timeout value for commit requests in minutes. */ - protected static final long COMMIT_TIMEOUT = 120L * 1000L; + protected static final long COMMIT_TIMEOUT = 2L; /** * The media type produced and accepted by Snow Owl's RESTful API for JSON content. @@ -164,7 +164,7 @@ protected final List getExtendedLocales(final String acceptLangu throw new BadRequestException(e.getMessage()); } } - + /** * Creates a Location header URI that should be returned from all POST resource create endpoints. * @param resourceId - the identifier of the resource @@ -173,7 +173,7 @@ protected final List getExtendedLocales(final String acceptLangu protected final URI getResourceLocationURI(String resourceId) { return MvcUriComponentsBuilder.fromController(getClass()).pathSegment(resourceId).build().toUri(); } - + /** * Creates a Location header URI that should be returned from all POST resource create endpoints. * @param branch - the branch where the resource has been created @@ -181,7 +181,7 @@ protected final URI getResourceLocationURI(String resourceId) { * @return a URI to be added as Location header value */ protected final URI getResourceLocationURI(String branch, String resourceId) { - return MvcUriComponentsBuilder.fromController(getClass()).pathSegment(branch, resourceId).build().toUri(); + return MvcUriComponentsBuilder.fromController(getClass()).pathSegment(resourceId).build(branch); } } diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemRestService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemRestService.java index 86c51bebef9..6d1ffa18237 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemRestService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemRestService.java @@ -15,6 +15,8 @@ */ package com.b2international.snowowl.core.rest.codesystem; +import java.util.concurrent.TimeUnit; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -117,7 +119,8 @@ public ResponseEntity createCodeSystem( .setCommitComment(commitComment) .build(codeSystem.getRepositoryUuid(), IBranchPath.MAIN_BRANCH) .execute(getBus()) - .getSync().getResultAs(String.class); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES) + .getResultAs(String.class); return ResponseEntity.created(getResourceLocationURI(shortName)).build(); } @@ -154,7 +157,7 @@ public void updateCodeSystem( .setLink(codeSystem.getOrganizationLink()) .build(codeSystem.getRepositoryUuid(), IBranchPath.MAIN_BRANCH, author, commitComment) .execute(getBus()) - .getSync(); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } private void validateUpdateInput(final String shortNameOrOId, final String repositoryUuid) { diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemService.java index 056a772c888..abf2eee88ec 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemService.java @@ -19,6 +19,7 @@ import static com.google.common.collect.Lists.newArrayList; import java.util.List; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import org.springframework.beans.factory.annotation.Autowired; @@ -67,7 +68,7 @@ public List getCodeSystems() { } return SHORT_NAME_ORDERING.immutableSortedCopy(codeSystems); }) - .getSync(); + .getSync(1, TimeUnit.MINUTES); } /** @@ -98,7 +99,7 @@ public CodeSystem getCodeSystemById(String shortNameOrOid) { } throw new NotFoundException("CodeSystem", shortNameOrOid); }) - .getSync(); + .getSync(1, TimeUnit.MINUTES); } private List getRepositoryIds() { @@ -107,7 +108,7 @@ private List getRepositoryIds() { .buildAsync() .execute(bus.get()) .then(repos -> repos.stream().map(RepositoryInfo::id).collect(Collectors.toList())) - .getSync(); + .getSync(1, TimeUnit.MINUTES); } } \ No newline at end of file diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemVersionService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemVersionService.java index 299f0b91eb6..9928d36440f 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemVersionService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/codesystem/CodeSystemVersionService.java @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.Date; import java.util.List; +import java.util.concurrent.TimeUnit; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -119,7 +120,7 @@ public CodeSystemVersion getCodeSystemVersionById(final String shortName, final .filterByVersionId(versionId) .build(codeSystem.getRepositoryUuid()) .execute(bus.get()) - .getSync(); + .getSync(1, TimeUnit.MINUTES); final CodeSystemVersionEntry version = Iterables.getOnlyElement(versions, null); if (version == null) { @@ -152,7 +153,7 @@ public CodeSystemVersion createVersion(String shortName, CodeSystemVersionProper .setRequest(req) .buildAsync() .execute(bus.get()) - .getSync(); + .getSync(1, TimeUnit.MINUTES); RemoteJobEntry job = null; do { @@ -165,7 +166,7 @@ public CodeSystemVersion createVersion(String shortName, CodeSystemVersionProper job = JobRequests.prepareGet(jobId) .buildAsync() .execute(bus.get()) - .getSync(); + .getSync(1, TimeUnit.MINUTES); } while (job == null || !job.isDone()); if (job.isSuccessful()) { @@ -185,7 +186,7 @@ private Collection getCodeSystemVersions(final String sh .filterByCodeSystemShortName(shortName) .build(repositoryId) .execute(bus.get()) - .getSync() + .getSync(1, TimeUnit.MINUTES) .getItems(); } diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/util/ModelAttributeParameterExpanderExt.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/util/ModelAttributeParameterExpanderExt.java index 891f82b5208..cd26e3f5b7e 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/util/ModelAttributeParameterExpanderExt.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/util/ModelAttributeParameterExpanderExt.java @@ -37,6 +37,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; import org.springframework.util.ClassUtils; import com.fasterxml.classmate.ResolvedType; @@ -56,7 +58,6 @@ import springfox.documentation.service.Parameter; import springfox.documentation.spi.schema.AlternateTypeProvider; import springfox.documentation.spi.schema.EnumTypeDeterminer; -import springfox.documentation.spi.service.contexts.DocumentationContext; import springfox.documentation.spi.service.contexts.ParameterExpansionContext; import springfox.documentation.spring.web.readers.parameter.ExpansionContext; import springfox.documentation.spring.web.readers.parameter.ModelAttributeField; @@ -105,7 +106,7 @@ public List expand(ExpansionContext context) { ResolvedType itemType = collectionElementType(each.getFieldType()); if (Types.isBaseType(itemType) || enumTypeDeterminer.isEnum(itemType.getErasedType())) { - parameters.add(simpleFields(context.getParentName(), context.getDocumentationContext(), each)); + parameters.add(simpleFields(context.getParentName(), context, each)); } else { parameters.addAll(expand(context.childContext(nestedParentName(context.getParentName(), each), itemType, context.getOperationContext()))); @@ -114,7 +115,7 @@ public List expand(ExpansionContext context) { FluentIterable simpleFields = modelAttributes.filter(simpleType()); for (ModelAttributeField each : simpleFields) { - parameters.add(simpleFields(context.getParentName(), context.getDocumentationContext(), each)); + parameters.add(simpleFields(context.getParentName(), context, each)); } List fieldNamesInOrder = fields.transform(ResolvedField::getName).toList(); @@ -141,7 +142,7 @@ public boolean apply(Parameter input) { }; } - private Parameter simpleFields(String parentName, DocumentationContext documentationContext, ModelAttributeField each) { + private Parameter simpleFields(String parentName, ExpansionContext context, ModelAttributeField each) { LOG.debug("Attempting to expand field: {}", each); String dataTypeName = Optional.fromNullable(typeNameFor(each.getFieldType().getErasedType())) .or(each.getFieldType().getErasedType().getSimpleName()); @@ -149,15 +150,31 @@ private Parameter simpleFields(String parentName, DocumentationContext documenta ParameterExpansionContext parameterExpansionContext = new ParameterExpansionContext( dataTypeName, parentName, - each.getFieldType().getTypeName(), + determineScalarParameterType( + context.getOperationContext().consumes(), + context.getOperationContext().httpMethod()), new ModelAttributeParameterMetadataAccessor( each.annotatedElements(), each.getFieldType(), each.getName()), - documentationContext.getDocumentationType(), + context.getDocumentationContext().getDocumentationType(), new ParameterBuilder()); return pluginsManager.expandParameter(parameterExpansionContext); } + + private static String determineScalarParameterType(Set consumes, HttpMethod method) { + String parameterType = "query"; + + if (consumes.contains(MediaType.APPLICATION_FORM_URLENCODED) + && method == HttpMethod.POST) { + parameterType = "form"; + } else if (consumes.contains(MediaType.MULTIPART_FORM_DATA) + && method == HttpMethod.POST) { + parameterType = "formData"; + } + + return parameterType; + } private Predicate recursiveType(final ExpansionContext context) { return new Predicate() { diff --git a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/validation/ValidationRestService.java b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/validation/ValidationRestService.java index a8509eac6cf..6c19e66babb 100644 --- a/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/validation/ValidationRestService.java +++ b/core/com.b2international.snowowl.core.rest/src/com/b2international/snowowl/core/rest/validation/ValidationRestService.java @@ -20,6 +20,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import org.springframework.beans.factory.annotation.Autowired; @@ -242,7 +243,7 @@ public ResponseEntity beginValidation( .filterByIds(rulesToFetch) .buildAsync() .execute(bus) - .getSync() + .getSync(1, TimeUnit.MINUTES) .stream() .collect(Collectors.toMap(ValidationRule::getId, ValidationRule::getMessageTemplate)); final Collection reports = issues.stream().map(issue -> { @@ -283,7 +284,7 @@ private CodeSystemEntry getCodeSystem(final String codeSystemShortName) { CodeSystemEntry codeSystemEntry = CodeSystemRequests.prepareGetCodeSystem(codeSystemShortName) .build(repoId) .execute(getBus()) - .getSync(); + .getSync(1, TimeUnit.MINUTES); if (codeSystemEntry != null) { return codeSystemEntry; @@ -299,7 +300,8 @@ private Set getRepositoryIds() { .all() .buildAsync() .execute(getBus()) - .getSync().stream() + .getSync(1, TimeUnit.MINUTES) + .stream() .map(RepositoryInfo::id) .collect(Collectors.toSet()); } diff --git a/core/com.b2international.snowowl.core.tests/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.core.tests/META-INF/MANIFEST.MF index e4af7c8b148..cc8360a6bef 100644 --- a/core/com.b2international.snowowl.core.tests/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.core.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Core Tests Bundle-SymbolicName: com.b2international.snowowl.core.tests -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.core;bundle-version="4.1.0" Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/core/com.b2international.snowowl.core.tests/pom.xml b/core/com.b2international.snowowl.core.tests/pom.xml index b3580025cbe..05e047aeade 100644 --- a/core/com.b2international.snowowl.core.tests/pom.xml +++ b/core/com.b2international.snowowl.core.tests/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.core.tests eclipse-test-plugin diff --git a/core/com.b2international.snowowl.core/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.core/META-INF/MANIFEST.MF index 2879d1cd177..c1e54c86c6c 100644 --- a/core/com.b2international.snowowl.core/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Core Bundle-SymbolicName: com.b2international.snowowl.core;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Activator: com.b2international.snowowl.core.CoreActivator Bundle-Vendor: B2i Healthcare Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", diff --git a/core/com.b2international.snowowl.core/pom.xml b/core/com.b2international.snowowl.core/pom.xml index ef9d96760ab..0c8e6d4c8c5 100644 --- a/core/com.b2international.snowowl.core/pom.xml +++ b/core/com.b2international.snowowl.core/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.core eclipse-plugin diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/SimpleFamilyJob.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/SimpleFamilyJob.java deleted file mode 100644 index f12725a1b04..00000000000 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/SimpleFamilyJob.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.core; - -import org.eclipse.core.runtime.QualifiedName; -import org.eclipse.core.runtime.jobs.Job; - -/** - * Abstract superclass which provides support for common functionality in Snow - * Owl's jobs: a {@link #belongsTo(Object)} implementation with an Object - * family, and a type-sensitive getter for job properties. - * - */ -public abstract class SimpleFamilyJob extends Job { - - protected final Object family; - - public SimpleFamilyJob(String name, Object family) { - super(name); - this.family = family; - } - - public SimpleFamilyJob(String name, Object family, boolean isUserJob, int priority) { - this(name, family); - setUser(isUserJob); - setPriority(priority); - } - - protected T getProperty(QualifiedName key, Class clazz) { - return clazz.cast(getProperty(key)); - } - - @Override - public boolean belongsTo(Object family) { - return (this.family == null || family == null) ? false : this.family.equals(family); - } -} \ No newline at end of file diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/AlreadyLoggedInException.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/AlreadyLoggedInException.java deleted file mode 100644 index 1b51e16db65..00000000000 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/AlreadyLoggedInException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.core.api; - -/** - * {@link SecurityException Security exception} extension. This exception should be raised - * to indicate authentication failed because requesting part is already authenticated. - */ -public class AlreadyLoggedInException extends SecurityException { - - private static final long serialVersionUID = 4840480288469687887L; - - /**Exception message. {@value}*/ - private static final String MESSAGE = "Already logged in."; - - /**Sole constructor.*/ - public AlreadyLoggedInException() { - super(MESSAGE); - } - -} \ No newline at end of file diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/ITerminologyComponentIdProvider.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/ITerminologyComponentIdProvider.java deleted file mode 100644 index 32beee71d3a..00000000000 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/ITerminologyComponentIdProvider.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.core.api; - -/** - * Provides a terminology component id. - */ -public interface ITerminologyComponentIdProvider { - - /** - * Returns the terminology component ID. - * - * @return - */ - String getTerminologyComponentId(); - -} \ No newline at end of file diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/IdComponent.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/IdComponent.java deleted file mode 100644 index a114961f02b..00000000000 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/IdComponent.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.core.api; - -/** - * @since 4.4 - */ -public class IdComponent implements IComponent, ITerminologyComponentIdProvider { - - private static final long serialVersionUID = -2016802041403195516L; - - private final String id; - private final String terminologyComponentId; - - private IdComponent(String id, String terminologyComponentId) { - this.id = id; - this.terminologyComponentId = terminologyComponentId; - } - - @Override - public String getLabel() { - return id; - } - - @Override - public String getId() { - return id; - } - - @Override - public String getTerminologyComponentId() { - return terminologyComponentId; - } - - public static final IComponent of(String id, String terminologyComponentId) { - return new IdComponent(id, terminologyComponentId); - } - -} diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/Net4jProtocolConstants.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/Net4jProtocolConstants.java deleted file mode 100644 index f2ba3563f5c..00000000000 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/Net4jProtocolConstants.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.core.api; - -/** - * Constants used for our custom Net4j communication protocol. - */ -public abstract class Net4jProtocolConstants { - - //buffer size for file transfer, arbitrary number - public static final short BUFFER_SIZE = 16384; - - //authentication protocol - public static final short AUTHENTICATION_SIGNAL = 1; - public static final short CREDENTIALS_SIGNAL = 2; - - //user management - public static final short FETCH_USERS_SIGNAL = 21; - - //ATC protocol - public static final short ATC_IMPORT_SIGNAL = 101; - public static final short ATC_EXPORT_SIGNAL = 102; - - //ICD-10 protocol - public static final short ICD10_IMPORT_SIGNAL = 301; - - //ICD-10-AM protocol - public static final short ICD10AM_IMPORT_SIGNAL = 601; - - //ICD-10-CM protocol - public static final short ICD10CM_IMPORT_SIGNAL = 501; - - //UMLS protocol - public static final short UMLS_IMPORT_SIGNAL = 401; - public static final short UMLS_EXPORT_SIGNAL = 402; - - //LOINC protocol - public static final short LOINC_IMPORT_SIGNAL = 701; - public static final short LOINC_EXPORT_SIGNAL = 702; - - // Value set protocol - public static final short VALUE_SET_EXCEL_IMPORT_SIGNAL = 801; - public static final short VALUE_SET_EXCEL_EXPORT_SIGNAL = 802; - public static final short VALUE_SET_UMLS_IMPORT_SIGNAL = 803; - public static final short VALUE_SET_UMLS_EXPORT_SIGNAL = 804; - - //Mapping set protocol - public static final short MAPPING_SET_EXCEL_IMPORT_SIGNAL = 1001; - public static final short MAPPING_SET_EXCEL_EXPORT_SIGNAL = 1002; - - private Net4jProtocolConstants() {} -} \ No newline at end of file diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/NullComponent.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/NullComponent.java deleted file mode 100644 index 2f6ce6329ec..00000000000 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/NullComponent.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.core.api; - -import java.io.Serializable; - -/** - * Null implementation of the {@link IComponent} interface. - * - */ -public enum NullComponent implements IComponent, Serializable { - - /**The singleton NULL instance with {@code null} ID and empty string label.*/ - INSTANCE; - - /** - * NOTE: this method always returns with {@code null}.

          - * {@inheritDoc} - */ - @Override - public Object getId() { - return null; - } - - /** - * NOTE: this method always returns with an empty string.

          - * {@inheritDoc} - */ - @Override - public String getLabel() { - return ""; - } - - @Override - public String toString() { - return ""; - } - - /** - * @return the {@link #INSTANCE null implementation} singleton instance. - */ - @SuppressWarnings("unchecked") - public static IComponent getNullImplementation() { - return (IComponent) INSTANCE; - } - - /** - * Returns {@code true} only and if only the specified object is either {@code null} or equals with the {@link #INSTANCE null instance}. - * @param object the object to check. - * @return {@code true} if the specified object is either {@code null} or equals with the {@link #INSTANCE null instance}. - * Otherwise returns with false. - */ - public static boolean isNullComponent(final Object object) { - return null == object || INSTANCE.equals(object); - } - -} \ No newline at end of file diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/config/SnowOwlConfiguration.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/config/SnowOwlConfiguration.java index 5bf7d1c8d99..218662e0181 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/config/SnowOwlConfiguration.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/config/SnowOwlConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,8 +28,6 @@ */ public class SnowOwlConfiguration extends Configuration { - private boolean systemUserNeeded = false; - private String description = "You Know, for Terminologies"; private boolean gzip = true; @@ -44,16 +42,6 @@ public void setDescription(String description) { this.description = description; } - @JsonProperty("systemUser") - public boolean isSystemUserNeeded() { - return systemUserNeeded; - } - - @JsonProperty("systemUser") - public void setSystemUserNeeded(boolean systemUserNeeded) { - this.systemUserNeeded = systemUserNeeded; - } - public boolean isGzip() { return gzip; } diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/date/EffectiveTimes.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/date/EffectiveTimes.java index 17ea2bb3464..56b47aa5f08 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/date/EffectiveTimes.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/date/EffectiveTimes.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,7 +68,7 @@ public static final String format(@Nullable Object effectiveTime) { public static String format(@Nullable Object effectiveTime, String datePattern) { return format(effectiveTime, datePattern, UNSET_EFFECTIVE_TIME_LABEL); } - + /** * Formats the given object representing an effective time with the given datePattern and returns the result. *

          @@ -156,19 +156,27 @@ public static Date toDate(long effectiveTime) { } /** - * Returns true if the given Object is an unset representation of an effective time value. + * Returns true if the given Object is an unset representation of an effective time value, false otherwise. + * * @param effectiveTimeValue * @return */ public static boolean isUnset(Object effectiveTimeValue) { if (effectiveTimeValue == null) { return true; - } else if (UNSET_EFFECTIVE_TIME_LABEL.equals(effectiveTimeValue)) { - return true; } else if (effectiveTimeValue instanceof Long && UNSET_EFFECTIVE_TIME == (long) effectiveTimeValue) { return true; - } else if (effectiveTimeValue instanceof String && UNSET_EFFECTIVE_TIME == Long.parseLong((String) effectiveTimeValue)) { - return true; + } else if (effectiveTimeValue instanceof String) { + if (UNSET_EFFECTIVE_TIME_LABEL.compareToIgnoreCase((String) effectiveTimeValue) == 0) { + return true; + } + try { + if (UNSET_EFFECTIVE_TIME == Long.parseLong((String) effectiveTimeValue)) { + return true; + } + } catch (NumberFormatException e) { + // ignore, return false, since the given value cannot be a valid unset effective time value + } } return false; } diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/CollectionResource.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/CollectionResource.java index 9f56df6ec3d..b1d4c5d7613 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/CollectionResource.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/domain/CollectionResource.java @@ -26,8 +26,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.MoreObjects; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; diff --git a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/events/util/Promise.java b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/events/util/Promise.java index ebeeea6cc09..5c894ea945c 100644 --- a/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/events/util/Promise.java +++ b/core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/events/util/Promise.java @@ -65,8 +65,7 @@ public T getSync() { final Throwable cause = e.getCause(); if (cause instanceof ApiException) { throw (ApiException) cause; - } - if (cause instanceof RuntimeException) { + } else if (cause instanceof RuntimeException) { throw (RuntimeException) cause; } else { throw new SnowowlRuntimeException(cause); @@ -92,8 +91,7 @@ public T getSync(final long timeout, final TimeUnit unit) { final Throwable cause = e.getCause(); if (cause instanceof ApiException) { throw (ApiException) cause; - } - if (cause instanceof RuntimeException) { + } if (cause instanceof RuntimeException) { throw (RuntimeException) cause; } else { throw new SnowowlRuntimeException(cause); diff --git a/core/com.b2international.snowowl.datastore.server.tests/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.datastore.server.tests/META-INF/MANIFEST.MF index d73a4d8ada1..ed9015d0ff2 100644 --- a/core/com.b2international.snowowl.datastore.server.tests/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.datastore.server.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Datastore Tests Bundle-SymbolicName: com.b2international.snowowl.datastore.server.tests -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.datastore;bundle-version="4.1.0" Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/core/com.b2international.snowowl.datastore.server.tests/pom.xml b/core/com.b2international.snowowl.datastore.server.tests/pom.xml index a07d17ea6ad..6256fe633d5 100644 --- a/core/com.b2international.snowowl.datastore.server.tests/pom.xml +++ b/core/com.b2international.snowowl.datastore.server.tests/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.datastore.server.tests eclipse-test-plugin @@ -21,26 +21,11 @@ - - eclipse-plugin - ch.qos.logback.classic - ${logback.versionRange} - - - eclipse-plugin - ch.qos.logback.core - ${logback.versionRange} - eclipse-plugin com.b2international.collections.fastutil 0.0.0 - - eclipse-plugin - com.sun.el - 0.0.0 - @@ -50,7 +35,7 @@ tycho-surefire-plugin false - ${tycho.testArgLine} -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch + ${tycho.testArgLine} -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Dlogback.configurationFile=${basedir}/src/configuration/logback-maven.xml **/AllCoreTests.java diff --git a/core/com.b2international.snowowl.datastore.server.tests/src/configuration/logback-maven.xml b/core/com.b2international.snowowl.datastore.server.tests/src/configuration/logback-maven.xml new file mode 100644 index 00000000000..7503b10d813 --- /dev/null +++ b/core/com.b2international.snowowl.datastore.server.tests/src/configuration/logback-maven.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/core/com.b2international.snowowl.datastore/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.datastore/META-INF/MANIFEST.MF index 4c122694f4a..98eb569e19b 100644 --- a/core/com.b2international.snowowl.datastore/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.datastore/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Terminology Datastore Bundle-SymbolicName: com.b2international.snowowl.datastore;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Activator: com.b2international.snowowl.datastore.DatastoreActivator Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/core/com.b2international.snowowl.datastore/pom.xml b/core/com.b2international.snowowl.datastore/pom.xml index ee3f728ebda..4c1305235d7 100644 --- a/core/com.b2international.snowowl.datastore/pom.xml +++ b/core/com.b2international.snowowl.datastore/pom.xml @@ -6,7 +6,7 @@ com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.datastore eclipse-plugin diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoConverter.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoConverter.java index 7653bbbdb81..70b9cd4e084 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoConverter.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/commit/CommitInfoConverter.java @@ -81,10 +81,11 @@ private Collection getCommitDetails(final Commit commit, Options d private String getDetailsAffectedComponentId(Options filters, Options expandOptions) { checkNotNull(filters, "At least one filter source must be defined"); - if (filters.containsKey(CommitInfoSearchRequest.OptionKey.AFFECTED_COMPONENT_ID)) { - return filters.getString(CommitInfoSearchRequest.OptionKey.AFFECTED_COMPONENT_ID.name()); - } else if (expandOptions.containsKey("affectedComponentId")) { + // prefer details() expand options first, then outer affectedComponentId filter + if (expandOptions.containsKey("affectedComponentId")) { return expandOptions.getString("affectedComponentId"); + } else if (filters.containsKey(CommitInfoSearchRequest.OptionKey.AFFECTED_COMPONENT_ID.name())) { + return filters.getString(CommitInfoSearchRequest.OptionKey.AFFECTED_COMPONENT_ID.name()); } else { return null; } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/CodeSystemsCommand.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/CodeSystemsCommand.java index 509bd0695d6..f784a22da5f 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/CodeSystemsCommand.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/CodeSystemsCommand.java @@ -18,6 +18,7 @@ import static com.google.common.collect.Lists.newArrayList; import java.util.List; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import com.b2international.commons.extension.Component; @@ -97,7 +98,7 @@ private String getCodeSystemVersionsInfo(CodeSystemEntry cs) { .sortBy(SortField.ascending(CodeSystemVersionEntry.Fields.EFFECTIVE_DATE)) .build(cs.getRepositoryUuid()) .execute(getBus()) - .getSync(); + .getSync(1, TimeUnit.MINUTES); if (versions.isEmpty()) { info.append("\tNo versions have been created yet."); } else { @@ -115,7 +116,7 @@ private List getRepositoryIds() { .buildAsync() .execute(getBus()) .then(repos -> repos.stream().map(RepositoryInfo::id).collect(Collectors.toList())) - .getSync(); + .getSync(1, TimeUnit.MINUTES); } private List getCodeSystems() { @@ -131,7 +132,7 @@ private List getCodeSystems() { } return SHORT_NAME_ORDERING.immutableSortedCopy(codeSystems); }) - .getSync(); + .getSync(1, TimeUnit.MINUTES); } private CodeSystemEntry getCodeSystemById(String shortNameOrOid) { @@ -152,7 +153,7 @@ private CodeSystemEntry getCodeSystemById(String shortNameOrOid) { } return null; }) - .getSync(); + .getSync(1, TimeUnit.MINUTES); } private String getCodeSystemVersionInformation(CodeSystemVersionEntry codeSystemVersion) { diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/ScriptsCommand.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/ScriptsCommand.java index 9e5a6f8029f..252eae96513 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/ScriptsCommand.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/console/ScriptsCommand.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,16 +15,21 @@ */ package com.b2international.snowowl.core.console; +import static com.google.common.collect.Maps.newHashMap; + import java.io.PrintStream; import java.nio.file.Files; import java.nio.file.Paths; -import java.util.Collections; +import java.util.Map; import java.util.stream.Collectors; import com.b2international.commons.extension.Component; import com.b2international.scripting.api.ScriptEngine; import com.b2international.snowowl.core.ApplicationContext; +import com.b2international.snowowl.core.ServiceProvider; +import com.b2international.snowowl.core.setup.Environment; import com.b2international.snowowl.core.setup.Plugins; +import com.b2international.snowowl.eventbus.IEventBus; import picocli.CommandLine; import picocli.CommandLine.HelpCommand; @@ -63,15 +68,24 @@ private static final class RunCommand extends Command { @Override public void run(CommandLineStream out) { try { + final String script = Files.lines(Paths.get(path)).collect(Collectors.joining(System.getProperty("line.separator"))); final ClassLoader classLoader = ApplicationContext.getServiceForClass(Plugins.class).getCompositeClassLoader(); - ScriptEngine.run("groovy", classLoader, script, Collections.emptyMap()); + + // Include the CLI-authorized IEventBus when running scripts + final ServiceProvider context = ApplicationContext.getServiceForClass(Environment.class) + .inject() + .bind(IEventBus.class, getBus()) + .build(); + + final Map binding = newHashMap(); + binding.put("ctx", context); + ScriptEngine.run("groovy", classLoader, script, binding); + } catch (Exception e) { e.printStackTrace(); out.println(e.getMessage()); } } - } - } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/CompositeComponentDeletionPolicy.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/CompositeComponentDeletionPolicy.java new file mode 100644 index 00000000000..61522e0c444 --- /dev/null +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/CompositeComponentDeletionPolicy.java @@ -0,0 +1,68 @@ +/* + * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.b2international.snowowl.core.repository; + +import static com.google.common.collect.Maps.newHashMap; +import static java.util.Collections.singletonMap; + +import java.util.Map; + +import com.b2international.snowowl.datastore.index.RevisionDocument; +import com.google.common.collect.ImmutableMap; + +/** + * @since 7.4.0 + */ +public class CompositeComponentDeletionPolicy implements ComponentDeletionPolicy { + + private Map, ComponentDeletionPolicy> deletionPolicies; + + public static CompositeComponentDeletionPolicy of(Class clazz, ComponentDeletionPolicy policy) { + return new CompositeComponentDeletionPolicy(singletonMap(clazz, policy)); + } + + public static CompositeComponentDeletionPolicy of(Map,ComponentDeletionPolicy> policies) { + return new CompositeComponentDeletionPolicy(policies); + } + + CompositeComponentDeletionPolicy(Map, ComponentDeletionPolicy> policies) { + this.deletionPolicies = policies; + } + + public CompositeComponentDeletionPolicy mergeWith(final CompositeComponentDeletionPolicy other) { + Map, ComponentDeletionPolicy> mergedPolicies = newHashMap(deletionPolicies); + other.getDeletionPolicies().forEach( (clazz, policy) -> mergedPolicies.putIfAbsent(clazz, policy)); + this.deletionPolicies = ImmutableMap.copyOf(mergedPolicies); + return this; + } + + @Override + public boolean canDelete(final RevisionDocument revision) { + + if (deletionPolicies.containsKey(revision.getClass())) { + return deletionPolicies.get(revision.getClass()).canDelete(revision); + } + + return deletionPolicies.entrySet().stream() + .filter(entry -> entry.getKey().isInstance(revision)) + .allMatch(entry -> entry.getValue().canDelete(revision)); + } + + public Map, ComponentDeletionPolicy> getDeletionPolicies() { + return deletionPolicies; + } + +} diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryBuilder.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryBuilder.java index 1fdf527e9fd..12d009a2aeb 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryBuilder.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryBuilder.java @@ -145,6 +145,10 @@ public Repository build(Environment env) { configurer.getAdditionalMappings().forEach(mappings::putMapping); }); + if (deletionPolicy instanceof CompositeComponentDeletionPolicy) { + repositoryConfigurers.forEach(configurer -> ((CompositeComponentDeletionPolicy) deletionPolicy).mergeWith(configurer.getComponentDeletionPolicy())); + } + final TerminologyRepository repository = new TerminologyRepository(repositoryId, mergeMaxResults, env, mappings, log); repository.bind(VersioningRequestBuilder.class, versioningRequestBuilder); repository.bind(ComponentDeletionPolicy.class, deletionPolicy); diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryPlugin.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryPlugin.java index ba698ddf399..82ae121c53f 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryPlugin.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/RepositoryPlugin.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,9 +89,9 @@ public void init(SnowOwlConfiguration configuration, Environment env) throws Exc LOG.debug("Preparing RPC communication (config={},gzip={})", rpcConfig, gzip); RpcUtil.prepareContainer(container, rpcConfig, gzip); LOG.debug("Preparing EventBus communication (gzip={})", gzip); - int numberOfWorkers = configuration.getModuleConfig(RepositoryConfiguration.class).getNumberOfWorkers(); - EventBusNet4jUtil.prepareContainer(container, gzip, numberOfWorkers); - env.services().registerService(IEventBus.class, EventBusNet4jUtil.getBus(container, numberOfWorkers)); + int maxThreads = configuration.getModuleConfig(RepositoryConfiguration.class).getMaxThreads(); + EventBusNet4jUtil.prepareContainer(container, gzip, maxThreads); + env.services().registerService(IEventBus.class, EventBusNet4jUtil.getBus(container, maxThreads)); LOG.debug("Preparing JSON support"); final ObjectMapper mapper = JsonSupport.getDefaultObjectMapper(); mapper.registerModule(new PrimitiveCollectionModule()); @@ -176,7 +176,7 @@ public void preRun(SnowOwlConfiguration configuration, Environment env) { env.services().registerService(RepositoryManager.class, repositoryManager); env.services().registerService(RepositoryContextProvider.class, repositoryManager); - int numberOfWorkers = configuration.getModuleConfig(RepositoryConfiguration.class).getNumberOfWorkers(); + int numberOfWorkers = configuration.getModuleConfig(RepositoryConfiguration.class).getMaxThreads(); initializeRequestSupport(env, numberOfWorkers); LOG.debug("Initialized repository plugin."); @@ -184,14 +184,13 @@ public void preRun(SnowOwlConfiguration configuration, Environment env) { LOG.debug("Snow Owl application is running in remote mode."); } - if (configuration.isSystemUserNeeded() || env.isServer()) { + if (env.isServer()) { try { connectSystemUser(env.container()); } catch (SnowowlServiceException e) { throw new SnowowlRuntimeException(e); } } - } private void registerRequestMetrics(MeterRegistry registry, IEventBus eventBus) { diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/TerminologyRepositoryConfigurer.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/TerminologyRepositoryConfigurer.java index f9448eb31d9..42c5c6c8c7c 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/TerminologyRepositoryConfigurer.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/repository/TerminologyRepositoryConfigurer.java @@ -32,4 +32,9 @@ public interface TerminologyRepositoryConfigurer { */ Collection> getAdditionalMappings(); + /** + * @return additional component deletion policies for subtypes of RevisionDocument + */ + CompositeComponentDeletionPolicy getComponentDeletionPolicy(); + } diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/issue/ValidationIssueDeleteRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/issue/ValidationIssueDeleteRequest.java index 9b276d718a7..5dcbdaf049f 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/issue/ValidationIssueDeleteRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/core/validation/issue/ValidationIssueDeleteRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2019-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,13 +15,20 @@ */ package com.b2international.snowowl.core.validation.issue; -import org.hibernate.validator.constraints.NotEmpty; +import java.util.Set; +import java.util.stream.Collectors; +import org.elasticsearch.common.Strings; + +import com.b2international.index.BulkDelete; +import com.b2international.index.query.Expressions; +import com.b2international.index.query.Expressions.ExpressionBuilder; import com.b2international.snowowl.core.ServiceProvider; import com.b2international.snowowl.core.events.Request; import com.b2international.snowowl.core.internal.validation.ValidationRepository; import com.b2international.snowowl.core.validation.ValidationDeleteNotification; import com.b2international.snowowl.core.validation.ValidationRequests; +import com.b2international.snowowl.core.validation.rule.ValidationRule; import com.b2international.snowowl.eventbus.IEventBus; import com.fasterxml.jackson.annotation.JsonProperty; @@ -33,11 +40,9 @@ final class ValidationIssueDeleteRequest implements Request { - - ValidationIssues issues = ValidationRequests.issues().prepareSearch() + ExpressionBuilder query = Expressions.builder(); + + if (!Strings.isNullOrEmpty(branch)) { + query.filter(Expressions.exactMatch(ValidationIssue.Fields.BRANCH_PATH, branch)); + } + + if (!Strings.isNullOrEmpty(toolingId)) { + final Set rulesToDelete = ValidationRequests.rules().prepareSearch() .all() - .filterByBranchPath(branch) .filterByTooling(toolingId) .build() - .execute(context); - - for (ValidationIssue issue : issues) { - writer.remove(ValidationIssue.class, issue.getId()); - } + .execute(context) + .stream() + .map(ValidationRule::getId) + .collect(Collectors.toSet()); + query.filter(Expressions.matchAny(ValidationIssue.Fields.RULE_ID, rulesToDelete)); + } + + return context.service(ValidationRepository.class).write(writer -> { + writer.bulkDelete(new BulkDelete<>(ValidationIssue.class, query.build())); writer.commit(); new ValidationDeleteNotification(branch, toolingId).publish(context.service(IEventBus.class)); diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/config/RepositoryConfiguration.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/config/RepositoryConfiguration.java index 0ce9377ec99..0f35a510618 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/config/RepositoryConfiguration.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/config/RepositoryConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,9 +43,8 @@ public class RepositoryConfiguration { @NotNull private IndexConfiguration indexConfiguration = new IndexConfiguration(); - @Min(0) - @Max(100) - private int numberOfWorkers = 3 * Runtime.getRuntime().availableProcessors(); + @Min(1) + private int maxThreads = 200; @Min(10) @Max(1000) @@ -98,19 +97,35 @@ public HostAndPort getHostAndPort() { } /** - * @return the number of workers threads per repository + * @return the number of workers threads + * @deprecated - use #getMaxThreads() instead, will be unsupported in 7.5 */ @JsonProperty public int getNumberOfWorkers() { - return numberOfWorkers; + return getMaxThreads(); + } + + /** + * @return number of maximum threads to allow in the underlying event bus instance + */ + public int getMaxThreads() { + return maxThreads; } /** - * @param numberOfWorkers the number of workers per repository to set + * @param numberOfWorkers - the number of workers to set + * @deprecated - use #setMaxThreads(int) instead, will be unsupported in 7.5 */ @JsonProperty public void setNumberOfWorkers(int numberOfWorkers) { - this.numberOfWorkers = numberOfWorkers; + setMaxThreads(numberOfWorkers); + } + + /** + * @param maxThreads - the maximum number of threads to allow in the underlying event bus instance + */ + public void setMaxThreads(int maxThreads) { + this.maxThreads = maxThreads; } @JsonProperty("index") diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/remotejobs/RemoteJob.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/remotejobs/RemoteJob.java index dcb6690c3d4..d2e13910a54 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/remotejobs/RemoteJob.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/remotejobs/RemoteJob.java @@ -24,6 +24,7 @@ import org.eclipse.core.runtime.QualifiedName; import org.eclipse.core.runtime.jobs.Job; +import com.b2international.commons.exceptions.ApiError; import com.b2international.commons.exceptions.ApiException; import com.b2international.commons.status.Statuses; import com.b2international.snowowl.core.CoreActivator; @@ -90,13 +91,21 @@ protected final IStatus run(IProgressMonitor monitor) { } catch (OperationCanceledException e) { return Statuses.cancel(); } catch (Throwable e) { + final ApiError apiError; + if (e instanceof ApiException) { - this.response = toJson(mapper, ((ApiException) e).toApiError()); + apiError = ((ApiException) e).toApiError(); + } else { + apiError = ApiError.Builder.of(e.getMessage()) + .status(500) + .developerMessage("Exception caught while executing request in remote job.") + .addInfo("exception-class", e.getClass().getSimpleName()) + .build(); } + this.response = toJson(mapper, apiError); // XXX: Don't delete remote jobs with errors autoClean = false; - return Statuses.error(CoreActivator.PLUGIN_ID, "Failed to execute long running request", e); } finally { if (autoClean) { diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/compare/BranchCompareRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/compare/BranchCompareRequest.java index 3e8492a1adf..5cc9c9c147b 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/compare/BranchCompareRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/compare/BranchCompareRequest.java @@ -83,10 +83,11 @@ public CompareResult execute(RepositoryContext context) { baseBranchPath = branchToCompare.parentPath(); } - final CompareResult.Builder result = CompareResult.builder(baseBranchPath, compare, compareHeadTimestamp) - .addTotalNew(compareResult.getTotalAdded()) - .addTotalChanged(compareResult.getTotalChanged()) - .addTotalDeleted(compareResult.getTotalRemoved()); + final CompareResult.Builder result = CompareResult.builder(baseBranchPath, compare, compareHeadTimestamp); + + int totalNew = 0; + int totalChanged = 0; + int totalDeleted = 0; for (RevisionCompareDetail detail : compareResult.getDetails()) { final ObjectId affectedId; @@ -105,17 +106,23 @@ public CompareResult execute(RepositoryContext context) { switch (detail.getOp()) { case ADD: result.putNewComponent(identifier); + totalNew++; break; case CHANGE: result.putChangedComponent(identifier); + totalChanged++; break; case REMOVE: result.putDeletedComponent(identifier); + totalDeleted++; break; } } - return result.build(); + return result.addTotalNew(totalNew) + .addTotalChanged(totalChanged) + .addTotalDeleted(totalDeleted) + .build(); } @Override diff --git a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/version/CodeSystemVersionCreateRequest.java b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/version/CodeSystemVersionCreateRequest.java index 919d654fc7a..107d6504937 100644 --- a/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/version/CodeSystemVersionCreateRequest.java +++ b/core/com.b2international.snowowl.datastore/src/com/b2international/snowowl/datastore/request/version/CodeSystemVersionCreateRequest.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; import java.util.function.Function; import java.util.stream.Collectors; @@ -120,7 +121,7 @@ public Boolean execute(ServiceProvider context) { .prepareGet(newVersionPath) .build(repositoryId) .execute(context.service(IEventBus.class)) - .getSync(); + .getSync(1, TimeUnit.MINUTES); throw new ConflictException("An existing branch with path '%s' conflicts with the specified version identifier.", newVersionPath); } catch (NotFoundException e) { // ignore @@ -199,7 +200,7 @@ private Instant getMostRecentVersionEffectiveDateTime(ServiceProvider context, C .filterByCodeSystemShortName(codeSystem.getShortName()) .build(codeSystem.getRepositoryUuid()) .execute(context.service(IEventBus.class)) - .getSync() + .getSync(1, TimeUnit.MINUTES) .stream() .max(CodeSystemVersionEntry.VERSION_EFFECTIVE_DATE_COMPARATOR) .map(CodeSystemVersionEntry::getEffectiveDate) @@ -245,7 +246,7 @@ private void doTag(ServiceProvider context, CodeSystemEntry codeSystem, IProgres .setName(versionId) .build(codeSystem.getRepositoryUuid()) .execute(context.service(IEventBus.class)) - .getSync(); + .getSync(1, TimeUnit.MINUTES); monitor.worked(1); } diff --git a/core/com.b2international.snowowl.identity.file/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.identity.file/META-INF/MANIFEST.MF index 6228424f38d..f8cb7a84b33 100644 --- a/core/com.b2international.snowowl.identity.file/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.identity.file/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl File Identity Module Bundle-SymbolicName: com.b2international.snowowl.identity.file;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Fragment-Host: com.b2international.snowowl.identity Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ClassPath: . diff --git a/core/com.b2international.snowowl.identity.file/pom.xml b/core/com.b2international.snowowl.identity.file/pom.xml index 8b7ed8a8fc2..127e79c17c2 100644 --- a/core/com.b2international.snowowl.identity.file/pom.xml +++ b/core/com.b2international.snowowl.identity.file/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.identity.file eclipse-plugin diff --git a/core/com.b2international.snowowl.identity.ldap/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.identity.ldap/META-INF/MANIFEST.MF index fac5b7f3167..355b6dc0834 100644 --- a/core/com.b2international.snowowl.identity.ldap/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.identity.ldap/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl LDAP Identity Module Bundle-SymbolicName: com.b2international.snowowl.identity.ldap -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Fragment-Host: com.b2international.snowowl.identity Bundle-RequiredExecutionEnvironment: JavaSE-11 Import-Package: com.fasterxml.jackson.annotation;version="2.9.9", diff --git a/core/com.b2international.snowowl.identity.ldap/pom.xml b/core/com.b2international.snowowl.identity.ldap/pom.xml index bd6e5eb337c..a324c544cf7 100644 --- a/core/com.b2international.snowowl.identity.ldap/pom.xml +++ b/core/com.b2international.snowowl.identity.ldap/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.identity.ldap eclipse-plugin diff --git a/core/com.b2international.snowowl.identity.ldap/src/com/b2international/snowowl/identity/ldap/LdapIdentityProvider.java b/core/com.b2international.snowowl.identity.ldap/src/com/b2international/snowowl/identity/ldap/LdapIdentityProvider.java index 09f53d4a525..445970425c3 100644 --- a/core/com.b2international.snowowl.identity.ldap/src/com/b2international/snowowl/identity/ldap/LdapIdentityProvider.java +++ b/core/com.b2international.snowowl.identity.ldap/src/com/b2international/snowowl/identity/ldap/LdapIdentityProvider.java @@ -21,6 +21,7 @@ import java.util.Collections; import java.util.Hashtable; import java.util.List; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import javax.naming.Context; @@ -116,7 +117,7 @@ public User auth(String username, String token) { systemContext = createLdapContext(); final String userDN = findUserDN(systemContext, username); if (!Strings.isNullOrEmpty(userDN) && authenticateUser(userDN, token)) { - return searchUsers(Collections.singleton(username), 1).getSync().first().get(); + return searchUsers(Collections.singleton(username), 1).getSync(1, TimeUnit.MINUTES).first().get(); } else { return null; } @@ -231,7 +232,10 @@ private Collection getAllLdapRoles(InitialLdapContext context, String // process permissions for (final Object permission : ImmutableList.copyOf(Iterators.forEnumeration(permissionEnumeration))) { - permissions.add(Permission.valueOf((String) permission)); + if ("unused".equals(permission)) { + continue; + } + permissions.add(Permission.valueOf(((String) permission).trim())); } // process members diff --git a/core/com.b2international.snowowl.identity/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.identity/META-INF/MANIFEST.MF index d5559d4450e..478020c7d99 100644 --- a/core/com.b2international.snowowl.identity/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.identity/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Identity Management Bundle-SymbolicName: com.b2international.snowowl.identity;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy diff --git a/core/com.b2international.snowowl.identity/pom.xml b/core/com.b2international.snowowl.identity/pom.xml index b0983154109..6dc1c510317 100644 --- a/core/com.b2international.snowowl.identity/pom.xml +++ b/core/com.b2international.snowowl.identity/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.identity eclipse-plugin diff --git a/core/com.b2international.snowowl.logback.config/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.logback.config/META-INF/MANIFEST.MF index de737c40237..222f8102eb8 100644 --- a/core/com.b2international.snowowl.logback.config/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.logback.config/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl's Logback Configuration Bundle-SymbolicName: com.b2international.snowowl.logback.config;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Fragment-Host: ch.qos.logback.classic;bundle-version="[1.1.3,2.0.0)" Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-Vendor: B2i Healthcare diff --git a/core/com.b2international.snowowl.logback.config/pom.xml b/core/com.b2international.snowowl.logback.config/pom.xml index 4d18125d184..dcaab423a4a 100644 --- a/core/com.b2international.snowowl.logback.config/pom.xml +++ b/core/com.b2international.snowowl.logback.config/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.logback.config eclipse-plugin diff --git a/core/com.b2international.snowowl.server.core.feature/feature.xml b/core/com.b2international.snowowl.server.core.feature/feature.xml index e5624a8def5..03eaef7319d 100644 --- a/core/com.b2international.snowowl.server.core.feature/feature.xml +++ b/core/com.b2international.snowowl.server.core.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/core/com.b2international.snowowl.server.core.feature/pom.xml b/core/com.b2international.snowowl.server.core.feature/pom.xml index b6e95a0d36a..90a57f913e7 100644 --- a/core/com.b2international.snowowl.server.core.feature/pom.xml +++ b/core/com.b2international.snowowl.server.core.feature/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.server.core.feature eclipse-feature diff --git a/core/com.b2international.snowowl.server.dependencies.feature/feature.xml b/core/com.b2international.snowowl.server.dependencies.feature/feature.xml index 20a83d30a22..7355d64495e 100644 --- a/core/com.b2international.snowowl.server.dependencies.feature/feature.xml +++ b/core/com.b2international.snowowl.server.dependencies.feature/feature.xml @@ -2,7 +2,7 @@ @@ -245,20 +245,6 @@ Visit us at http://b2i.sg version="0.0.0" unpack="false"/> - - - - - - com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.server.dependencies.feature eclipse-feature diff --git a/core/com.b2international.snowowl.server.product.feature/feature.xml b/core/com.b2international.snowowl.server.product.feature/feature.xml index 99a50069a07..06bb3569e0c 100644 --- a/core/com.b2international.snowowl.server.product.feature/feature.xml +++ b/core/com.b2international.snowowl.server.product.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/core/com.b2international.snowowl.server.product.feature/pom.xml b/core/com.b2international.snowowl.server.product.feature/pom.xml index 4689f5499fd..8d91f7479ef 100644 --- a/core/com.b2international.snowowl.server.product.feature/pom.xml +++ b/core/com.b2international.snowowl.server.product.feature/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.server.product.feature eclipse-feature diff --git a/core/com.b2international.snowowl.server.product/META-INF/MANIFEST.MF b/core/com.b2international.snowowl.server.product/META-INF/MANIFEST.MF index 25c13a5e58c..c8ee5bdb77a 100644 --- a/core/com.b2international.snowowl.server.product/META-INF/MANIFEST.MF +++ b/core/com.b2international.snowowl.server.product/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Server Product Bundle-SymbolicName: com.b2international.snowowl.server.product;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.eclipse.osgi;bundle-version="3.6.1", diff --git a/core/com.b2international.snowowl.server.product/pom.xml b/core/com.b2international.snowowl.server.product/pom.xml index e5db1410107..ebe9f8a4811 100644 --- a/core/com.b2international.snowowl.server.product/pom.xml +++ b/core/com.b2international.snowowl.server.product/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl core-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.server.product eclipse-plugin diff --git a/core/pom.xml b/core/pom.xml index e869d69a21e..0430d8c3284 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/dist/pom.xml b/dist/pom.xml index 2ab4fc0724c..ed0dc61fc12 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT @@ -54,12 +54,6 @@ ${project.version} compile - - com.b2international.snowowl - com.b2international.index.tests.tools - ${project.version} - compile - com.b2international.snowowl com.b2international.scripting.api @@ -98,13 +92,13 @@ com.b2international.snowowl - com.b2international.snowowl.fhir.rest + com.b2international.snowowl.fhir.core ${project.version} compile com.b2international.snowowl - com.b2international.snowowl.fhir.core + com.b2international.snowowl.fhir.rest ${project.version} compile @@ -134,25 +128,25 @@ com.b2international.snowowl - com.b2international.snowowl.snomed.core.rest + com.b2international.snowowl.snomed.cis ${project.version} compile com.b2international.snowowl - com.b2international.snowowl.snomed.cis + com.b2international.snowowl.snomed.cis.rest ${project.version} compile com.b2international.snowowl - com.b2international.snowowl.snomed.cis.rest + com.b2international.snowowl.snomed.common ${project.version} compile com.b2international.snowowl - com.b2international.snowowl.snomed.common + com.b2international.snowowl.snomed.core.rest ${project.version} compile @@ -168,6 +162,12 @@ ${project.version} compile + + com.b2international.snowowl + com.b2international.snowowl.snomed.etl + ${project.version} + compile + com.b2international.snowowl com.b2international.snowowl.snomed.fhir @@ -192,6 +192,12 @@ ${project.version} compile + + com.b2international.snowowl + com.b2international.snowowl.snomed.scg + ${project.version} + compile + com.b2international.snowowl @@ -259,6 +265,24 @@ ${project.version} test + + com.b2international.snowowl + com.b2international.snowowl.snomed.ql.tests + ${project.version} + compile + + + com.b2international.snowowl + com.b2international.snowowl.snomed.etl.tests + ${project.version} + compile + + + com.b2international.snowowl + com.b2international.snowowl.snomed.scg.tests + ${project.version} + compile + com.b2international.snowowl com.b2international.snowowl.snomed.reasoner.tests diff --git a/docs/backup/index.md b/docs/backup/index.md index 7aaf4e092a9..9b36b8f21e4 100644 --- a/docs/backup/index.md +++ b/docs/backup/index.md @@ -1 +1,10 @@ -# Backup and Restore \ No newline at end of file +# Backup and Restore + +Snow Owl 7 uses a single data source, an Elasticsearch cluster (either embedded or external). +To backup and restore the data, we highly recommend the official [Snapshot and Restore](https://www.elastic.co/guide/en/elasticsearch/reference/7.5/snapshot-restore.html) feature from Elasticsearch. +Additionally, you can experiment with any Elasticsearch compatible index management software, like [Curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.8/index.html) for example. + +## Recommended snapshot configuration + +We highly recommend using two remotely accessible repositories (Amazon S3, network attached storage, etc.) to back up and restore data to/from. +The back up interval depends on your use case and how you are accessing the data. If you have write-heavy scenarios, we recommend a hourly backup interval, otherwise some value between hourly - daily is preferrable. \ No newline at end of file diff --git a/docs/migration/from-6x.md b/docs/migration/from-6x.md new file mode 100644 index 00000000000..c5905967ad2 --- /dev/null +++ b/docs/migration/from-6x.md @@ -0,0 +1,53 @@ +# Migration from 6.x version + +The following major differences, features and topics are worth mentioning when comparing features present in Snow Owl 6 and 7 and migrating an existing 6.x deployment to Snow Owl 7.x. + +NOTE: It is highly recommended to keep the previous Snow Owl 6 deployment up and running until you have the data and all connected services migrated to the new version successfully. The new Snow Owl 7 system should get its own dedicated machine and deployment environment. Rolling back to the previous state should be available and must be executed when the upgrade cannot be performed successfully. + +## Java 11 + +From Snow Owl 7.1, Snow Owl compiles and runs on Java 11+ versions. It is recommended to use the latest OpenJDK or OracleJDK 11 LTS version. Install from [OpenJDK](https://openjdk.java.net/), [Oracle](https://www.oracle.com/java/technologies/javase-downloads.html) or [AdoptJDK](https://adoptopenjdk.net/). The Oracle JDK comes with commercial usage restrictions, see [here](https://www.oracle.com/technetwork/java/javase/overview/oracle-jdk-faqs.html) before installing. + +## RDBMS vs Elasticsearch + +While Snow Owl 6 was relying on two data sources for reading and writing data, a primary RDBMS (MySQL) for writing and a secondary Elasticsearch index for full-text search, queries and quick access, Snow Owl 7 in the other hand requires only a single data source, an Elasticsearch cluster. + +If you were using an external Elasticsearch cluster then we recommended installing the new Elasticsearch 7.x version first, then installing Snow Owl 7.x and finally connecting the two (or using the appropriate Docker images). +If you were using the embedded version, then installing the new Snow Owl 7 version is enough. + +After the migration, the MySQL software dependency can be uninstalled from the machine if there are no other services depending on it. + +## Database content + +Due to schema changes the old content present in the RDBMS and index cannot be used by a Snow Owl 7 installation. To migrate an existing dataset to the new version, perform an export in the old system and use the exported files to import the content back into the new Snow Owl 7 version. + +## LDAP Authorization + +The new Snow Owl 7 version comes with complete authorization support using JWT authorization tokens. The old `User - Role - Permission` system can be used by performing the following migration steps: + +1. Add the administrator permission to all administrator roles: `*:*` +2. Remove the `unused` permission values from all roles used by Snow Owl +3. Add the `classify:*` permission declaration and assign it to all roles that should be able to run classifications + +## Configuration changes + +Snow Owl 7 configuration file has been renamed to `snowowl.yml` (from `snowowl_config.yml`) and moved to the `/configuration` folder. + +The following configuration settings have been changed: +* `repository.database` configuration setting has been removed completely +* `repository.numberOfWorkers` has been renamed to `repository.maxThreads` and its default value became `200`. +* `metrics` settings has been renamed to `monitoring` + +Apply these changes to the configuration before starting your Snow Owl Terminology Server. + +## Startup and shutdown + +The old `startup.bat`, `startup.sh`, `shutdown.bat`, `shutdown.sh` have been replaced with the new `snowowl.sh`, `snowowl.bat` and `shutdown.sh` scripts. + +## Packaging + +Snow Owl 7 comes in four distribution formats: +* `zip`/`tar.gz` for manual deployments +* `rpm` for `CentOS/RHEL` based Linux system deployments +* `deb` for `Debian` based Linux system deployments +* `docker` for `Docker` based deployments \ No newline at end of file diff --git a/documentation/META-INF/MANIFEST.MF b/documentation/META-INF/MANIFEST.MF index 5e6b49bb785..2f430a1cfd2 100644 --- a/documentation/META-INF/MANIFEST.MF +++ b/documentation/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Documentation Bundle-SymbolicName: documentation;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/documentation/pom.xml b/documentation/pom.xml index 837ac77ed07..5c88db681f9 100644 --- a/documentation/pom.xml +++ b/documentation/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl snowowl-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT documentation diff --git a/fhir/com.b2international.snowowl.fhir.core/META-INF/MANIFEST.MF b/fhir/com.b2international.snowowl.fhir.core/META-INF/MANIFEST.MF index 03827ec06a6..c27561c6b24 100644 --- a/fhir/com.b2international.snowowl.fhir.core/META-INF/MANIFEST.MF +++ b/fhir/com.b2international.snowowl.fhir.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl FHIR API Core Bundle-SymbolicName: com.b2international.snowowl.fhir.core;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Export-Package: com.b2international.snowowl.fhir.core, diff --git a/fhir/com.b2international.snowowl.fhir.core/pom.xml b/fhir/com.b2international.snowowl.fhir.core/pom.xml index d2adf00f1e0..b0af6c76b9e 100644 --- a/fhir/com.b2international.snowowl.fhir.core/pom.xml +++ b/fhir/com.b2international.snowowl.fhir.core/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl fhir-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.fhir.core diff --git a/fhir/com.b2international.snowowl.fhir.rest.feature/feature.xml b/fhir/com.b2international.snowowl.fhir.rest.feature/feature.xml index 0bba3a0d30d..c6bc5fc456e 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.feature/feature.xml +++ b/fhir/com.b2international.snowowl.fhir.rest.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/fhir/com.b2international.snowowl.fhir.rest.feature/pom.xml b/fhir/com.b2international.snowowl.fhir.rest.feature/pom.xml index b5ec154be91..cb135148254 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.feature/pom.xml +++ b/fhir/com.b2international.snowowl.fhir.rest.feature/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl fhir-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.fhir.rest.feature diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/META-INF/MANIFEST.MF b/fhir/com.b2international.snowowl.fhir.rest.tests/META-INF/MANIFEST.MF index 1f98def1a60..7344218e4c9 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/META-INF/MANIFEST.MF +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl FHIR API Tests Bundle-SymbolicName: com.b2international.snowowl.fhir.rest.tests -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.junit;bundle-version="4.12.0", diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/pom.xml b/fhir/com.b2international.snowowl.fhir.rest.tests/pom.xml index 33afe030e21..ed97fae9c46 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/pom.xml +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl fhir-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.fhir.rest.tests @@ -24,16 +24,6 @@ org.eclipse.jetty.osgi.boot 0.0.0 - - eclipse-plugin - ch.qos.logback.classic - ${logback.versionRange} - - - eclipse-plugin - ch.qos.logback.core - ${logback.versionRange} - eclipse-plugin com.b2international.snowowl.identity.file @@ -44,11 +34,6 @@ com.b2international.collections.fastutil 0.0.0 - - eclipse-plugin - com.sun.el - 0.0.0 - eclipse-plugin com.b2international.snowowl.fhir.rest diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/src/configuration/snowowl.yml b/fhir/com.b2international.snowowl.fhir.rest.tests/src/configuration/snowowl.yml index f02706bad0c..f93b96e6b87 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/src/configuration/snowowl.yml +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/src/configuration/snowowl.yml @@ -2,9 +2,6 @@ # Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg # -# necessary to connect one user to the system otherwise Snow Owl startup fails -systemUser: true - identity: providers: - file: diff --git a/fhir/com.b2international.snowowl.fhir.rest/META-INF/MANIFEST.MF b/fhir/com.b2international.snowowl.fhir.rest/META-INF/MANIFEST.MF index fc06d315e2b..20649051054 100644 --- a/fhir/com.b2international.snowowl.fhir.rest/META-INF/MANIFEST.MF +++ b/fhir/com.b2international.snowowl.fhir.rest/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl FHIR REST API Bundle-SymbolicName: com.b2international.snowowl.fhir.rest -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.core.rest Automatic-Module-Name: com.b2international.snowowl.fhir.rest diff --git a/fhir/com.b2international.snowowl.fhir.rest/pom.xml b/fhir/com.b2international.snowowl.fhir.rest/pom.xml index 8bd9c734f04..e8c6212da6a 100644 --- a/fhir/com.b2international.snowowl.fhir.rest/pom.xml +++ b/fhir/com.b2international.snowowl.fhir.rest/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl fhir-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.fhir.rest diff --git a/fhir/pom.xml b/fhir/pom.xml index 491f95b3c84..c0db5f7e8f4 100644 --- a/fhir/pom.xml +++ b/fhir/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/net4j/com.b2international.snowowl.eventbus.tests/META-INF/MANIFEST.MF b/net4j/com.b2international.snowowl.eventbus.tests/META-INF/MANIFEST.MF index 0f616c0d71c..632233d5174 100644 --- a/net4j/com.b2international.snowowl.eventbus.tests/META-INF/MANIFEST.MF +++ b/net4j/com.b2international.snowowl.eventbus.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: EventBus Tests Bundle-SymbolicName: com.b2international.snowowl.eventbus.tests -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.eventbus;bundle-version="3.1.0" Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/net4j/com.b2international.snowowl.eventbus.tests/pom.xml b/net4j/com.b2international.snowowl.eventbus.tests/pom.xml index 82750d9e8c9..6340e1bf694 100644 --- a/net4j/com.b2international.snowowl.eventbus.tests/pom.xml +++ b/net4j/com.b2international.snowowl.eventbus.tests/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl net4j-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT @@ -16,7 +16,6 @@ org.eclipse.tycho tycho-surefire-plugin - ${tycho.version} **/AllEventBusTests.java diff --git a/net4j/com.b2international.snowowl.eventbus/META-INF/MANIFEST.MF b/net4j/com.b2international.snowowl.eventbus/META-INF/MANIFEST.MF index 844ebb93793..37a3487fa4e 100644 --- a/net4j/com.b2international.snowowl.eventbus/META-INF/MANIFEST.MF +++ b/net4j/com.b2international.snowowl.eventbus/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Net4J Eventbus Bundle-SymbolicName: com.b2international.snowowl.eventbus;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.eclipse.net4j;bundle-version="4.1.2", diff --git a/net4j/com.b2international.snowowl.eventbus/pom.xml b/net4j/com.b2international.snowowl.eventbus/pom.xml index 4e70935edc0..0e0170b2e9f 100644 --- a/net4j/com.b2international.snowowl.eventbus/pom.xml +++ b/net4j/com.b2international.snowowl.eventbus/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl net4j-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT \ No newline at end of file diff --git a/net4j/com.b2international.snowowl.eventbus/src/com/b2international/snowowl/internal/eventbus/EventBus.java b/net4j/com.b2international.snowowl.eventbus/src/com/b2international/snowowl/internal/eventbus/EventBus.java index 1cb33a44296..be39b2e5624 100644 --- a/net4j/com.b2international.snowowl.eventbus/src/com/b2international/snowowl/internal/eventbus/EventBus.java +++ b/net4j/com.b2international.snowowl.eventbus/src/com/b2international/snowowl/internal/eventbus/EventBus.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,6 +40,7 @@ import com.b2international.snowowl.eventbus.net4j.EventBusConstants; import com.b2international.snowowl.eventbus.net4j.IEventBusProtocol; import com.google.common.collect.MapMaker; +import com.google.common.primitives.Ints; /** * @since 3.1 @@ -57,7 +58,7 @@ public class EventBus extends Lifecycle implements IEventBus { private final ConcurrentMap completedMessages; private final ConcurrentMap failedMessages; private final String description; - private final int numberOfWorkers; + private final int maxThreads; private final ExecutorServiceFactory executorServiceFactory; private ExecutorService executorService; @@ -66,15 +67,15 @@ public EventBus() { this(EventBusConstants.GLOBAL_BUS, Runtime.getRuntime().availableProcessors()); } - public EventBus(String description, int numberOfWorkers) { + public EventBus(String description, int maxThreads) { CheckUtil.checkArg(description, "Description should be specified"); - CheckUtil.checkArg(numberOfWorkers >= 0, "Number of workers must be greater than zero"); + CheckUtil.checkArg(maxThreads >= 0, "Number of workers must be greater than zero"); this.description = description; - this.numberOfWorkers = numberOfWorkers; - this.executorServiceFactory = numberOfWorkers == 0 ? ExecutorServiceFactory.DIRECT : new WorkerExecutorServiceFactory(); + this.maxThreads = maxThreads; + this.executorServiceFactory = maxThreads == 0 ? ExecutorServiceFactory.DIRECT : new WorkerExecutorServiceFactory(); - // init stat maps with at least 1 concurrencyLevel - final int concurrencyLevel = Math.max(1, numberOfWorkers); + // init stat maps with 1-4 concurrencyLevel + final int concurrencyLevel = Ints.constrainToRange(maxThreads, 1, 4); this.protocolMap = new MapMaker().concurrencyLevel(concurrencyLevel).makeMap(); this.handlerMap = new MapMaker().concurrencyLevel(concurrencyLevel).makeMap(); this.inQueueMessages = new MapMaker().concurrencyLevel(concurrencyLevel).makeMap(); @@ -87,7 +88,7 @@ public EventBus(String description, int numberOfWorkers) { @Override protected void doActivate() throws Exception { super.doActivate(); - executorService = executorServiceFactory.createExecutorService(description, numberOfWorkers); + executorService = executorServiceFactory.createExecutorService(description, maxThreads); } @Override diff --git a/net4j/com.b2international.snowowl.eventbus/src/com/b2international/snowowl/internal/eventbus/WorkerExecutorServiceFactory.java b/net4j/com.b2international.snowowl.eventbus/src/com/b2international/snowowl/internal/eventbus/WorkerExecutorServiceFactory.java index 2d8e5102782..dc92859f0df 100644 --- a/net4j/com.b2international.snowowl.eventbus/src/com/b2international/snowowl/internal/eventbus/WorkerExecutorServiceFactory.java +++ b/net4j/com.b2international.snowowl.eventbus/src/com/b2international/snowowl/internal/eventbus/WorkerExecutorServiceFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,21 +16,24 @@ package com.b2international.snowowl.internal.eventbus; import java.util.concurrent.ExecutorService; -import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.LinkedTransferQueue; +import java.util.concurrent.RejectedExecutionHandler; import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +import com.google.common.primitives.Ints; + /** * @since 4.5.1 */ public class WorkerExecutorServiceFactory implements ExecutorServiceFactory { @Override - public ExecutorService createExecutorService(String description, int numberOfWorkers) { + public ExecutorService createExecutorService(String description, int maxThreads) { final ThreadGroup group = new ThreadGroup(description); - ThreadFactory threadFactory = new ThreadFactory() { + final ThreadFactory threadFactory = new ThreadFactory() { @Override public Thread newThread(Runnable r) { final Thread thread = new Thread(group, r); @@ -40,17 +43,69 @@ public Thread newThread(Runnable r) { } }; - final ExecutorService context = new ThreadPoolExecutor(numberOfWorkers, numberOfWorkers, - 0L, TimeUnit.MILLISECONDS, - new LinkedBlockingQueue(), - threadFactory) { + final ExecutorScalingQueue queue = new ExecutorScalingQueue(); + final ThreadPoolExecutor executor = new ThreadPoolExecutor( + Ints.constrainToRange(Runtime.getRuntime().availableProcessors(), 2, maxThreads), maxThreads, + 1L, TimeUnit.MINUTES, + queue, + threadFactory, + new ForceQueuePolicy() + ); + queue.executor = executor; + return executor; + } + + /*Elaticsearch maintained class, copied from EsExecutors*/ + static class ExecutorScalingQueue extends LinkedTransferQueue { - @Override - protected void finalize() { - shutdown(); - } - }; + ThreadPoolExecutor executor; - return context; - } + ExecutorScalingQueue() { + } + + @Override + public boolean offer(E e) { + // first try to transfer to a waiting worker thread + if (!tryTransfer(e)) { + // check if there might be spare capacity in the thread + // pool executor + int left = executor.getMaximumPoolSize() - executor.getCorePoolSize(); + if (left > 0) { + // reject queuing the task to force the thread pool + // executor to add a worker if it can; combined + // with ForceQueuePolicy, this causes the thread + // pool to always scale up to max pool size and we + // only queue when there is no spare capacity + return false; + } else { + return super.offer(e); + } + } else { + return true; + } + } + + } + + /*Elaticsearch maintained class, copied from EsExecutors*/ + /** + * A handler for rejected tasks that adds the specified element to this queue, + * waiting if necessary for space to become available. + */ + static class ForceQueuePolicy implements RejectedExecutionHandler { + + @Override + public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { + try { + // force queue policy should only be used with a scaling queue + assert executor.getQueue() instanceof ExecutorScalingQueue; + executor.getQueue().put(r); + } catch (final InterruptedException e) { + // a scaling queue never blocks so a put to it can never be interrupted + throw new AssertionError(e); + } + } + + } + } diff --git a/net4j/com.b2international.snowowl.rpc.test/META-INF/MANIFEST.MF b/net4j/com.b2international.snowowl.rpc.test/META-INF/MANIFEST.MF index 5c5cd234abf..49aac5aa984 100644 --- a/net4j/com.b2international.snowowl.rpc.test/META-INF/MANIFEST.MF +++ b/net4j/com.b2international.snowowl.rpc.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Remote Procedure Call Tests Bundle-SymbolicName: com.b2international.snowowl.rpc.test;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy diff --git a/net4j/com.b2international.snowowl.rpc.test/pom.xml b/net4j/com.b2international.snowowl.rpc.test/pom.xml index a95fc3e681e..92f91941ead 100644 --- a/net4j/com.b2international.snowowl.rpc.test/pom.xml +++ b/net4j/com.b2international.snowowl.rpc.test/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl net4j-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.rpc.test eclipse-test-plugin diff --git a/net4j/com.b2international.snowowl.rpc/META-INF/MANIFEST.MF b/net4j/com.b2international.snowowl.rpc/META-INF/MANIFEST.MF index 77c31904cce..0a9ac118bd9 100644 --- a/net4j/com.b2international.snowowl.rpc/META-INF/MANIFEST.MF +++ b/net4j/com.b2international.snowowl.rpc/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Remote Procedure Call Bundle-SymbolicName: com.b2international.snowowl.rpc;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Activator: com.b2international.snowowl.internal.rpc.bundle.OM$Activator Bundle-Vendor: B2i Healthcare Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.100", diff --git a/net4j/com.b2international.snowowl.rpc/pom.xml b/net4j/com.b2international.snowowl.rpc/pom.xml index 73d947ed015..8028a7d647c 100644 --- a/net4j/com.b2international.snowowl.rpc/pom.xml +++ b/net4j/com.b2international.snowowl.rpc/pom.xml @@ -6,7 +6,7 @@ com.b2international.snowowl net4j-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.rpc eclipse-plugin diff --git a/net4j/pom.xml b/net4j/pom.xml index 3bac0473923..29c1d64d16d 100644 --- a/net4j/pom.xml +++ b/net4j/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index 491146d1aeb..78b6fd73ab9 100644 --- a/pom.xml +++ b/pom.xml @@ -6,937 +6,930 @@ 4.0.0 com.b2international.snowowl snowowl-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT pom - - UTF-8 - UTF-8 + + UTF-8 + UTF-8 + + + 2.9.10 + 2.9.10.1 + 4.1.45.Final + 1.7.25 + 1.2.3 + [1.2.3,1.2.4) + 21.0 + [21.0.0,22.0.0) + 1.9.3 + 2.4.17 + 3.2.2 + [3.2.2,3.3.0) + 1.2.71 + 5.0.4-b2i + 4.5.10 + 0.4.3 + 9.4.18.v20190429 + 4.8.43 + 0.4.1 + 0.6.1 + 2.1.10 + 1.2 + 1.10 + 8.2.2 + 2.3.0 + 1.2.0 + 2.6.0 + 2.3.1 + + 1.5.0 + 1.5.0 + 2.18.0 + 0.8.4 + + + yyyyMMddHHmm + ${maven.build.timestamp} + - - 2.9.10 - 2.9.10.1 - 4.1.43.Final - 1.7.25 - 1.2.3 - [1.2.3,1.2.4) - 21.0 - [21.0.0,22.0.0) - 1.9.3 - 2.4.17 - 3.2.2 - [3.2.2,3.3.0) - 1.2.71 - 5.0.4-b2i - 4.5.10 - 0.4.3 - 9.4.18.v20190429 - 4.8.43 - 0.4.1 - 0.6.1 - 2.1.10 - 1.2 - 1.10 - 8.2.2 - 2.3.0 - 1.2.0 - 2.6.0 - 2.3.1 - - 1.5.0 - 1.5.0 - 2.18.0 - 0.8.4 + + commons + core + fhir + net4j + snomed + cis + tests + releng + dist + - - yyyyMMddHHmm - ${maven.build.timestamp} - + + + protege-mvn-repo + https://b2ihealthcare.github.io/protege/ + + true + never + + + false + never + + + + snomed-international-releases + https://maven.ihtsdotools.org/content/repositories/releases/ + + true + never + + + false + never + + + - - commons - core - fhir - net4j - snomed - cis - tests - releng - dist - + + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + provided + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + provided + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.databind.version} + provided + + + com.fasterxml.jackson.dataformat + jackson-dataformat-cbor + ${jackson.version} + provided + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + ${jackson.version} + provided + + + com.fasterxml.jackson.dataformat + jackson-dataformat-smile + ${jackson.version} + provided + + + com.fasterxml.jackson.dataformat + jackson-dataformat-csv + ${jackson.version} + provided + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson.version} + provided + + + com.fasterxml.jackson.module + jackson-module-afterburner + ${jackson.version} + provided + + + com.fasterxml.jackson.module + jackson-module-jaxb-annotations + ${jackson.version} + provided + + + com.thoughtworks.xstream + xstream + 1.4.7 + provided + + + org.eclipse.persistence + javax.persistence + 2.0.5 + provided + + + org.assertj + assertj-core + 1.7.1 + provided + + + org.yaml + snakeyaml + 1.25 + provided + + + io.reactivex.rxjava2 + rxjava + 2.0.7 + provided + + + org.reactivestreams + reactive-streams + 1.0.0 + provided + + + commons-collections + commons-collections + 3.2.2 + provided + + + com.google.guava + guava + ${guava.version} + provided + + + io.netty + netty-buffer + ${netty.version} + provided + + + io.netty + netty-codec + ${netty.version} + provided + + + io.netty + netty-codec-http + ${netty.version} + provided + + + io.netty + netty-common + ${netty.version} + provided + + + io.netty + netty-handler + ${netty.version} + provided + + + io.netty + netty-resolver + ${netty.version} + provided + + + io.netty + netty-transport + ${netty.version} + provided + + + org.jetbrains.kotlin + kotlin-osgi-bundle + ${kotlin.version} + provided + + + com.diffplug.osgi + com.diffplug.osgi.extension.sun.misc + 0.0.0 + provided + + + com.diffplug.osgi + com.diffplug.osgi.extension.sun.reflect + 0.0.0 + provided + + + ch.qos.logback + logback-classic + ${logback.version} + provided + + + ch.qos.logback + logback-core + ${logback.version} + provided + + + org.slf4j + slf4j-api + ${slf4j.version} + provided + + + org.slf4j + jcl-over-slf4j + ${slf4j.version} + provided + + + org.slf4j + jul-to-slf4j + ${slf4j.version} + provided + + + org.slf4j + log4j-over-slf4j + ${slf4j.version} + provided + + + io.github.classgraph + classgraph + ${classgraph.version} + provided + + + com.b2international.snowowl + protege-common + ${protege.version} + provided + + + + org.apache.felix + org.apache.felix.main + + + + + com.b2international.snowowl + protege-editor-core + ${protege.version} + provided + + + + org.eclipse.equinox + org.eclipse.equinox.common + + + org.eclipse.equinox + org.eclipse.equinox.registry + + + + + com.b2international.snowowl + protege-editor-owl + ${protege.version} + provided + + + + log4j + log4j + + + + + net.sourceforge.owlapi + owlapi-osgidistribution + ${owlapi.version} + provided + + + org.semanticweb.elk + elk-protege + ${elk.version} + provided + + + + log4j + log4j + + + + org.protege + protege-editor-core-application + + + org.protege + protege-editor-owl + + + + + org.eclipse.jetty + jetty-continuation + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-deploy + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-http + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-io + ${jetty.version} + provided + + + org.eclipse.jetty.osgi + jetty-osgi-boot + ${jetty.version} + provided + + + + org.eclipse.osgi + org.eclipse.osgi + + + org.eclipse.osgi + org.eclipse.osgi.services + + + org.ow2.asm + asm + + + org.ow2.asm + asm-commons + + + + + org.eclipse.jetty + jetty-security + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-servlet + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-util + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-webapp + ${jetty.version} + provided + + + org.eclipse.jetty + jetty-xml + ${jetty.version} + provided + + + net.bytebuddy + byte-buddy + ${net.bytebuddy.version} + provided + + + com.fasterxml + classmate + 1.3.4 + provided + + + org.mapstruct + mapstruct + 1.2.0.Final + provided + + + io.swagger + swagger-annotations + 1.5.23 + provided + + + io.swagger + swagger-models + 1.5.23 + provided + + + org.apache.httpcomponents + httpclient-osgi + 4.5.3 + provided + + + org.apache.httpcomponents + httpcore-osgi + 4.4.10 + provided + + + org.apache.httpcomponents + httpasyncclient-osgi + 4.1.4 + provided + + + de.svenkubiak + jBCrypt + ${jbcrypt.version} + provided + + + net.jodah + typetools + ${typetools.version} + provided + + + org.hdrhistogram + HdrHistogram + ${hdrhistogram.version} + provided + + + commons-codec + commons-codec + ${commons.codec.version} + provided + + + commons-logging + commons-logging + ${commons.logging.version} + provided + + + it.unimi.dsi + fastutil + ${fastutil.version} + provided + + + javax.activation + javax.activation-api + 1.2.0 + provided + + + javax.xml.bind + jaxb-api + ${jaxb.api.version} + provided + + + com.sun.xml.bind + jaxb-core + ${jaxb.api.version} + provided + + + com.sun.xml.bind + jaxb-impl + ${jaxb.api.version} + provided + + + com.sun.activation + javax.activation + ${javax.activation.version} + provided + + + org.snomed.otf + snomed-owl-toolkit + ${snomed.owl.toolkit.version} + bundle + provided + + + + com.google.inject + guice + + + com.google.inject.extensions + guice-assistedinject + + + com.google.inject.extensions + guice-multibindings + + + + + net.jodah + failsafe + ${failsafe.version} + provided + + - - - - false - - maven-central - remote-repos - https://repo.maven.apache.org/maven2 - - - protege-mvn-repo - https://b2ihealthcare.github.io/protege/ - - true - never - - - false - never - - - - snomed-international-releases - https://maven.ihtsdotools.org/content/repositories/releases/ - - true - never - - - false - never - - - - - - - com.fasterxml.jackson.core - jackson-core - ${jackson.version} - provided - - - com.fasterxml.jackson.core - jackson-annotations - ${jackson.version} - provided - - - com.fasterxml.jackson.core - jackson-databind - ${jackson.databind.version} - provided - - - com.fasterxml.jackson.dataformat - jackson-dataformat-cbor - ${jackson.version} - provided - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - ${jackson.version} - provided - - - com.fasterxml.jackson.dataformat - jackson-dataformat-smile - ${jackson.version} - provided - - - com.fasterxml.jackson.dataformat - jackson-dataformat-csv - ${jackson.version} - provided - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - ${jackson.version} - provided - - - com.fasterxml.jackson.module - jackson-module-afterburner - ${jackson.version} - provided - - - com.fasterxml.jackson.module - jackson-module-jaxb-annotations - ${jackson.version} - provided - - - com.thoughtworks.xstream - xstream - 1.4.7 - provided - - - org.eclipse.persistence - javax.persistence - 2.0.5 - provided - - - org.assertj - assertj-core - 1.7.1 - provided - - - org.yaml - snakeyaml - 1.25 - provided - - - io.reactivex.rxjava2 - rxjava - 2.0.7 - provided - - - org.reactivestreams - reactive-streams - 1.0.0 - provided - - - commons-collections - commons-collections - 3.2.2 - provided - - - com.google.guava - guava - ${guava.version} - provided - - - io.netty - netty-buffer - ${netty.version} - provided - - - io.netty - netty-codec - ${netty.version} - provided - - - io.netty - netty-codec-http - ${netty.version} - provided - - - io.netty - netty-common - ${netty.version} - provided - - - io.netty - netty-handler - ${netty.version} - provided - - - io.netty - netty-resolver - ${netty.version} - provided - - - io.netty - netty-transport - ${netty.version} - provided - - - org.jetbrains.kotlin - kotlin-osgi-bundle - ${kotlin.version} - provided - - - com.diffplug.osgi - com.diffplug.osgi.extension.sun.misc - 0.0.0 - provided - - - com.diffplug.osgi - com.diffplug.osgi.extension.sun.reflect - 0.0.0 - provided - - - ch.qos.logback - logback-classic - ${logback.version} - provided - - - ch.qos.logback - logback-core - ${logback.version} - provided - - - org.slf4j - slf4j-api - ${slf4j.version} - provided - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - provided - - - org.slf4j - jul-to-slf4j - ${slf4j.version} - provided - - - org.slf4j - log4j-over-slf4j - ${slf4j.version} - provided - - - io.github.classgraph - classgraph - ${classgraph.version} - provided - - - com.b2international.snowowl - protege-common - ${protege.version} - provided - - - - org.apache.felix - org.apache.felix.main - - - - - com.b2international.snowowl - protege-editor-core - ${protege.version} - provided - - - - org.eclipse.equinox - org.eclipse.equinox.common - - - org.eclipse.equinox - org.eclipse.equinox.registry - - - - - com.b2international.snowowl - protege-editor-owl - ${protege.version} - provided - - - - log4j - log4j - - - - - net.sourceforge.owlapi - owlapi-osgidistribution - ${owlapi.version} - provided - - - org.semanticweb.elk - elk-protege - ${elk.version} - provided - - - - log4j - log4j - - - - org.protege - protege-editor-core-application - - - org.protege - protege-editor-owl - - - - - org.eclipse.jetty - jetty-continuation - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-deploy - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-http - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-io - ${jetty.version} - provided - - - org.eclipse.jetty.osgi - jetty-osgi-boot - ${jetty.version} - provided - - - - org.eclipse.osgi - org.eclipse.osgi - - - org.eclipse.osgi - org.eclipse.osgi.services - - - org.ow2.asm - asm - - - org.ow2.asm - asm-commons - - - - - org.eclipse.jetty - jetty-security - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-servlet - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-util - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-webapp - ${jetty.version} - provided - - - org.eclipse.jetty - jetty-xml - ${jetty.version} - provided - - - net.bytebuddy - byte-buddy - ${net.bytebuddy.version} - provided - - - com.fasterxml - classmate - 1.3.4 - provided - - - org.mapstruct - mapstruct - 1.2.0.Final - provided - - - io.swagger - swagger-annotations - 1.5.23 - provided - - - io.swagger - swagger-models - 1.5.23 - provided - - - org.apache.httpcomponents - httpclient-osgi - 4.5.3 - provided - - - org.apache.httpcomponents - httpcore-osgi - 4.4.10 - provided - - - org.apache.httpcomponents - httpasyncclient-osgi - 4.1.4 - provided - - - de.svenkubiak - jBCrypt - ${jbcrypt.version} - provided - - - net.jodah - typetools - ${typetools.version} - provided - - - org.hdrhistogram - HdrHistogram - ${hdrhistogram.version} - provided - - - commons-codec - commons-codec - ${commons.codec.version} - provided - - - commons-logging - commons-logging - ${commons.logging.version} - provided - - - it.unimi.dsi - fastutil - ${fastutil.version} - provided - - - javax.activation - javax.activation-api - 1.2.0 - provided - - - javax.xml.bind - jaxb-api - ${jaxb.api.version} - provided - - - com.sun.xml.bind - jaxb-core - ${jaxb.api.version} - provided - - - com.sun.xml.bind - jaxb-impl - ${jaxb.api.version} - provided - - - com.sun.activation - javax.activation - ${javax.activation.version} - provided - - - org.snomed.otf - snomed-owl-toolkit - ${snomed.owl.toolkit.version} - bundle - provided - - - - com.google.inject - guice - - - com.google.inject.extensions - guice-assistedinject - - - com.google.inject.extensions - guice-multibindings - - - - - net.jodah - failsafe - ${failsafe.version} - provided - - + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho.version} + true + + + org.eclipse.tycho + tycho-packaging-plugin + + false + false + + + + org.eclipse.tycho + tycho-source-plugin + ${tycho.version} + + + plugin-source + + plugin-source + + + + + + org.eclipse.tycho + target-platform-configuration + ${tycho.version} + + p2 + consider + + + ${project.groupId} + target-platform + ${project.version} + + + + + eclipse-plugin + org.eclipse.osgi + + [3.13.0,3.15.0] + + + + + + p2-installable-unit + org.eclipse.equinox.servletbridge.extensionbundle + + + + eclipse-plugin + org.codehaus.groovy + + ${groovy.version} + + + + eclipse-plugin + com.google.guava + + ${guava.versionRange} + + + + + p2-installable-unit + slf4j.api + + ${slf4j.version} + + + + p2-installable-unit + ch.qos.logback.classic + + ${logback.versionRange} + + + + p2-installable-unit + ch.qos.logback.core + + ${logback.versionRange} + + + + + p2-installable-unit + com.fasterxml.jackson.core.jackson-annotations + + ${jackson.version} + + + + p2-installable-unit + com.fasterxml.jackson.core.jackson-core + + ${jackson.version} + + + + p2-installable-unit + com.fasterxml.jackson.core.jackson-databind + + ${jackson.databind.version} + + + + p2-installable-unit + com.fasterxml.jackson.dataformat.jackson-dataformat-yaml + + ${jackson.version} + + + + p2-installable-unit + com.fasterxml.jackson.dataformat.jackson-dataformat-cbor + + ${jackson.version} + + + + p2-installable-unit + com.fasterxml.jackson.dataformat.jackson-dataformat-csv + + ${jackson.version} + + + + p2-installable-unit + com.fasterxml.jackson.dataformat.jackson-dataformat-xml + + ${jackson.version} + + + + p2-installable-unit + com.fasterxml.jackson.dataformat.jackson-dataformat-afterburner + + ${jackson.version} + + + + + p2-installable-unit + org.apache.commons.collections + + ${commons.collections.versionRange} + + + + p2-installable-unit + org.slf4j.api + + + + + + linux + gtk + x86_64 + + + win32 + win32 + x86_64 + + + + + + org.eclipse.tycho + tycho-p2-director-plugin + ${tycho.version} + + + org.codehaus.plexus + plexus-archiver + 2.4.4 + + + org.codehaus.plexus + plexus-component-api + + + org.codehaus.plexus + plexus-container-default + + + + + + + org.eclipse.tycho + tycho-p2-publisher-plugin + ${tycho.version} + + true + + + + org.eclipse.tycho + tycho-versions-plugin + ${tycho.version} + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + + + + + + org.eclipse.tycho + tycho-compiler-plugin + ${tycho.version} + + false + 11 + 11 + + **/*.groovy + **/*.xtend + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 11 + 11 + + + + org.eclipse.tycho + tycho-surefire-plugin + ${tycho.version} + + false + + **/*Test*.java + + false + + + + org.eclipse.tycho + tycho-packaging-plugin + ${tycho.version} + + + org.eclipse.tycho.extras + tycho-buildtimestamp-jgit + ${tycho-extras.version} + + + + jgit + + pom.xml + + + + + org.eclipse.tycho + tycho-p2-repository-plugin + ${tycho.version} + + true + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.3 + + + + - - - - org.eclipse.tycho - tycho-maven-plugin - ${tycho.version} - true - - - org.eclipse.tycho - tycho-packaging-plugin - - false - false - - - - org.eclipse.tycho - tycho-source-plugin - ${tycho.version} - - - plugin-source - - plugin-source - - - - - - org.eclipse.tycho - target-platform-configuration - ${tycho.version} - - p2 - consider - - - ${project.groupId} - target-platform - ${project.version} - - - - - eclipse-plugin - org.eclipse.osgi - - [3.13.0,3.15.0] - - - - - - p2-installable-unit - org.eclipse.equinox.servletbridge.extensionbundle - - - - eclipse-plugin - org.codehaus.groovy - - ${groovy.version} - - - - eclipse-plugin - com.google.guava - - ${guava.versionRange} - - - - - p2-installable-unit - slf4j.api - - ${slf4j.version} - - - - p2-installable-unit - ch.qos.logback.classic - - ${logback.versionRange} - - - - p2-installable-unit - ch.qos.logback.core - - ${logback.versionRange} - - - - - p2-installable-unit - com.fasterxml.jackson.core.jackson-annotations - - ${jackson.version} - - - - p2-installable-unit - com.fasterxml.jackson.core.jackson-core - - ${jackson.version} - - - - p2-installable-unit - com.fasterxml.jackson.core.jackson-databind - - ${jackson.databind.version} - - - - p2-installable-unit - com.fasterxml.jackson.dataformat.jackson-dataformat-yaml - - ${jackson.version} - - - - p2-installable-unit - com.fasterxml.jackson.dataformat.jackson-dataformat-cbor - - ${jackson.version} - - - - p2-installable-unit - com.fasterxml.jackson.dataformat.jackson-dataformat-csv - - ${jackson.version} - - - - p2-installable-unit - com.fasterxml.jackson.dataformat.jackson-dataformat-xml - - ${jackson.version} - - - - p2-installable-unit - com.fasterxml.jackson.dataformat.jackson-dataformat-afterburner - - ${jackson.version} - - - - - p2-installable-unit - org.apache.commons.collections - - ${commons.collections.versionRange} - - - - p2-installable-unit - org.slf4j.api - - - - - - linux - gtk - x86_64 - - - win32 - win32 - x86_64 - - - - - - org.eclipse.tycho - tycho-p2-director-plugin - ${tycho.version} - - - org.codehaus.plexus - plexus-archiver - 2.4.4 - - - org.codehaus.plexus - plexus-component-api - - - org.codehaus.plexus - plexus-container-default - - - - - - - org.eclipse.tycho - tycho-p2-publisher-plugin - ${tycho.version} - - true - - - - org.eclipse.tycho - tycho-versions-plugin - ${tycho.version} - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - - prepare-agent - - - - - - - - - org.eclipse.tycho - tycho-compiler-plugin - ${tycho.version} - - false - 11 - 11 - - **/*.groovy - **/*.xtend - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.0 - - 11 - 11 - - - - org.eclipse.tycho - tycho-surefire-plugin - ${tycho.version} - - false - - - - false - - - - org.eclipse.tycho - tycho-packaging-plugin - ${tycho.version} - - - org.eclipse.tycho.extras - tycho-buildtimestamp-jgit - ${tycho-extras.version} - - - - jgit - - pom.xml - - - - - org.eclipse.tycho - tycho-p2-repository-plugin - ${tycho.version} - - true - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.3 - - - - + + + docs + + + docs + true + + + + documentation + + + - - - docs - - - docs - true - - - - documentation - - - - - - - artifactory-releases - https://artifactory.ops.babylontech.co.uk/artifactory/babylon-maven-releases - - - artifactory-snapshots - https://artifactory.ops.babylontech.co.uk/artifactory/babylon-maven-snapshots - - - - - https://github.com/babylonhealth/snow-owl - scm:git:ssh://github.com/babylonhealth/snow-owl.git - scm:git:ssh@github.com:babylonhealth/snow-owl.git - + + + ${maven.repository.id} + ${nexus.releases.url} + + + ${maven.repository.id} + ${nexus.snapshots.url} + + + + https://github.com/b2ihealthcare/snow-owl + scm:git:ssh://github.com/b2ihealthcare/snow-owl.git + scm:git:ssh@github.com:b2ihealthcare/snow-owl.git + + \ No newline at end of file diff --git a/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowbackup.sh b/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowbackup.sh deleted file mode 100644 index d44eb02f1b4..00000000000 --- a/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowbackup.sh +++ /dev/null @@ -1,505 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2019 B2i Healthcare Pte Ltd, http://b2i.sg -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This sample backup script for the Snow Owl server creates a .zip file in the -# current directory with the saved contents of the MySQL databases and semantic -# indexes for each terminology, as well as supporting index content, while the -# server is kept running. - -# -# Basic mandatory configuration options (these should be set by editing this script before running it) -# - -# The location of the Snow Owl Server installation directory, eg. /opt/snowowl/server/latest (no trailing slash) -SO_HOME="/opt/snowowl/server/latest" - -# The base URL of the REST services to use -BASE_URL="http://localhost:8080/snowowl" - -# The username used for creating hot backups (should be a valid Snow Owl user) -SNOWOWL_USERNAME="snowowl" - -# The password for the user given above -SNOWOWL_PASSWORD="snowowl" - -# The MySQL username used to take backups -MYSQL_USERNAME="backup" - -# The password for the user given above -MYSQL_PASSWORD="secret" - -# Elasticsearch URL to connect to for taking index snapshots -ES_URL="http://localhost:9200" - -# The backup location where all data will be backed up (should be a path on either a local or mounted disk), including metadata files for subsequent backups -BACKUP_DIR="/opt/snowowl/backup" - -# Number of snapshots to keep in incremental fashion, by default the last 10 snapshots will be kept -NUMBER_OF_SNAPSHOTS_TO_KEEP=10 - -# -# Advanced configuration options -# - -# The number of milliseconds to wait before giving up trying to lock the complete repository. -LOCK_TIMEOUT_MILLIS=30000 - -# The connection timeout for HTTP requests in seconds. -CONNECTION_TIMEOUT_SECONDS=5 - -# The initial waiting time after sending a message to connected users in minutes. -INITIAL_WAIT_MINUTES=5 - -# The number of retries the first lock is attempted. -RETRIES=5 - -# The waiting time after an unsuccessful lock attempt in minutes. -RETRY_WAIT_MINUTES=5 - -# Elasticsearch configuration for repository snapshots (number of bytes per sec to use for snapshot throttle) -SNAPSHOT_BYTES_PER_SEC="250mb" - -# Use archive structure without container folder -USE_ROOT_ARCHIVE_STRUCTURE=false - -# -# Script variables -# - -# The base URL for administrative services -SO_ADMIN_URL="$BASE_URL/admin" - -# The timestamp suffix for the top-level directory, eg. 20120904_102102 -CURRENT_DATE=`date +%Y%m%d_%H%M%S` - -# The working directory and the resulting archive file prefix -ARCHIVE_PREFIX="snowowl_$CURRENT_DATE" - -# The absolute path to the above -ABSOLUTE_ARCHIVE_PREFIX="$BACKUP_DIR/$ARCHIVE_PREFIX" - -usage() { - -cat << EOF - -NAME: - Snow Owl Backup/Restore Tool - -DESCRIPTION: - This sample backup script for the Snow Owl server creates a .zip file in the - current directory with the saved contents of the MySQL databases and semantic - indexes for each terminology, as well as supporting index content, while the - server is kept running. - -USAGE: $0 [OPTIONS] [PATH_TO_SERVER] - - [PATH_TO_SERVER] specifing the server's home dir through a parameter will - always overwrite the stored values. If the path never - changes it is not mandatory to pass it in as a parameter, - more useful to store it in the script. - -OPTIONS: - - -r do not use container dir inside the resulting archive - - -i no initial wait time will be applied for the users, backup - starts immediately - - -h display help - -EXAMPLES: - - If all user credentials are stored in the script but server home was not - specified: - - $0 /path/to/server - - If server location and all user credentials are stored in the script but - the resulting archive must contain all files in it's root: - - $0 -r - - If all user credentials are specified, server home dir is provided through - a parameter and initial wait time can be ignored: - - $0 -i /path/to/server - -EOF - -} - -# Prints a message to stdout with the current date and time. -echo_date() { - echo -e "[`date +\"%Y-%m-%d %H:%M:%S\"`] $@" -} - -# Prints an error message to stderr and exits the script with a non-zero status. -error_exit() { - echo -e "[`date +\"%Y-%m-%d %H:%M:%S\"`] $@" >&2 - exit 1 -} - -# Invokes curl to make an HTTP request to the Snow Owl Server; stores returned message and HTTP status code in output variables. -so_rest_call() { - rest_call --connect-timeout "$CONNECTION_TIMEOUT_SECONDS" --user "$SNOWOWL_USERNAME:$SNOWOWL_PASSWORD" "$@" -} - -# Invokes curl to make an HTTP request to any Web Server or API; stores returned message and HTTP status code in output variables. -rest_call() { - CURL_OUTPUT=`curl -q --fail --silent --show-error --write-out "\n%{http_code}" "$@"` - CURL_RESPONSE=`echo "$CURL_OUTPUT" | head -n-1` - CURL_HTTP_STATUS=`echo "$CURL_OUTPUT" | tail -n1` -} - -# Tries to acquire a global lock that prevents writing to any of the terminology stores on any available branch. -lock_all_repositories() { - echo_date "Locking repositories..." - so_rest_call --data-urlencode "timeoutMillis=$LOCK_TIMEOUT_MILLIS" "$SO_ADMIN_URL/repositories/lock" -} - -# Removes the lock from all repositories. -unlock_all_repositories() { - echo_date "Unlocking repositories..." - so_rest_call --data-urlencode "" "$SO_ADMIN_URL/repositories/unlock" -} - -# Cleans up the global repository lock and exits with an error. -unlock_all_repositories_and_exit() { - unlock_all_repositories - error_exit "$1" -} - -# Locks the specified repository, preventing write access to all of its branches. -lock_repository() { - echo_date "Locking repository $REPOSITORY..." - so_rest_call --data-urlencode "" "$SO_ADMIN_URL/repositories/$REPOSITORY/lock" - - if [ "$CURL_HTTP_STATUS" -ne "204" ]; then - unlock_all_repositories_and_exit "Couldn't lock repository $REPOSITORY. Exiting with error." - fi -} - -# Unlocks the specified repository if it was already locked. -unlock_repository() { - echo_date "Unlocking repository $REPOSITORY..." - so_rest_call --data-urlencode "" "$SO_ADMIN_URL/repositories/$REPOSITORY/unlock" -} - -# Unlocks the specified repository, cleans up the global repository lock and exits with an error. -unlock_repository_and_exit() { - unlock_repository - unlock_all_repositories_and_exit "$1" -} - -# Copies the contents of the specified repository to the zip file. -backup_mysql() { - echo_date "Backing up MySQL content for database $REPOSITORY..." - # Create the MySQL backup directory - mkdir --parents $BACKUP_DIR/mysql - cd $BACKUP_DIR/mysql - - FULL_BKP_DIR="base" - INCREMENTAL_PREFIX="inc_" - - # Check that the full backup directory exists - if [ ! -d "$BACKUP_DIR/mysql/$FULL_BKP_DIR" ]; - then - # if not take a full backup - xtrabackup --backup --target-dir=$FULL_BKP_DIR -u$MYSQL_USERNAME -p$MYSQL_PASSWORD || unlock_repository_and_exit "Couldn't create full backup of MySQL. Exiting with error." - LAST_BKP=$FULL_BKP_DIR - else - # otherwise get the latest incremental backup directory under $BACKUP_DIR/mysql - LAST_BKP=$(ls -t . | grep $INCREMENTAL_PREFIX | head -1) - fi - - # take an incremental backup (even if we did a full seconds ago, this is needed to keep track of number of snapshots properly) - xtrabackup --backup --target-dir="$INCREMENTAL_PREFIX$CURRENT_DATE" --incremental-basedir=$LAST_BKP -u$MYSQL_USERNAME -p$MYSQL_PASSWORD || unlock_repository_and_exit "Couldn't create incremental backup of MySQL. Exiting with error." - - # Keep only the last N backup, count the current incremental snapshots - NUMBER_OF_SNAPSHOTS=$( ls . | grep $INCREMENTAL_PREFIX | wc -l ) - # Do the cleanup if we have more than the configured snapshots to keep - if [ $NUMBER_OF_SNAPSHOTS -gt $NUMBER_OF_SNAPSHOTS_TO_KEEP ]; - then - SNAPSHOTS_TO_CLEAN=$(ls . | grep $INCREMENTAL_PREFIX | head -$(( $NUMBER_OF_SNAPSHOTS - $NUMBER_OF_SNAPSHOTS_TO_KEEP)) ) - echo_date "Cleaning $(( $NUMBER_OF_SNAPSHOTS - $NUMBER_OF_SNAPSHOTS_TO_KEEP )) snapshot(s) of MySQL backups..." - # Prepare the full bkp dir for snapshot cleaning - xtrabackup --prepare --apply-log-only --target-dir=$FULL_BKP_DIR || unlock_repository_and_exit "Couldn't clean up snapshot $snapshot. Exiting with error." - for snapshot in $SNAPSHOTS_TO_CLEAN; do - echo_date "Cleaning MySQL snapshot of $snapshot..." - # Clean the now obsolete snapshot - xtrabackup --prepare --apply-log-only --target-dir=$FULL_BKP_DIR --incremental-dir=$snapshot || unlock_repository_and_exit "Couldn't clean up snapshot $snapshot. Exiting with error." - rm -rf $snapshot - done - fi - - cd -- - echo_date "Done backing up MySQL database $REPOSITORY." -} - -backup_resources() { - echo_date "Backing up resources directory (attachments, etc)..." - - # Take backup - mkdir --parents $BACKUP_DIR/resources - cd $SO_HOME - if [ -z "$(ls -A $BACKUP_DIR/resources)" ]; - then - rsync --verbose --recursive --delete --dirs --exclude 'indexes' "resources/" "$BACKUP_DIR/resources/$CURRENT_DATE" || unlock_repository_and_exit "Couldn't take full backup of resources directory. Exiting with error." - else - LAST_BKP=$(ls -t $BACKUP_DIR/resources | head -1) - rsync --verbose --recursive --delete --dirs --exclude 'indexes' --link-dest="$BACKUP_DIR/resources/$LAST_BKP" "resources/" "$BACKUP_DIR/resources/$CURRENT_DATE" || unlock_repository_and_exit "Couldn't take incremental backup of resources directory. Exiting with error." - fi - cd -- - - # Keep only the last N backup - cd $BACKUP_DIR/resources - # Count the current incremental snapshots - NUMBER_OF_SNAPSHOTS=$( ls . | wc -l ) - # Do the cleanup if we have more than the configured snapshots to keep - if [ $NUMBER_OF_SNAPSHOTS -gt $NUMBER_OF_SNAPSHOTS_TO_KEEP ]; - then - SNAPSHOTS_TO_CLEAN=$( ls . | head -$(( $NUMBER_OF_SNAPSHOTS - $NUMBER_OF_SNAPSHOTS_TO_KEEP)) ) - echo_date "Cleaning $(( $NUMBER_OF_SNAPSHOTS - $NUMBER_OF_SNAPSHOTS_TO_KEEP )) snapshot(s) of resources backups..." - for snapshot in $SNAPSHOTS_TO_CLEAN; do - echo_date "Cleaning resources snapshot of $snapshot..." - # Clean the now obsolete snapshot - rm -rf $snapshot - done - fi - cd -- - - echo_date "Done backing up resources directory (attachments, etc)." -} - -backup_indexes() { - echo_date "Backing up Elasticsearch indices..." - mkdir --parents $BACKUP_DIR/indexes - REPO="backup" - -REPO_CONFIG=$(cat <&2 - exit 1 - ;; - :) - echo "Option -$OPTARG requires an argument." >&2 - exit 1 - ;; - esac -done - -shift "$((OPTIND - 1))" - -if [ ! -z "$1" ]; then - - if [ -d "$1" ]; then - SO_HOME=$(echo ${1%/}) - else - echo_date "Invalid parameter, using stored values." - fi - -fi - -if [ ! -z "$2" ]; then - - echo_error "More than one parameter is not allowed." - usage - exit 1 - -fi - -# Ensure we have an existing backup directory -mkdir --parents $BACKUP_DIR - -# Ensures that only a single instance is running at any time -LOCKFILE="$BACKUP_DIR/instance.lock" - -( - flock -n 200 || error_exit "Another backup script is already running. Exiting with error." - trap "rm $LOCKFILE" EXIT - main -) 200> $LOCKFILE diff --git a/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl-install.sh b/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl-install.sh deleted file mode 100644 index e862d5e6242..00000000000 --- a/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl-install.sh +++ /dev/null @@ -1,1168 +0,0 @@ -#!/usr/bin/env bash - -# -# Copyright 2016-2017 B2i Healthcare Pte Ltd, http://b2i.sg -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Snow Owl terminology server install script -# See usage or execute the script with the -h flag to get further information about it. -# -# Version: 1.0 -# - -# The following variables must be filled in before executing the script at the first time: - -# A MySQL username with root privileges -MYSQL_USERNAME="root" - -# The password for the root MySQL user -MYSQL_PASSWORD="password" - -# The MySQL username for Snow Owl server to use -SNOWOWL_MYSQL_USER="snowowl" - -# The password for Snow Owl's MySQL user -SNOWOWL_MYSQL_PASSWORD="snowowl" - -# A valid Snow Owl user to be able to create backups -SNOWOWL_USERNAME="user@localhost.localdomain" - -# The password for the Snow Owl user given above -SNOWOWL_PASSWORD="password123" - -# The LDAP server's URL -LDAP_URL="ldap://:10389/" - -# The LDAP password -LDAP_PASSWORD="secret" - -########################################################### - -# Optional variables that are modifiable: - -# Full path to a local hot backup script. It is not necessary to fill in if the provided archive -# contains the script. -HOT_BACKUP_SCRIPT_LOCATION="" - -# Set maximum java heap size. If not specified the default (10g) will be used. Can be set by the -# -x parameter as well. Setting this value will always overwrite the value specified through the -# -x parameter. -MAX_JAVA_HEAP_SIZE=0 - -# The name of the folder where extra server files (documentation, scripts, config files) will be -# extracted during the install process. This folder will be in the server folder itself: -# / -EXTRA_SERVER_FILES_DIR_NAME="extras" - -# Set to either file or ldap. If left empty the default server config will be used. -AUTH_TYPE="" - -########################################################### - -# Changing the following variables is NOT advised. - -# The number of retries to wait for e.g. server shutdown or log file creation. -RETRIES=15 - -# The number of seconds to wait between retries. -RETRY_WAIT_SECONDS=1 - -# The anchor file in a server archive which is always in the root of the server folder. This is -# used for identifying the server folder inside an archive with subfolders. -SERVER_ANCHOR_FILE="snowowl_config.yml" - -# The anchor file in a dataset/server archive which is always in the root of the dataset folder. -# This is used for identifying the dataset folder inside an archive with subfolders. -DATASET_ANCHOR_FILE="snomedStore.sql" - -# List of known database names used by the Snow Owl terminology server. -DATABASES=( atcStore icd10Store icd10amStore icd10cmStore localterminologyStore \ - loincStore mappingsetStore sddStore snomedStore umlsStore valuesetStore ) - -# Flag for indicating the will to create a backup. -CREATE_BACKUP=false - -# Flag for indicating that the dataset should be (re)loaded. -LOAD_DATASET=false - -# Flag for indicating the will that the provided server should be started upon finish. -START_SERVER=false - -# Flag for ignoring interactive prompts. -IGNORE_PROMPTS=false - -# Flag for indicating the will to open up useful terminals after the server was started. -# (two terminals will open, one for the Virgo startup process and one for the server log) -OPEN_TERMINAL=false - -# Variable to determine the local MySQL instance. -MYSQL=$(which mysql) - -# Variable for the first archive passed in as a parameter. -FIRST_ARCHIVE="" -# Variable for the second archive passed in as a parameter. -SECOND_ARCHIVE="" - -# Variable used for storing the server path inside the first archive. -SERVER_ARCHIVE_PATH="" -# Variable used for storing the dataset path inside the first or the second archive. -DATASET_ARCHIVE_PATH="" - -# Variable used for storing the currently running Snow Owl server's path. -RUNNING_SERVER_PATH="" - -# Variable to store the path of the newly installed server. -SERVER_PATH="" -# Variable to store the path of the newly installed dataset. -DATASET_PATH="" - -# The working folder of the script. It could change to the containing folder of the -# currently running Snow Owl server. -WORKING_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# Temporary folder to extract the server archive. It is always cleaned up upon exiting -# the script. -TMP_SERVER_DIR="" - -# Temporary folder to extract the dataset archive. It is always cleaned up upon exiting -# the script. -TMP_DATASET_DIR="" - -# Enviromental variable used by Jenkins -export BUILD_ID=dontKillMe - -usage() { - -cat << EOF - -NAME: - - Snow Owl terminology server install script - -DESCRIPTION: - - This script can be used for deploying Snow Owl terminology server / dataset - in the following scenarios: - - clean install of a server with empty dataset - - clean install of a server with a provided dataset - - upgrading to a newer server version without modifying the existing dataset - - upgrading to a newer version of dataset without modifying the currently running server - - updating MySQL content from a provided dataset. - -NOTES: - - Mandatory variables must be filled in before executing the script. These are: - - MySQL user with root privileges and it's password (to create the necessary - SQL user/databases/tables) - - the desired MySQL user and password for the Snow Owl terminology server - (snowowl/snowowl by default). - - LDAP host and password - - an existing Snow Owl user name and password (to execute a backup) - Optional variables: - - path to a hot backup script if the provided server archive does not contain - any scripts. It is not necessary to provide one if the script is in the server - archive. - -IMPORTANT: - - This script will NOT perform all necessary configuration steps required to start - a Snow Owl server on a clean machine. It is advised to use when at least one - successful Snow Owl server setup was performed before. - - The working folder of the script is determined by the following: - - if there is no running Snow Owl server upon execution time, then the - containing folder of the script. - - if there is a running Snow Owl server upon execution time, then the - containing folder of the running server. - -USAGE: $0 [OPTIONS] [SERVER_ARCHIVE|DATASET_ARCHIVE|SERVER_AND_DATASET_ARCHIVE] [DATASET_ARCHIVE] - - [SERVER_ARCIVE] an archive that contains only a Snow Owl terminology server - - [DATASET_ARCHIVE] an archive that contains only a dataset for the server - - [SERVER_AND_DATASET_ARCHIVE] an archive that contains both server and dataset files in - separate folders - -OPTIONS: - - -b (backup): if set a dataset backup will be performed for the currently running - Snow Owl server. The path to a local backup script must either be provided or - the server archive must contain one. - - -l (load): if set the script will try to (re)load the dataset. If no dataset was - provided through the parameters, then an empty MySQL database structure will - be created - - -s (start): if set the script will either start the new server (if it was provided) - or will restart the previously running server instance (if it was running upon - execution time) - - -f (force): if set interactive prompts will be ignored - - -t (terminal): if set two terminals will open upon server start, one for the Virgo - startup process and one for the server log. This can help monitor if the server - startup was successful - - -x sets the maximum java heap size to use by the new server instance. If not set - and there was no running server upon execution then the default value (10g) - will be used. If there was a running server upon execution then that server's - heap settings will be used. - - -a configure the authentication type through setting the appropriate values in - snowowl_config.yml and osgi_server.plan. The value can either be 'file' or 'ldap', - no other values are allowed. - - -h (help): displays this help - -EXAMPLES: - - If a clean server install without a given dataset must be performed, the current database - can safely be deleted, the server should start and terminals should open at the end: - - Make sure there is no running server in the background and then execute: - - $0 -lst .zip - - If a clean server install with a provided dataset must be performed, the current database - can safely be deleted, no prompt should ask for confirmation and the server should start - at the end: - - Make sure there is no running server in the background and then execute: - - $0 -lfs .zip - - OR - - $0 -lfs .zip .zip - - If a server version upgrade must be performed, a dataset backup must be created, the - current database must be kept, indexes must be moved to the new server folder and the - server should start at the end: - - Make sure there is a running server in the background and then execute: - - $0 -bls .zip - - If a dataset upgrade must be performed, a backup must be created (make sure that in this - case the backup script's location must be specified in this script), the current server - must be kept, indexes must be moved to the server folder and the server should restart at - the end: - - Make sure there is a running server in the background and then execute: - - $0 -bls .zip - - If a server must be extracted to a folder, all configuration settings (e.g. LDAP host, - MySQL user/pass) must be set but a dataset reload or server start is not required: - - If configurations of a previous server instance must be kept, then make sure it is - running and then execute: - - $0 .zip - - If configurations specified in the script must be used, then make sure there is no - running instance at execution time and then: - - $0 .zip - -EOF - -} - -echo_date() { - echo -e "[`date +\"%Y-%m-%d %H:%M:%S\"`] $@" -} - -echo_error() { - echo_date "ERROR: $@" >&2 -} - -echo_step() { - echo_date - echo_date "#### $@ ####" -} - -echo_exit() { - echo_error $@ - exit 1 -} - -swap_value() { - - FILE_LOCATION=$1 - PATTERN=$2 - NEW_VALUE=$3 - - OLD_VALUE=$(grep -Eo "$PATTERN" $FILE_LOCATION) - - sed -i 's,'"$OLD_VALUE"','"$NEW_VALUE"',' $FILE_LOCATION - -} - -check_if_exists() { - - if [ -z "$1" ]; then - echo_exit "$2" - fi - -} - -check_variables() { - - check_if_exists "$MYSQL_USERNAME" "MySQL username must be specified" - check_if_exists "$MYSQL_PASSWORD" "MySQL password must be specified" - check_if_exists "$SNOWOWL_MYSQL_USER" "Snow Owl's MySQL user must be specified" - check_if_exists "$SNOWOWL_MYSQL_PASSWORD" "Snow Owl's MySQL password must be specified" - check_if_exists "$SNOWOWL_USERNAME" "A Snow Owl user must be specified" - check_if_exists "$SNOWOWL_PASSWORD" "A Snow Owl user's password must be specified" - check_if_exists "$LDAP_URL" "The LDAP server's URL must be specified" - check_if_exists "$LDAP_PASSWORD" "The LDAP password must be specified" - - if [ ! -z "$AUTH_TYPE" ] && [ "$AUTH_TYPE" != "file" ] && [ "$AUTH_TYPE" != "ldap" ]; then - echo_exit "Authentication type must be either 'file' or 'ldap'" - fi - -} - -scan_archives() { - - echo_step "Inspecting archives" - - # if two archives were specified look for the server in the first and look for the dataset in the second file - - if [ ! -z "$FIRST_ARCHIVE" ] && [ ! -z "$SECOND_ARCHIVE" ]; then - - CONFIG_LOCATION=$(unzip -l $FIRST_ARCHIVE | grep $SERVER_ANCHOR_FILE | sed 's/ /\n/g' | tail -n1 | sed 's/ //g') - - if [ -z "$CONFIG_LOCATION" ]; then - echo_exit "Unable to locate Snow Owl server within '"$FIRST_ARCHIVE"'" - else - SERVER_ARCHIVE_PATH=$(dirname "$CONFIG_LOCATION") - if [ "$SERVER_ARCHIVE_PATH" = "." ]; then - echo_date "Found Snow Owl server in the root of '"$FIRST_ARCHIVE"'" - else - echo_date "Found Snow Owl server within the provided archive: '$FIRST_ARCHIVE/$SERVER_ARCHIVE_PATH'" - fi - fi - - SNOMED_STORE_LOCATION=$(unzip -l $SECOND_ARCHIVE | grep $DATASET_ANCHOR_FILE | sed 's/ /\n/g' | tail -n1 | sed 's/ //g') - - if [ -z "$SNOMED_STORE_LOCATION" ]; then - echo_exit "Unable to locate dataset within '"$SECOND_ARCHIVE"'." - else - DATASET_ARCHIVE_PATH=$(dirname "$SNOMED_STORE_LOCATION") - if [ "$DATASET_ARCHIVE_PATH" = "." ]; then - echo_date "Found dataset in the root of '"$SECOND_ARCHIVE"'" - else - echo_date "Found dataset within the provided archive: '$SECOND_ARCHIVE/$DATASET_ARCHIVE_PATH'" - fi - fi - - # if only one archive was specified look for the server and the dataset in the same file - - elif [ ! -z "$FIRST_ARCHIVE" ] && [ -z "$SECOND_ARCHIVE" ]; then - - CONFIG_LOCATION=$(unzip -l $FIRST_ARCHIVE | grep $SERVER_ANCHOR_FILE | sed 's/ /\n/g' | tail -n1 | sed 's/ //g') - - if [ ! -z "$CONFIG_LOCATION" ]; then - SERVER_ARCHIVE_PATH=$(dirname "$CONFIG_LOCATION") - if [ "$SERVER_ARCHIVE_PATH" = "." ]; then - echo_date "Found Snow Owl server in the root of '"$FIRST_ARCHIVE"'" - else - echo_date "Found Snow Owl server within the provided archive: '$FIRST_ARCHIVE/$SERVER_ARCHIVE_PATH'" - fi - fi - - SNOMED_STORE_LOCATION=$(unzip -l $FIRST_ARCHIVE | grep $DATASET_ANCHOR_FILE | sed 's/ /\n/g' | tail -n1 | sed 's/ //g') - - if [ ! -z "$SNOMED_STORE_LOCATION" ]; then - DATASET_ARCHIVE_PATH=$(dirname "$SNOMED_STORE_LOCATION") - if [ "$DATASET_ARCHIVE_PATH" = "." ]; then - echo_date "Found dataset in the root of '"$FIRST_ARCHIVE"'" - else - echo_date "Found dataset within the provided archive: '$FIRST_ARCHIVE/$DATASET_ARCHIVE_PATH'" - fi - fi - - fi - -} - -find_running_snowowl_servers() { - - echo_step "Searching for running server instances" - - RUNNING_SERVER_PATH=$(ps aux | grep virgo | sed 's/-D/\n/g' | grep osgi.install.area | sed 's/=/\n/g' | tail -n1 | sed 's/ //g') - - if [ ! -z "$RUNNING_SERVER_PATH" ]; then - echo_date "Found running Snow Owl server instance @ '"$RUNNING_SERVER_PATH"'" - WORKING_DIR=$(dirname "$RUNNING_SERVER_PATH") - else - echo_date "No running Snow Owl server found." - fi - -} - -unzip_server() { - - if [ ! -z "$SERVER_ARCHIVE_PATH" ]; then - - TMP_SERVER_DIR=$(mktemp -d --tmpdir=$WORKING_DIR) - - unzip -q $FIRST_ARCHIVE -d $TMP_SERVER_DIR - - FOLDER_NAME="" - - if [ "$SERVER_ARCHIVE_PATH" = "." ]; then - FILENAME=$(basename $FIRST_ARCHIVE) - FOLDER_NAME=$(echo ${FILENAME%.*}) - else - FOLDER_NAME=$(basename $SERVER_ARCHIVE_PATH) - fi - - if [ ! -d "$WORKING_DIR/$FOLDER_NAME" ]; then - mkdir "$WORKING_DIR/$FOLDER_NAME" - SERVER_PATH="$WORKING_DIR/$FOLDER_NAME" - else - echo_date "Suffixing server dir name as '"$WORKING_DIR/$FOLDER_NAME"' already exists." - CURRENT_DATE=$(date +%Y%m%d_%H%M%S) - mkdir "$WORKING_DIR/"$FOLDER_NAME"_$CURRENT_DATE" - SERVER_PATH="$WORKING_DIR/"$FOLDER_NAME"_$CURRENT_DATE" - fi - - if [ "$SERVER_ARCHIVE_PATH" = "." ]; then - mv -t $SERVER_PATH "$TMP_SERVER_DIR/"* - else - mv -t $SERVER_PATH "$TMP_SERVER_DIR/$SERVER_ARCHIVE_PATH/"* - rm -rf "$TMP_SERVER_DIR/$SERVER_ARCHIVE_PATH/" - fi - - echo_date "Extracted server files to: '"$SERVER_PATH"'" - - fi - -} - -unzip_dataset() { - - if [ ! -z "$DATASET_ARCHIVE_PATH" ]; then - - if [ ! -z "$FIRST_ARCHIVE" ] && [ ! -z "$SECOND_ARCHIVE" ]; then - - TMP_DATASET_DIR=$(mktemp -d --tmpdir=$WORKING_DIR) - - unzip -q $SECOND_ARCHIVE -d $TMP_DATASET_DIR - - # $SERVER_PATH must exists at this point - - if [ ! -d "$SERVER_PATH/resources" ]; then - mkdir "$SERVER_PATH/resources" - fi - - DATASET_PATH="$SERVER_PATH/resources" - - if [ "$DATASET_ARCHIVE_PATH" = "." ]; then - mv -t $DATASET_PATH "$TMP_DATASET_DIR/"* - else - mv -t $DATASET_PATH "$TMP_DATASET_DIR/$DATASET_ARCHIVE_PATH/"* - rm -rf "$TMP_DATASET_DIR/$DATASET_ARCHIVE_PATH/" - fi - - elif [ ! -z "$FIRST_ARCHIVE" ] && [ -z "$SECOND_ARCHIVE" ]; then - - if [ ! -z "$SERVER_PATH" ]; then - - if [ ! -d "$SERVER_PATH/resources" ]; then - mkdir "$SERVER_PATH/resources" - fi - - DATASET_PATH="$SERVER_PATH/resources" - - if [ "$DATASET_ARCHIVE_PATH" != "." ]; then - mv -t $DATASET_PATH "$TMP_SERVER_DIR/$DATASET_ARCHIVE_PATH/"* - rm -rf "$TMP_SERVER_DIR/$DATASET_ARCHIVE_PATH/" - fi - - else - - TMP_DATASET_DIR=$(mktemp -d --tmpdir=$WORKING_DIR) - - unzip -q $FIRST_ARCHIVE -d $TMP_DATASET_DIR - - FOLDER_NAME="" - - if [ "$DATASET_ARCHIVE_PATH" = "." ]; then - FILENAME=$(basename $FIRST_ARCHIVE) - FOLDER_NAME=$(echo ${FILENAME%.*}) - else - FOLDER_NAME=$(basename $DATASET_ARCHIVE_PATH) - fi - - if [ ! -d "$WORKING_DIR/$FOLDER_NAME" ]; then - mkdir "$WORKING_DIR/$FOLDER_NAME" - DATASET_PATH="$WORKING_DIR/$FOLDER_NAME" - else - echo_date "Suffixing dataset dir name as '"$WORKING_DIR/$FOLDER_NAME"' already exists." - CURRENT_DATE=$(date +%Y%m%d_%H%M%S) - mkdir "$WORKING_DIR/"$FOLDER_NAME"_$CURRENT_DATE" - DATASET_PATH="$WORKING_DIR/"$FOLDER_NAME"_$CURRENT_DATE" - fi - - if [ "$DATASET_ARCHIVE_PATH" = "." ]; then - mv -t $DATASET_PATH "$TMP_DATASET_DIR/"* - else - mv -t $DATASET_PATH "$TMP_DATASET_DIR/$DATASET_ARCHIVE_PATH/"* - rm -rf "$TMP_DATASET_DIR/$DATASET_ARCHIVE_PATH/" - fi - - fi - - fi - - echo_date "Extracted dataset files to: '"$DATASET_PATH"'" - - fi -} - -unzip_archives() { - - echo_step "Extracting archives" - - unzip_server - unzip_dataset - - if [ ! -z $TMP_SERVER_DIR ] && [ -n "$(ls -A $TMP_SERVER_DIR)" ]; then - mkdir "$SERVER_PATH/$EXTRA_SERVER_FILES_DIR_NAME" - mv -t "$SERVER_PATH/$EXTRA_SERVER_FILES_DIR_NAME" "$TMP_SERVER_DIR/"* - echo_date "Extracted additional server files to '$SERVER_PATH/$EXTRA_SERVER_FILES_DIR_NAME" - fi - -} - -configure_backup_script() { - - SCRIPT_LOCATION=$1 - - echo_date "Configuring backup script..." - - swap_value $SCRIPT_LOCATION "SNOW_OWL_SERVER_HOME=\"[^ ]*\"" "SNOW_OWL_SERVER_HOME=\"$RUNNING_SERVER_PATH\"" && echo_date "Using server location '$RUNNING_SERVER_PATH'" - - swap_value $SCRIPT_LOCATION "SNOWOWL_USERNAME=\"[^ ]*\"" "SNOWOWL_USERNAME=\"$SNOWOWL_USERNAME\"" && echo_date "Using Snow Owl user name '$SNOWOWL_USERNAME'" - - swap_value $SCRIPT_LOCATION "SNOWOWL_PASSWORD=\"[^ ]*\"" "SNOWOWL_PASSWORD=\"$SNOWOWL_PASSWORD\"" && echo_date "Using Snow Owl user password '$SNOWOWL_PASSWORD'" - - swap_value $SCRIPT_LOCATION "MYSQL_USERNAME=\"[^ ]*\"" "MYSQL_USERNAME=\"$SNOWOWL_MYSQL_USER\"" && echo_date "Using MySQL user '$SNOWOWL_MYSQL_USER'" - - swap_value $SCRIPT_LOCATION "MYSQL_PASSWORD=\"[^ ]*\"" "MYSQL_PASSWORD=\"$SNOWOWL_MYSQL_PASSWORD\"" && echo_date "Using MySQL password '$SNOWOWL_MYSQL_PASSWORD'" - - swap_value $SCRIPT_LOCATION "INITIAL_WAIT_MINUTES=5" "INITIAL_WAIT_MINUTES=0" && echo_date "Using immediate backup execution" - -} - -backup_and_shutdown() { - - if [ "$CREATE_BACKUP" = true ]; then - - if [ ! -z "$RUNNING_SERVER_PATH" ]; then - - echo_step "Creating backup" - - if [ -z "$HOT_BACKUP_SCRIPT_LOCATION" ]; then - - if [ ! -z "$SERVER_PATH" ]; then - HOT_BACKUP_SCRIPT_LOCATION=$(find $SERVER_PATH -type f -name '*hot_backup*.sh') - fi - - if [ -z "$HOT_BACKUP_SCRIPT_LOCATION" ]; then - echo_exit "Unable to locate backup script, see script parameters or check if your server archive contains the script." - else - echo_date "Using backup script (found in the server archive) @ '$HOT_BACKUP_SCRIPT_LOCATION'" - chmod +x $HOT_BACKUP_SCRIPT_LOCATION - fi - - else - echo_date "Using backup script @ '$HOT_BACKUP_SCRIPT_LOCATION'" - fi - - if [ ! -z "$HOT_BACKUP_SCRIPT_LOCATION" ]; then - - configure_backup_script $HOT_BACKUP_SCRIPT_LOCATION - - echo_date "Executing backup script..." - - $HOT_BACKUP_SCRIPT_LOCATION && echo_date "Backup created successfully." || echo_error "Backup script failed to finish." - wait - - fi - - else - echo_error "Unable to create backup as there is no running Snow Owl server." - fi - - fi - - if [ ! -z "$RUNNING_SERVER_PATH" ]; then - - echo_step "Shutdown" - - if [ "$IGNORE_PROMPTS" = false ]; then - - read -p "[`date +\"%Y-%m-%d %H:%M:%S\"`] The currently running Snow Owl server must be shut down. Are you sure you want to continue? (y or n) " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - echo_date "Shutting down server @ '$RUNNING_SERVER_PATH'" - else - echo_exit "Server shutdown was interrupted by the user." - fi - - else - echo_date "Shutting down server @ '$RUNNING_SERVER_PATH'" - fi - - "$RUNNING_SERVER_PATH/bin/shutdown.sh" > /dev/null - - SERVER_IS_DOWN=false - - for i in $(seq 1 "$RETRIES"); do - - SERVER_TO_SHUTDOWN=$(ps aux | grep virgo | sed 's/-D/\n/g' | grep osgi.install.area | sed 's/=/\n/g' | tail -n1 | sed 's/ //g') - - if [ ! -z "$SERVER_TO_SHUTDOWN" ]; then - sleep "$RETRY_WAIT_SECONDS"s - else - echo_date "Shutdown finished." - SERVER_IS_DOWN=true - break - fi - - done - - if [ "$SERVER_IS_DOWN" = false ]; then - echo_exit "Unable to shutdown server @ '$RUNNING_SERVER_PATH' after $(( $RETRIES * $RETRY_WAIT_SECONDS )) seconds" - fi - - fi - -} - -configure_ldap_host() { - - JAAS_CONFIG_LOCATION=$(find $SERVER_PATH -type f ! -path '*.jar*' -name '*jaas_config*.conf') - - # set LDAP url - - OLD_VALUE=$(grep -Eo 'ldap://[^ ]+/' $JAAS_CONFIG_LOCATION) - - sed -i 's,'"$OLD_VALUE"','"$LDAP_URL"',' $JAAS_CONFIG_LOCATION - - echo_date "Setting LDAP host to '$LDAP_URL'" - - # set LDAP password - - if [ "$LDAP_PASSWORD" != "secret" ]; then - - OLD_VALUE=$(grep -Eo 'bindDnPassword="[^ ]+"' $JAAS_CONFIG_LOCATION) - - NEW_VALUE="bindDnPassword=\"$LDAP_PASSWORD\"" - - sed -i 's,'"$OLD_VALUE"','"$NEW_VALUE"',' $JAAS_CONFIG_LOCATION - - echo_date "Setting LDAP password to '$LDAP_PASSWORD'" - - fi - -} - -configure_mysql_user() { - - SNOWOWL_CONFIG_LOCATION=$(find $SERVER_PATH -type f -name '*config.yml') - - # set Snow Owl MySQL user - - if [ "$SNOWOWL_MYSQL_USER" != "snowowl" ]; then - - OLD_VALUE=$(grep -Eo 'username: [^ ]+' $SNOWOWL_CONFIG_LOCATION) - - NEW_VALUE="username: $SNOWOWL_MYSQL_USER" - - sed -i 's,'"$OLD_VALUE"','"$NEW_VALUE"',' $SNOWOWL_CONFIG_LOCATION - - echo_date "Setting Snow Owl's MySQL user to '$SNOWOWL_MYSQL_USER'" - - fi - - # set Snow Owl MySQL password - - if [ "$SNOWOWL_MYSQL_PASSWORD" != "snowowl" ]; then - - OLD_VALUE=$(grep -Eo 'password: [^ ]+' $SNOWOWL_CONFIG_LOCATION) - - NEW_VALUE="password: $SNOWOWL_MYSQL_PASSWORD" - - sed -i 's,'"$OLD_VALUE"','"$NEW_VALUE"',' $SNOWOWL_CONFIG_LOCATION - - echo_date "Setting Snow Owl's MySQL password to '$SNOWOWL_MYSQL_PASSWORD'" - - fi - -} - -configure_max_java_heap_size() { - - DMK_LOCATION=$(find $SERVER_PATH -type f -name 'dmk.sh') - - if [ $MAX_JAVA_HEAP_SIZE -ne 0 ]; then - - sed -i -e "s/-Xmx10g/-Xmx"$MAX_JAVA_HEAP_SIZE"g/g" $DMK_LOCATION - - echo_date "Setting max java heap size to '$MAX_JAVA_HEAP_SIZE g'" - - elif [ ! -z "$RUNNING_SERVER_PATH" ]; then - - OLD_DMK_LOCATION=$(find $RUNNING_SERVER_PATH -type f -name 'dmk.sh') - - OLD_VALUE=$(grep -Eo '\-Xmx[^ ]+g' $OLD_DMK_LOCATION) - OLD_VALUE=${OLD_VALUE#-Xmx} - OLD_VALUE=${OLD_VALUE%g} - - sed -i -e "s/-Xmx10g/-Xmx"$OLD_VALUE"g/g" $DMK_LOCATION - - echo_date "Reusing previously configured max heap size '$OLD_VALUE g'" - - fi - -} - -configure_authentication_type() { - - SNOWOWL_CONFIG_LOCATION=$(find $SERVER_PATH -type f -name '*config.yml') - - if [ "$AUTH_TYPE" = "file" ]; then - - OLD_VALUE=$(grep -Eo 'type: LDAP' $SNOWOWL_CONFIG_LOCATION) - - if [ ! -z "$OLD_VALUE" ]; then - - NEW_VALUE="type: PROP_FILE" - - sed -i 's,'"$OLD_VALUE"','"$NEW_VALUE"',' $SNOWOWL_CONFIG_LOCATION - - echo_date "Setting authentication type to PROP_FILE in snowowl_config.yml" - - fi - - elif [ "$AUTH_TYPE" = "ldap" ]; then - - OLD_VALUE=$(grep -Eo 'type: PROP_FILE' $SNOWOWL_CONFIG_LOCATION) - - if [ ! -z "$OLD_VALUE" ]; then - - NEW_VALUE="type: LDAP" - - sed -i 's,'"$OLD_VALUE"','"$NEW_VALUE"',' $SNOWOWL_CONFIG_LOCATION - - echo_date "Setting authentication type to LDAP in snowowl_config.yml" - - fi - - fi - - PLAN_LOCATION=$(find "$SERVER_PATH/pickup" -type f -name 'osgi_server.plan') - - for i in $(grep -Eo "authentication.[^\" ]+" $PLAN_LOCATION); do - - if [ "$AUTH_TYPE" = "file" ]; then - sed -i 's,'"${i}"','"authentication.file"',' $PLAN_LOCATION - elif [ "$AUTH_TYPE" = "ldap" ]; then - sed -i 's,'"${i}"','"authentication.ldap"',' $PLAN_LOCATION - fi - - done - - if [ "$AUTH_TYPE" = "file" ]; then - echo_date "Setting authentication type to file in osgi_server.plan" - elif [ "$AUTH_TYPE" = "ldap" ]; then - echo_date "Setting authentication type to LDAP osgi_server.plan" - fi - -} - -set_server_variables() { - - if [ ! -z $SERVER_PATH ]; then - - echo_step "Configuring server variables" - - configure_ldap_host - configure_mysql_user - configure_max_java_heap_size - - if [ ! -z "$AUTH_TYPE" ]; then - - configure_authentication_type - - fi - - fi - -} - -execute_mysql_statement() { - ${MYSQL} --user=${MYSQL_USERNAME} --password=${MYSQL_PASSWORD} --execute="$1" > /dev/null 2>&1 && echo_date "$2" -} - -setup_mysql_content() { - - echo_date "Setting up MySQL content..." - - if [ "$IGNORE_PROMPTS" = false ] && [ "$CREATE_BACKUP" = false ]; then - - read -p "[`date +\"%Y-%m-%d %H:%M:%S\"`] Dataset backup was not performed, all MySQL content will be gone. Are you sure you want to continue? (y or n) " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - echo_date "Continuing dataset reload procedure." - else - echo_exit "Dataset reload was interrupted by the user." - fi - - fi - - SNOWOWL_USER_EXISTS=false - - while read User; do - if [[ "$SNOWOWL_MYSQL_USER" == "$User" ]]; then - SNOWOWL_USER_EXISTS=true - break - fi - done < <(${MYSQL} --user=${MYSQL_USERNAME} --password=${MYSQL_PASSWORD} \ - --batch --skip-column-names --execute='use mysql; SELECT `user` FROM `user`;' > /dev/null 2>&1) - - if [ "$SNOWOWL_USER_EXISTS" = false ]; then - execute_mysql_statement "CREATE USER '${SNOWOWL_MYSQL_USER}'@'localhost' identified by '${SNOWOWL_MYSQL_PASSWORD}';" \ - "Created '${SNOWOWL_MYSQL_USER}' MySQL user with password '${SNOWOWL_MYSQL_PASSWORD}'." - fi - - for i in "${DATABASES[@]}"; do - execute_mysql_statement "DROP DATABASE \`${i}\`;" "Dropped database ${i}." - done - - if [ -z "$DATASET_PATH" ]; then - - for i in "${DATABASES[@]}"; do - - DATABASE_NAME=${i} - - execute_mysql_statement "CREATE DATABASE \`${DATABASE_NAME}\` DEFAULT CHARSET 'utf8';" "Created database ${DATABASE_NAME}." - execute_mysql_statement "GRANT ALL PRIVILEGES ON \`${DATABASE_NAME}\`.* to '${SNOWOWL_MYSQL_USER}'@'localhost';" \ - "Granted all privileges on ${DATABASE_NAME} to '${SNOWOWL_MYSQL_USER}@localhost'." - - done - - else - - for i in $(find "$DATASET_PATH" -type f -name '*.sql'); do - - BASENAME=$(basename ${i}) - DATABASE_NAME=${BASENAME%.sql} - - execute_mysql_statement "CREATE DATABASE \`${DATABASE_NAME}\` DEFAULT CHARSET 'utf8';" "Created database ${DATABASE_NAME}." - execute_mysql_statement "GRANT ALL PRIVILEGES ON \`${DATABASE_NAME}\`.* to '${SNOWOWL_MYSQL_USER}'@'localhost';" \ - "Granted all privileges on ${DATABASE_NAME} to '${SNOWOWL_MYSQL_USER}@localhost'." - - echo_date "Loading ${BASENAME}..." - ${MYSQL} --user=${MYSQL_USERNAME} --password=${MYSQL_PASSWORD} "${DATABASE_NAME}" < "${i}" > /dev/null 2>&1 && \ - echo_date "Loading of ${BASENAME} finished." - - done - - fi - - execute_mysql_statement "FLUSH PRIVILEGES;" "Reloaded grant tables." - -} - -setup_dataset() { - - if [ "$LOAD_DATASET" = true ]; then - - echo_step "Preparing dataset" - - if [ ! -z "$FIRST_ARCHIVE" ] && [ ! -z "$SECOND_ARCHIVE" ]; then - - setup_mysql_content - - elif [ ! -z "$FIRST_ARCHIVE" ] && [ -z "$SECOND_ARCHIVE" ]; then - - if [ ! -z "$DATASET_PATH" ] && [ ! -z "$SERVER_PATH" ]; then - - setup_mysql_content - - elif [ -z "$DATASET_PATH" ] && [ ! -z "$SERVER_PATH" ]; then - - if [ ! -z "$RUNNING_SERVER_PATH" ]; then - - mv -t "$SERVER_PATH/resources" "$RUNNING_SERVER_PATH/resources/indexes" && echo_date "Moved index folder from '$RUNNING_SERVER_PATH/resources' to '$SERVER_PATH/resources'." - - else - - setup_mysql_content - - fi - - elif [ ! -z "$DATASET_PATH" ] && [ -z "$SERVER_PATH" ]; then - - if [ ! -z "$RUNNING_SERVER_PATH" ]; then - - setup_mysql_content - - rm -rf "$RUNNING_SERVER_PATH/resources/indexes" && echo_date "Cleaned up old index folder @ '$RUNNING_SERVER_PATH/resources'." - mv -t "$RUNNING_SERVER_PATH/resources" "$DATASET_PATH/indexes" && echo_date "Moved '$DATASET_PATH/indexes' folder to '$RUNNING_SERVER_PATH/resources'." - - else - - setup_mysql_content - - echo_date "Index folder to copy under '/resources' is available @ '$DATASET_PATH'" - - fi - - fi - - fi - - fi - -} - -open_terminal_for_startup() { - - gnome-terminal --working-directory="$1/bin" --title="$1/bin" -x bash -c "screen -r $(basename $SERVER_PATH); exec bash;" & - -} - -open_terminal_for_log() { - - LOG_FILE_EXISTS=false - - for i in $(seq 1 "$RETRIES"); do - if [ ! -f "$1/serviceability/logs/log.log" ]; then - sleep "$RETRY_WAIT_SECONDS"s - else - LOG_FILE_EXISTS=true - break - fi - done - - if [ "$LOG_FILE_EXISTS" = true ]; then - gnome-terminal --working-directory="$1/serviceability/logs" --title="$1/serviceability/logs/log.log" -x bash -c 'tail --follow=name log.log; exec bash;' & - fi - -} - -open_terminals() { - - if [ "$OPEN_TERMINAL" = true ]; then - open_terminal_for_startup $1 - open_terminal_for_log $1 - fi - -} - -verify_server_startup() { - - SERVER_IS_UP=false - - for i in $(seq 1 "$RETRIES"); do - - SERVER_TO_START=$(ps aux | grep virgo | sed 's/-D/\n/g' | grep osgi.install.area | sed 's/=/\n/g' | tail -n1 | sed 's/ //g') - - if [ -z "$SERVER_TO_START" ]; then - sleep "$RETRY_WAIT_SECONDS"s - else - echo_date "Server started @ '$SERVER_TO_START'" - SERVER_IS_UP=true - break - fi - - done - - if [ "$SERVER_IS_UP" = false ]; then - echo_exit "Unable to start server @ '$1' after $(( $RETRIES * $RETRY_WAIT_SECONDS )) seconds" - fi - -} - -start_server() { - - if [ ! -z "$SERVER_PATH" ] || [ ! -z "$RUNNING_SERVER_PATH" ]; then - - if [ "$START_SERVER" = true ]; then - - echo_step "Starting server" - - if [ ! -z "$DATASET_PATH" ]; then - - if [ ! -z "$SERVER_PATH" ]; then - - chmod +x $SERVER_PATH/bin/*.sh - - screen -d -m -S "$(basename $SERVER_PATH)" -t "$SERVER_PATH" "$SERVER_PATH/bin/startup.sh" - - open_terminals $SERVER_PATH - - verify_server_startup $SERVER_PATH - - elif [ ! -z "$RUNNING_SERVER_PATH" ]; then - - screen -d -m -S "$(basename $RUNNING_SERVER_PATH)" -t "$RUNNING_SERVER_PATH" "$RUNNING_SERVER_PATH/bin/startup.sh" - - open_terminals $RUNNING_SERVER_PATH - - verify_server_startup $RUNNING_SERVER_PATH - - fi - - elif [ ! -z "$SERVER_PATH" ]; then - - screen -d -m -S "$(basename $SERVER_PATH)" -t "$SERVER_PATH" "$SERVER_PATH/bin/startup.sh" - - open_terminals $SERVER_PATH - - verify_server_startup $SERVER_PATH - - fi - - fi - - fi - -} - -cleanup() { - - if [ -d "$TMP_SERVER_DIR" ] || [ -d "$TMP_DATASET_DIR" ]; then - - echo_step "Clean up" - - if [ -d "$TMP_SERVER_DIR" ]; then - rm -rf $TMP_SERVER_DIR && echo_date "Deleted temporary server dir @ '$TMP_SERVER_DIR'" - fi - - if [ -d "$TMP_DATASET_DIR" ]; then - rm -rf $TMP_DATASET_DIR && echo_date "Deleted temporary dataset dir @ '$TMP_DATASET_DIR'" - fi - - fi - -} - -main() { - - echo_date "################################" - echo_date "Snow Owl install script STARTED." - - check_variables - - scan_archives - - find_running_snowowl_servers - - unzip_archives - - backup_and_shutdown - - set_server_variables - - setup_dataset - - start_server - - echo_date - echo_date "Snow Owl install script FINISHED." - - exit 0 - -} - -trap cleanup EXIT - -while getopts ":hblsftx:a:" opt; do - case "$opt" in - h) - usage - exit 0 - ;; - b) - CREATE_BACKUP=true - ;; - l) - LOAD_DATASET=true - ;; - s) - START_SERVER=true - ;; - f) - IGNORE_PROMPTS=true - ;; - t) - OPEN_TERMINAL=true - ;; - x) - MAX_JAVA_HEAP_SIZE=$OPTARG - ;; - a) - AUTH_TYPE=$OPTARG - ;; - \?) - echo "Invalid option: -$OPTARG" >&2 - exit 1 - ;; - :) - echo "Option -$OPTARG requires an argument." >&2 - exit 1 - ;; - esac -done - -shift "$(( OPTIND - 1 ))" - -if [ ! -z "$1" ] && [ ! -z "$2" ]; then - - FIRST_ARCHIVE=$1 - SECOND_ARCHIVE=$2 - -elif [ ! -z "$1" ] && [ -z "$2" ]; then - - FIRST_ARCHIVE=$1 - -elif [ -z "$1" ] && [ -z "$2"]; then - - echo_error "At least one parameter must be provided." - usage - exit 1 - -fi - -if [ ! -z "$3" ]; then - - echo_error "More than two parameters are not allowed." - usage - exit 1 - -fi - -main \ No newline at end of file diff --git a/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_cold_backup_mysql.sh b/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_cold_backup_mysql.sh deleted file mode 100644 index acacded991c..00000000000 --- a/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_cold_backup_mysql.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env bash - -# -# Copyright 2016-2017 B2i Healthcare Pte Ltd, http://b2i.sg -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This sample backup script for Snow Owl server creates a .zip file in the -# current directory with the saved contents of the MySQL databases and semantic -# indexes for each terminology, as well as supporting index content. -# -# The server should be stopped before running the script. -# -# The following variables should be set by editing this script before running it: - -# The location of the Snow Owl Server installation, eg. /opt/snowowl (no trailing slash) -SNOW_OWL_SERVER_HOME="" - -# The MySQL username used for creating the database dump -MYSQL_USERNAME="snowowl" - -# The password for the user given above -MYSQL_PASSWORD="snowowl" - -# The timestamp suffix for the top-level directory, eg. 20120904_1021 -CURRENT_DATE=`date +%Y%m%d_%H%M` - -# The starting directory -INITIAL_PWD="$PWD" - -# The working directory and the resulting archive file prefix -ARCHIVE_PREFIX="snowowl_$CURRENT_DATE" - -# The absolute path to the above -ABSOLUTE_ARCHIVE_PREFIX="$INITIAL_PWD/$ARCHIVE_PREFIX" - -# The list of known terminology stores to preserve -REPOSITORIES=( snomedStore ) - -# Prints a message to stdout with the current date and time. -echo_date() { - echo -e "[`date +\"%Y-%m-%d %H:%M:%S\"`] $@" -} - -# Prints an error message to stderr and exits the script with a non-zero status. -error_exit() { - echo -e "[`date +\"%Y-%m-%d %H:%M:%S\"`] $@" >&2 - exit 1 -} - -# Checks input arguments and test whether the script is ready to be executed. -check_arguments() { - if [ "x$SNOW_OWL_SERVER_HOME" = "x" ]; then - error_exit "Please set the variable SNOW_OWL_SERVER_HOME before running this script. Exiting with error." - fi - - if [ "x$MYSQL_USERNAME" = "x" ]; then - error_exit "Please set the variable MYSQL_USERNAME before running this script. Exiting with error." - fi - - if [ "x$MYSQL_PASSWORD" = "x" ]; then - error_exit "Please set the variable MYSQL_PASSWORD before running this script. Exiting with error." - fi - - if [ ! -d "$SNOW_OWL_SERVER_HOME/resources/indexes" ]; then - error_exit "No index directory could be found for the installation under '$SNOW_OWL_SERVER_HOME'. Exiting with error." - fi -} - -# Saves all index content to the destination archive. -backup_indexes() { - echo_date "Saving index content..." - - # Need to switch directories because of relative paths within the zip - cd "$SNOW_OWL_SERVER_HOME/resources" || error_exit "Couldn't switch to index directory '$SNOW_OWL_SERVER_HOME/resources'. Exiting with error." - rsync --verbose --recursive --dirs --exclude=segments.gen --exclude=write.lock "indexes" "$ABSOLUTE_ARCHIVE_PREFIX" || error_exit "Couldn't copy files from 'indexes'. Exiting with error." - - echo_date "Done saving index content." -} - -# Saves content from a single repository. -backup_repository() { - cd "$INITIAL_PWD" - DATABASE_DUMP_FILE="$REPOSITORY.sql" - - echo_date "Creating SQL dump from contents of repository $REPOSITORY to $DATABASE_DUMP_FILE..." - mysqldump --user="$MYSQL_USERNAME" --password="$MYSQL_PASSWORD" "$REPOSITORY" > "$ABSOLUTE_ARCHIVE_PREFIX/$DATABASE_DUMP_FILE" || error_exit "Couldn't create SQL dump for repository $REPOSITORY. Exiting with error." -} - -# Saves all terminology content in database dumps and moves them to the destination archive. -backup_repositories() { - echo_date "Backing up installed terminology repositories..." - - for REPOSITORY in "${REPOSITORIES[@]}"; do - backup_repository || break - done - - # Check if the loop above was left via a break - if [ $? -ne 0 ]; then exit 1; fi - - echo_date "Done backing up installed repositories." -} - -# Main script starts here. -main() { - echo_date "----------------------------" - check_arguments - - echo_date "Creating backup destination directory '$ABSOLUTE_ARCHIVE_PREFIX'." - mkdir -pv "$ABSOLUTE_ARCHIVE_PREFIX" || error_exit "Couldn't create directory '$ABSOLUTE_ARCHIVE_PREFIX'. Exiting with error." - - backup_repositories - backup_indexes - - echo_date "Creating archive..." - cd "$INITIAL_PWD" - zip --recurse-paths --move --test "$ARCHIVE_PREFIX.zip" "$ARCHIVE_PREFIX" || error_exit "Archive creation failed; the backup is incomplete. Exiting with error." - - echo_date "Finished successfully." - exit 0 -} - -# Ensures that only a single instance is running at any time -LOCKFILE="/var/run/snowowl-backup/instance.lock" - -( - flock -n 200 || error_exit "Another backup script is already running. Exiting with error." - trap "rm $LOCKFILE" EXIT - main -) 200> $LOCKFILE \ No newline at end of file diff --git a/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_create_db.sh b/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_create_db.sh deleted file mode 100644 index 8d3e5a33e2d..00000000000 --- a/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_create_db.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -# -# Copyright 2015-2017 B2i Healthcare Pte Ltd, http://b2i.sg -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# -# This script creates all required databases and user for Snow Owl Server US edition. -# - -DATABASES=( snomedStore ) - -MYSQL=`which mysql` -USER="root" -PASSWORD="root_pwd" - -echo -e "\nStarting Snow Owl database setup procedure." - -# Create user -${MYSQL} -u${USER} -p${PASSWORD} -e "CREATE USER 'snowowl'@'localhost' identified by 'snowowl';" > /dev/null 2>&1 -echo -e "\n\tCreated snowowl/mysql user." - -# Create databases -echo -e "\n\tCreating Snow Owl databases:" -for i in "${DATABASES[@]}" - do - ${MYSQL} -u${USER} -p${PASSWORD} -e "CREATE DATABASE \`${i}\` DEFAULT CHARSET 'utf8';" > /dev/null 2>&1 - echo -e "\t\tCreated Snow Owl database ${i}." - ${MYSQL} -u${USER} -p${PASSWORD} -e "GRANT ALL PRIVILEGES ON \`${i}\`.* to 'snowowl'@'localhost';" > /dev/null 2>&1 - echo -e "\t\tPrivileges granted on ${i} for snowowl user." - done -echo -e "\tCreation of Snow Owl databases are now complete." - -${MYSQL} -u${USER} -p${PASSWORD} -e "FLUSH PRIVILEGES;" > /dev/null 2>&1 -echo -e "\n\tGrant tables reloaded." - -echo -e "\nSnow Owl database setup procedure has finished.\n" \ No newline at end of file diff --git a/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_hot_backup_mysql.sh b/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_hot_backup_mysql.sh deleted file mode 100644 index a21b6c35a1f..00000000000 --- a/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_hot_backup_mysql.sh +++ /dev/null @@ -1,376 +0,0 @@ -#!/usr/bin/env bash - -# -# Copyright 2016-2017 B2i Healthcare Pte Ltd, http://b2i.sg -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This sample backup script for the Snow Owl server creates a .zip file in the -# current directory with the saved contents of the MySQL databases and semantic -# indexes for each terminology, as well as supporting index content, while the -# server is kept running. - -# The following variables should be set by editing this script before running it: - -# The location of the Snow Owl server installation, eg. /opt/snowowl (no trailing slash) -SNOW_OWL_SERVER_HOME="" - -# The username used for creating hot backups (should be a valid Snow Owl user) -SNOWOWL_USERNAME="user@localhost.localdomain" - -# The password for the user given above -SNOWOWL_PASSWORD="password123" - -# The MySQL username used for creating the database dump -MYSQL_USERNAME="snowowl" - -# The password for the user given above -MYSQL_PASSWORD="snowowl" - -# The timestamp suffix for the top-level directory, eg. 20120904_1021 -CURRENT_DATE=`date +%Y%m%d_%H%M` - -# The number of milliseconds to wait before giving up trying to lock the complete repository. -LOCK_TIMEOUT_MILLIS=30000 - -# The connection timeout for HTTP requests in seconds. -CONNECTION_TIMEOUT_SECONDS=5 - -# The initial waiting time after sending a message to connected users in minutes. -INITIAL_WAIT_MINUTES=5 - -# The number of retries the first lock is attempted. -RETRIES=5 - -# The waiting time after an unsuccessful lock attempt in minutes. -RETRY_WAIT_MINUTES=5 - -# The starting directory -INITIAL_PWD="$PWD" - -# The working directory and the resulting archive file prefix -ARCHIVE_PREFIX="snowowl_$CURRENT_DATE" - -# The absolute path to the above -ABSOLUTE_ARCHIVE_PREFIX="$INITIAL_PWD/$ARCHIVE_PREFIX" - -# The base URL of the REST services to use -BASE_URL="http://localhost:8080/snowowl" - -# The base URL for administrative services -ADMIN_BASE_URL="$BASE_URL/admin" - -# Use archive structure without container folder -USE_ROOT_ARCHIVE_STRUCTURE=false - -usage() { - -cat << EOF - -NAME: - Snow Owl hot backup script - -DESCRIPTION: - This sample backup script for the Snow Owl server creates a .zip file in the - current directory with the saved contents of the MySQL databases and semantic - indexes for each terminology, as well as supporting index content, while the - server is kept running. - -USAGE: $0 [OPTIONS] [PATH_TO_SERVER] - - [PATH_TO_SERVER] specifing the server's home dir through a parameter will - always overwrite the stored values. If the path never - changes it is not mandatory to pass it in as a parameter, - more useful to store it in the script. - -OPTIONS: - - -r do not use container dir inside the resulting archive - - -i no initial wait time will be applied for the users, backup - starts immediately - - -h display help - -EXAMPLES: - - If all user credentials are stored in the script but server home was not - specified: - - $0 /path/to/server - - If server location and all user credentials are stored in the script but - the resulting archive must contain all files in it's root: - - $0 -r - - If all user credentials are specified, server home dir is provided through - a parameter and initial wait time can be ignored: - - $0 -i /path/to/server - -EOF - -} - -# Prints a message to stdout with the current date and time. -echo_date() { - echo -e "[`date +\"%Y-%m-%d %H:%M:%S\"`] $@" -} - -# Prints an error message to stderr and exits the script with a non-zero status. -error_exit() { - echo -e "[`date +\"%Y-%m-%d %H:%M:%S\"`] $@" >&2 - exit 1 -} - -# Invokes curl to make an HTTP request to the server; stores returned message and HTTP status code in output variables. -rest_call() { - CURL_OUTPUT=`curl -q --fail --silent --show-error --connect-timeout "$CONNECTION_TIMEOUT_SECONDS" --user "$SNOWOWL_USERNAME:$SNOWOWL_PASSWORD" --write-out "\n%{http_code}" "$@"` - CURL_MESSAGE=`echo "$CURL_OUTPUT" | head -n-1` - CURL_HTTP_STATUS=`echo "$CURL_OUTPUT" | tail -n1` -} - -# Tries to acquire a global lock that prevents writing to any of the terminology stores on any available branch. -lock_all_repositories() { - echo_date "Locking repositories..." - rest_call --data-urlencode "timeoutMillis=$LOCK_TIMEOUT_MILLIS" "$ADMIN_BASE_URL/repositories/lock" -} - -# Removes the lock from all repositories. -unlock_all_repositories() { - echo_date "Unlocking repositories..." - rest_call --data-urlencode "" "$ADMIN_BASE_URL/repositories/unlock" -} - -# Cleans up the global repository lock and exits with an error. -unlock_all_repositories_and_exit() { - unlock_all_repositories - error_exit "$1" -} - -# Locks the specified repository, preventing write access to all of its branches. -lock_repository() { - echo_date "Locking repository $REPOSITORY..." - rest_call --data-urlencode "" "$ADMIN_BASE_URL/repositories/$REPOSITORY/lock" - - if [ "$CURL_HTTP_STATUS" -ne "204" ]; then - unlock_all_repositories_and_exit "Couldn't lock repository $REPOSITORY. Exiting with error." - fi -} - -# Unlocks the specified repository if it was already locked. -unlock_repository() { - echo_date "Unlocking repository $REPOSITORY..." - rest_call --data-urlencode "" "$ADMIN_BASE_URL/repositories/$REPOSITORY/unlock" -} - -# Unlocks the specified repository, cleans up the global repository lock and exits with an error. -unlock_repository_and_exit() { - unlock_repository - unlock_all_repositories_and_exit "$1" -} - -# Copies the contents of the specified repository to the zip file. -backup_mysql() { - echo_date "Backing up MySQL content for database $REPOSITORY..." - - DATABASE_DUMP_FILE="$REPOSITORY.sql" - mysqldump --user="$MYSQL_USERNAME" --password="$MYSQL_PASSWORD" "$REPOSITORY" > "$ABSOLUTE_ARCHIVE_PREFIX/$DATABASE_DUMP_FILE" || unlock_repository_and_exit "Couldn't create SQL dump for repository $REPOSITORY. Exiting with error." - - echo_date "Done backing up MySQL database $REPOSITORY." -} - -backup_resources() { - echo_date "Backing up resources directory (indexes, attachments, etc)..." - rsync --verbose --recursive --dirs --exclude=segments.gen --exclude=write.lock "resources/" "$ABSOLUTE_ARCHIVE_PREFIX" - echo_date "Done backing up resources directory (indexes, attachments, etc)." -} - -# Retrieves the list of terminology repositories and backs them up one by one. -backup_repositories() { - echo_date "Backing up installed terminology repositories..." - rest_call "$ADMIN_BASE_URL/repositories" - - if [ "$CURL_HTTP_STATUS" -ne "200" ]; then - unlock_all_repositories_and_exit "Failed to retrieve list of repositories. Exiting with error." - fi - - echo "$CURL_MESSAGE" | grep -Po '"id":.*?[^\\]",' | sed 's/\"id\":\"\(.*\)\",/\1/' | while read -r REPOSITORY - do - backup_mysql || break - done - - backup_resources - - # Check if the loop above was left via a break - if [ $? -ne 0 ]; then exit 1; fi - - echo_date "Done backing up installed repositories." -} - -# Sends a message to connected users. -send_message() { - rest_call -H "Content-Type:text/plain" --data "$1" "$ADMIN_BASE_URL/messages/send" -} - -# Checks input arguments and test whether the script is ready to be executed. -check_arguments() { - if [ "x$SNOW_OWL_SERVER_HOME" = "x" ]; then - error_exit "Please set the variable SNOW_OWL_SERVER_HOME or pass it in as an argument before running this script. Exiting with error." - fi - - if [ ! -d "$SNOW_OWL_SERVER_HOME/resources" ]; then - error_exit "No resources directory could be found for the installation under '$SNOW_OWL_SERVER_HOME'. Exiting with error." - fi - - if [ "x$SNOWOWL_USERNAME" = "x" ]; then - error_exit "Please set the variable SNOWOWL_USERNAME before running this script. Exiting with error." - fi - - if [ "x$SNOWOWL_PASSWORD" = "x" ]; then - error_exit "Please set the variable SNOWOWL_PASSWORD before running this script. Exiting with error." - fi - - if [ "x$MYSQL_USERNAME" = "x" ]; then - error_exit "Please set the variable MYSQL_USERNAME before running this script. Exiting with error." - fi - - if [ "x$MYSQL_PASSWORD" = "x" ]; then - error_exit "Please set the variable MYSQL_PASSWORD before running this script. Exiting with error." - fi -} - -# Main script starts here. -main() { - - echo_date "----------------------------" - check_arguments - - echo_date "Create backup destination directory '$ABSOLUTE_ARCHIVE_PREFIX'." - - # Creates both $ABSOLUTE_ARCHIVE_PREFIX and $ABSOLUTE_ARCHIVE_PREFIX/resources - mkdir --parents --verbose "$ABSOLUTE_ARCHIVE_PREFIX/resources" || error_exit "Couldn't create directory '$ABSOLUTE_ARCHIVE_PREFIX'. Exiting with error." - - echo_date "Starting backup; sending message to connected users." - - if [ $INITIAL_WAIT_MINUTES -eq 0 ]; then - send_message "Write access to repositories is disabled while the system creates a backup." - else - send_message "Write access to repositories will be disabled while the system creates a backup in $INITIAL_WAIT_MINUTES minutes." - fi - - if [ "$CURL_HTTP_STATUS" = "000" ]; then - error_exit "Couldn't send message to users; the server is not running. Exiting with error." - fi - - if [ $INITIAL_WAIT_MINUTES -ne 0 ]; then - echo_date "Waiting $INITIAL_WAIT_MINUTES minutes for users to finish..." - sleep "$INITIAL_WAIT_MINUTES"m - fi - - for i in $(seq 1 "$RETRIES"); do - lock_all_repositories - - if [ "$CURL_HTTP_STATUS" -ne "204" ]; then - echo_date "Couldn't lock repositories, waiting $RETRY_WAIT_MINUTES minutes to retry ($i)..." - sleep "$RETRY_WAIT_MINUTES"m - else - break - fi - done - - if [ "$CURL_HTTP_STATUS" -ne "204" ]; then - error_exit "Couldn't lock repositories after $RETRIES attempts. Exiting with error." - fi - - # Need to switch directories because of relative paths within the zip - cd "$SNOW_OWL_SERVER_HOME" || error_exit "Couldn't switch to index directory '$SNOW_OWL_SERVER_HOME'. Exiting with error." - - backup_repositories - unlock_all_repositories - - echo_date "Notifying users that write access has been restored." - send_message "Write access to repositories restored." - - echo_date "Creating archive..." - - # Set access permissions for files - cd "$ABSOLUTE_ARCHIVE_PREFIX" - find . -type f -exec chmod +x '{}' \; - - if [ "$USE_ROOT_ARCHIVE_STRUCTURE" = true ]; then - zip --recurse-paths --move --test "$ABSOLUTE_ARCHIVE_PREFIX.zip" * || error_exit "Archive creation failed; the backup is incomplete. Exiting with error." - rm --recursive --force "$ABSOLUTE_ARCHIVE_PREFIX" - else - # Return to the initial directory - cd "$INITIAL_PWD" - zip --recurse-paths --move --test "$ARCHIVE_PREFIX.zip" "$ARCHIVE_PREFIX" || error_exit "Archive creation failed; the backup is incomplete. Exiting with error." - fi - - echo_date "Hot backup script finished successfully." - exit 0 -} - -while getopts ":hri" opt; do - case "$opt" in - h) - usage - exit 0 - ;; - r) - USE_ROOT_ARCHIVE_STRUCTURE=true - ;; - i) - INITIAL_WAIT_MINUTES=0 - ;; - \?) - echo "Invalid option: -$OPTARG" >&2 - exit 1 - ;; - :) - echo "Option -$OPTARG requires an argument." >&2 - exit 1 - ;; - esac -done - -shift "$((OPTIND - 1))" - -if [ ! -z "$1" ]; then - - if [ -d "$1" ]; then - SNOW_OWL_SERVER_HOME=$(echo ${1%/}) - else - echo_date "Invalid parameter, using stored values." - fi - -fi - -if [ ! -z "$2" ]; then - - echo_error "More than one parameter is not allowed." - usage - exit 1 - -fi - -# Ensures that only a single instance is running at any time -LOCKFILE="/var/run/snowowl-backup/instance.lock" - -( - flock -n 200 || error_exit "Another backup script is already running. Exiting with error." - trap "rm $LOCKFILE" EXIT - main -) 200> $LOCKFILE diff --git a/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_load_db.sh b/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_load_db.sh deleted file mode 100644 index d232d9a29d3..00000000000 --- a/releng/com.b2international.snowowl.server.update/assembly/common/scripts/snowowl_load_db.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash - -# -# Copyright 2013-2017 B2i Healthcare Pte Ltd, http://b2i.sg -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Loads database content for Snow Owl from SQL dumps. Uses the name of the SQL -# file(s) specified as the target database for each file. -# -# Usage: ./snowowl_load_db [dbfile1] [dbfile2] ... - -if [[ $# -eq 0 ]]; then - echo "No SQL files were specified for loading. Exiting." - exit 1 -fi - -MYSQL=$(which mysql) -BASENAME=$(which basename) -USER="snowowl" -PASSWORD="snowowl_pwd" - -for DBFILE in "$@" -do - DB="$(${BASENAME} "$DBFILE")" - ${MYSQL} --batch -u${USER} -p${PASSWORD} "${DB%.sql}" < "${DBFILE}" - - if [ $? -ne 0 ]; then - echo "Loading from file ${DB} failed." - else - echo "Loading from file ${DB} finished successfully." - fi -done - -echo "All files processed." -exit 0 diff --git a/releng/com.b2international.snowowl.server.update/category.xml b/releng/com.b2international.snowowl.server.update/category.xml index 6acec323a97..97c49e67f2f 100644 --- a/releng/com.b2international.snowowl.server.update/category.xml +++ b/releng/com.b2international.snowowl.server.update/category.xml @@ -1,27 +1,27 @@ - + - + - + - + - + - + - + - + diff --git a/releng/com.b2international.snowowl.server.update/pom.xml b/releng/com.b2international.snowowl.server.update/pom.xml index 9b21c4f1087..88e3a442918 100644 --- a/releng/com.b2international.snowowl.server.update/pom.xml +++ b/releng/com.b2international.snowowl.server.update/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl releng-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/releng/com.b2international.snowowl.server.update/snow-owl-oss.product b/releng/com.b2international.snowowl.server.update/snow-owl-oss.product index 668811f9f49..e68225724a1 100644 --- a/releng/com.b2international.snowowl.server.update/snow-owl-oss.product +++ b/releng/com.b2international.snowowl.server.update/snow-owl-oss.product @@ -1,7 +1,7 @@ - + diff --git a/releng/pom.xml b/releng/pom.xml index e609d301967..862a9a61ce4 100644 --- a/releng/pom.xml +++ b/releng/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl snowowl-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/releng/target-platform/pom.xml b/releng/target-platform/pom.xml index a42f70aee0a..1dba14507ad 100644 --- a/releng/target-platform/pom.xml +++ b/releng/target-platform/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl releng-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT target-platform diff --git a/snomed/com.b2international.snowowl.snomed.common/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.common/META-INF/MANIFEST.MF index 60fe46c2c84..e5eead6559d 100644 --- a/snomed/com.b2international.snowowl.snomed.common/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.common/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Commons Bundle-SymbolicName: com.b2international.snowowl.snomed.common -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Export-Package: com.b2international.snowowl.snomed.common diff --git a/snomed/com.b2international.snowowl.snomed.common/pom.xml b/snomed/com.b2international.snowowl.snomed.common/pom.xml index 7c5e5d01d42..87de65f595d 100644 --- a/snomed/com.b2international.snowowl.snomed.common/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.common/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.common eclipse-plugin diff --git a/snomed/com.b2international.snowowl.snomed.core.feature/feature.xml b/snomed/com.b2international.snowowl.snomed.core.feature/feature.xml index a034a036837..740fc2fcee6 100644 --- a/snomed/com.b2international.snowowl.snomed.core.feature/feature.xml +++ b/snomed/com.b2international.snowowl.snomed.core.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/snomed/com.b2international.snowowl.snomed.core.feature/pom.xml b/snomed/com.b2international.snowowl.snomed.core.feature/pom.xml index 79e4b1c9a27..a814c1edc4d 100644 --- a/snomed/com.b2international.snowowl.snomed.core.feature/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.core.feature/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.core.feature eclipse-feature diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.feature/feature.xml b/snomed/com.b2international.snowowl.snomed.core.rest.feature/feature.xml index fb04555a59f..74eded432c5 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.feature/feature.xml +++ b/snomed/com.b2international.snowowl.snomed.core.rest.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.feature/pom.xml b/snomed/com.b2international.snowowl.snomed.core.rest.feature/pom.xml index b469dde0a8a..b859212ff85 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.feature/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.core.rest.feature/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.core.rest.feature eclipse-feature diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.core.rest.tests/META-INF/MANIFEST.MF index 4bea1ec5c7c..dad020f26c2 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT REST API Tests Bundle-SymbolicName: com.b2international.snowowl.snomed.core.rest.tests -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/pom.xml b/snomed/com.b2international.snowowl.snomed.core.rest.tests/pom.xml index e4f01fac8aa..b285a466d62 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT @@ -25,16 +25,6 @@ org.eclipse.jetty.osgi.boot 0.0.0 - - eclipse-plugin - ch.qos.logback.classic - ${logback.versionRange} - - - eclipse-plugin - ch.qos.logback.core - ${logback.versionRange} - eclipse-plugin com.b2international.snowowl.identity.file @@ -45,11 +35,6 @@ com.b2international.collections.fastutil 0.0.0 - - eclipse-plugin - com.sun.el - 0.0.0 - eclipse-plugin org.semanticweb.elk diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/issue/EclSerializerTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/issue/EclSerializerTest.java index 2467c0296e3..63e681b553f 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/issue/EclSerializerTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/issue/EclSerializerTest.java @@ -19,6 +19,7 @@ import static org.junit.Assert.assertNull; import java.util.List; +import java.util.concurrent.TimeUnit; import org.junit.Test; @@ -62,7 +63,7 @@ public void verify() throws Exception { ? throwable.getMessage() : Throwables.getRootCause(throwable).getClass().getSimpleName(); }) - .getSync(); + .getSync(1, TimeUnit.MINUTES); assertNull(error, error); } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedClassificationRestRequests.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedClassificationRestRequests.java index 2f545644363..bf9c3fca3d6 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedClassificationRestRequests.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedClassificationRestRequests.java @@ -24,6 +24,7 @@ import java.util.Set; import com.b2international.snowowl.core.api.IBranchPath; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration; import com.b2international.snowowl.snomed.reasoner.domain.ClassificationStatus; import com.google.common.collect.ImmutableMap; @@ -90,7 +91,11 @@ public static ValidatableResponse waitForClassificationJob(IBranchPath branchPat } public static ValidatableResponse beginClassificationSave(IBranchPath branchPath, String classificationId) { - Map requestBody = ImmutableMap.of("status", ClassificationStatus.SAVED.toString()); + Map requestBody = ImmutableMap.of( + "status", ClassificationStatus.SAVED.toString(), + "module", Concepts.MODULE_SCT_CORE, + "namespace", "" + ); return givenAuthenticatedRequest(SnomedApiTestConstants.SCT_API) .contentType(ContentType.JSON) diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetDeletionPerformanceTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetDeletionPerformanceTest.java index aecb8a61735..464b5ad289f 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetDeletionPerformanceTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetDeletionPerformanceTest.java @@ -21,6 +21,7 @@ import java.util.Iterator; import java.util.Set; import java.util.UUID; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import org.databene.contiperf.PerfTest; @@ -134,7 +135,7 @@ private Set generateConceptIds(int quantity) { .setQuantity(quantity) .buildAsync() .execute(getBus()) - .getSync() + .getSync(1, TimeUnit.MINUTES) .stream() .map(SctId::getSctid) .collect(Collectors.toSet()); diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedConceptApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedConceptApiTest.java index de733ad2017..5e469a9aa82 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedConceptApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/components/SnomedConceptApiTest.java @@ -225,12 +225,31 @@ public void createLongIsACycle() throws Exception { } @Test - public void testConceptInactivation() throws Exception { + public void inactivatePrimitiveConcept() throws Exception { String conceptId = createNewConcept(branchPath); inactivateConcept(branchPath, conceptId); getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId).statusCode(200) .body("active", equalTo(false)) + .body("definitionStatusId", equalTo(Concepts.PRIMITIVE)) + .body("parentIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))) + .body("ancestorIds", equalTo(ImmutableList.of())) + .body("statedParentIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))) + .body("statedAncestorIds", equalTo(ImmutableList.of())); + } + + @Test + public void inactivateFullyDefinedConcept() throws Exception { + Map conceptRequestBody = createConceptRequestBody(Concepts.ROOT_CONCEPT) + .put("definitionStatusId", Concepts.FULLY_DEFINED) + .put("commitComment", "Created new concept") + .build(); + String conceptId = createNewConcept(branchPath, conceptRequestBody); + + inactivateConcept(branchPath, conceptId); + getComponent(branchPath, SnomedComponentType.CONCEPT, conceptId).statusCode(200) + .body("active", equalTo(false)) + .body("definitionStatusId", equalTo(Concepts.PRIMITIVE)) .body("parentIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))) .body("ancestorIds", equalTo(ImmutableList.of())) .body("statedParentIds", equalTo(ImmutableList.of(IComponent.ROOT_ID))) diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedExportApiTest.java b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedExportApiTest.java index d37e25be8d7..a367119a454 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedExportApiTest.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/com/b2international/snowowl/snomed/core/rest/io/SnomedExportApiTest.java @@ -58,6 +58,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; import java.util.Set; import org.junit.Ignore; @@ -87,7 +88,6 @@ import com.b2international.snowowl.snomed.core.rest.SnomedComponentType; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; -import com.google.common.base.Function; import com.google.common.base.Joiner; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ImmutableList; @@ -315,46 +315,37 @@ public void executeMultipleExportsAtTheSameTime() throws Exception { .execute(getBus()); String message = Promise.all(first, second) - .then(new Function, String>() { - @Override - public String apply(List input) { - - ExportResult firstResult = (ExportResult) input.get(0); - ExportResult secondResult = (ExportResult) input.get(1); - - InternalAttachmentRegistry fileRegistry = (InternalAttachmentRegistry) ApplicationContext.getServiceForClass(AttachmentRegistry.class); - - File firstArchive = fileRegistry.getAttachment(firstResult.getRegistryId()); - File secondArchive = fileRegistry.getAttachment(secondResult.getRegistryId()); - - final Map firstArchiveMap = ImmutableMap.builder() - .put("sct2_Concept_Full", true) - .build(); - - final Map secondArchiveMap = ImmutableMap.builder() - .put("sct2_Concept_Snapshot", true) - .build(); - - try { - assertArchiveContainsFiles(firstArchive, firstArchiveMap); - assertArchiveContainsFiles(secondArchive, secondArchiveMap); - } catch (Exception e) { - return e.getMessage(); - } - - fileRegistry.delete(firstResult.getRegistryId()); - fileRegistry.delete(secondResult.getRegistryId()); - - return null; - } - }) - .fail(new Function() { - @Override - public String apply(Throwable input) { - return input.getMessage(); + .then(input -> { + ExportResult firstResult = (ExportResult) input.get(0); + ExportResult secondResult = (ExportResult) input.get(1); + + InternalAttachmentRegistry fileRegistry = (InternalAttachmentRegistry) ApplicationContext.getServiceForClass(AttachmentRegistry.class); + + File firstArchive = fileRegistry.getAttachment(firstResult.getRegistryId()); + File secondArchive = fileRegistry.getAttachment(secondResult.getRegistryId()); + + final Map firstArchiveMap = ImmutableMap.builder() + .put("sct2_Concept_Full", true) + .build(); + + final Map secondArchiveMap = ImmutableMap.builder() + .put("sct2_Concept_Snapshot", true) + .build(); + + try { + assertArchiveContainsFiles(firstArchive, firstArchiveMap); + assertArchiveContainsFiles(secondArchive, secondArchiveMap); + } catch (Exception e) { + return e.getMessage(); } + + fileRegistry.delete(firstResult.getRegistryId()); + fileRegistry.delete(secondResult.getRegistryId()); + + return null; }) - .getSync(); + .fail(input -> input.getMessage()) + .getSync(2, TimeUnit.MINUTES); assertNull(message, message); } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/configuration/snowowl.yml b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/configuration/snowowl.yml index 5eabf202be4..c16a847c77a 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/configuration/snowowl.yml +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/configuration/snowowl.yml @@ -42,7 +42,6 @@ monitoring: repository: deploymentId: api-test - index: socketTimeout: 60000 diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.core.rest/META-INF/MANIFEST.MF index a695bd0b90d..259f996b20d 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.core.rest/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT REST Services Bundle-SymbolicName: com.b2international.snowowl.snomed.core.rest;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.core.rest Automatic-Module-Name: com.b2international.snowowl.rest.snomed diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/pom.xml b/snomed/com.b2international.snowowl.snomed.core.rest/pom.xml index 1a02412afc8..ef5cc5de2b9 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.core.rest/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.core.rest diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedClassificationRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedClassificationRestService.java index 39dd9c3953e..7d2643e6a1f 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedClassificationRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedClassificationRestService.java @@ -17,6 +17,7 @@ import java.net.URI; import java.util.List; +import java.util.concurrent.TimeUnit; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -30,7 +31,7 @@ import com.b2international.snowowl.core.events.util.Promise; import com.b2international.snowowl.core.rest.AbstractRestService; import com.b2international.snowowl.core.rest.RestApiError; -import com.b2international.snowowl.snomed.core.rest.domain.ClassificationRestInput; +import com.b2international.snowowl.snomed.core.rest.domain.ClassificationRunRestInput; import com.b2international.snowowl.snomed.core.rest.domain.ClassificationRunRestUpdate; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; import com.b2international.snowowl.snomed.reasoner.domain.ClassificationStatus; @@ -119,7 +120,7 @@ public SnomedClassificationRestService() { public Promise> beginClassification( @ApiParam(value ="Classification parameters") @RequestBody - final ClassificationRestInput request, + final ClassificationRunRestInput request, @RequestHeader(value = X_AUTHOR, required = false) final String author) { @@ -343,19 +344,24 @@ public void updateClassificationRun( @ApiParam(value = "The updated classification parameters") @RequestBody - final ClassificationRunRestUpdate updatedRun, + final ClassificationRunRestUpdate update, @RequestHeader(value = X_AUTHOR, required = false) final String author) { + ApiValidation.checkInput(update); + // TODO: compare all fields to find out what the client wants us to do, check for conflicts, etc. - if (ClassificationStatus.SAVED.equals(updatedRun.getStatus())) { + if (ClassificationStatus.SAVED.equals(update.getStatus())) { ClassificationRequests.prepareSaveClassification() .setClassificationId(classificationId) + .setAssignerType(update.getAssigner()) + .setModuleId(update.getModule()) + .setNamespace(update.getNamespace()) .setUserId(author) .build(SnomedDatastoreActivator.REPOSITORY_UUID) .execute(getBus()) - .getSync(); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } } @@ -377,7 +383,7 @@ public void deleteClassificationRun( ClassificationRequests.prepareDeleteClassification(classificationId) .build(SnomedDatastoreActivator.REPOSITORY_UUID) .execute(getBus()) - .getSync(); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedConceptRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedConceptRestService.java index 4e454258670..b4f864e3655 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedConceptRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedConceptRestService.java @@ -238,7 +238,7 @@ public ResponseEntity create( final String createdConceptId = change.toRequestBuilder() .build(repositoryId, branchPath, author, commitComment, defaultModuleId) .execute(getBus()) - .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS) + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES) .getResultAs(String.class); @@ -289,7 +289,7 @@ public void update( change.toRequestBuilder(conceptId) .build(repositoryId, branchPath, author, commitComment, defaultModuleId) .execute(getBus()) - .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } @ApiOperation( @@ -328,7 +328,7 @@ public void delete( .force(force) .build(repositoryId, branchPath, author, String.format("Deleted Concept '%s' from store.", conceptId)) .execute(getBus()) - .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } @Override @@ -345,7 +345,7 @@ private Sort toTermSort(String field, boolean ascending, String branchPath, List .setFields(SnomedConcept.Fields.ID) .build(repositoryId, branchPath) .execute(getBus()) - .getSync() + .getSync(1, TimeUnit.MINUTES) .getItems() .stream() .map(IComponent::getId) diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedDescriptionRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedDescriptionRestService.java index 641d72fe1ae..53f0d503ede 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedDescriptionRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedDescriptionRestService.java @@ -191,7 +191,7 @@ public ResponseEntity create( final String createdDescriptionId = change.toRequestBuilder() .build(repositoryId, branchPath, author, commitComment, defaultModuleId) .execute(getBus()) - .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS) + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES) .getResultAs(String.class); return ResponseEntity.created(getResourceLocationURI(branchPath, createdDescriptionId)).build(); @@ -257,7 +257,7 @@ public void update( .toRequestBuilder(descriptionId) .build(repositoryId, branchPath, author, commitComment, defaultModuleId) .execute(getBus()) - .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } @@ -294,7 +294,7 @@ public void delete( .force(force) .build(repositoryId, branchPath, author, String.format("Deleted Description '%s' from store.", descriptionId)) .execute(getBus()) - .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedExportRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedExportRestService.java index c033c6bd30c..4e4df1fbc5a 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedExportRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedExportRestService.java @@ -23,6 +23,7 @@ import java.util.Date; import java.util.UUID; import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.TimeUnit; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -137,7 +138,8 @@ private void validateCodeSystemShortName(SnomedExportRestConfiguration configura .filterById(configuration.getCodeSystemShortName()) .build(SnomedDatastoreActivator.REPOSITORY_UUID) .execute(getBus()) - .getSync().getTotal(); + .getSync(1, TimeUnit.MINUTES) + .getTotal(); if (hitSize == 0) { throw new BadRequestException("Unknown code system with short name: %s", configuration.getCodeSystemShortName()); @@ -310,7 +312,7 @@ private String getEffectiveBranchMetadataValue(Branch branch, String metadataKey .prepareGet(branch.parentPath()) .build(SnomedDatastoreActivator.REPOSITORY_UUID) .execute(ApplicationContext.getServiceForClass(IEventBus.class)) - .getSync(); + .getSync(1, TimeUnit.MINUTES); return getEffectiveBranchMetadataValue(parent, metadataKey); } } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetMemberRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetMemberRestService.java index b0debc63172..196c11e9306 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetMemberRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetMemberRestService.java @@ -202,7 +202,7 @@ public ResponseEntity create( final String createdRefSetMemberId = change.toRequestBuilder() .build(repositoryId, branchPath, author, commitComment, defaultModuleId) .execute(getBus()) - .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS) + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES) .getResultAs(String.class); return ResponseEntity.created(getResourceLocationURI(branchPath, createdRefSetMemberId)).build(); @@ -240,7 +240,7 @@ public void delete( .force(force) .build(repositoryId, branchPath, author, String.format("Deleted reference set member '%s' from store.", memberId)) .execute(getBus()) - .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } @ApiOperation( @@ -287,7 +287,7 @@ public void update( .force(force) .build(repositoryId, branchPath, author, commitComment, defaultModuleId) .execute(getBus()) - .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } @ApiOperation( diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetRestService.java index 98707680807..7bb5211156c 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedReferenceSetRestService.java @@ -98,6 +98,7 @@ public SnomedReferenceSetRestService() { List sorts = extractSortFields(params.getSort(), branch, extendedLocales); return SnomedRequests.prepareSearchRefSet() + .filterByIds(params.getId()) .filterByTypes(getRefSetTypes(params.getRefSetTypes())) .setLimit(params.getLimit()) .setSearchAfter(params.getSearchAfter()) @@ -231,7 +232,7 @@ public ResponseEntity create( final String createdRefSetId = change.toRequestBuilder() .build(repositoryId, branchPath, author, commitComment, defaultModuleId) .execute(getBus()) - .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS) + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES) .getResultAs(String.class); return ResponseEntity.created(getResourceLocationURI(branchPath, createdRefSetId)).build(); @@ -281,7 +282,7 @@ public void executeAction( .setAuthor(author) .build(repositoryId, branchPath) .execute(getBus()) - .getSync(); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } @ApiOperation( @@ -333,7 +334,7 @@ public void updateMembers( .setCommitComment(commitComment) .build(repositoryId, branchPath) .execute(getBus()) - .getSync(); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } @ApiOperation( @@ -365,7 +366,7 @@ public void delete( SnomedRequests.prepareDeleteReferenceSet(referenceSetId, force) .build(repositoryId, branchPath, author, String.format("Deleted Reference Set '%s' from store.", referenceSetId)) .execute(getBus()) - .getSync(); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRelationshipRestService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRelationshipRestService.java index 4033792abdf..c2ddbd68c01 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRelationshipRestService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/SnomedRelationshipRestService.java @@ -158,7 +158,7 @@ public ResponseEntity create( final String createdRelationshipId = change.toRequestBuilder() .build(repositoryId, branchPath, author, commitComment, defaultModuleId) .execute(getBus()) - .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS) + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES) .getResultAs(String.class); return ResponseEntity.created(getResourceLocationURI(branchPath, createdRelationshipId)).build(); @@ -229,7 +229,7 @@ public void update( .setDestinationId(update.getDestinationId()) .build(repositoryId, branchPath, author, commitComment, defaultModuleId) .execute(getBus()) - .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } @ApiOperation( @@ -268,7 +268,7 @@ public void delete( .force(force) .build(repositoryId, branchPath, author, String.format("Deleted Relationship '%s' from store.", relationshipId)) .execute(getBus()) - .getSync(COMMIT_TIMEOUT, TimeUnit.MILLISECONDS); + .getSync(COMMIT_TIMEOUT, TimeUnit.MINUTES); } } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ClassificationRestInput.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ClassificationRunRestInput.java similarity index 92% rename from snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ClassificationRestInput.java rename to snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ClassificationRunRestInput.java index 4e5159dda67..31190896ddf 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ClassificationRestInput.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ClassificationRunRestInput.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ /** * @since 4.0 */ -public class ClassificationRestInput { +public class ClassificationRunRestInput { @NotEmpty private String reasonerId; @@ -35,7 +35,7 @@ public String getReasonerId() { public void setReasonerId(final String reasonerId) { this.reasonerId = reasonerId; } - + public String getBranch() { return branch; } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ClassificationRunRestUpdate.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ClassificationRunRestUpdate.java index 849fcecf616..eed8e386853 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ClassificationRunRestUpdate.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/ClassificationRunRestUpdate.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,14 +15,43 @@ */ package com.b2international.snowowl.snomed.core.rest.domain; +import javax.validation.constraints.NotNull; + +import org.hibernate.validator.constraints.NotEmpty; + import com.b2international.snowowl.snomed.reasoner.domain.ClassificationStatus; /** */ public class ClassificationRunRestUpdate { + @NotNull private ClassificationStatus status; + @NotEmpty + private String module; + + @NotNull + private String namespace; + + private String assigner; + + public String getModule() { + return module; + } + + public void setModule(String module) { + this.module = module; + } + + public String getNamespace() { + return namespace; + } + + public void setNamespace(String namespace) { + this.namespace = namespace; + } + public ClassificationStatus getStatus() { return status; } @@ -31,12 +60,16 @@ public void setStatus(final ClassificationStatus status) { this.status = status; } + public String getAssigner() { + return assigner; + } + + public void setAssigner(String assigner) { + this.assigner = assigner; + } + @Override public String toString() { - final StringBuilder builder = new StringBuilder(); - builder.append("ClassificationRestRun [status="); - builder.append(status); - builder.append("]"); - return builder.toString(); + return "ClassificationRunRestUpdate [status=" + status + ", module=" + module + ", namespace=" + namespace + ", assigner=" + assigner + "]"; } } diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptRestInput.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptRestInput.java index 9adf20ac19d..3e7c06ae485 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptRestInput.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/domain/SnomedConceptRestInput.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ import java.util.Collections; import java.util.List; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.datastore.request.SnomedConceptCreateRequestBuilder; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; @@ -26,10 +27,15 @@ */ public class SnomedConceptRestInput extends AbstractSnomedComponentRestInput { + private String definitionStatusId = Concepts.PRIMITIVE; private List descriptions = Collections.emptyList(); private List relationships = Collections.emptyList(); private List members = Collections.emptyList(); + public String getDefinitionStatusId() { + return definitionStatusId; + } + public List getDescriptions() { return descriptions; } @@ -42,6 +48,10 @@ public List getMembers() { return members; } + public void setDefinitionStatusId(String definitionStatusId) { + this.definitionStatusId = definitionStatusId; + } + public void setDescriptions(List descriptions) { this.descriptions = descriptions; } @@ -56,7 +66,8 @@ public void setMembers(List members) { @Override protected SnomedConceptCreateRequestBuilder createRequestBuilder() { - return SnomedRequests.prepareNewConcept(); + return SnomedRequests.prepareNewConcept() + .setDefinitionStatusId(getDefinitionStatusId()); } @Override diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/DescriptionService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/DescriptionService.java deleted file mode 100644 index d4f079dc31b..00000000000 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/DescriptionService.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.rest.services; - -import com.b2international.snowowl.eventbus.IEventBus; -import com.b2international.snowowl.snomed.core.domain.SnomedDescriptions; -import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; -import com.b2international.snowowl.snomed.datastore.request.DescriptionRequestHelper; -import com.b2international.snowowl.snomed.datastore.request.SnomedDescriptionSearchRequestBuilder; - -/** - * @since 4.5 - */ -public class DescriptionService extends DescriptionRequestHelper { - - private final IEventBus bus; - private final String branch; - - public DescriptionService(IEventBus bus, String branch) { - this.bus = bus; - this.branch = branch; - } - - @Override - protected SnomedDescriptions execute(SnomedDescriptionSearchRequestBuilder req) { - return req.build(SnomedDatastoreActivator.REPOSITORY_UUID, branch).execute(bus).getSync(); - } - -} diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/FsnJoinerOperation.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/FsnJoinerOperation.java index 8fc24f749f8..e69de29bb2d 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/FsnJoinerOperation.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/FsnJoinerOperation.java @@ -1,87 +0,0 @@ -/* - * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.rest.services; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -import com.b2international.commons.http.ExtendedLocale; -import com.b2international.snowowl.core.domain.IComponent; -import com.b2international.snowowl.snomed.core.domain.SnomedConcept; -import com.b2international.snowowl.snomed.core.domain.SnomedDescription; -import com.google.common.base.Function; -import com.google.common.base.Optional; -import com.google.common.collect.FluentIterable; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Iterables; - -/** - * Given a set of {@link SnomedConcept concepts}, collects the corresponding "preferred" fully - * specified names of each entry, and makes them available for converting to a response object. - */ -public abstract class FsnJoinerOperation { - - private final String conceptId; - private final List locales; - private final DescriptionService descriptionService; - - // Requires a BranchContext decorated with an IndexSearcher - protected FsnJoinerOperation(final String conceptId, final List locales, final DescriptionService descriptionService) { - this.conceptId = conceptId; - this.locales = locales; - this.descriptionService = descriptionService; - } - - public final List run() { - final Iterable concepts = getConceptEntries(conceptId); - if (Iterables.isEmpty(concepts)) { - return ImmutableList.of(); - } - - Map descriptionsByConcept = initDescriptionsByConcept(concepts); - return convertConceptEntries(concepts, descriptionsByConcept); - } - - private Map initDescriptionsByConcept(Iterable conceptEntries) { - final Set conceptIds = FluentIterable.from(conceptEntries).transform(IComponent::getId).toSet(); - return descriptionService.getFullySpecifiedNames(conceptIds, locales); - } - - private List convertConceptEntries(Iterable concepts, Map descriptionsByConcept) { - final ImmutableList.Builder resultBuilder = ImmutableList.builder(); - - for (final SnomedConcept conceptEntry : concepts) { - resultBuilder.add(convertConceptEntry(conceptEntry, getTerm(descriptionsByConcept, conceptEntry.getId()))); - } - - return resultBuilder.build(); - } - - private Optional getTerm(Map descriptionsByConcept, final String conceptId) { - return Optional.fromNullable(descriptionsByConcept.get(conceptId)) - .transform(new Function() { - @Override - public String apply(SnomedDescription input) { - return input.getTerm(); - } - }); - } - - protected abstract Iterable getConceptEntries(String conceptId); - - protected abstract T convertConceptEntry(SnomedConcept concept, Optional optionalFsn); -} diff --git a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/SnomedRf2ImportService.java b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/SnomedRf2ImportService.java index 2a0d9c1be55..1ad1c18141f 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/SnomedRf2ImportService.java +++ b/snomed/com.b2international.snowowl.snomed.core.rest/src/com/b2international/snowowl/snomed/core/rest/services/SnomedRf2ImportService.java @@ -188,7 +188,7 @@ private CodeSystemEntry getCodeSystem(final String shortName) { return CodeSystemRequests.prepareGetCodeSystem(shortName) .build(REPOSITORY_UUID) .execute(bus.get()) - .getSync(); + .getSync(1, TimeUnit.MINUTES); } catch (NotFoundException e) { return null; } diff --git a/snomed/com.b2international.snowowl.snomed.datastore.tests/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.datastore.tests/META-INF/MANIFEST.MF index 7fd392d73f9..37379f08ea4 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore.tests/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.datastore.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Datastore Tests Bundle-SymbolicName: com.b2international.snowowl.snomed.datastore.tests;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.snomed.datastore Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/snomed/com.b2international.snowowl.snomed.datastore.tests/pom.xml b/snomed/com.b2international.snowowl.snomed.datastore.tests/pom.xml index 4af84da3cf1..b08bc7f8791 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore.tests/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.datastore.tests/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.b2international.snowowl - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT snomed-parent com.b2international.snowowl.snomed.datastore.tests @@ -19,26 +19,11 @@ - - eclipse-plugin - ch.qos.logback.classic - ${logback.versionRange} - - - eclipse-plugin - ch.qos.logback.core - ${logback.versionRange} - eclipse-plugin com.b2international.collections.fastutil 0.0.0 - - eclipse-plugin - com.sun.el - 0.0.0 - diff --git a/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/id/AbstractIdentifierServiceTest.java b/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/id/AbstractIdentifierServiceTest.java index bf1b8c86673..ed10d7a60a6 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/id/AbstractIdentifierServiceTest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/id/AbstractIdentifierServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,11 @@ import org.junit.Test; -import com.b2international.commons.exceptions.BadRequestException; import com.b2international.snowowl.core.terminology.ComponentCategory; -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.cis.ISnomedIdentifierService; import com.b2international.snowowl.snomed.cis.domain.IdentifierStatus; import com.b2international.snowowl.snomed.cis.domain.SctId; +import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.google.common.collect.Sets; /** @@ -36,7 +35,7 @@ */ public abstract class AbstractIdentifierServiceTest { - private static final String B2I_NAMESPACE = Concepts.B2I_NAMESPACE; + protected static final String B2I_NAMESPACE = Concepts.B2I_NAMESPACE; protected abstract ISnomedIdentifierService getIdentifierService(); @@ -143,17 +142,4 @@ public void whenDeprecatingAssignedIds_ThenTheyShouldBeDeprecated() { } } - @Test - public void whenReleasingPublishedId_ThenExceptionShouldBeThrown() { - try { - final Set componentIds = getIdentifierService().generate(B2I_NAMESPACE, ComponentCategory.CONCEPT, 1); - getIdentifierService().publish(componentIds); - getIdentifierService().release(componentIds); - fail("No exception was thrown when releasing already published ID."); - } catch (BadRequestException e) { - // correct behavior - } catch (Exception e) { - fail(String.format("Unexpected exception was thrown. Exception class: %s.", e.getClass())); - } - } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/id/cis/CisSnomedIdentifierServiceTest.java b/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/id/cis/CisSnomedIdentifierServiceTest.java index c6c46704bbc..a04c062c64e 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/id/cis/CisSnomedIdentifierServiceTest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/id/cis/CisSnomedIdentifierServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,15 @@ */ package com.b2international.snowowl.snomed.datastore.id.cis; +import static org.junit.Assert.fail; + +import java.util.Set; + import org.junit.Before; +import org.junit.Test; +import com.b2international.commons.exceptions.BadRequestException; +import com.b2international.snowowl.core.terminology.ComponentCategory; import com.b2international.snowowl.snomed.cis.ISnomedIdentifierService; import com.b2international.snowowl.snomed.cis.SnomedIdentifierConfiguration; import com.b2international.snowowl.snomed.cis.client.CisSnomedIdentifierService; @@ -53,4 +60,18 @@ public void init() { service = new CisSnomedIdentifierService(conf, reservationService, mapper); } + @Test + public void whenReleasingPublishedId_ThenExceptionShouldBeThrown() { + try { + final Set componentIds = getIdentifierService().generate(B2I_NAMESPACE, ComponentCategory.CONCEPT, 1); + getIdentifierService().publish(componentIds); + getIdentifierService().release(componentIds); + fail("No exception was thrown when releasing already published ID."); + } catch (BadRequestException e) { + // correct behavior + } catch (Exception e) { + fail(String.format("Unexpected exception was thrown. Exception class: %s.", e.getClass())); + } + } + } diff --git a/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/id/memory/DefaultSnomedIdentifierServiceTest.java b/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/id/memory/DefaultSnomedIdentifierServiceTest.java index e154bcee531..068873b62e9 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/id/memory/DefaultSnomedIdentifierServiceTest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore.tests/src/com/b2international/snowowl/snomed/datastore/id/memory/DefaultSnomedIdentifierServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/snomed/com.b2international.snowowl.snomed.datastore/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.datastore/META-INF/MANIFEST.MF index e9611cb8083..fec1018fccf 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.datastore/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Datastore Bundle-SymbolicName: com.b2international.snowowl.snomed.datastore;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Activator: com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 @@ -29,7 +29,6 @@ Export-Package: com.b2international.snowowl.snomed.core, com.b2international.snowowl.snomed.core.domain.constraint, com.b2international.snowowl.snomed.core.domain.refset, com.b2international.snowowl.snomed.core.ecl, - com.b2international.snowowl.snomed.core.label, com.b2international.snowowl.snomed.core.mrcm, com.b2international.snowowl.snomed.core.mrcm.io, com.b2international.snowowl.snomed.core.ql, @@ -41,7 +40,6 @@ Export-Package: com.b2international.snowowl.snomed.core, com.b2international.snowowl.snomed.datastore.derivation, com.b2international.snowowl.snomed.datastore.id, com.b2international.snowowl.snomed.datastore.id.assigner, - com.b2international.snowowl.snomed.datastore.index, com.b2international.snowowl.snomed.datastore.index.change, com.b2international.snowowl.snomed.datastore.index.constraint, com.b2international.snowowl.snomed.datastore.index.entry, diff --git a/snomed/com.b2international.snowowl.snomed.datastore/plugin.xml b/snomed/com.b2international.snowowl.snomed.datastore/plugin.xml index b12e79e888e..c3b047ee8e0 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/plugin.xml +++ b/snomed/com.b2international.snowowl.snomed.datastore/plugin.xml @@ -2,7 +2,6 @@ - - - - - - - diff --git a/snomed/com.b2international.snowowl.snomed.datastore/pom.xml b/snomed/com.b2international.snowowl.snomed.datastore/pom.xml index 4f64ee0c8a8..1aa9cbe0c34 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.datastore/pom.xml @@ -11,6 +11,6 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/snomed/com.b2international.snowowl.snomed.datastore/schema/snomedNamespaceAndModuleAssigner.exsd b/snomed/com.b2international.snowowl.snomed.datastore/schema/snomedNamespaceAndModuleAssigner.exsd deleted file mode 100644 index ad84bd7d2df..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/schema/snomedNamespaceAndModuleAssigner.exsd +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - Extension point that allowes different namespace and module assigners to be plugged-in. These assigners allocate and assign namespaces and module concepts to relationships and concrete domain elements generated by the classifier. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [Enter the first release in which this extension point appears.] - - - - - - - - - [Enter extension point usage example here.] - - - - - - - - - [Enter API information here.] - - - - - - - - - * Default implementation - assignes the default namespace and module -* Source concept inheritance - assignes the namespace and the module of the source concept - - - - - - - - - Copyright 2017 B2i Healthcare Pte Ltd, http://b2i.sg - - - - diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/SnomedPlugin.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/SnomedPlugin.java index 7e04dd8c346..e21799209db 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/SnomedPlugin.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/SnomedPlugin.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ import com.b2international.snowowl.core.domain.IComponent; import com.b2international.snowowl.core.merge.ComponentRevisionConflictProcessor; import com.b2international.snowowl.core.repository.ComponentDeletionPolicy; +import com.b2international.snowowl.core.repository.CompositeComponentDeletionPolicy; import com.b2international.snowowl.core.repository.TerminologyRepositoryInitializer; import com.b2international.snowowl.core.repository.TerminologyRepositoryPlugin; import com.b2international.snowowl.core.setup.ConfigurationRegistry; @@ -61,9 +62,7 @@ import com.b2international.snowowl.snomed.core.version.SnomedVersioningRequest; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; import com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration; -import com.b2international.snowowl.snomed.datastore.id.assigner.SnomedNamespaceAndModuleAssignerProvider; import com.b2international.snowowl.snomed.datastore.index.change.SnomedRepositoryPreCommitHook; -import com.b2international.snowowl.snomed.datastore.index.constraint.SnomedConstraintDocument; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedDocument; import com.b2international.snowowl.snomed.datastore.internal.SnomedRepositoryInitializer; import com.b2international.snowowl.snomed.ecl.EclStandaloneSetup; @@ -99,7 +98,6 @@ public void init(SnowOwlConfiguration configuration, Environment env) throws Exc // register SNOMED CT Query based validation rule evaluator ValidationRuleEvaluator.Registry.register(new SnomedQueryValidationRuleEvaluator()); - env.services().registerService(SnomedNamespaceAndModuleAssignerProvider.class, SnomedNamespaceAndModuleAssignerProvider.INSTANCE); } @Override @@ -118,7 +116,7 @@ public void preRun(SnowOwlConfiguration configuration, Environment env) throws E @Override protected ComponentDeletionPolicy getComponentDeletionPolicy() { - return doc -> (doc instanceof SnomedDocument && !((SnomedDocument) doc).isReleased()) || doc instanceof SnomedConstraintDocument; + return CompositeComponentDeletionPolicy.of(SnomedDocument.class, doc -> !((SnomedDocument) doc).isReleased()); } @Override diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/RelationshipRefinability.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/RelationshipRefinability.java deleted file mode 100644 index 65f978d949e..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/domain/RelationshipRefinability.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.domain; - -import java.text.MessageFormat; - -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.google.common.base.Strings; - -/** - * Enumerates allowed relationship refinability values and maps them to concept identifiers. - * - * @see Relationship Refinability Reference Set - * (Technical Implementation Guide) - */ -public enum RelationshipRefinability { - - /** - * Relationship can not be refined in postcoordinated concept expressions. - */ - NOT_REFINABLE(Concepts.NOT_REFINABLE), - - /** - * Relationship can optionally be refined in postcoordinated concept expressions. - */ - OPTIONAL(Concepts.OPTIONAL_REFINABLE), - - /** - * Relationship must be refined in postcoordinated concept expressions. - */ - MANDATORY(Concepts.MANDATORY_REFINABLE); - - private final String conceptId; - - private RelationshipRefinability(final String conceptId) { - this.conceptId = conceptId; - } - - /** - * Retrieves the concept identifier for this refinability value. - * - * @return the concept identifier corresponding to the refinability constant - */ - public String getConceptId() { - return conceptId; - } - - /** - * Performs a reverse lookup by concept identifier and returns the matching refinability value. - * - * @param conceptId the concept identifier to look for - * - * @return the resolved {@link RelationshipRefinability}, or {@code null} if {@code conceptId} is null or empty - * @throws IllegalArgumentException if no refinability value matches the specified concept identifier - */ - public static RelationshipRefinability getByConceptId(final String conceptId) { - if (Strings.isNullOrEmpty(conceptId)) { - return null; - } - - for (final RelationshipRefinability candidate : values()) { - if (candidate.getConceptId().equals(conceptId)) { - return candidate; - } - } - - throw new IllegalArgumentException(MessageFormat.format("No relationship refinability value found for identifier ''{0}''.", conceptId)); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclRefinementEvaluator.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclRefinementEvaluator.java index 545f08609dd..df16ee07478 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclRefinementEvaluator.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/ecl/SnomedEclRefinementEvaluator.java @@ -33,6 +33,7 @@ import java.util.Map.Entry; import java.util.Objects; import java.util.Set; +import java.util.concurrent.TimeUnit; import java.util.function.BinaryOperator; import java.util.stream.Collectors; @@ -353,10 +354,11 @@ private Promise> evalRefinement(final BranchContext context propertyCardinality = Range.closed(min, max); } final Function idProvider = refinement.isReversed() ? Property::getValue : Property::getObjectId; - final Set focusConceptIds = focusConcepts.isAnyExpression() - ? Collections.singleton(Ecl.ANY) // XXX send ANY expression to evalStatements, to indicate that any source can match - : grouped ? focusConcepts.resolveToConceptsWithGroups(context).getSync().keySet() : focusConcepts.resolve(context).getSync(); - return evalRefinement(context, refinement, grouped, focusConceptIds) + final Promise> focusConceptIdsPromise = focusConcepts.isAnyExpression() + ? Promise.immediate(Collections.singleton(Ecl.ANY)) // XXX send ANY expression to evalStatements, to indicate that any source can match + : grouped ? focusConcepts.resolveToConceptsWithGroups(context).then(Multimap::keySet) : focusConcepts.resolve(context); + return focusConceptIdsPromise + .thenWith(focusConceptIds -> evalRefinement(context, refinement, grouped, focusConceptIds)) .then(filterByCardinality(grouped, groupCardinality, propertyCardinality, idProvider)); } @@ -623,7 +625,7 @@ private static Collection evalToConceptIds(final BranchContext context, } // TODO replace sync call to concept search with async promise - return EclExpression.of(expression, expressionForm).resolve(context).getSync(); + return EclExpression.of(expression, expressionForm).resolve(context).getSync(1, TimeUnit.MINUTES); } } return idFilter; diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/label/SnomedConceptNameProvider.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/label/SnomedConceptNameProvider.java deleted file mode 100644 index 875631b846e..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/core/label/SnomedConceptNameProvider.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.core.label; - -import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; - -import com.b2international.commons.http.ExtendedLocale; -import com.b2international.snowowl.core.branch.Branch; -import com.b2international.snowowl.eventbus.IEventBus; -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.SnomedConcept; -import com.b2international.snowowl.snomed.core.domain.SnomedDescription; -import com.b2international.snowowl.snomed.core.domain.SnomedDescriptions; -import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; -import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; -import com.b2international.snowowl.snomed.datastore.request.DescriptionRequestHelper; -import com.b2international.snowowl.snomed.datastore.request.SnomedDescriptionSearchRequestBuilder; -import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; - -/** - * Component name provider implementation for SNOMED CT concepts. - * @deprecated - if possible use {@link SnomedRequests} API directly - */ -public final class SnomedConceptNameProvider { - - private static final long NAME_PROVIDER_TIMEOUT = TimeUnit.SECONDS.toMillis(10L); - - private final IEventBus bus; - private final List locales; - - public SnomedConceptNameProvider(final IEventBus bus) { - this.bus = bus; - this.locales = SnomedRequests.prepareSearchConcept() - .all() - .filterByAncestor(Concepts.REFSET_LANGUAGE_TYPE) - .filterByActive(true) - .setFields(SnomedConceptDocument.Fields.ID) - .build(SnomedDatastoreActivator.REPOSITORY_UUID, Branch.MAIN_PATH) - .execute(bus) - .getSync() - .stream().map(SnomedConcept::getId) - .map(id -> ExtendedLocale.valueOf("en-x-"+id)) - .collect(Collectors.toList()); - } - - public String getComponentLabel(final String branchPath, final String componentId) { - final SnomedDescription pt = new DescriptionRequestHelper() { - @Override - protected SnomedDescriptions execute(final SnomedDescriptionSearchRequestBuilder req) { - return req.build(SnomedDatastoreActivator.REPOSITORY_UUID, branchPath).execute(bus).getSync(NAME_PROVIDER_TIMEOUT, TimeUnit.MILLISECONDS); - } - }.getPreferredTerm(componentId, locales); - - return (pt != null) ? pt.getTerm() : componentId; - } -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/AlwalysComplexMapAttribute.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/AlwalysComplexMapAttribute.java deleted file mode 100644 index 0e5b975b857..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/AlwalysComplexMapAttribute.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore; - -import java.util.Map; - -import com.google.common.collect.Maps; - -/** - * Represents an ALWAYS map rule SNOMED CT complex map reference set attribute. - *

          Example: ALWAYS F31.1 - */ -public class AlwalysComplexMapAttribute implements IComplexMapAttribute { - - private final Map cache = Maps.newHashMap(); - - /* (non-Javadoc) - * @see com.b2international.snowowl.snomed.datastore.IComplexMapAttribute#setAttribute(java.lang.Object, java.lang.Object) - */ - @Override - public void setAttribute(final Object key, final Object value) { - cache.put(key, value); - } - - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - final Object value = cache.get(ICD_10_ID); - final String label = null == value ? ICD_10_ID : String.valueOf(value); - return "ALWAYS " + label; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IComplexMapAttribute.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IComplexMapAttribute.java deleted file mode 100644 index 9525c2caeea..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IComplexMapAttribute.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore; - -/** - * Represents an attribute for the SNOMED CT complex map type reference set member. - *

          Note: used for e.g.: MAP ADVICE and MAP RULE - */ -public interface IComplexMapAttribute { - - public static final String SNOMED_CT_ID = "${SNOMED_CT_ID}"; - public static final String ICD_10_ID = "${ICD-10_ID}"; - public static final String SNOMED_CT_LABEL = "${SNOMED_CT_LABEL}"; - public static final String SNOMED_CT_FSN = "${SNOMED_CT_FSN}"; - public static final String UNSPECIFIED_ID = "${SOURCE_COMPONENT_ID}"; - - /** - * Sets an attribute for a specified value. - * @param key the unique identifier of the attribute. - * @param value the value associated with the attribute. - */ - void setAttribute(final Object key, final Object value); - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IdStorageKeyPair.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IdStorageKeyPair.java deleted file mode 100644 index 013beeb3c40..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IdStorageKeyPair.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore; - -import com.b2international.commons.Pair; -import com.google.common.base.MoreObjects; -import com.google.common.base.Preconditions; - -/** - * Class for wrapping a terminology specific ID and a primary unique key. - *

          NOTE: {@code equals} and {@code hashCode} is based on the terminology specific ID.
          - * Primary key can be {@code -1L} if it is temporary. - * @see Pair - */ -public final class IdStorageKeyPair extends Pair { - - public IdStorageKeyPair(final String componentId, final Long storageKey) { - super( - Preconditions.checkNotNull(componentId, "Component ID argument cannot be null."), - Preconditions.checkNotNull(storageKey, "Storage key argument cannot be null.")); - } - - /* - * (non-Javadoc) - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getA() == null) ? 0 : getA().hashCode()); - return result; - } - - /* - * (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - final IdStorageKeyPair other = (IdStorageKeyPair) obj; - if (getA() == null) { - if (other.getA() != null) - return false; - } else if (!getA().equals(other.getA())) - return false; - return true; - } - - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return MoreObjects.toStringHelper(this).add("ID", getA()).add("CDO ID", getB()).toString(); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IfAvailableComplexMapAttribute.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IfAvailableComplexMapAttribute.java deleted file mode 100644 index 6a7dbded768..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IfAvailableComplexMapAttribute.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore; - -import java.util.HashMap; - -import com.google.common.collect.Maps; - -/** - * Represents an IFA map rule SNOMED CT complex map reference set attribute. - *

          Example: IFA 287189003 | Suicide - car exhaust (event) | - */ -public class IfAvailableComplexMapAttribute implements IComplexMapAttribute { - - private final HashMap cache = Maps.newHashMap(); - - /* (non-Javadoc) - * @see com.b2international.snowowl.snomed.datastore.IComplexMapAttribute#setAttribute(java.lang.Object, java.lang.Object) - */ - @Override - public void setAttribute(final Object key, final Object value) { - cache.put(key, value); - } - - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - final Object id = cache.get(SNOMED_CT_ID); - final Object fsn = cache.get(SNOMED_CT_FSN); - final String idLabel = null == id ? SNOMED_CT_ID : String.valueOf(id); - final String fsnLabel = null == id ? SNOMED_CT_FSN : String.valueOf(fsn); - return "IFA " + idLabel + " | " + fsnLabel + " |"; - } -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IfAvailableOrDescendantComplexMapAttribute.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IfAvailableOrDescendantComplexMapAttribute.java deleted file mode 100644 index b22984e0f37..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IfAvailableOrDescendantComplexMapAttribute.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore; - - -/** - * Represents an IFA OR DESCENDANT map rule SNOMED CT complex map reference set attribute. - *

          Example: IFA 52824009 | Developmental reading disorder (disorder) | OR DESCENDANT - * @see IfAvailableComplexMapAttribute - */ -public class IfAvailableOrDescendantComplexMapAttribute extends IfAvailableComplexMapAttribute { - - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return super.toString() + " OR DESCENDANT"; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IfExistsComplexMapAttribute.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IfExistsComplexMapAttribute.java deleted file mode 100644 index e206c1a7bc1..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/IfExistsComplexMapAttribute.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore; - -import java.util.Map; - -import com.google.common.collect.Maps; - -/** - * Represents an IF EXISTS map rule attribute for the SNOMED CT complex map type reference set member. - *

          Example: IF RHEUMATIC MITRAL VALVE STENOSIS AND AORTIC VALVE INSUFFICIENCY CHOOSE I08.0; - */ -public class IfExistsComplexMapAttribute implements IComplexMapAttribute { - - private final Map cache = Maps.newHashMap(); - - /* (non-Javadoc) - * @see com.b2international.snowowl.snomed.datastore.IComplexMapAttribute#setAttribute(java.lang.Object, java.lang.Object) - */ - @Override - public void setAttribute(final Object key, final Object value) { - cache.put(key, value); - } - - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - final Object id = cache.get(ICD_10_ID); - final Object term = cache.get(SNOMED_CT_LABEL); - final String idLabel = null == id ? ICD_10_ID : String.valueOf(id); - final String termLabel = null == term ? SNOMED_CT_LABEL : String.valueOf(term); - return "IF " + termLabel.toUpperCase() + " CHOOSE " + idLabel; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/MapSetType.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/MapSetType.java deleted file mode 100644 index 53e8f18e5fe..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/MapSetType.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore; - -/** - * Enumeration for representing all available map set types for SNOMED CT RF1 publication. - *

          The following types are available: - *

            - *
          • {@link #UNSPECIFIED Unspecified}
          • - *
          • {@link #SINGLE Single}
          • - *
          • {@link #MULTIPLE Multiple}
          • - *
          • {@link #CHOICE Choice}
          • - *
          • {@link #FLEXIBLE Flexible}
          • - *
          - *

          - */ -public enum MapSetType { - - /** - * Unspecified. Value: {@code 0x00}. - * @see MapSetType - */ - UNSPECIFIED("Unspecified", 0x00), - /** - * Single. All maps are unique one-to-one maps. Value: {@code 0x01}. - * @see MapSetType - */ - SINGLE("Single", 0x01), - /** - * Multiple. Some maps are one-to-many maps but there are no choices. Value: {@code 0x02}. - * @see MapSetType - */ - MULTIPLE("Multiple", 0x02), - /** - * Choice. Some maps include choices of one-to-one maps but there are no one-to-many maps. Value: {@code 0x03}. - * @see MapSetType - */ - CHOICE("Choice", 0x03), - /** - * Flexible. Some maps include choices and there are some one-to-many maps. Value: {@code 0x04}. - * @see MapSetType - */ - FLEXIBLE("Flexible", 0x04); - - private final String name; - private final int value; - - private MapSetType(final String name, final int value) { - this.name = name; - this.value = value; - } - - /** - * Humane readable name of the map set type. - * @return the name of the map set type. - */ - public String getName() { - return name; - } - - /** - * Returns with the value of the map set type. - * @return the value of the map set type. - */ - public int getValue() { - return value; - } - - /* - * (non-Javadoc) - * @see java.lang.Enum#toString() - */ - @Override - public String toString() { - return getName(); - } - - /** - * Returns with the map set type identified by its specified unique value. - * @param value the value of the map set type. - * @return the map set type looked up by its unique value. - */ - public static MapSetType getByValue(final int value) { - for (final MapSetType type : values()) - if (value == type.value) - return type; - throw new IllegalArgumentException("Unknown map set type for value: " + value + "."); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/NormalFormWrapper.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/NormalFormWrapper.java deleted file mode 100644 index 7ed0dae0f2d..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/NormalFormWrapper.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore; - -import java.util.Collection; -import java.util.Map; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; - -/** - * Simple POJO for representing a SNOMED CT concept as a bunch of parent concept IDs and relationships based on an SCG normal form expression. - */ -public final class NormalFormWrapper { - - private final Collection parentConceptIds; - private final Collection attributeConceptGroups; - - /** - * Creates an instance of the SCG normal form representation. - * @param parentConceptIds the parent concept IDs. - * @param attributeConceptGroups the concept attribute groups. - */ - public NormalFormWrapper(final Collection parentConceptIds, final Collection attributeConceptGroups) { - this.parentConceptIds = parentConceptIds; - this.attributeConceptGroups = attributeConceptGroups; - } - - /** - * Collection of attribute concept representations. - * @return - */ - public Collection getAttributeConceptGroups() { - return ImmutableSet.copyOf(attributeConceptGroups); - } - - /** - * Returns with a copy of the parent concept IDs. - * @return the parent concept IDs. - */ - public Collection getParentConceptIds() { - return ImmutableSet.copyOf(parentConceptIds); - } - - /** - * POJO representation of the SCG attribute group concepts. - */ - public static final class AttributeConceptGroupWrapper { - - private final Map attributeConceptIds; - private final int group; - - /** - * Creates an SCG attribute group representation. - * @param attributeConceptIds the attribute concept IDs. - * @param group the relationship group. - */ - public AttributeConceptGroupWrapper(final Map attributeConceptIds, final int group) { - this.attributeConceptIds = attributeConceptIds; - this.group = group; - } - - /** - * Returns with a map of attribute concept IDs. Keys are the relationship type concept IDs. Values are the destination concept IDs. - * @return a map of attribute concept IDs. - */ - public Map getAttributeConceptIds() { - return ImmutableMap.copyOf(attributeConceptIds); - } - - /** - * Returns with the relationship group. - * @return relationship group. - */ - public int getGroup() { - return group; - } - - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/PlainComplexMapAttribute.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/PlainComplexMapAttribute.java deleted file mode 100644 index aa9bca67655..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/PlainComplexMapAttribute.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore; - -import javax.annotation.Nullable; - -/** - * Represents a plain text SNOMED CT complex map type attribute. - */ -public class PlainComplexMapAttribute implements IComplexMapAttribute { - - private final String label; - - /** - * Creates a new instance. - * @param label the label of the element can be {@code null}. - */ - public PlainComplexMapAttribute(@Nullable final String label) { - this.label = label; - } - - /* (non-Javadoc) - * @see com.b2international.snowowl.snomed.datastore.IComplexMapAttribute#setAttribute(java.lang.Object, java.lang.Object) - */ - @Override - public void setAttribute(final Object key, final Object value) { - //intentionally does nothing - } - - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return String.valueOf(label); - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedDeletionPlanMessages.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedDeletionPlanMessages.java deleted file mode 100644 index eea4dc25152..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedDeletionPlanMessages.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore; - -/** - * Messages to use in the deletion plan dialog - * - * @since 4.6 - */ -public final class SnomedDeletionPlanMessages { - - public static final String COMPONENT_IS_RELEASED_MESSAGE = "The %s '%s' has been released, and cannot be deleted."; - - public static final String UNABLE_TO_DELETE_CONCEPT_DUE_TO_RELEASED_INBOUND_RSHIP_MESSAGE = "Cannot delete concept: '%s' because it has a released inbound relationship: '%s'."; - - public static final String UNABLE_TO_DELETE_DESCRIPTION_TYPE_CONCEPT_MESSAGE = "Cannot delete concept: '%s' because it is used as a description type."; - - public static final String UNABLE_TO_DELETE_CONCEPT_DUE_TO_ISA_RSHIP_MESSAGE = "Concept '%s' would be deleted when the last active 'Is a' relationship is deleted."; - - public static final String UNABLE_TO_DELETE_RELATIONSHIP_MESSAGE = "Cannot relationship concept: '%s'."; - - public static final String UNABLE_TO_DELETE_REFERENCE_SET_MESSAGE = "Cannot delete reference set: '%s'."; - -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedMapSetSetting.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedMapSetSetting.java deleted file mode 100644 index 9feeb98cedf..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedMapSetSetting.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.io.Serializable; -import java.util.Set; - -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.google.common.collect.ImmutableSet; - -/** - * POJO for storing information about the SNOMED CT map set used for RF1 cross map export. - * - * @see MapSetType - */ -public class SnomedMapSetSetting implements Serializable { - - private static final long serialVersionUID = 1L; - - public static final Set DEFAULT_IDS = ImmutableSet.of(Concepts.ICD_O_REFERENCE_SET_ID, - Concepts.ICD_9_CM_REFERENCE_SET_ID, - Concepts.ICD_10_REFERENCE_SET_ID); - - /** - * The reference set identifier concept ID. - */ - private String refSetId; - - /** - * Human readable name of the map set. - */ - private String mapSetName; - - /** - * The unique OID of the map set scheme. - */ - private String mapSchemeId; - - /** - * The name of the map set scheme. - */ - private String mapSchemeName; - - /** - * The version of the map set scheme. - */ - private String mapSchemeVersion; - - /** - * Type of the map set. - */ - private MapSetType mapSetType; - - /** - * Flag for indicating whether the reference set is a complex type or not. - */ - private boolean complex; - - public static SnomedMapSetSetting read(final DataInputStream dis) throws IOException { - return new SnomedMapSetSetting( - dis.readUTF(), - dis.readUTF(), - dis.readUTF(), - dis.readUTF(), - dis.readUTF(), - MapSetType.getByValue(dis.readInt()), - dis.readBoolean() - ); - } - - public static void write(final SnomedMapSetSetting setting, final DataOutputStream dos) throws IOException { - dos.writeUTF(setting.getRefSetId()); - dos.writeUTF(setting.getMapSetName()); - dos.writeUTF(setting.getMapSchemeId()); - dos.writeUTF(setting.getMapSchemeName()); - dos.writeUTF(setting.getMapSchemeVersion()); - dos.writeInt(setting.getMapSetType().getValue()); - dos.writeBoolean(setting.isComplex()); - } - - /** - * Map set setting for ICD-O. - */ - public static final SnomedMapSetSetting ICD_O_SETTING = new SnomedMapSetSetting( - Concepts.ICD_O_REFERENCE_SET_ID, - "ICD-O-3", - "2.16.840.1.113883.6.5.2.2", - "International Classification of Diseases for Oncology, 3rd Edition", - "2001", - MapSetType.SINGLE, - false - ); - - /** - * Map set setting for ICD-9-CM. - */ - public static final SnomedMapSetSetting ICD_9_CM_SETTING = new SnomedMapSetSetting( - Concepts.ICD_9_CM_REFERENCE_SET_ID, - "ICD-9-CM", - "2.16.840.1.113883.6.5.2.1", - "International Classification of Diseases and Related Health Problems, 9th Revision, Clinical Modifications.", - "2012", - MapSetType.MULTIPLE, - true - ); - - /** - * Map set setting for ICD-10. - */ - public static final SnomedMapSetSetting ICD_10_SETTING = new SnomedMapSetSetting( - Concepts.ICD_10_REFERENCE_SET_ID, - "ICD-10", - "2.16.840.1.113883.6.3", - "International Classification of Diseases revision 10 (ICD-10)", - "2012", - MapSetType.MULTIPLE, - true - ); - - public SnomedMapSetSetting(final String refSetId, - final String mapSetName, - final String mapSchemeId, - final String mapSchemeName, - final String mapSchemeVersion, - final MapSetType mapSetType, - final boolean complex) { - - this.refSetId = refSetId; - this.mapSetName = mapSetName; - this.mapSchemeId = mapSchemeId; - this.mapSchemeName = mapSchemeName; - this.mapSchemeVersion = mapSchemeVersion; - this.mapSetType = mapSetType; - this.complex = complex; - } - - public String getRefSetId() { - return refSetId; - } - - public void setRefSetId(String refSetId) { - this.refSetId = refSetId; - } - - public String getMapSetName() { - return mapSetName; - } - - public void setMapSetName(String mapSetName) { - this.mapSetName = mapSetName; - } - - public String getMapSchemeId() { - return mapSchemeId; - } - - public void setMapSchemeId(String mapSchemeId) { - this.mapSchemeId = mapSchemeId; - } - - public String getMapSchemeName() { - return mapSchemeName; - } - - public void setMapSchemeName(String mapSchemeName) { - this.mapSchemeName = mapSchemeName; - } - - public String getMapSchemeVersion() { - return mapSchemeVersion; - } - - public void setMapSchemeVersion(String mapSchemeVersion) { - this.mapSchemeVersion = mapSchemeVersion; - } - - public MapSetType getMapSetType() { - return mapSetType; - } - - public void setMapSetType(MapSetType mapSetType) { - this.mapSetType = mapSetType; - } - - public boolean isComplex() { - return complex; - } - - public void setComplex(boolean complex) { - this.complex = complex; - } -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedRefSetUtil.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedRefSetUtil.java index cdba5305e91..97afc0047d0 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedRefSetUtil.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/SnomedRefSetUtil.java @@ -15,7 +15,11 @@ */ package com.b2international.snowowl.snomed.datastore; -import static com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType.*; +import static com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType.COMPLEX_BLOCK_MAP; +import static com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType.COMPLEX_MAP; +import static com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType.EXTENDED_MAP; +import static com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType.SIMPLE_MAP; +import static com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType.SIMPLE_MAP_WITH_DESCRIPTION; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static java.util.stream.Collectors.collectingAndThen; @@ -25,12 +29,10 @@ import java.util.Date; import java.util.Map; import java.util.Map.Entry; -import java.util.Set; import com.b2international.commons.BooleanUtils; import com.b2international.snowowl.core.ApplicationContext; import com.b2international.snowowl.core.config.SnowOwlConfiguration; -import com.b2international.snowowl.core.date.Dates; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRF2Folder; import com.b2international.snowowl.snomed.core.domain.refset.DataType; @@ -40,32 +42,13 @@ import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; import com.google.common.collect.Multimap; -import com.google.common.collect.Sets; /** * Utility class collecting commons operations related to SNOMED CT reference sets. */ public abstract class SnomedRefSetUtil { - /*** - * Mapping between the association indication reference set IDs and the human readable names instead of - * their CAPITAL CASE preferred terms. - */ - public static final Map ASSOCIATION_REFSETS = ImmutableMap.builder() - .put(Concepts.REFSET_ALTERNATIVE_ASSOCIATION, "Alternative concept") - .put(Concepts.REFSET_MOVED_FROM_ASSOCIATION, "Moved from") - .put(Concepts.REFSET_MOVED_TO_ASSOCIATION, "Moved to") - .put(Concepts.REFSET_POSSIBLY_EQUIVALENT_TO_ASSOCIATION, "Possibly equivalent to") - .put(Concepts.REFSET_REFERS_TO_ASSOCIATION, "Refers to") - .put(Concepts.REFSET_REPLACED_BY_ASSOCIATION, "Replaced by") - .put(Concepts.REFSET_SAME_AS_ASSOCIATION, "Same as") - .put(Concepts.REFSET_SIMILAR_TO_ASSOCIATION, "Similar to") - .put(Concepts.REFSET_WAS_A_ASSOCIATION, "Was a") - .build(); - - private static BiMap DATATYPE_TO_REFSET_MAP; public static final BiMap getConcreteDomainRefSetMap() { @@ -111,21 +94,6 @@ public static final BiMap getConcreteDomainRefSetMap() { public static final Map REFSET_TYPE_TO_FOLDER_MAP = FOLDER_TO_REFSET_TYPE_MAP.entries().stream() .collect(collectingAndThen(toMap(Entry::getValue, Entry::getKey), ImmutableMap::copyOf)); - /** - * The set of all available datatypes. - */ - public static final Set ALL_DATATYPES = ImmutableSet.copyOf(DataType.values()); - - /** - * The set of datatypes for which no UI/constraint support exists at this time. - */ - public static final Set UNSUPPORTED_DATATYPES = ImmutableSet.of(DataType.DATE); - - /** - * The set of supported datatypes: a difference of {@link #ALL_DATATYPES} and {@link #UNSUPPORTED_DATATYPES}. - */ - public static final Set SUPPORTED_DATATYPES = ImmutableSet.copyOf(Sets.difference(ALL_DATATYPES, UNSUPPORTED_DATATYPES)); - private static SnomedCoreConfiguration getCoreConfiguration() { return ApplicationContext.getServiceForClass(SnowOwlConfiguration.class).getModuleConfig(SnomedCoreConfiguration.class); } @@ -158,60 +126,6 @@ public static boolean isConcreteDomain(final String refSetId) { return getConcreteDomainRefSetMap().containsValue(refSetId); } - /** - * Attempts to retrieve the reference set type associated with the specified - * ancestor concept in the reference set hierarchy. - *

          - * Note: Certain reference set types do not have a corresponding (fixed) common - * ancestor, and so will not be returned by this method, eg.: "concrete domain", - * "simple map with map target description" - * - * @param conceptId the concept ID to find a corresponding reference set type for - * @return the detected reference set type, or null - */ - public static SnomedRefSetType getByConceptId(String conceptId) { - switch (conceptId) { - case Concepts.REFSET_ATTRIBUTE_VALUE_TYPE: - return SnomedRefSetType.ATTRIBUTE_VALUE; - case Concepts.REFSET_LANGUAGE_TYPE: - return SnomedRefSetType.LANGUAGE; - case Concepts.REFSET_QUERY_SPECIFICATION_TYPE: - return SnomedRefSetType.QUERY; - case Concepts.SDD_DRUG_REFERENCE_SET: //$FALL-THROUGH$ - case Concepts.REFSET_SIMPLE_MAP_TYPE: - return SnomedRefSetType.SIMPLE_MAP; - case Concepts.SDD_SIMPLE_TYPE_REFERENCE_SET: //$FALL-THROUGH$ - case Concepts.REFSET_SIMPLE_TYPE: - return SnomedRefSetType.SIMPLE; - case Concepts.REFSET_COMPLEX_MAP_TYPE: - return SnomedRefSetType.COMPLEX_MAP; - case Concepts.REFSET_COMPLEX_BLOCK_MAP_TYPE: - return SnomedRefSetType.COMPLEX_BLOCK_MAP; - case Concepts.EXTENDED_MAP_TYPE: - return SnomedRefSetType.EXTENDED_MAP; - case Concepts.REFSET_DESCRIPTION_TYPE: - return SnomedRefSetType.DESCRIPTION_TYPE; - case Concepts.REFSET_ASSOCIATION_TYPE: - return SnomedRefSetType.ASSOCIATION; - case Concepts.REFSET_MODULE_DEPENDENCY_TYPE: - return SnomedRefSetType.MODULE_DEPENDENCY; - case Concepts.REFSET_OWL_AXIOM: - return SnomedRefSetType.OWL_AXIOM; - case Concepts.REFSET_OWL_ONTOLOGY: - return SnomedRefSetType.OWL_ONTOLOGY; - case Concepts.REFSET_MRCM_DOMAIN_INTERNATIONAL: - return SnomedRefSetType.MRCM_DOMAIN; - case Concepts.REFSET_MRCM_ATTRIBUTE_DOMAIN_INTERNATIONAL: - return SnomedRefSetType.MRCM_ATTRIBUTE_DOMAIN; - case Concepts.REFSET_MRCM_ATTRIBUTE_RANGE_INTERNATIONAL: - return SnomedRefSetType.MRCM_ATTRIBUTE_RANGE; - case Concepts.REFSET_MRCM_MODULE_SCOPE: - return SnomedRefSetType.MRCM_MODULE_SCOPE; - default: - return null; - } - } - /** * Returns {@code true} if the specified reference set type is either complex map or extended map type. * @param type the type to check. @@ -236,39 +150,6 @@ public static boolean isMapping(final SnomedRefSetType type) { || EXTENDED_MAP.equals(type); } - /** - * Returns a human-readable label for the specified reference set type. - * - * @param type - * @return - */ - public static String getTypeLabel(SnomedRefSetType type) { - - switch (type) { - case ATTRIBUTE_VALUE: return "Attribute value type reference set"; - case LANGUAGE: return "Language type reference set"; - case QUERY: return "Query type reference set"; - case SIMPLE_MAP: return "Simple map type reference set"; - case SIMPLE_MAP_WITH_DESCRIPTION: return "Simple map type with map target description"; - case SIMPLE: return "Simple type reference set"; - case COMPLEX_MAP: return "Complex map type reference set"; - case COMPLEX_BLOCK_MAP: return "Complex map with map block type reference set"; - case EXTENDED_MAP: return "Extended map type reference set"; - case DESCRIPTION_TYPE: return "Description type reference set"; - case ASSOCIATION: return "Association type reference set"; - case CONCRETE_DATA_TYPE: return "Concrete domain type reference set"; - case MODULE_DEPENDENCY: return "Module dependency type reference set"; - case OWL_AXIOM: return "OWL axiom type reference set"; - case OWL_ONTOLOGY: return "OWL ontology type reference set"; - case MRCM_DOMAIN: return "MRCM domain type reference set"; - case MRCM_ATTRIBUTE_DOMAIN: return "MRCM attribute domain type reference set"; - case MRCM_ATTRIBUTE_RANGE: return "MRCM attribute range type reference set"; - case MRCM_MODULE_SCOPE: return "MRCM module scope type reference set"; - default: - throw new IllegalArgumentException("Unexpected reference set type: " + type); - } - } - /** * Returns the identifier concept ancestor for the specified reference set type. * @@ -335,20 +216,6 @@ public static T deserializeValue(final DataType dataType, final String seria } } - @SuppressWarnings("unchecked") - public static T defaultValueForDataType(final DataType dataType) { - checkArgument(null != dataType, "Datatype argument cannot be null."); - - switch (dataType) { - case BOOLEAN: return (T) Boolean.FALSE; - case DECIMAL: return (T) BigDecimal.ZERO; - case INTEGER: return (T) Integer.valueOf(0); - case DATE: return (T) Dates.todayGmt(); - case STRING: return (T) ""; - default: throw new IllegalArgumentException("Unknown datatype: " + dataType); - } - } - public static String serializeValue(final DataType dataType, final T value) { checkArgument(null != dataType, "Datatype argument cannot be null."); checkArgument(null != value, "Value argument cannot be null."); @@ -363,33 +230,6 @@ public static String serializeValue(final DataType dataType, final T value) } } - public static String getLabel(final DataType dataType) { - switch (dataType) { - case BOOLEAN: return "Boolean"; - case DATE: return "Date"; - case DECIMAL: return "Decimal"; - case INTEGER: return "Integer"; - case STRING: return "String"; - default: throw new IllegalArgumentException("Unknown datatype: " + dataType); - } - } - - public static DataType getByClass(Class clazz) { - if (clazz.equals(String.class)) { - return DataType.STRING; - } else if (clazz.equals(Integer.class)) { - return DataType.INTEGER; - } else if (clazz.equals(BigDecimal.class)) { - return DataType.DECIMAL; - } else if (clazz.equals(Boolean.class)) { - return DataType.BOOLEAN; - } else if (clazz.equals(Date.class)) { - return DataType.DATE; - } else { - throw new IllegalArgumentException("Unsupported datatype class: " + clazz.getName()); - } - } - private SnomedRefSetUtil() { // Suppress instantiation } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/UnspecifiedAlwaysComplexMapAttribute.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/UnspecifiedAlwaysComplexMapAttribute.java deleted file mode 100644 index 778b764edd9..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/UnspecifiedAlwaysComplexMapAttribute.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore; - -import java.util.Map; - -import com.google.common.collect.Maps; - -/** - * Represents an ALWAYS map rule SNOMED CT complex map reference set attribute. - *

          Example: ALWAYS F31.1 - *

          Note: in this case the map target is unspecified and will be treated as a String. - * @see AlwalysComplexMapAttribute - */ -public class UnspecifiedAlwaysComplexMapAttribute implements IComplexMapAttribute { - - private final Map cache = Maps.newHashMap(); - - /* (non-Javadoc) - * @see com.b2international.snowowl.snomed.datastore.IComplexMapAttribute#setAttribute(java.lang.Object, java.lang.Object) - */ - @Override - public void setAttribute(final Object key, final Object value) { - cache.put(key, value); - } - - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - final Object value = cache.get(UNSPECIFIED_ID); - final String label = null == value ? UNSPECIFIED_ID : String.valueOf(value); - return "ALWAYS " + label; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/UnspecifiedIfExistsComplexMapAttribute.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/UnspecifiedIfExistsComplexMapAttribute.java deleted file mode 100644 index d218e0b4640..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/UnspecifiedIfExistsComplexMapAttribute.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore; - -import java.util.Map; - -import com.google.common.collect.Maps; - -/** - * Represents an IF EXISTS map rule attribute for the SNOMED CT complex map type reference set member. - *

          Example: IF RHEUMATIC MITRAL VALVE STENOSIS AND AORTIC VALVE INSUFFICIENCY CHOOSE I08.0; - *

          Note: in this case the map target is unspecified and will be treated as a String. - * @see IfExistsComplexMapAttribute - */ -public class UnspecifiedIfExistsComplexMapAttribute implements IComplexMapAttribute { - -private final Map cache = Maps.newHashMap(); - - /* (non-Javadoc) - * @see com.b2international.snowowl.snomed.datastore.IComplexMapAttribute#setAttribute(java.lang.Object, java.lang.Object) - */ - @Override - public void setAttribute(final Object key, final Object value) { - cache.put(key, value); - } - - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - final Object id = cache.get(UNSPECIFIED_ID); - final Object term = cache.get(SNOMED_CT_LABEL); - final String idLabel = null == id ? UNSPECIFIED_ID : String.valueOf(id); - final String termLabel = null == term ? SNOMED_CT_LABEL : String.valueOf(term); - return "IF " + termLabel.toUpperCase() + " CHOOSE " + idLabel; - } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/config/SnomedCoreConfiguration.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/config/SnomedCoreConfiguration.java index 9b4fba68c17..c075d143d9c 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/config/SnomedCoreConfiguration.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/config/SnomedCoreConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,8 +27,6 @@ import org.hibernate.validator.constraints.NotEmpty; -import com.b2international.snowowl.core.config.SnowOwlConfiguration; -import com.b2international.snowowl.snomed.cis.SnomedIdentifierConfiguration; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -83,10 +81,6 @@ public class SnomedCoreConfiguration { @NotEmpty private String datetimeDatatypeRefsetIdentifier = Concepts.REFSET_DATETIME_DATATYPE; - @Deprecated - @Valid - private SnomedIdentifierConfiguration ids; - @Valid private SnomedExportDefaultConfiguration export = new SnomedExportDefaultConfiguration(); @@ -99,12 +93,6 @@ public class SnomedCoreConfiguration { //enables the manual editing of inferred relationships and concrete data types private boolean inferredEditingEnabled = false; - @NotNull - private String defaultNamespace = DEFAULT_NAMESPACE; - - @NotEmpty - private String defaultModule = DEFAULT_MODULE; - @NotNull private Set reasonerExcludedModuleIds = Collections.emptySet(); @@ -218,18 +206,6 @@ public void setCollectSystemChanges(boolean collectSystemChanges) { this.collectSystemChanges = collectSystemChanges; } - /** - * @return the identifier generation sub-section of the SNOMED CT core configuration object - * @deprecated - no longer supported and it will be removed in a future release, access the identifiers configuration via {@link SnowOwlConfiguration#getModuleConfig(Class)} - */ - public SnomedIdentifierConfiguration getIds() { - return ids; - } - - public void setIds(SnomedIdentifierConfiguration ids) { - this.ids = ids; - } - /** * @return the RF2 export defaults sub-section of the SNOMED CT core configuration object */ @@ -361,37 +337,11 @@ public void setDatetimeDatatypeRefsetIdentifier(String datetimeDatatypeRefsetIde this.datetimeDatatypeRefsetIdentifier = datetimeDatatypeRefsetIdentifier; } - /** - * @return the default module ID to use when not set in any other way - */ - @JsonProperty - public String getDefaultModule() { - return defaultModule; - } - - /** - * @return the default namespace to use for ID generation when not set in any other way - */ - @JsonProperty - public String getDefaultNamespace() { - return defaultNamespace; - } - @JsonProperty public String getNamespaceModuleAssigner() { return namespaceModuleAssigner; } - @JsonProperty - public void setDefaultModule(String defaultModule) { - this.defaultModule = defaultModule; - } - - @JsonProperty - public void setDefaultNamespace(String defaultNamespace) { - this.defaultNamespace = defaultNamespace; - } - @JsonProperty public void setNamespaceModuleAssigner(String namespaceModuleAssigner) { this.namespaceModuleAssigner = namespaceModuleAssigner; diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedConceptConverter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedConceptConverter.java index aed73d99c71..8cf9ccc88c0 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedConceptConverter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/converter/SnomedConceptConverter.java @@ -28,9 +28,11 @@ import java.util.Collection; import java.util.List; import java.util.Map; +import java.util.NoSuchElementException; import java.util.Set; import java.util.stream.Collectors; +import com.b2international.commons.ExplicitFirstOrdering; import com.b2international.commons.collect.LongSets; import com.b2international.commons.exceptions.BadRequestException; import com.b2international.commons.functions.LongToStringFunction; @@ -46,17 +48,28 @@ import com.b2international.snowowl.core.domain.IComponent; import com.b2international.snowowl.datastore.request.BaseRevisionResourceConverter; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.*; +import com.b2international.snowowl.snomed.core.domain.Acceptability; +import com.b2international.snowowl.snomed.core.domain.SnomedConcept; +import com.b2international.snowowl.snomed.core.domain.SnomedConcepts; +import com.b2international.snowowl.snomed.core.domain.SnomedDescription; +import com.b2international.snowowl.snomed.core.domain.SnomedDescriptions; +import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; +import com.b2international.snowowl.snomed.core.domain.SnomedRelationships; +import com.b2international.snowowl.snomed.core.domain.SubclassDefinitionStatus; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSet; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; -import com.b2international.snowowl.snomed.datastore.request.DescriptionRequestHelper; +import com.b2international.snowowl.snomed.datastore.request.SnomedDescriptionSearchRequestBuilder; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; +import com.google.common.base.Function; import com.google.common.base.Functions; +import com.google.common.base.Predicates; import com.google.common.collect.FluentIterable; +import com.google.common.collect.ImmutableMap; import com.google.common.collect.ListMultimap; import com.google.common.collect.Maps; import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; +import com.google.common.collect.Ordering; import com.google.common.collect.TreeMultimap; /** @@ -223,7 +236,7 @@ private void expandPreferredTerm(List results, final Set } } - final Map terms = DescriptionRequestHelper.indexBestPreferredByConceptId(synonyms, locales()); + final Map terms = indexBestPreferredByConceptId(synonyms, locales()); for (SnomedConcept concept : results) { concept.setPt(terms.get(concept.getId())); } @@ -247,7 +260,7 @@ private void expandFullySpecifiedName(List results, final Set terms = DescriptionRequestHelper.indexBestPreferredByConceptId(fsns, locales()); + final Map terms = indexBestPreferredByConceptId(fsns, locales()); for (SnomedConcept concept : results) { SnomedDescription fsn = terms.get(concept.getId()); @@ -549,4 +562,63 @@ private String toDefinitionStatus(final boolean primitive) { private SubclassDefinitionStatus toSubclassDefinitionStatus(final boolean exhaustive) { return exhaustive ? SubclassDefinitionStatus.DISJOINT_SUBCLASSES : SubclassDefinitionStatus.NON_DISJOINT_SUBCLASSES; } + + public static Map indexBestPreferredByConceptId(Iterable descriptions, List orderedLocales) { + List languageRefSetIds = SnomedDescriptionSearchRequestBuilder.getLanguageRefSetIds(orderedLocales); + ExplicitFirstOrdering languageRefSetOrdering = ExplicitFirstOrdering.create(languageRefSetIds); + + return extractBest(indexByConceptId(descriptions), languageRefSetIds, description -> { + Set preferredLanguageRefSetIds = Maps.filterValues(description.getAcceptabilityMap(), Predicates.equalTo(Acceptability.PREFERRED)).keySet(); + // the explicit first ordering will put the VIP / anticipated / first priority languages codes to the min end. + return languageRefSetOrdering.min(preferredLanguageRefSetIds); + }); + } + + private static Multimap indexByConceptId(Iterable descriptions) { + return Multimaps.index(descriptions, description -> description.getConceptId()); + } + + private static Map extractBest(Multimap descriptionsByConceptId, + List orderedValues, + Function predicateFactory) { + + Map uniqueMap = Maps.transformValues(descriptionsByConceptId.asMap(), new ExtractBestFunction(orderedValues, predicateFactory)); + return ImmutableMap.copyOf(Maps.filterValues(uniqueMap, Predicates.notNull())); + } + + private static class ExtractBestFunction implements Function, SnomedDescription> { + + private final List orderedValues; + private final Function valuesExtractor; + private final Ordering ordering; + + private ExtractBestFunction(List orderedValues, Function valuesExtractor) { + this.orderedValues = orderedValues; + this.valuesExtractor = valuesExtractor; + this.ordering = ExplicitFirstOrdering.create(orderedValues).onResultOf(valuesExtractor); + } + + @Override + public SnomedDescription apply(Collection descriptions) { + try { + + SnomedDescription candidate = ordering.min(descriptions); + + /* + * We're using ExplicitFirstOrdering so that it doesn't break in the middle of processing + * the collection, but this means that we have to test the final SnomedDescription again + * to see if it is suitable for our needs. + */ + if (orderedValues.contains(valuesExtractor.apply(candidate))) { + return candidate; + } else { + return null; + } + + } catch (NoSuchElementException e) { + return null; + } + } + } + } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/DefaultNamespaceAndModuleAssigner.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/DefaultNamespaceAndModuleAssigner.java index 065fe09dd20..05c60850fa2 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/DefaultNamespaceAndModuleAssigner.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/DefaultNamespaceAndModuleAssigner.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,28 +17,29 @@ import java.util.Set; +import com.b2international.commons.extension.Component; import com.b2international.snowowl.core.domain.BranchContext; -import com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration; -import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; /** * Simple assigner that allocates the default namespace and module for relationships and concrete domains. * * @since 5.11.5 */ +@Component public final class DefaultNamespaceAndModuleAssigner implements SnomedNamespaceAndModuleAssigner { private String defaultNamespace; private String defaultModule; - // Empty constructor required for executable extension-based initialization - public DefaultNamespaceAndModuleAssigner() { } + public DefaultNamespaceAndModuleAssigner() { + } - public DefaultNamespaceAndModuleAssigner(final String defaultNamespace, final String defaultModule) { + @Override + public void init(final String defaultNamespace, final String defaultModule) { this.defaultNamespace = defaultNamespace; this.defaultModule = defaultModule; } - + @Override public String getRelationshipNamespace(final String sourceConceptId) { return defaultNamespace; @@ -56,35 +57,24 @@ public String getConcreteDomainModuleId(final String referencedConceptId) { @Override public void collectRelationshipNamespacesAndModules(final Set conceptIds, final BranchContext context) { - if (defaultNamespace == null) { - defaultNamespace = context.service(SnomedCoreConfiguration.class).getDefaultNamespace(); - } - - initializeDefaultModule(context); } @Override public void collectConcreteDomainModules(final Set conceptIds, final BranchContext context) { - initializeDefaultModule(context); } - private void initializeDefaultModule(final BranchContext context) { - if (defaultModule == null) { - defaultModule = context.service(SnomedCoreConfiguration.class).getDefaultModule(); - - // verify that the default module concept exists - SnomedRequests.prepareGetConcept(defaultModule).build().execute(context); - } - } - @Override public void clear() { - defaultModule = null; - defaultNamespace = null; } @Override public String getName() { return "default"; } + + @Override + public String toString() { + return String.format("%s[defaultNamespace: '%s', defaultModule: '%s']", getName(), defaultNamespace, defaultModule); + } + } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/ExtensionNamespaceAndModuleAssigner.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/ExtensionNamespaceAndModuleAssigner.java index 10d86143e1a..5385032767c 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/ExtensionNamespaceAndModuleAssigner.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/ExtensionNamespaceAndModuleAssigner.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,11 +22,11 @@ import com.b2international.collections.PrimitiveMaps; import com.b2international.collections.longs.LongKeyLongMap; +import com.b2international.commons.extension.Component; import com.b2international.snowowl.core.domain.BranchContext; import com.b2international.snowowl.snomed.cis.SnomedIdentifiers; import com.b2international.snowowl.snomed.common.SnomedConstants; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; -import com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedComponentDocument; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; import com.google.common.collect.Sets; @@ -37,16 +37,24 @@ * * @since 5.11.5 */ +@Component public final class ExtensionNamespaceAndModuleAssigner implements SnomedNamespaceAndModuleAssigner { private final LongKeyLongMap relationshipModuleMap = PrimitiveMaps.newLongKeyLongOpenHashMap(); private final LongKeyLongMap concreteDomainModuleMap = PrimitiveMaps.newLongKeyLongOpenHashMap(); + private String defaultNamespace; - private String defaultModuleId; + private String defaultModule; + private Set internationalModuleIds = Sets.newHashSet(); + + public ExtensionNamespaceAndModuleAssigner() {} - // Empty constructor required for executable extension-based initialization - public ExtensionNamespaceAndModuleAssigner() { } + @Override + public void init(final String defaultNamespace, final String defaultModule) { + this.defaultNamespace = defaultNamespace; + this.defaultModule = defaultModule; + } @Override public String getRelationshipNamespace(final String sourceConceptId) { @@ -61,8 +69,9 @@ public String getRelationshipModuleId(final String sourceConceptId) { final String moduleId = Long.toString(relationshipModuleMap.get(sourceConceptIdAsLong)); if (internationalModuleIds.contains(moduleId)) { - return defaultModuleId; + return defaultModule; } + return moduleId; } @@ -73,8 +82,9 @@ public String getConcreteDomainModuleId(final String referencedConceptId) { final String moduleId = Long.toString(concreteDomainModuleMap.get(referencedConceptIdAsLong)); if (internationalModuleIds.contains(moduleId)) { - return defaultModuleId; + return defaultModule; } + return moduleId; } @@ -88,8 +98,6 @@ public void collectRelationshipNamespacesAndModules(final Set conceptIds relationshipModuleMap.put(conceptId, moduleId); }); - defaultNamespace = context.service(SnomedCoreConfiguration.class).getDefaultNamespace(); - defaultModuleId = context.service(SnomedCoreConfiguration.class).getDefaultModule(); initializeInternationalModules(context); } @@ -102,9 +110,6 @@ public void collectConcreteDomainModules(final Set conceptIds, final Bra final long moduleId = Long.parseLong(c.getModuleId()); concreteDomainModuleMap.put(conceptId, moduleId); }); - - defaultModuleId = context.service(SnomedCoreConfiguration.class).getDefaultModule(); - initializeInternationalModules(context); } private void initializeInternationalModules(BranchContext context) { @@ -139,4 +144,10 @@ public void clear() { public String getName() { return "extension"; } + + @Override + public String toString() { + return String.format("%s[defaultNamespace: '%s', defaultModule: '%s']", getName(), defaultNamespace, defaultModule); + } + } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/SnomedNamespaceAndModuleAssigner.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/SnomedNamespaceAndModuleAssigner.java index 84474f5acdd..76e4db41738 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/SnomedNamespaceAndModuleAssigner.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/SnomedNamespaceAndModuleAssigner.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2017-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,15 +17,15 @@ import java.util.Set; +import com.b2international.commons.exceptions.FormattedRuntimeException; +import com.b2international.commons.extension.ClassPathScanner; import com.b2international.snowowl.core.domain.BranchContext; /** * Common interface for a namespace-module allocator which: *

            - *
          • For each inferred relationship, returns the expected namespace and module - * ID, given the source concept ID; - *
          • For each inferred concrete domain member, returns the expected module ID, - * given the "container" concept ID. + *
          • For each inferred relationship, returns the expected namespace and module ID, given the source concept ID; + *
          • For each inferred concrete domain member, returns the expected module ID, given the "container" concept ID. *
          * * @since 5.11.5 @@ -36,33 +36,38 @@ public interface SnomedNamespaceAndModuleAssigner { * Returns the configuration key of the assigner */ String getName(); - + + /** + * Initialize the assigner with default module and namespace values. + * + * @param defaultNamespace + * @param defaultModule + */ + void init(String defaultNamespace, String defaultModule); + /** - * Returns an SCTID to be registered to a relationship based on its source - * concept ID. + * Returns an SCTID to be registered to a relationship based on its source concept ID. * - * @param sourceConceptId the concept ID of the relationship to allocate the - * SCTID to + * @param sourceConceptId + * the concept ID of the relationship to allocate the SCTID to * @return the namespace for the relationship */ String getRelationshipNamespace(String sourceConceptId); /** - * Returns a module concept to be assigned to a relationship based on its source - * concept ID. + * Returns a module concept to be assigned to a relationship based on its source concept ID. * - * @param sourceConceptId the concept ID of the relationship to determine the - * module for + * @param sourceConceptId + * the concept ID of the relationship to determine the module for * @return the module ID for the relationship */ String getRelationshipModuleId(String sourceConceptId); /** - * Returns a module concept to be assigned to a concrete domain based on its - * referenced component ID. + * Returns a module concept to be assigned to a concrete domain based on its referenced component ID. * - * @param referencedConceptId the ID of the referenced concept to determine the - * module for + * @param referencedConceptId + * the ID of the referenced concept to determine the module for * @return the module ID for the concrete domain member */ String getConcreteDomainModuleId(String referencedConceptId); @@ -83,4 +88,23 @@ public interface SnomedNamespaceAndModuleAssigner { * Clears the internal maps of this assigner. */ void clear(); + + /** + * Instantiate a namespace and module assigner instance based on the given type. + * + * @param assignerType + * @param moduleId + * @param namespace + * @return + */ + static SnomedNamespaceAndModuleAssigner create(String assignerType, String moduleId, String namespace) { + SnomedNamespaceAndModuleAssigner assigner = ClassPathScanner.INSTANCE.getComponentsByInterface(SnomedNamespaceAndModuleAssigner.class) + .stream() + .filter(a -> assignerType.equals(a.getName())) + .findFirst() + .orElseThrow(() -> new FormattedRuntimeException("Couldn't find namespace and module assigner '%s'.", assignerType)); + assigner.init(namespace, moduleId); + return assigner; + } + } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/SnomedNamespaceAndModuleAssignerProvider.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/SnomedNamespaceAndModuleAssignerProvider.java deleted file mode 100644 index a08e8eea188..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/id/assigner/SnomedNamespaceAndModuleAssignerProvider.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore.id.assigner; - -import java.util.Map; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.b2international.commons.extension.Extensions; -import com.google.common.collect.Maps; - -/** - * @since 6.3 - */ -public enum SnomedNamespaceAndModuleAssignerProvider { - - INSTANCE; - - private static final String NAMESPACE_ASSIGNER_EXTENSION = "com.b2international.snowowl.snomed.datastore.snomedNamespaceAndModuleAssigner"; - - private final Logger LOG = LoggerFactory.getLogger(SnomedNamespaceAndModuleAssignerProvider.class); - - private final Map assigners = Maps.newHashMap(); - - private SnomedNamespaceAndModuleAssignerProvider() { - Extensions.getExtensions(NAMESPACE_ASSIGNER_EXTENSION, SnomedNamespaceAndModuleAssigner.class) - .forEach(assigner -> { - final String assignerType = assigner.getName(); - if (assigners.containsKey(assignerType)) { - LOG.warn("A namespace/module assigner with the name '{}' is already registered.", assignerType); - } else { - assigners.put(assignerType, assigner); - } - }); - } - - public SnomedNamespaceAndModuleAssigner get(String assignerType) { - if (!assigners.containsKey(assignerType)) { - throw new IllegalArgumentException("Unrecognized assigner type: " + assignerType); - } - return assigners.get(assignerType); - } -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/SnomedHierarchy.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/SnomedHierarchy.java deleted file mode 100644 index 1bd7d530827..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/SnomedHierarchy.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore.index; - -import java.util.Arrays; -import java.util.BitSet; - -import com.b2international.collections.PrimitiveMaps; -import com.b2international.collections.PrimitiveSets; -import com.b2international.collections.longs.LongKeyIntMap; -import com.b2international.collections.longs.LongSet; -import com.b2international.commons.CompareUtils; -import com.b2international.snowowl.core.api.IBranchPath; -import com.b2international.snowowl.snomed.datastore.IsAStatement; -import com.google.common.base.Preconditions; - -/** - * Holds a snapshot of parent-child relationships within the SNOMED CT terminology. - */ -public class SnomedHierarchy { - - /** - * Matrix for storing ancestor information. - *
            - *
          • Keys are internal concept IDs.
          • - *
          • Values integer hash set instances.
          • - */ - private final int[][] superTypes; - - /** - * Matrix for storing descendant information. - *
              - *
            • Keys are internal concept IDs.
            • - *
            • Values integer hash set instances.
            • - */ - private final int[][] subTypes; - - /** - * Stores the internal identifier of root concepts (concepts with no supertypes). - */ - private final int[] roots; - - private final LongKeyIntMap conceptIdToInternalId; - - private final long[] conceptIds; - - /** - * Creates a view of the concept hierarchy for the specified branch. - * @param branchPath the branch path. - * @return the new incremental taxonomy builder instance. - */ - public static SnomedHierarchy forBranch(final IBranchPath branchPath) { - throw new UnsupportedOperationException("Unsupported API, make it deprecated or remove it if not required by other services"); -// final AtomicReference conceptIdsReference = new AtomicReference(); -// final AtomicReference statementsReference = new AtomicReference(); -// -// final Runnable getConceptsRunnable = new Runnable() { -// @Override public void run() { -// final LongCollection conceptIds = getAllActiveConceptIds(branchPath); -// conceptIds.trimToSize(); -// conceptIdsReference.set(conceptIds.toArray()); -// } -// }; -// -// final Runnable getStatementsRunnable = new Runnable() { -// @Override public void run() { -// final IsAStatement[] statements = getActiveStatements(branchPath, StatementCollectionMode.NO_IDS); -// statementsReference.set(statements); -// } -// }; -// -// ForkJoinUtils.runInParallel(getStatementsRunnable, getConceptsRunnable); -// return new SnomedHierarchy(conceptIdsReference.get(), statementsReference.get()); - } - - public SnomedHierarchy(final long[] conceptIds, final IsAStatement[] statements) { - - Preconditions.checkNotNull(conceptIds, "Array of concept IDs argument cannot be null."); - Preconditions.checkNotNull(statements, "Array of statements argument cannot be null."); - - this.conceptIdToInternalId = PrimitiveMaps.newLongKeyIntOpenHashMapWithExpectedSize(conceptIds.length); - this.conceptIds = Arrays.copyOf(conceptIds, conceptIds.length); - - for (int i = 0; i < conceptIds.length; i++) { - conceptIdToInternalId.put(conceptIds[i], i); - } - - final int conceptCount = conceptIds.length; - - // allocate data - final int[] numberOfSuperTypes = new int[conceptCount]; - final int[] numberOfSubTypes = new int[conceptCount]; - - superTypes = new int[conceptCount][]; - subTypes = new int[conceptCount][]; - - // only for calculating bit set initial size, could be removed sometime - for (int i = 0; i < statements.length; i++) { - - final long sourceId = statements[i].getSourceId(); - final int sourceConceptInternalId = conceptIdToInternalId.get(sourceId); - numberOfSuperTypes[sourceConceptInternalId]++; - - final long destinationId = statements[i].getDestinationId(); - final int destinationConceptInternalId = conceptIdToInternalId.get(destinationId); - numberOfSubTypes[destinationConceptInternalId]++; - } - - int numberOfRootConcepts = 0; - - for (int i = 0; i < conceptCount; i++) { - - superTypes[i] = new int[numberOfSuperTypes[i]]; - subTypes[i] = new int[numberOfSubTypes[i]]; - - if (numberOfSuperTypes[i] < 1) { - numberOfRootConcepts++; - } - } - - roots = new int[numberOfRootConcepts]; - - // create index matrices for relationships - final int[] nextSuperTypeIndex = new int[conceptCount]; - final int[] nextSubTypeIndex = new int[conceptCount]; - - for (int i = 0; i < statements.length; i++) { - - final int sourceId = conceptIdToInternalId.get(statements[i].getSourceId()); - final int destinationId = conceptIdToInternalId.get(statements[i].getDestinationId()); - - superTypes[sourceId][nextSuperTypeIndex[sourceId]++] = destinationId; - subTypes[destinationId][nextSubTypeIndex[destinationId]++] = sourceId; - } - - int nextRootIndex = 0; - - for (int i = 0; i < conceptCount; i++) { - - if (numberOfSuperTypes[i] < 1) { - roots[nextRootIndex++] = i; - } - } - - Arrays.sort(roots); - } - - public LongSet getRootConceptIds() { - final LongSet result = PrimitiveSets.newLongOpenHashSetWithExpectedSize(roots.length); - for (int i = 0; i < roots.length; i++) { - result.add(getConceptId(roots[i])); - } - return result; - } - - public boolean isRoot(final long conceptId) { - return Arrays.binarySearch(roots, getInternalId(conceptId)) >= 0; - } - - public boolean isActive(final long conceptId) { - return conceptIdToInternalId.containsKey(conceptId); - } - - /** - * Returns with a set of IDs of the direct descendants of a SNOMED CT concept given by its unique ID. - * @param conceptId the ID of the SNOMED CT concept. - * @return a set of concept IDs representing the direct descendants of a concept. - */ - public LongSet getSubTypeIds(final long conceptId) { - - if (!isActive(conceptId)) { - return PrimitiveSets.newLongOpenHashSet(); - } - - final int id = getInternalId(conceptId); - - final int[] subtypes = subTypes[id]; - - if (CompareUtils.isEmpty(subtypes)) { //guard against lower bound cannot be negative: 0 - return PrimitiveSets.newLongOpenHashSet(); - } - - final LongSet $ = PrimitiveSets.newLongOpenHashSetWithExpectedSize(subtypes.length); - - for (int i = 0; i < subtypes.length; i++) { - $.add(getConceptId(subtypes[i])); - } - - return $; - } - - /** - * Returns with a set of IDs of the direct ancestors of a SNOMED CT concept given by its unique ID. - * @param conceptId the ID of the SNOMED CT concept. - * @return a set of concept IDs representing the direct ancestors of a concept. - */ - public LongSet getSuperTypeIds(final long conceptId) { - - if (!isActive(conceptId)) { - return PrimitiveSets.newLongOpenHashSet(); - } - - final int id = getInternalId(conceptId); - - final int[] supertypes = superTypes[id]; - - if (CompareUtils.isEmpty(supertypes)) { //guard against lower bound cannot be negative: 0 - return PrimitiveSets.newLongOpenHashSet(); - } - - final LongSet $ = PrimitiveSets.newLongOpenHashSetWithExpectedSize(supertypes.length); - - for (int i = 0; i < supertypes.length; i++) { - $.add(getConceptId(supertypes[i])); - } - - return $; - } - - /** - * Returns with a set of IDs of all descendants of a SNOMED CT concept given by its unique ID. - * @param conceptId the ID of the SNOMED CT concept. - * @return a set of concept IDs representing all descendants of a concept. - */ - public LongSet getAllSubTypesIds(final long conceptId) { - - if (!isActive(conceptId)) { - return PrimitiveSets.newLongOpenHashSet(); - } - - final int conceptCount = conceptIdToInternalId.size(); - final int id = getInternalId(conceptId); - - final BitSet subTypeMap = new BitSet(conceptCount); - - collectSubTypes(id, subTypeMap); - final int count = subTypeMap.cardinality(); - - if (0 == count) { //guard against lower bound cannot be negative: 0 - return PrimitiveSets.newLongOpenHashSet(); - } - - final LongSet $ = PrimitiveSets.newLongOpenHashSetWithExpectedSize(count); - for (int i = subTypeMap.nextSetBit(0); i >= 0; i = subTypeMap.nextSetBit(i + 1)) { - $.add(getConceptId(i)); - - } - - return $; - } - - /** - * Returns with a set of IDs of all ancestors of a SNOMED CT concept given by its unique ID. - * @param conceptId the ID of the SNOMED CT concept. - * @return a set of concept IDs representing all ancestors of a concept. - */ - public LongSet getAllSuperTypeIds(final long conceptId) { - - if (!isActive(conceptId)) { - return PrimitiveSets.newLongOpenHashSet(); - } - - final int conceptCount = conceptIdToInternalId.size(); - final int id = getInternalId(conceptId); - - final BitSet superTypeMap = new BitSet(conceptCount); - - collectSuperTypes(id, superTypeMap); - final int count = superTypeMap.cardinality(); - - if (0 == count) { //guard against lower bound cannot be negative: 0 - return PrimitiveSets.newLongOpenHashSet(); - } - - final LongSet $ = PrimitiveSets.newLongOpenHashSetWithExpectedSize(count); - for (int i = superTypeMap.nextSetBit(0); i >= 0; i = superTypeMap.nextSetBit(i + 1)) { - $.add(getConceptId(i)); - - } - - return $; - - } - - /*returns with the unique SNOMED CT ID of a concept given by its internal ID.*/ - private long getConceptId(final int internalId) { - return conceptIds[internalId]; - } - - /*returns with the internal ID of a concept specified by the unique SNOMED CT ID.*/ - private int getInternalId(final long conceptId) { - return conceptIdToInternalId.get(conceptId); - } - - private void collectSuperTypes(final int type, final BitSet superTypes) { - - final int[] relationships = this.superTypes[type]; - - if (relationships != null) { - - for (int i = 0; i < relationships.length; i++) { - if (!superTypes.get(relationships[i])) { - superTypes.set(relationships[i]); //set to true - collectSuperTypes(relationships[i], superTypes); - } - } - - } - - } - - private void collectSubTypes(final int type, final BitSet subTypes) { - - final int[] relationships = this.subTypes[type]; - - if (relationships != null) { - - for (int i = 0; i < relationships.length; i++) { - if (!subTypes.get(relationships[i])) { - subTypes.set(relationships[i]); //set to true - collectSubTypes(relationships[i], subTypes); - } - } - - } - - } - - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/ComponentEffectiveTimeRestoreChangeProcessor.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/ComponentEffectiveTimeRestoreChangeProcessor.java index 84f19800b0a..796252e3daa 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/ComponentEffectiveTimeRestoreChangeProcessor.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/ComponentEffectiveTimeRestoreChangeProcessor.java @@ -22,6 +22,7 @@ import java.util.Objects; import java.util.Optional; import java.util.Set; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import javax.validation.UnexpectedTypeException; @@ -174,7 +175,7 @@ private List getAvailableVersionPaths(IEventBus bus, String branchPath) .all() .build(SnomedDatastoreActivator.REPOSITORY_UUID) .execute(bus) - .getSync(); + .getSync(1, TimeUnit.MINUTES); final Map codeSystemsByMainBranch = Maps.uniqueIndex(codeSystems, CodeSystemEntry::getBranchPath); @@ -226,7 +227,7 @@ private List getAvailableVersionPaths(IEventBus bus, String branchPath) .filterByCodeSystemShortName(codeSystem.getShortName()) .build(SnomedDatastoreActivator.REPOSITORY_UUID) .execute(bus) - .getSync() + .getSync(1, TimeUnit.MINUTES) .stream() .collect(Collectors.toMap(version -> version.getPath(), v -> v)); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/ComponentInactivationChangeProcessor.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/ComponentInactivationChangeProcessor.java index 0adf9d44f02..45877b0a7ab 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/ComponentInactivationChangeProcessor.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/ComponentInactivationChangeProcessor.java @@ -29,6 +29,7 @@ import com.b2international.index.revision.RevisionSearcher; import com.b2international.index.revision.StagingArea; import com.b2international.index.revision.StagingArea.RevisionDiff; +import com.b2international.snowowl.core.date.EffectiveTimes; import com.b2international.snowowl.datastore.index.ChangeSetProcessorBase; import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; import com.b2international.snowowl.snomed.common.SnomedRf2Headers; @@ -149,18 +150,25 @@ public void process(StagingArea staging, RevisionSearcher searcher) throws IOExc final Map changedRevisions = staging.getChangedRevisions(); for (Hits hits : searcher.scroll(Query.select(SnomedRefSetMemberIndexEntry.class) .where(Expressions.builder() + .filter(SnomedRefSetMemberIndexEntry.Expressions.active()) .should(SnomedRefSetMemberIndexEntry.Expressions.referencedComponentIds(inactivatedComponentIds)) .should(SnomedRefSetMemberIndexEntry.Expressions.referenceSetId(inactivatedComponentIds)) + .setMinimumNumberShouldMatch(1) .build()) .limit(PAGE_SIZE) .build())) { hits.forEach(member -> { + // XXX: setting effectiveTime to -1L here should be undone by SnomedRepositoryPreCommitHook's effective time restorer, if needed if (changedRevisions.containsKey(member.getObjectId())) { - stageChange(member, SnomedRefSetMemberIndexEntry.builder((SnomedRefSetMemberIndexEntry) changedRevisions.get(member.getObjectId()).newRevision) +// stageChange(member, SnomedRefSetMemberIndexEntry.builder((SnomedRefSetMemberIndexEntry) changedRevisions.get(member.getObjectId()).newRevision) +// .active(false) +// .effectiveTime(EffectiveTimes.UNSET_EFFECTIVE_TIME) +// .build()); + } else { + stageChange(member, SnomedRefSetMemberIndexEntry.builder(member) .active(false) + .effectiveTime(EffectiveTimes.UNSET_EFFECTIVE_TIME) .build()); - } else { - stageChange(member, SnomedRefSetMemberIndexEntry.builder(member).active(false).build()); } }); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/SnomedRepositoryPreCommitHook.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/SnomedRepositoryPreCommitHook.java index a1485f199c7..e70286b591a 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/SnomedRepositoryPreCommitHook.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/change/SnomedRepositoryPreCommitHook.java @@ -81,7 +81,11 @@ protected void preUpdateDocuments(StagingArea staging, RevisionSearcher index) t protected Collection getChangeSetProcessors(StagingArea staging, RevisionSearcher index) throws IOException { final RepositoryContext context = ClassUtils.checkAndCast(staging.getContext(), RepositoryContext.class); // initialize OWL Expression converter on the current branch - final SnomedOWLExpressionConverter expressionConverter = new BranchRequest<>(staging.getBranchPath(), branchContext -> new SnomedOWLExpressionConverter(branchContext)).execute(context); + final SnomedOWLExpressionConverter expressionConverter = new BranchRequest<>(staging.getBranchPath(), branchContext -> { + return new SnomedOWLExpressionConverter(branchContext.inject() + .bind(RevisionSearcher.class, index) + .build()); + }).execute(context); final Set statedSourceIds = Sets.newHashSet(); final Set statedDestinationIds = Sets.newHashSet(); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/constraint/SnomedConstraintDocument.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/constraint/SnomedConstraintDocument.java index b595a673c8a..9f66a110860 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/constraint/SnomedConstraintDocument.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/constraint/SnomedConstraintDocument.java @@ -26,13 +26,10 @@ import com.b2international.index.Keyword; import com.b2international.index.query.Expression; import com.b2international.index.revision.Revision; -import com.b2international.snowowl.core.api.ITerminologyComponentIdProvider; import com.b2international.snowowl.datastore.index.RevisionDocument; -import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.core.domain.constraint.ConstraintForm; import com.b2international.snowowl.snomed.core.domain.constraint.ConstraintStrength; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; import com.google.common.base.MoreObjects.ToStringHelper; @@ -45,7 +42,7 @@ */ @Doc(type = "constraint") @JsonDeserialize(builder = SnomedConstraintDocument.Builder.class) -public final class SnomedConstraintDocument extends RevisionDocument implements ITerminologyComponentIdProvider { +public final class SnomedConstraintDocument extends RevisionDocument { private static final long serialVersionUID = -3084452506109842527L; public static Builder builder() { @@ -398,12 +395,6 @@ public Set getRelationshipKeys() { return relationshipKeys; } - @Override - @JsonIgnore - public String getTerminologyComponentId() { - return SnomedTerminologyComponentConstants.CONSTRAINT; - } - @Override protected ToStringHelper doToString() { return super.doToString() diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRefSetMemberIndexEntry.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRefSetMemberIndexEntry.java index deb8c125691..51e113ca911 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRefSetMemberIndexEntry.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/index/entry/SnomedRefSetMemberIndexEntry.java @@ -50,7 +50,6 @@ import com.b2international.snowowl.snomed.common.SnomedRf2Headers; import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.RelationshipRefinability; import com.b2international.snowowl.snomed.core.domain.SnomedConcept; import com.b2international.snowowl.snomed.core.domain.SnomedCoreComponent; import com.b2international.snowowl.snomed.core.domain.SnomedDescription; @@ -318,6 +317,10 @@ public static Expression mapPriority(Collection mapPriorities) { return matchAnyInt(Fields.MAP_PRIORITY, mapPriorities); } + public static Expression mapBlock(Collection mapBlocks) { + return matchAnyInt(Fields.MAP_BLOCK, mapBlocks); + } + public static Expression referencedComponentTypes(Collection referencedComponentTypes) { return matchAnyInt(Fields.REFERENCED_COMPONENT_TYPE, referencedComponentTypes.stream().map(Short::intValue).collect(Collectors.toSet())); } @@ -1337,11 +1340,6 @@ public Acceptability getAcceptability() { return Acceptability.getByConceptId(getAcceptabilityId()); } - @JsonIgnore - public RelationshipRefinability getRefinability() { - return RelationshipRefinability.getByConceptId(getValueId()); - } - @JsonIgnore public String getSourceEffectiveTimeAsString() { return EffectiveTimes.format(getSourceEffectiveTime(), DateFormats.SHORT); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/internal/rf2/SnomedExporterUtil.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/internal/rf2/SnomedExporterUtil.java deleted file mode 100644 index 6743ec5a9c8..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/internal/rf2/SnomedExporterUtil.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore.internal.rf2; - -import java.io.File; -import java.util.Set; - -import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants; -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSet; -import com.b2international.snowowl.snomed.datastore.MapSetType; -import com.b2international.snowowl.snomed.datastore.SnomedMapSetSetting; -import com.b2international.snowowl.snomed.datastore.SnomedRefSetUtil; -import com.google.common.collect.Sets; - -public final class SnomedExporterUtil { - - public static final String REFERENCE_SET_RELATIVE_ROOT_DIR = "Reference Sets"; - public static final String STRUCTURAL_REFERENCE_SET_RELATIVE_DIR = REFERENCE_SET_RELATIVE_ROOT_DIR + File.separatorChar + "Structural"; - public static final String PRODUCTION_REFERENCE_SET_RELATIVE_DIR = REFERENCE_SET_RELATIVE_ROOT_DIR + File.separatorChar + "Clinical" + File.separatorChar + "Production"; - - /** - * Creates a set of map set setting for the SNOMED CT publication process for the RF1 release format. - *

              NOTE: this method should not be called on the server side since it uses the Snor to retrieve information.
              - * This method should be invoked when clients are sure the RF1 release format is also selected for the SNOMED CT publication process. - * @param refSets the reference set identifier concept ID. - * @return a collection of map set setting. Can be empty if no map set should be created while publishing SNOMED CT into RF1. - */ - public static final Set createSettings(final Set refSets) { - final Set settings = Sets.newHashSet(); - for (final SnomedReferenceSet refSet : refSets) { - if (shouldCreateMapSetSetting(refSet)) - settings.add(createSetting(refSet)); - } - return settings; - } - - /*returns true if a map set setting should be created for the RF1 publication process*/ - private static boolean shouldCreateMapSetSetting(final SnomedReferenceSet refSet) { - return SnomedTerminologyComponentConstants.CONCEPT.equals(refSet.getReferencedComponentType()) && !(!SnomedRefSetUtil.isMapping(refSet.getType()) || isStructuralRefSet(refSet)); - } - - /*returns true if the passed in reference set identifier concept ID is either CTV3 simple map ID or SNOMED RT simple map reference set ID*/ - private static boolean isStructuralRefSet(final SnomedReferenceSet refSet) { - return Concepts.CTV3_SIMPLE_MAP_TYPE_REFERENCE_SET_ID.equals(refSet.getId()) - || Concepts.SNOMED_RT_SIMPLE_MAP_TYPE_REFERENCE_SET_ID.equals(refSet.getId()); - } - - /*creates and returns with a new map setting instance for the RF1 publication.*/ - private static SnomedMapSetSetting createSetting(final SnomedReferenceSet refSet) { - if (Concepts.ICD_O_REFERENCE_SET_ID.equals(refSet.getId())) - return SnomedMapSetSetting.ICD_O_SETTING; - else if (Concepts.ICD_9_CM_REFERENCE_SET_ID.equals(refSet.getId())) - return SnomedMapSetSetting.ICD_9_CM_SETTING; - else if (Concepts.ICD_10_REFERENCE_SET_ID.equals(refSet.getId())) - return SnomedMapSetSetting.ICD_10_SETTING; - else - return new SnomedMapSetSetting(refSet.getId(), "", "", "", "", MapSetType.UNSPECIFIED, SnomedRefSetUtil.isComplexMapping(refSet.getType())); - } - - private SnomedExporterUtil() { } - -} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/DescriptionRequestHelper.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/DescriptionRequestHelper.java deleted file mode 100644 index 74311555973..00000000000 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/DescriptionRequestHelper.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright 2011-2018 B2i Healthcare Pte Ltd, http://b2i.sg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.b2international.snowowl.snomed.datastore.request; - -import static com.google.common.collect.Maps.newHashMap; - -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.Set; - -import com.b2international.commons.ExplicitFirstOrdering; -import com.b2international.commons.http.ExtendedLocale; -import com.b2international.snowowl.snomed.common.SnomedConstants.Concepts; -import com.b2international.snowowl.snomed.core.domain.Acceptability; -import com.b2international.snowowl.snomed.core.domain.SnomedDescription; -import com.b2international.snowowl.snomed.core.domain.SnomedDescriptions; -import com.google.common.base.Function; -import com.google.common.base.Predicates; -import com.google.common.collect.FluentIterable; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Iterables; -import com.google.common.collect.Maps; -import com.google.common.collect.Multimap; -import com.google.common.collect.Multimaps; -import com.google.common.collect.Ordering; -import com.google.common.collect.Sets; - -/** - * @since 4.5 - */ -public abstract class DescriptionRequestHelper { - - private static class ExtractBestFunction implements Function, SnomedDescription> { - - private final List orderedValues; - private final Function valuesExtractor; - private final Ordering ordering; - - private ExtractBestFunction(List orderedValues, Function valuesExtractor) { - this.orderedValues = orderedValues; - this.valuesExtractor = valuesExtractor; - this.ordering = ExplicitFirstOrdering.create(orderedValues).onResultOf(valuesExtractor); - } - - @Override - public SnomedDescription apply(Collection descriptions) { - try { - - SnomedDescription candidate = ordering.min(descriptions); - - /* - * We're using ExplicitFirstOrdering so that it doesn't break in the middle of processing - * the collection, but this means that we have to test the final SnomedDescription again - * to see if it is suitable for our needs. - */ - if (orderedValues.contains(valuesExtractor.apply(candidate))) { - return candidate; - } else { - return null; - } - - } catch (NoSuchElementException e) { - return null; - } - } - } - - /** - * Retrieves the preferred term for the concept identified by the given identifier, if it exists. - *

              - * The first active description with "synonym" or descendant as the type will be returned, where all of the following conditions apply: - *

                - *
              • a matching well-known language reference set exists for the given {@code ExtendedLocale} (eg. {@code "en-GB"}); - *
              • the description has a language reference set member in the reference set identified above with preferred acceptability. - *
              - *

              - * If no such description can be found, the process is repeated with the next {@code Locale} in the list. - * - * @param conceptId the identifier of the concept for which the preferred term should be returned (may not be {@code null}) - * @param locales a list of {@link Locale}s to use, in order of preference - * @return the preferred term for the concept, or {@code null} if no results could be retrieved - */ - public SnomedDescription getPreferredTerm(String conceptId, List locales) { - SnomedDescriptionSearchRequestBuilder req = preparePtSearch(conceptId, locales); - SnomedDescriptions descriptions = execute(req); - Map bestMatchByConceptId = indexBestPreferredByConceptId(descriptions, locales); - return bestMatchByConceptId.get(conceptId); - } - - public Map getPreferredTerms(Set conceptIds, List locales) { - if (conceptIds.isEmpty()) { - return Collections.emptyMap(); - } - - SnomedDescriptionSearchRequestBuilder req = preparePtSearch(conceptIds, locales); - SnomedDescriptions descriptions = execute(req); - Map bestMatchByConceptId = indexBestPreferredByConceptId(descriptions, locales); - return bestMatchByConceptId; - } - - /** - * Retrieves the fully specified name for the concept identified by the given identifier, if it exists. - *

              - * The first active description with "fully specified name" as the type will be returned, where all of the following conditions apply: - *

                - *
              • a matching well-known language reference set exists for the given {@code Locale} (eg. {@code "en-GB"}); - *
              • the description has a language reference set member in the reference set identified above with preferred acceptability. - *
              - *

              - * If no such description can be found, the search is repeated with the following conditions: - *

                - *
              • the description's language code matches the supplied {@code Locale}'s language (eg. {@code "en"} on description, {@code "en-US"} on - * {@code Locale}); - *
              - *

              - * Failing that, the whole check starts from the beginning with the next {@link Locale} in the list. The method falls back to the first active - * fully specified name if the language code does not match any of the specified {@code Locale}s. - * - * @param conceptId - * - the identifier of the concept for which the preferred term should be returned (may not be {@code null}) - * @param locales - * - a list of {@link Locale}s to use, in order of preference - * @return the preferred term for the concept - */ - public SnomedDescription getFullySpecifiedName(String conceptId, List locales) { - SnomedDescriptionSearchRequestBuilder acceptabilityReq = prepareFsnSearchByAcceptability(conceptId, locales); - SnomedDescriptions preferredDescriptions = execute(acceptabilityReq); - Map bestPreferredByConceptId = indexBestPreferredByConceptId(preferredDescriptions, locales); - - if (bestPreferredByConceptId.containsKey(conceptId)) { - return bestPreferredByConceptId.get(conceptId); - } - - List languageCodes = getLanguageCodes(locales); - - SnomedDescriptionSearchRequestBuilder languageCodeReq = prepareFsnSearchByLanguageCodes(conceptId, languageCodes); - SnomedDescriptions languageCodeDescriptions = execute(languageCodeReq); - Map bestLanguageByConceptId = indexBestLanguageByConceptId(languageCodeDescriptions, languageCodes); - - if (bestLanguageByConceptId.containsKey(conceptId)) { - return bestLanguageByConceptId.get(conceptId); - } - - SnomedDescriptionSearchRequestBuilder defaultReq = prepareFsnSearchDefault(conceptId); - SnomedDescriptions activeFsnDescriptions = execute(defaultReq); - - /* - * XXX: we usually expect to see just one active FSN at this point, but depending on the given ExtendedLocale combinations, - * there might be more candidates remaining. - */ - return Iterables.getFirst(activeFsnDescriptions, null); - } - - public Map getFullySpecifiedNames(Set conceptIds, List locales) { - if (conceptIds.isEmpty()) { - return Collections.emptyMap(); - } - - Map fsnMap = newHashMap(); - Set conceptIdsNotInMap; - - SnomedDescriptionSearchRequestBuilder acceptabilityReq = prepareFsnSearchByAcceptability(conceptIds, locales); - SnomedDescriptions preferredDescriptions = execute(acceptabilityReq); - fsnMap.putAll(indexBestPreferredByConceptId(preferredDescriptions, locales)); - - conceptIdsNotInMap = Sets.difference(conceptIds, fsnMap.keySet()); - if (conceptIdsNotInMap.isEmpty()) { - return fsnMap; - } - - List languageCodes = getLanguageCodes(locales); - SnomedDescriptionSearchRequestBuilder languageCodeReq = prepareFsnSearchByLanguageCodes(conceptIdsNotInMap, languageCodes); - SnomedDescriptions languageCodeDescriptions = execute(languageCodeReq); - fsnMap.putAll(indexBestLanguageByConceptId(languageCodeDescriptions, languageCodes)); - - conceptIdsNotInMap = Sets.difference(conceptIds, fsnMap.keySet()); - if (conceptIdsNotInMap.isEmpty()) { - return fsnMap; - } - - SnomedDescriptionSearchRequestBuilder defaultReq = prepareFsnSearchDefault(conceptIdsNotInMap); - SnomedDescriptions activeFsnDescriptions = execute(defaultReq); - fsnMap.putAll(indexFirstByConceptId(activeFsnDescriptions)); - - return fsnMap; - } - - private List getLanguageCodes(List locales) { - return FluentIterable.from(locales) - .transform(new Function() { @Override public String apply(ExtendedLocale input) { return input.getLanguage(); } }) - .toSet() // preserves iteration order, but makes elements unique - .asList(); - } - - // FSN requests - - private SnomedDescriptionSearchRequestBuilder prepareFsnSearchByAcceptability(String conceptId, List locales) { - return prepareFsnSearchDefault(conceptId) - .filterByPreferredIn(locales); - } - - private SnomedDescriptionSearchRequestBuilder prepareFsnSearchByAcceptability(Collection conceptIds, List locales) { - return prepareFsnSearchDefault(conceptIds) - .filterByPreferredIn(locales); - } - - private SnomedDescriptionSearchRequestBuilder prepareFsnSearchByLanguageCodes(String conceptId, List languageCodes) { - return prepareFsnSearchDefault(conceptId) - .filterByLanguageCodes(languageCodes); - } - - private SnomedDescriptionSearchRequestBuilder prepareFsnSearchByLanguageCodes(Collection conceptIds, List languageCodes) { - return prepareFsnSearchDefault(conceptIds) - .filterByLanguageCodes(languageCodes); - } - - private SnomedDescriptionSearchRequestBuilder prepareFsnSearchDefault(String conceptId) { - return SnomedRequests.prepareSearchDescription() - .all() - .filterByActive(true) - .filterByConcept(conceptId) - .filterByType(Concepts.FULLY_SPECIFIED_NAME); - } - - private SnomedDescriptionSearchRequestBuilder prepareFsnSearchDefault(Collection conceptIds) { - return SnomedRequests.prepareSearchDescription() - .all() - .filterByActive(true) - .filterByConceptId(conceptIds) - .filterByType(Concepts.FULLY_SPECIFIED_NAME); - } - - // PT requests - - private SnomedDescriptionSearchRequestBuilder preparePtSearch(String conceptId, List locales) { - return SnomedRequests.prepareSearchDescription() - .all() - .filterByActive(true) - .filterByConcept(conceptId) - .filterByType("<<" + Concepts.SYNONYM) - .filterByPreferredIn(locales); - } - - private SnomedDescriptionSearchRequestBuilder preparePtSearch(Collection conceptIds, List locales) { - return SnomedRequests.prepareSearchDescription() - .all() - .filterByActive(true) - .filterByConceptId(conceptIds) - .filterByType("<<" + Concepts.SYNONYM) - .filterByPreferredIn(locales); - } - - public static Map indexBestPreferredByConceptId(Iterable descriptions, List orderedLocales) { - List languageRefSetIds = SnomedDescriptionSearchRequestBuilder.getLanguageRefSetIds(orderedLocales); - ExplicitFirstOrdering languageRefSetOrdering = ExplicitFirstOrdering.create(languageRefSetIds); - - return extractBest(indexByConceptId(descriptions), languageRefSetIds, description -> { - Set preferredLanguageRefSetIds = Maps.filterValues(description.getAcceptabilityMap(), Predicates.equalTo(Acceptability.PREFERRED)).keySet(); - // the explicit first ordering will put the VIP / anticipated / first priority languages codes to the min end. - return languageRefSetOrdering.min(preferredLanguageRefSetIds); - }); - } - - private Map indexBestLanguageByConceptId(SnomedDescriptions descriptions, List orderedLanguages) { - return extractBest(indexByConceptId(descriptions), orderedLanguages, description -> description.getLanguageCode()); - } - - private Map indexFirstByConceptId(SnomedDescriptions descriptions) { - return extractFirst(indexByConceptId(descriptions)); - } - - private static Multimap indexByConceptId(Iterable descriptions) { - return Multimaps.index(descriptions, description -> description.getConceptId()); - } - - private Map extractFirst(Multimap descriptionsByConceptId) { - Map uniqueMap = Maps.transformValues(descriptionsByConceptId.asMap(), values -> Iterables.getFirst(values, null)); - return ImmutableMap.copyOf(Maps.filterValues(uniqueMap, Predicates.notNull())); - } - - private static Map extractBest(Multimap descriptionsByConceptId, - List orderedValues, - Function predicateFactory) { - - Map uniqueMap = Maps.transformValues(descriptionsByConceptId.asMap(), new ExtractBestFunction(orderedValues, predicateFactory)); - return ImmutableMap.copyOf(Maps.filterValues(uniqueMap, Predicates.notNull())); - } - - protected abstract SnomedDescriptions execute(SnomedDescriptionSearchRequestBuilder req); -} diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedBulkRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedBulkRequest.java index 29428554c55..52c66c8b965 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedBulkRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedBulkRequest.java @@ -46,7 +46,7 @@ */ public final class SnomedBulkRequest extends DelegatingRequest { - SnomedBulkRequest(Request next) { + public SnomedBulkRequest(Request next) { super(next); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComponentCreateRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComponentCreateRequest.java index 70676117db0..315f3f53d21 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComponentCreateRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedComponentCreateRequest.java @@ -29,7 +29,7 @@ public interface SnomedComponentCreateRequest extends SnomedComponentRequest component) { if (null == moduleId) { return false; @@ -106,51 +106,77 @@ protected final , T extends Snom if (null == isActive() && getInactivationProperties() == null) { return false; } - + final boolean currentStatus = component.isActive(); final boolean newStatus = isActive() == null ? currentStatus : isActive(); - final String newInactivationIndicatorId = getInactivationProperties() == null || getInactivationProperties().getInactivationIndicatorId() == null ? "" : getInactivationProperties().getInactivationIndicatorId(); + final String newInactivationIndicatorId = getInactivationProperties() == null || getInactivationProperties().getInactivationIndicatorId() == null ? "" : getInactivationProperties().getInactivationIndicatorId(); final ImmutableMultimap.Builder newAssociationTargets = ImmutableMultimap.builder(); - + if (getInactivationProperties() != null && !CompareUtils.isEmpty(getInactivationProperties().getAssociationTargets())) { getInactivationProperties().getAssociationTargets().forEach(associationTarget -> { newAssociationTargets.put(associationTarget.getReferenceSetId(), associationTarget.getTargetComponentId()); }); } - + if (currentStatus && !newStatus) { - + // Active --> Inactive: concept inactivation, update indicator and association targets // (using default values if not given) - + inactivateComponent(context, component, updatedComponent); updateInactivationIndicator(context, component, newInactivationIndicatorId); updateAssociationTargets(context, component, newAssociationTargets.build()); + postInactivateComponent(context, component, updatedComponent); return true; - + } else if (!currentStatus && newStatus) { - + // Inactive --> Active: concept reactivation, clear indicator and association targets - + reactivateComponent(context, component, updatedComponent); updateInactivationIndicator(context, component, newInactivationIndicatorId); updateAssociationTargets(context, component, newAssociationTargets.build()); + postReactivateComponent(context, component, updatedComponent); return true; - + } else if (currentStatus == newStatus) { - + // Same status, allow indicator and/or association targets to be updated if required // (using original values that can be null) - + updateInactivationIndicator(context, component, getInactivationProperties() != null ? getInactivationProperties().getInactivationIndicatorId() : null); updateAssociationTargets(context, component, newAssociationTargets.build()); return false; - + } else { return false; } } + /** + * Subclasses may override this method to provide additional inactivation logic after inactivating the given component. + * @param + * @param + * @param context + * @param component + * @param updatedComponent + */ + protected , T extends SnomedComponentDocument> void postInactivateComponent(TransactionContext context, T component, B updatedComponent) { + // do nothing by default + } + + /** + * Subclasses may override this method to provide additional reactivation logic after reactivating the given component. + * @param + * @param + * @param context + * @param component + * @param updatedComponent + */ + protected , T extends SnomedComponentDocument> void postReactivateComponent(TransactionContext context, T component, B updatedComponent) { + // do nothing by default + } + protected final void updateAssociationTargets(final TransactionContext context, SnomedComponentDocument concept, Multimap associationTargets) { if (associationTargets == null) { return; @@ -162,7 +188,7 @@ protected final void updateInactivationIndicator(final TransactionContext contex if (newInactivationIndicatorId == null) { return; } - + final SnomedInactivationReasonUpdateRequest inactivationUpdateRequest = new SnomedInactivationReasonUpdateRequest(concept, getInactivationIndicatorRefSetId()); inactivationUpdateRequest.setInactivationValueId(newInactivationIndicatorId); inactivationUpdateRequest.execute(context); @@ -172,7 +198,7 @@ protected final , T extends Snom if (!component.isActive()) { throw new ComponentStatusConflictException(component.getId(), component.isActive()); } - + updatedComponent.active(false); } @@ -180,11 +206,11 @@ protected final , T extends Snom if (component.isActive()) { throw new ComponentStatusConflictException(component.getId(), component.isActive()); } - + updatedConcept.active(true); } - + @JsonIgnore protected abstract String getInactivationIndicatorRefSetId(); - + } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptSearchRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptSearchRequest.java index c7d153d7516..141e6d63965 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptSearchRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptSearchRequest.java @@ -25,6 +25,7 @@ import java.util.Collection; import java.util.Map; +import java.util.concurrent.TimeUnit; import com.b2international.index.Hits; import com.b2international.index.query.Expression; @@ -177,17 +178,17 @@ protected Expression prepareQuery(BranchContext context) { if (containsKey(OptionKey.ECL)) { final String ecl = getString(OptionKey.ECL); - queryBuilder.filter(EclExpression.of(ecl, Trees.INFERRED_FORM).resolveToExpression(context).getSync()); + queryBuilder.filter(EclExpression.of(ecl, Trees.INFERRED_FORM).resolveToExpression(context).getSync(3, TimeUnit.MINUTES)); } if (containsKey(OptionKey.STATED_ECL)) { final String ecl = getString(OptionKey.STATED_ECL); - queryBuilder.filter(EclExpression.of(ecl, Trees.STATED_FORM).resolveToExpression(context).getSync()); + queryBuilder.filter(EclExpression.of(ecl, Trees.STATED_FORM).resolveToExpression(context).getSync(3, TimeUnit.MINUTES)); } if (containsKey(OptionKey.QUERY)) { final String ql = getString(OptionKey.QUERY); - queryBuilder.filter(SnomedQueryExpression.of(ql).resolveToExpression(context).getSync()); + queryBuilder.filter(SnomedQueryExpression.of(ql).resolveToExpression(context).getSync(3, TimeUnit.MINUTES)); } Expression searchProfileQuery = null; diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptUpdateRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptUpdateRequest.java index e6d7860010e..7fc674ab3d7 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptUpdateRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedConceptUpdateRequest.java @@ -47,6 +47,7 @@ import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSet; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMembers; +import com.b2international.snowowl.snomed.datastore.index.entry.SnomedComponentDocument; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedConceptDocument; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedDocument; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedRefSetMemberIndexEntry; @@ -165,6 +166,13 @@ public Boolean execute(TransactionContext context) { return changed; } + @Override + protected , T extends SnomedComponentDocument> void postInactivateComponent(TransactionContext context, T component, B updatedComponent) { + // automatically set concept to primitive when inactivating it, unless the user decided to use a different definition status ID + // https://confluence.ihtsdotools.org/display/DOCEXTPG/5.4.2.3+Inactivate+Concept+in+an+Extension + ((SnomedConceptDocument.Builder) updatedComponent).primitive(definitionStatusId == null ? true : Concepts.PRIMITIVE.equals(definitionStatusId)); + } + @Override protected String getInactivationIndicatorRefSetId() { return Concepts.REFSET_CONCEPT_INACTIVITY_INDICATOR; diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequest.java index 2aff5a2bd42..bbb35c5efaf 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequest.java @@ -51,7 +51,6 @@ public final class SnomedDescriptionCreateRequest extends BaseSnomedComponentCre @NotNull private String caseSignificanceId; - @NotEmpty private Map acceptability; private String inactivationIndicatorId; @@ -105,10 +104,12 @@ public Set getRequiredComponentIds(TransactionContext context) { .add(caseSignificanceId) .add(typeId); - acceptability.forEach((refSetId, acceptability) -> { - result.add(refSetId); - result.add(acceptability.getConceptId()); - }); + if (acceptability != null) { + acceptability.forEach((refSetId, acceptability) -> { + result.add(refSetId); + result.add(acceptability.getConceptId()); + }); + } if (getModuleId() != null) { result.add(getModuleId()); diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequestBuilder.java index 1efda621fd8..09b37a24009 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionCreateRequestBuilder.java @@ -78,7 +78,9 @@ public SnomedDescriptionCreateRequestBuilder preferredIn(String languageReferenc } public SnomedDescriptionCreateRequestBuilder setAcceptability(Map acceptabilityMap) { - this.acceptabilityMap.putAll(acceptabilityMap); + if (acceptabilityMap != null) { + this.acceptabilityMap.putAll(acceptabilityMap); + } return getSelf(); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberSearchRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberSearchRequest.java index 28e2da68b4d..46cecffd9ef 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberSearchRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetMemberSearchRequest.java @@ -166,6 +166,9 @@ protected Expression prepareQuery(BranchContext context) { if (propKeys.remove(SnomedRf2Headers.FIELD_MAP_PRIORITY)) { queryBuilder.filter(mapPriority(propsFilter.getCollection(SnomedRf2Headers.FIELD_MAP_PRIORITY, Integer.class))); } + if (propKeys.remove(SnomedRf2Headers.FIELD_MAP_BLOCK)) { + queryBuilder.filter(mapBlock(propsFilter.getCollection(SnomedRf2Headers.FIELD_MAP_BLOCK, Integer.class))); + } if (propKeys.remove(SnomedRf2Headers.FIELD_VALUE_ID)) { addEclFilter(context, queryBuilder, propsFilter.getCollection(SnomedRf2Headers.FIELD_VALUE_ID, String.class), SnomedRefSetMemberIndexEntry.Expressions::valueIds); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetSearchRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetSearchRequestBuilder.java index 3aed01f2f6d..def656d7d38 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetSearchRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRefSetSearchRequestBuilder.java @@ -15,9 +15,6 @@ */ package com.b2international.snowowl.snomed.datastore.request; -import java.util.Collection; - -import com.b2international.commons.collections.Collections3; import com.b2international.snowowl.core.domain.BranchContext; import com.b2international.snowowl.core.request.SearchResourceRequest; import com.b2international.snowowl.core.terminology.TerminologyRegistry; @@ -46,8 +43,8 @@ public SnomedRefSetSearchRequestBuilder filterByType(SnomedRefSetType refSetType return addOption(SnomedRefSetSearchRequest.OptionKey.TYPE, refSetType); } - public SnomedRefSetSearchRequestBuilder filterByTypes(Collection refSetTypes) { - return addOption(SnomedRefSetSearchRequest.OptionKey.TYPE, Collections3.toImmutableSet(refSetTypes)); + public SnomedRefSetSearchRequestBuilder filterByTypes(Iterable refSetTypes) { + return addOption(SnomedRefSetSearchRequest.OptionKey.TYPE, refSetTypes); } public SnomedRefSetSearchRequestBuilder filterByReferencedComponentType(String referencedComponentType) { @@ -68,8 +65,8 @@ public SnomedRefSetSearchRequestBuilder filterByReferencedComponentType(Integer return addOption(SnomedRefSetSearchRequest.OptionKey.REFERENCED_COMPONENT_TYPE, referencedComponentType); } - public SnomedRefSetSearchRequestBuilder filterByReferencedComponentTypes(Collection referencedComponentTypes) { - return addOption(SnomedRefSetSearchRequest.OptionKey.REFERENCED_COMPONENT_TYPE, Collections3.toImmutableSet(referencedComponentTypes)); + public SnomedRefSetSearchRequestBuilder filterByReferencedComponentTypes(Iterable referencedComponentTypes) { + return addOption(SnomedRefSetSearchRequest.OptionKey.REFERENCED_COMPONENT_TYPE, referencedComponentTypes); } /** @@ -93,8 +90,8 @@ public SnomedRefSetSearchRequestBuilder filterByMapTargetComponentType(Integer m * @param mapTargetComponentTypes * - map target component type values */ - public SnomedRefSetSearchRequestBuilder filterByMapTargetComponentTypes(Collection mapTargetComponentTypes) { - return addOption(SnomedRefSetSearchRequest.OptionKey.MAP_TARGET_COMPONENT_TYPE, Collections3.toImmutableSet(mapTargetComponentTypes)); + public SnomedRefSetSearchRequestBuilder filterByMapTargetComponentTypes(Iterable mapTargetComponentTypes) { + return addOption(SnomedRefSetSearchRequest.OptionKey.MAP_TARGET_COMPONENT_TYPE, mapTargetComponentTypes); } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRepositoryCommitRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRepositoryCommitRequestBuilder.java index 1734b6b84e0..e4c31207de0 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRepositoryCommitRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedRepositoryCommitRequestBuilder.java @@ -16,14 +16,8 @@ package com.b2international.snowowl.snomed.datastore.request; import com.b2international.snowowl.core.domain.TransactionContext; -import com.b2international.snowowl.core.events.AsyncRequest; import com.b2international.snowowl.core.events.Request; -import com.b2international.snowowl.datastore.request.BranchRequest; -import com.b2international.snowowl.datastore.request.CommitResult; -import com.b2international.snowowl.datastore.request.HealthCheckingRequest; import com.b2international.snowowl.datastore.request.RepositoryCommitRequestBuilder; -import com.b2international.snowowl.datastore.request.RepositoryRequest; -import com.b2international.snowowl.datastore.request.RevisionIndexReadRequest; /** * @since 4.5 @@ -47,21 +41,5 @@ public SnomedRepositoryCommitRequestBuilder setDefaultModuleId(String defaultMod new IdRequest<>(new SnomedBulkRequest<>(super.getBody())), defaultModuleId); } - - @Override - public AsyncRequest build(String repositoryId, String branch) { - return new AsyncRequest<>( - new RepositoryRequest<>(repositoryId, - new HealthCheckingRequest<>( - new BranchRequest<>(branch, - new RevisionIndexReadRequest<>( - build() - ) - ), - allowedHealthstates() - ) - ) - ); - } } \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedSearchRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedSearchRequest.java index f4e50275ca7..bde24594d0c 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedSearchRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedSearchRequest.java @@ -17,6 +17,7 @@ import java.util.Collection; import java.util.Collections; +import java.util.concurrent.TimeUnit; import com.b2international.index.query.Expression; import com.b2international.index.query.Expressions.ExpressionBuilder; @@ -131,7 +132,7 @@ protected final Collection evaluateEclFilter(BranchContext context, Coll } // TODO replace sync call to concept search with async promise - idFilter = EclExpression.of(expression, eclExpressionForm()).resolve(context).getSync(); + idFilter = EclExpression.of(expression, eclExpressionForm()).resolve(context).getSync(3, TimeUnit.MINUTES); if (idFilter.isEmpty()) { throw new SearchResourceRequest.NoResultException(); } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedSearchRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedSearchRequestBuilder.java index 6b57d54e5c3..f2fffa5a3dc 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedSearchRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedSearchRequestBuilder.java @@ -88,7 +88,11 @@ public final B filterByEffectiveTime(String effectiveTime) { if (CompareUtils.isEmpty(effectiveTime)) { return getSelf(); } else { - return filterByEffectiveTime(EffectiveTimes.parse(effectiveTime, DateFormats.SHORT).getTime()); + if (EffectiveTimes.isUnset(effectiveTime)) { + return filterByEffectiveTime(EffectiveTimes.UNSET_EFFECTIVE_TIME); + } else { + return filterByEffectiveTime(EffectiveTimes.parse(effectiveTime, DateFormats.SHORT).getTime()); + } } } diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ExportRequest.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ExportRequest.java index e9a9b3ece43..7084162932f 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ExportRequest.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/SnomedRf2ExportRequest.java @@ -29,6 +29,7 @@ import java.time.Instant; import java.util.*; import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -531,7 +532,7 @@ private Optional getLatestModuleEffectiveTime(final RepositoryContext cont final Optional moduleDependencyMember = requestBuilder .build(context.id(), version.getPath()) .execute(context.service(IEventBus.class)) - .getSync() + .getSync(1, TimeUnit.MINUTES) .first(); return moduleDependencyMember.map(m -> { diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2RefSetExporter.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2RefSetExporter.java index 06669b5d4af..4f1487d15b8 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2RefSetExporter.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/rf2/exporter/Rf2RefSetExporter.java @@ -28,6 +28,7 @@ import java.util.stream.Stream; import com.b2international.commons.BooleanUtils; +import com.b2international.commons.FileUtils; import com.b2international.commons.StringUtils; import com.b2international.snowowl.core.domain.RepositoryContext; import com.b2international.snowowl.core.request.SearchResourceRequest.SortField; @@ -46,7 +47,6 @@ import com.b2international.snowowl.snomed.datastore.request.SnomedRefSetMemberSearchRequestBuilder; import com.b2international.snowowl.snomed.datastore.request.SnomedRequests; import com.google.common.base.CaseFormat; -import com.google.common.base.CharMatcher; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; @@ -55,13 +55,6 @@ */ public class Rf2RefSetExporter extends Rf2Exporter { - private static final char[] INVALID_RESOURCE_CHARACTERS = { '\\', '/', ':', '*', '?', '"', '<', '>', '|', '\0' }; - - private static final CharMatcher INVALID_RESOURCE_MATCHER = CharMatcher.WHITESPACE - .or(CharMatcher.anyOf(String.valueOf(INVALID_RESOURCE_CHARACTERS))) - .or(CharMatcher.JAVA_ISO_CONTROL) - .precomputed(); - protected final Rf2RefSetExportLayout refSetExportLayout; protected final SnomedRefSetType refSetType; protected final Collection referenceSets; @@ -174,7 +167,7 @@ private String getIndividualRefSetName() { : singleReferenceSet.getId(); // Replace dangerous characters with an underscore - return INVALID_RESOURCE_MATCHER.replaceFrom(refSetName, '_'); + return FileUtils.INVALID_RESOURCE_MATCHER.replaceFrom(refSetName, '_'); } private String toCamelCase(final String term) { diff --git a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/validation/detail/SnomedValidationIssueDetailExtension.java b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/validation/detail/SnomedValidationIssueDetailExtension.java index 6747bfa39db..74101b09186 100644 --- a/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/validation/detail/SnomedValidationIssueDetailExtension.java +++ b/snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/validation/detail/SnomedValidationIssueDetailExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -345,7 +345,7 @@ private void extendRelationshipIssueLabels(BranchContext context, Collection com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.ecl.tests eclipse-test-plugin @@ -59,7 +59,6 @@ org.eclipse.tycho tycho-surefire-plugin - ${tycho.version} **/*Test.java diff --git a/snomed/com.b2international.snowowl.snomed.ecl/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.ecl/META-INF/MANIFEST.MF index 4b7774acb23..58ed2d5df96 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.ecl/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Expression Constraint Language Bundle-Vendor: B2i Healthcare -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-SymbolicName: com.b2international.snowowl.snomed.ecl; singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0", diff --git a/snomed/com.b2international.snowowl.snomed.ecl/pom.xml b/snomed/com.b2international.snowowl.snomed.ecl/pom.xml index 562db27c7b0..a7831441d8b 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.ecl/pom.xml @@ -6,7 +6,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.ecl eclipse-plugin diff --git a/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/Ecl.java b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/Ecl.java index 944c4e9162e..c75d5a5a999 100644 --- a/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/Ecl.java +++ b/snomed/com.b2international.snowowl.snomed.ecl/src/com/b2international/snowowl/snomed/ecl/Ecl.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2011-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,10 @@ */ package com.b2international.snowowl.snomed.ecl; +import java.util.Collection; + +import com.google.common.base.Joiner; + /** * @since 5.4 */ @@ -22,7 +26,16 @@ public final class Ecl { public static final String ANY = "*"; public static final int MAX_CARDINALITY = -1; + public static final Joiner OR_JOINER = Joiner.on(" OR "); private Ecl() {} + + public static String or(String...eclExpressions) { + return OR_JOINER.join(eclExpressions); + } + + public static String or(Collection eclExpressions) { + return OR_JOINER.join(eclExpressions); + } } diff --git a/snomed/com.b2international.snowowl.snomed.etl.tests/.project b/snomed/com.b2international.snowowl.snomed.etl.tests/.project index 9adb3d267db..57d34f74454 100644 --- a/snomed/com.b2international.snowowl.snomed.etl.tests/.project +++ b/snomed/com.b2international.snowowl.snomed.etl.tests/.project @@ -37,4 +37,4 @@ org.eclipse.xtext.ui.shared.xtextNature org.eclipse.pde.PluginNature - + \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.etl.tests/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.etl.tests/META-INF/MANIFEST.MF index 2f2b436cb95..5069f6d79e9 100644 --- a/snomed/com.b2international.snowowl.snomed.etl.tests/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.etl.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Expression Template Language Tests Bundle-SymbolicName: com.b2international.snowowl.snomed.etl.tests -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/snomed/com.b2international.snowowl.snomed.etl.tests/pom.xml b/snomed/com.b2international.snowowl.snomed.etl.tests/pom.xml index 756edcc7d0e..b17fa2a097e 100644 --- a/snomed/com.b2international.snowowl.snomed.etl.tests/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.etl.tests/pom.xml @@ -3,7 +3,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.etl.tests eclipse-test-plugin @@ -55,7 +55,6 @@ org.eclipse.tycho tycho-surefire-plugin - ${tycho.version} **/*Test.java diff --git a/snomed/com.b2international.snowowl.snomed.etl/.classpath b/snomed/com.b2international.snowowl.snomed.etl/.classpath index dd9974e1e33..9224ace40c0 100644 --- a/snomed/com.b2international.snowowl.snomed.etl/.classpath +++ b/snomed/com.b2international.snowowl.snomed.etl/.classpath @@ -9,4 +9,4 @@ - + \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.etl/.project b/snomed/com.b2international.snowowl.snomed.etl/.project index a0fbfa0a466..cee95b84a28 100644 --- a/snomed/com.b2international.snowowl.snomed.etl/.project +++ b/snomed/com.b2international.snowowl.snomed.etl/.project @@ -37,4 +37,4 @@ org.eclipse.jdt.core.javanature org.eclipse.pde.PluginNature - + \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.etl/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.etl/META-INF/MANIFEST.MF index 0b5cdf8c5be..c421c448c61 100644 --- a/snomed/com.b2international.snowowl.snomed.etl/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.etl/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: SNOMED CT Expression Template Language Bundle-Vendor: B2i Healthcare -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-SymbolicName: com.b2international.snowowl.snomed.etl;singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0", diff --git a/snomed/com.b2international.snowowl.snomed.etl/pom.xml b/snomed/com.b2international.snowowl.snomed.etl/pom.xml index 27f07d39a0c..f8880a3e111 100644 --- a/snomed/com.b2international.snowowl.snomed.etl/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.etl/pom.xml @@ -11,7 +11,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/validation/AbstractEtlValidator.java b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/validation/AbstractEtlValidator.java index d8d9fc2e154..b8bfc89ead9 100644 --- a/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/validation/AbstractEtlValidator.java +++ b/snomed/com.b2international.snowowl.snomed.etl/src-gen/com/b2international/snowowl/snomed/etl/validation/AbstractEtlValidator.java @@ -1,6 +1,6 @@ /* * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,11 +21,11 @@ import org.eclipse.emf.ecore.EPackage; public abstract class AbstractEtlValidator extends EclValidator { - + @Override protected List getEPackages() { List result = new ArrayList(super.getEPackages()); result.add(com.b2international.snowowl.snomed.etl.etl.EtlPackage.eINSTANCE); return result; } -} +} \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.fhir/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.fhir/META-INF/MANIFEST.MF index c7831f59400..884c10c00d0 100644 --- a/snomed/com.b2international.snowowl.snomed.fhir/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.fhir/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT FHIR support Bundle-SymbolicName: com.b2international.snowowl.snomed.fhir;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: com.b2international.snowowl.fhir.core, diff --git a/snomed/com.b2international.snowowl.snomed.fhir/pom.xml b/snomed/com.b2international.snowowl.snomed.fhir/pom.xml index d68c585d775..56fdd32abe5 100644 --- a/snomed/com.b2international.snowowl.snomed.fhir/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.fhir/pom.xml @@ -4,7 +4,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.fhir diff --git a/snomed/com.b2international.snowowl.snomed.icons/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.icons/META-INF/MANIFEST.MF index 1aa67c319fa..7dfd5e282a4 100644 --- a/snomed/com.b2international.snowowl.snomed.icons/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.icons/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Icons Bundle-SymbolicName: com.b2international.snowowl.snomed.icons;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: com.b2international.commons, diff --git a/snomed/com.b2international.snowowl.snomed.icons/pom.xml b/snomed/com.b2international.snowowl.snomed.icons/pom.xml index a771e8a3c43..b9af7222112 100644 --- a/snomed/com.b2international.snowowl.snomed.icons/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.icons/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.ql.tests/.project b/snomed/com.b2international.snowowl.snomed.ql.tests/.project index 0d0152b8f91..19fb82ee35c 100644 --- a/snomed/com.b2international.snowowl.snomed.ql.tests/.project +++ b/snomed/com.b2international.snowowl.snomed.ql.tests/.project @@ -37,4 +37,4 @@ org.eclipse.xtext.ui.shared.xtextNature org.eclipse.pde.PluginNature - + \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.ql.tests/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.ql.tests/META-INF/MANIFEST.MF index cee82406056..c0ffa702f5b 100644 --- a/snomed/com.b2international.snowowl.snomed.ql.tests/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.ql.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: SNOMED CT Query Language Tests Bundle-SymbolicName: com.b2international.snowowl.snomed.ql.tests -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/snomed/com.b2international.snowowl.snomed.ql.tests/pom.xml b/snomed/com.b2international.snowowl.snomed.ql.tests/pom.xml index b2507974c36..5afd96fc0e8 100644 --- a/snomed/com.b2international.snowowl.snomed.ql.tests/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.ql.tests/pom.xml @@ -7,7 +7,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.ql.tests eclipse-test-plugin @@ -59,7 +59,6 @@ org.eclipse.tycho tycho-surefire-plugin - ${tycho.version} **/*Test.java diff --git a/snomed/com.b2international.snowowl.snomed.ql/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.ql/META-INF/MANIFEST.MF index 14644e9b704..0642475ab6e 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.ql/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: SNOMED CT Query Language Module Bundle-Vendor: B2i Healthcare -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-SymbolicName: com.b2international.snowowl.snomed.ql;singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0", diff --git a/snomed/com.b2international.snowowl.snomed.ql/pom.xml b/snomed/com.b2international.snowowl.snomed.ql/pom.xml index cbb84b0dd85..1519d76f394 100644 --- a/snomed/com.b2international.snowowl.snomed.ql/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.ql/pom.xml @@ -11,7 +11,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/snomed/com.b2international.snowowl.snomed.reasoner.tests/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.reasoner.tests/META-INF/MANIFEST.MF index 00a59c1bb88..54565da4ad1 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner.tests/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.reasoner.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Reasoner Tests Bundle-SymbolicName: com.b2international.snowowl.snomed.reasoner.tests;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Fragment-Host: com.b2international.snowowl.snomed.reasoner Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/snomed/com.b2international.snowowl.snomed.reasoner.tests/pom.xml b/snomed/com.b2international.snowowl.snomed.reasoner.tests/pom.xml index c97f125095a..964da1045a4 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner.tests/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.reasoner.tests/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.b2international.snowowl - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT snomed-parent com.b2international.snowowl.snomed.reasoner.tests @@ -19,26 +19,11 @@ - - eclipse-plugin - ch.qos.logback.classic - ${logback.versionRange} - - - eclipse-plugin - ch.qos.logback.core - ${logback.versionRange} - eclipse-plugin com.b2international.collections.fastutil 0.0.0 - - eclipse-plugin - com.sun.el - 0.0.0 - diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.reasoner/META-INF/MANIFEST.MF index 195d0de99bd..ac0e74736aa 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.reasoner/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Reasoner Plug-in Bundle-SymbolicName: com.b2international.snowowl.snomed.reasoner;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", org.semanticweb.owl.owlapi;bundle-version="[4.5.10,5.0.0)", diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/pom.xml b/snomed/com.b2international.snowowl.snomed.reasoner/pom.xml index 475f614518d..15331e61c65 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.reasoner/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.reasoner eclipse-plugin diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/SnomedReasonerPlugin.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/SnomedReasonerPlugin.java index 80cd6644525..9cb2270367b 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/SnomedReasonerPlugin.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/SnomedReasonerPlugin.java @@ -22,11 +22,14 @@ import com.b2international.index.Index; import com.b2international.snowowl.core.RepositoryManager; import com.b2international.snowowl.core.config.SnowOwlConfiguration; +import com.b2international.snowowl.core.repository.ComponentDeletionPolicy; +import com.b2international.snowowl.core.repository.CompositeComponentDeletionPolicy; import com.b2international.snowowl.core.repository.TerminologyRepositoryConfigurer; import com.b2international.snowowl.core.setup.Environment; import com.b2international.snowowl.core.setup.Plugin; import com.b2international.snowowl.snomed.datastore.SnomedDatastoreActivator; import com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration; +import com.b2international.snowowl.snomed.datastore.index.constraint.SnomedConstraintDocument; import com.b2international.snowowl.snomed.reasoner.classification.ClassificationTracker; import com.b2international.snowowl.snomed.reasoner.index.ClassificationTaskDocument; import com.b2international.snowowl.snomed.reasoner.index.ConceptChangeDocument; @@ -72,4 +75,9 @@ public String getRepositoryId() { return SnomedDatastoreActivator.REPOSITORY_UUID; } + @Override + public CompositeComponentDeletionPolicy getComponentDeletionPolicy() { + return CompositeComponentDeletionPolicy.of(SnomedConstraintDocument.class, ComponentDeletionPolicy.ALLOW); + } + } diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSaveRequest.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSaveRequest.java index 4fbed82c36d..7cdfcd1c02a 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSaveRequest.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/ClassificationSaveRequest.java @@ -73,10 +73,14 @@ final class ClassificationSaveRequest implements Request doBuild() { request.setCommitComment(commitComment); request.setModuleId(moduleId); request.setNamespace(namespace); + request.setAssignerType(assignerType); request.setFixEquivalences(fixEquivalences); request.setHandleConcreteDomains(handleConcreteDomains); return request; diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/SaveJobRequest.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/SaveJobRequest.java index 259904bf44e..27c78ac52d8 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/SaveJobRequest.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/SaveJobRequest.java @@ -56,9 +56,7 @@ import com.b2international.snowowl.snomed.core.domain.SnomedRelationship; import com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember; import com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration; -import com.b2international.snowowl.snomed.datastore.id.assigner.DefaultNamespaceAndModuleAssigner; import com.b2international.snowowl.snomed.datastore.id.assigner.SnomedNamespaceAndModuleAssigner; -import com.b2international.snowowl.snomed.datastore.id.assigner.SnomedNamespaceAndModuleAssignerProvider; import com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry; import com.b2international.snowowl.snomed.datastore.request.IdRequest; import com.b2international.snowowl.snomed.datastore.request.SnomedDescriptionCreateRequestBuilder; @@ -108,12 +106,14 @@ final class SaveJobRequest implements Request, BranchAcc @NotEmpty private String commitComment; - // @Nullable + @NotEmpty private String moduleId; - // @Nullable + @NotNull private String namespace; + private String assignerType; + private boolean fixEquivalences; private boolean handleConcreteDomains; @@ -144,6 +144,10 @@ void setNamespace(final String namespace) { this.namespace = namespace; } + void setAssignerType(final String assignerType) { + this.assignerType = assignerType; + } + void setFixEquivalences(final boolean fixEquivalences) { this.fixEquivalences = fixEquivalences; } @@ -585,17 +589,18 @@ private Set mergeEquivalentConcepts(final BranchContext context, } private SnomedNamespaceAndModuleAssigner createNamespaceAndModuleAssigner(final BranchContext context) { - final SnomedNamespaceAndModuleAssigner assigner; - if (namespace != null || moduleId != null) { - assigner = new DefaultNamespaceAndModuleAssigner(namespace, moduleId); + // Override assigner type if given + final String selectedType; + if (assignerType != null) { + selectedType = assignerType; } else { final SnomedCoreConfiguration configuration = context.service(SnomedCoreConfiguration.class); - final String namespaceModuleAssignerType = configuration.getNamespaceModuleAssigner(); - assigner = context.service(SnomedNamespaceAndModuleAssignerProvider.class).get(namespaceModuleAssignerType); + selectedType = configuration.getNamespaceModuleAssigner(); } + + final SnomedNamespaceAndModuleAssigner assigner = SnomedNamespaceAndModuleAssigner.create(selectedType, moduleId, namespace); - final String assignerName = assigner.getClass().getSimpleName(); - LOG.info("Reasoner service will use {} for relationship/concrete domain namespace and module assignment.", assignerName); + LOG.info("Reasoner service will use {} for relationship/concrete domain namespace and module assignment.", assigner); return assigner; } diff --git a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/SaveJobRequestBuilder.java b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/SaveJobRequestBuilder.java index 3b69c45941a..8207d0db418 100644 --- a/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/SaveJobRequestBuilder.java +++ b/snomed/com.b2international.snowowl.snomed.reasoner/src/com/b2international/snowowl/snomed/reasoner/request/SaveJobRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 B2i Healthcare Pte Ltd, http://b2i.sg + * Copyright 2018-2020 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,6 +34,7 @@ public final class SaveJobRequestBuilder private String commitComment; private String moduleId; private String namespace; + private String assignerType; private boolean fixEquivalences; private boolean handleConcreteDomains; @@ -67,6 +68,11 @@ public SaveJobRequestBuilder setNamespace(String namespace) { return getSelf(); } + public SaveJobRequestBuilder setAssignerType(String assignerType) { + this.assignerType = assignerType; + return getSelf(); + } + public SaveJobRequestBuilder setFixEquivalences(boolean fixEquivalences) { this.fixEquivalences = fixEquivalences; return getSelf(); @@ -86,6 +92,7 @@ protected Request doBuild() { request.setCommitComment(commitComment); request.setModuleId(moduleId); request.setNamespace(namespace); + request.setAssignerType(assignerType); request.setFixEquivalences(fixEquivalences); request.setHandleConcreteDomains(handleConcreteDomains); return request; diff --git a/snomed/com.b2international.snowowl.snomed.scg.tests/.classpath b/snomed/com.b2international.snowowl.snomed.scg.tests/.classpath index 48522a76f44..67c92b4017a 100644 --- a/snomed/com.b2international.snowowl.snomed.scg.tests/.classpath +++ b/snomed/com.b2international.snowowl.snomed.scg.tests/.classpath @@ -22,4 +22,4 @@ - + \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg.tests/.project b/snomed/com.b2international.snowowl.snomed.scg.tests/.project index b6ba7c821d8..a12c1cac335 100644 --- a/snomed/com.b2international.snowowl.snomed.scg.tests/.project +++ b/snomed/com.b2international.snowowl.snomed.scg.tests/.project @@ -37,4 +37,4 @@ org.eclipse.pde.PluginNature org.eclipse.xtext.ui.shared.xtextNature - + \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg.tests/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.scg.tests/META-INF/MANIFEST.MF index 37aafab398f..a79baff4c06 100644 --- a/snomed/com.b2international.snowowl.snomed.scg.tests/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.scg.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Compositional Grammar Tests Bundle-SymbolicName: com.b2international.snowowl.snomed.scg.tests -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy diff --git a/snomed/com.b2international.snowowl.snomed.scg.tests/pom.xml b/snomed/com.b2international.snowowl.snomed.scg.tests/pom.xml index 264936c8309..bc7fb1f9a5b 100644 --- a/snomed/com.b2international.snowowl.snomed.scg.tests/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.scg.tests/pom.xml @@ -3,7 +3,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.scg.tests eclipse-test-plugin @@ -55,7 +55,6 @@ org.eclipse.tycho tycho-surefire-plugin - ${tycho.version} **/*Test.java diff --git a/snomed/com.b2international.snowowl.snomed.scg/.project b/snomed/com.b2international.snowowl.snomed.scg/.project index 429c416225c..ef01525de30 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/.project +++ b/snomed/com.b2international.snowowl.snomed.scg/.project @@ -25,10 +25,16 @@ + + org.eclipse.m2e.core.maven2Builder + + + + org.eclipse.m2e.core.maven2Nature org.eclipse.xtext.ui.shared.xtextNature org.eclipse.jdt.core.javanature org.eclipse.pde.PluginNature - + \ No newline at end of file diff --git a/snomed/com.b2international.snowowl.snomed.scg/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.snomed.scg/META-INF/MANIFEST.MF index ee5576e5d12..20b1066e0ce 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.snomed.scg/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: com.b2international.snowowl.snomed.scg Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Compositional Grammar Bundle-Vendor: B2i Healthcare -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-SymbolicName: com.b2international.snowowl.snomed.scg;singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0", diff --git a/snomed/com.b2international.snowowl.snomed.scg/pom.xml b/snomed/com.b2international.snowowl.snomed.scg/pom.xml index d0c1d338c13..d826a2a12c9 100644 --- a/snomed/com.b2international.snowowl.snomed.scg/pom.xml +++ b/snomed/com.b2international.snowowl.snomed.scg/pom.xml @@ -6,7 +6,7 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.snomed.scg eclipse-plugin diff --git a/snomed/com.b2international.snowowl.validation.snomed/.launch/validation-snomed-tests.launch b/snomed/com.b2international.snowowl.validation.snomed/.launch/validation-snomed-tests.launch new file mode 100644 index 00000000000..027b959035f --- /dev/null +++ b/snomed/com.b2international.snowowl.validation.snomed/.launch/validation-snomed-tests.launch @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/snomed/com.b2international.snowowl.validation.snomed/META-INF/MANIFEST.MF b/snomed/com.b2international.snowowl.validation.snomed/META-INF/MANIFEST.MF index 1f307c01f12..3f1991f6596 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/META-INF/MANIFEST.MF +++ b/snomed/com.b2international.snowowl.validation.snomed/META-INF/MANIFEST.MF @@ -2,18 +2,18 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl SNOMED CT Validation Rules Bundle-SymbolicName: com.b2international.snowowl.validation.snomed;singleton:=true -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", org.eclipse.xtext;bundle-version="2.11.0", - org.junit;bundle-version="4.12.0", - org.assertj.core;bundle-version="1.7.1", + org.junit;bundle-version="4.12.0";resolution:=optional, + org.assertj.core;bundle-version="1.7.1";resolution:=optional, com.b2international.snowowl.snomed.ecl, com.b2international.snowowl.snomed.datastore, com.b2international.collections.jackson, - com.b2international.snowowl.test.commons, - com.b2international.index.tests.tools, + com.b2international.snowowl.test.commons;resolution:=optional, + com.b2international.index.tests.tools;resolution:=optional, com.fasterxml.jackson.core.jackson-databind;bundle-version="[2.9.9,3.0.0]", com.fasterxml.jackson.core.jackson-annotations;bundle-version="[2.9.9,3.0.0]" Bundle-ActivationPolicy: lazy diff --git a/snomed/com.b2international.snowowl.validation.snomed/build.properties b/snomed/com.b2international.snowowl.validation.snomed/build.properties index d4c538de685..07df6bff794 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/build.properties +++ b/snomed/com.b2international.snowowl.validation.snomed/build.properties @@ -1,4 +1,5 @@ -source.. = src/main/resources/ -output.. = target/classes/ +source.. = src/main/resources/,\ + src/test/java/ +output.. = target/classes bin.includes = META-INF/,\ - src/main/resources/ + . diff --git a/snomed/com.b2international.snowowl.validation.snomed/pom.xml b/snomed/com.b2international.snowowl.validation.snomed/pom.xml index ff7c58d8281..9b9d46a6648 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/pom.xml +++ b/snomed/com.b2international.snowowl.validation.snomed/pom.xml @@ -9,8 +9,9 @@ com.b2international.snowowl snomed-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT + @@ -20,16 +21,6 @@ - - eclipse-plugin - ch.qos.logback.classic - ${logback.versionRange} - - - eclipse-plugin - ch.qos.logback.core - ${logback.versionRange} - eclipse-plugin com.b2international.collections.fastutil @@ -37,12 +28,12 @@ eclipse-plugin - com.sun.el + com.b2international.snowowl.identity.file 0.0.0 eclipse-plugin - com.b2international.snowowl.identity.file + com.b2international.scripting.groovy 0.0.0 @@ -52,20 +43,12 @@ org.eclipse.tycho tycho-surefire-plugin - - - snomed-validation-tests - - test - - - ${tycho.testArgLine} -Xms1g -Xmx1g -XX:+AlwaysLockClassLoader -Dosgi.classloader.type=nonparallel -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch - - **/AllGenericValidationTests.java - - - - + + ${tycho.testArgLine} -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch + + **/AllGenericValidationTests.java + + diff --git a/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule666.groovy b/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule666.groovy index 1fc175d6325..1b39ef54c1a 100644 --- a/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule666.groovy +++ b/snomed/com.b2international.snowowl.validation.snomed/src/main/resources/scripts/rule666.groovy @@ -33,7 +33,6 @@ SnomedRequests.prepareSearchConcept() SnomedConceptSearchRequestBuilder conceptsRequestBuilder = SnomedRequests.prepareSearchConcept() .filterByActive(true) .setLimit(50_000) - .setScroll("5m") .setExpand("preferredDescriptions()") if (params.isUnpublishedOnly) { diff --git a/snomed/pom.xml b/snomed/pom.xml index 05d02914391..9aa83fd2e61 100644 --- a/snomed/pom.xml +++ b/snomed/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/tests/com.b2international.restassured-all/META-INF/MANIFEST.MF b/tests/com.b2international.restassured-all/META-INF/MANIFEST.MF index 5138c1bfa16..6bd62018918 100644 --- a/tests/com.b2international.restassured-all/META-INF/MANIFEST.MF +++ b/tests/com.b2international.restassured-all/META-INF/MANIFEST.MF @@ -38,7 +38,6 @@ Export-Package: io.restassured, Require-Bundle: org.hamcrest.core;bundle-version="1.3.0";visibility:=reexport, org.hamcrest.library;bundle-version="1.3.0";visibility:=reexport, org.apache.commons.codec;bundle-version="1.10.0", - org.apache.commons.logging;bundle-version="1.2.0", org.apache.commons.lang3;bundle-version="3.1.0", org.apache.httpcomponents.httpasyncclient;bundle-version="4.1.4", org.apache.httpcomponents.httpclient;bundle-version="4.5.3", @@ -95,6 +94,7 @@ Import-Package: groovy.beans, javax.xml.bind.annotation, javax.xml.bind.helpers, javax.xml.bind.util, + org.apache.commons.logging;version="1.2.0", org.codehaus.groovy, org.codehaus.groovy.ant, org.codehaus.groovy.antlr, diff --git a/tests/com.b2international.restassured-all/pom.xml b/tests/com.b2international.restassured-all/pom.xml index 8c114239a80..567eca72131 100644 --- a/tests/com.b2international.restassured-all/pom.xml +++ b/tests/com.b2international.restassured-all/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl tests-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/tests/com.b2international.snowowl.test.commons/META-INF/MANIFEST.MF b/tests/com.b2international.snowowl.test.commons/META-INF/MANIFEST.MF index fcff39028a3..235604e025a 100644 --- a/tests/com.b2international.snowowl.test.commons/META-INF/MANIFEST.MF +++ b/tests/com.b2international.snowowl.test.commons/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Snow Owl Test Commons Bundle-SymbolicName: com.b2international.snowowl.test.commons -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2i Healthcare Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0", org.junit;bundle-version="4.12.0";visibility:=reexport, diff --git a/tests/com.b2international.snowowl.test.commons/pom.xml b/tests/com.b2international.snowowl.test.commons/pom.xml index 81423c5f7f2..5ae5b0595aa 100644 --- a/tests/com.b2international.snowowl.test.commons/pom.xml +++ b/tests/com.b2international.snowowl.test.commons/pom.xml @@ -8,7 +8,7 @@ com.b2international.snowowl tests-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT diff --git a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/SnomedContentRule.java b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/SnomedContentRule.java index fab62b70888..f3e6efe31f1 100644 --- a/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/SnomedContentRule.java +++ b/tests/com.b2international.snowowl.test.commons/src/com/b2international/snowowl/test/commons/SnomedContentRule.java @@ -55,10 +55,14 @@ public SnomedContentRule(final String codeSystemShortName, final String branchPa } public SnomedContentRule(final String codeSystemShortName, final String branchPath, final Class relativeClass, final String importArchivePath, final Rf2ReleaseType contentType) { + this(codeSystemShortName, branchPath, relativeClass, false, importArchivePath, contentType); + } + + public SnomedContentRule(final String codeSystemShortName, final String branchPath, final Class relativeClass, final boolean isFragment, final String importArchivePath, final Rf2ReleaseType contentType) { this.codeSystemShortName = checkNotNull(codeSystemShortName, "codeSystem"); this.codeSystemBranchPath = checkNotNull(branchPath, "branchPath"); this.contentType = checkNotNull(contentType, "contentType"); - this.importArchive = PlatformUtil.toAbsolutePathBundleEntry(relativeClass, importArchivePath).toFile(); + this.importArchive = isFragment ? PlatformUtil.toAbsolutePath(relativeClass, importArchivePath).toFile() : PlatformUtil.toAbsolutePathBundleEntry(relativeClass, importArchivePath).toFile(); } @Override diff --git a/tests/com.b2international.snowowl.test.dependencies/META-INF/MANIFEST.MF b/tests/com.b2international.snowowl.test.dependencies/META-INF/MANIFEST.MF index f343945aae6..9987746ecf6 100644 --- a/tests/com.b2international.snowowl.test.dependencies/META-INF/MANIFEST.MF +++ b/tests/com.b2international.snowowl.test.dependencies/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Test Dependencies Bundle-SymbolicName: com.b2international.snowowl.test.dependencies -Bundle-Version: 7.4.0.qualifier +Bundle-Version: 7.5.0.qualifier Bundle-Vendor: B2iHealthcare Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ClassPath: ., diff --git a/tests/com.b2international.snowowl.test.dependencies/pom.xml b/tests/com.b2international.snowowl.test.dependencies/pom.xml index b44b9ec9bdf..f0a17c3a4d3 100644 --- a/tests/com.b2international.snowowl.test.dependencies/pom.xml +++ b/tests/com.b2international.snowowl.test.dependencies/pom.xml @@ -6,7 +6,7 @@ 4.0.0 com.b2international.snowowl - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT tests-parent com.b2international.snowowl.test.dependencies diff --git a/tests/com.b2international.snowowl.test.feature/feature.xml b/tests/com.b2international.snowowl.test.feature/feature.xml index 4809371f3dc..972a1ea2e6c 100644 --- a/tests/com.b2international.snowowl.test.feature/feature.xml +++ b/tests/com.b2international.snowowl.test.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/tests/com.b2international.snowowl.test.feature/pom.xml b/tests/com.b2international.snowowl.test.feature/pom.xml index da69ee9c6e3..8eeac62fe66 100644 --- a/tests/com.b2international.snowowl.test.feature/pom.xml +++ b/tests/com.b2international.snowowl.test.feature/pom.xml @@ -5,7 +5,7 @@ com.b2international.snowowl tests-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT com.b2international.snowowl.test.feature eclipse-feature diff --git a/tests/pom.xml b/tests/pom.xml index 592a0e2ebdc..e1e9a401566 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -9,7 +9,7 @@ com.b2international.snowowl snowowl-parent - 7.4.0-SNAPSHOT + 7.5.0-SNAPSHOT From 1551dcf29622831810cbfadf887a1018d01d875a Mon Sep 17 00:00:00 2001 From: ivelina-yordanova <56301327+ivelina-yordanova@users.noreply.github.com> Date: Wed, 4 Mar 2020 09:59:26 +0000 Subject: [PATCH 6/7] [CHR-1516]- revert deploy pom bit, change lang hierarchy (#9) * chr-1516- revert accidentally overridden pom bit * chr-1516- change lang config --- .../src/configuration/snowowl.yml | 8 +------- docker/config/snowowl.yml | 8 +------- .../src/configuration/snowowl.yml | 8 +------- pom.xml | 14 +++++++------- .../assembly/common/configuration/snowowl.yml | 8 +------- .../src/configuration/snowowl.yml | 8 +------- 6 files changed, 12 insertions(+), 42 deletions(-) diff --git a/core/com.b2international.snowowl.core.rest.tests/src/configuration/snowowl.yml b/core/com.b2international.snowowl.core.rest.tests/src/configuration/snowowl.yml index e91c6f0c979..cb763b2a1c4 100644 --- a/core/com.b2international.snowowl.core.rest.tests/src/configuration/snowowl.yml +++ b/core/com.b2international.snowowl.core.rest.tests/src/configuration/snowowl.yml @@ -11,16 +11,10 @@ snomed: languages: - code: en - refSetIds: ["900000000000509007", "900000000000508004"] + refSetIds: ["900000000000509007", "900000000000508004", "999001261000000100", "999000671000001103"] - code: en-us refSetIds: ["900000000000509007"] - code: en-gb refSetIds: ["900000000000508004"] - - - code: en-x-999001261000000100 - refSetIds: ["999001261000000100"] - - - code: en-x-999000671000001103 - refSetIds: ["999000671000001103"] diff --git a/docker/config/snowowl.yml b/docker/config/snowowl.yml index 26afc765751..110a55f9204 100644 --- a/docker/config/snowowl.yml +++ b/docker/config/snowowl.yml @@ -21,19 +21,13 @@ snomed: languages: - code: en - refSetIds: ["900000000000509007", "900000000000508004"] + refSetIds: ["900000000000509007", "900000000000508004", "999001261000000100", "999000671000001103"] - code: en-us refSetIds: ["900000000000509007"] - code: en-gb refSetIds: ["900000000000508004"] - - - code: en-x-999001261000000100 - refSetIds: ["999001261000000100"] - - - code: en-x-999000671000001103 - refSetIds: ["999000671000001103"] monitoring: enabled: true diff --git a/fhir/com.b2international.snowowl.fhir.rest.tests/src/configuration/snowowl.yml b/fhir/com.b2international.snowowl.fhir.rest.tests/src/configuration/snowowl.yml index f93b96e6b87..5335053d93e 100644 --- a/fhir/com.b2international.snowowl.fhir.rest.tests/src/configuration/snowowl.yml +++ b/fhir/com.b2international.snowowl.fhir.rest.tests/src/configuration/snowowl.yml @@ -11,16 +11,10 @@ snomed: languages: - code: en - refSetIds: ["900000000000509007", "900000000000508004"] + refSetIds: ["900000000000509007", "900000000000508004", "999001261000000100", "999000671000001103"] - code: en-us refSetIds: ["900000000000509007"] - code: en-gb refSetIds: ["900000000000508004"] - - - code: en-x-999001261000000100 - refSetIds: ["999001261000000100"] - - - code: en-x-999000671000001103 - refSetIds: ["999000671000001103"] diff --git a/pom.xml b/pom.xml index 78b6fd73ab9..cd8a53fb5d4 100644 --- a/pom.xml +++ b/pom.xml @@ -917,19 +917,19 @@ - ${maven.repository.id} - ${nexus.releases.url} + artifactory-releases + https://artifactory.ops.babylontech.co.uk/artifactory/babylon-maven-releases - ${maven.repository.id} - ${nexus.snapshots.url} + artifactory-snapshots + https://artifactory.ops.babylontech.co.uk/artifactory/babylon-maven-snapshots - https://github.com/b2ihealthcare/snow-owl - scm:git:ssh://github.com/b2ihealthcare/snow-owl.git - scm:git:ssh@github.com:b2ihealthcare/snow-owl.git + https://github.com/babylonhealth/snow-owl + scm:git:ssh://github.com/babylonhealth/snow-owl.git + scm:git:ssh@github.com:babylonhealth/snow-owl.git \ No newline at end of file diff --git a/releng/com.b2international.snowowl.server.update/assembly/common/configuration/snowowl.yml b/releng/com.b2international.snowowl.server.update/assembly/common/configuration/snowowl.yml index 97022836032..6ff81995550 100644 --- a/releng/com.b2international.snowowl.server.update/assembly/common/configuration/snowowl.yml +++ b/releng/com.b2international.snowowl.server.update/assembly/common/configuration/snowowl.yml @@ -29,19 +29,13 @@ snomed: languages: - code: en - refSetIds: ["900000000000509007", "900000000000508004"] + refSetIds: ["900000000000509007", "900000000000508004", "999001261000000100", "999000671000001103"] - code: en-us refSetIds: ["900000000000509007"] - code: en-gb refSetIds: ["900000000000508004"] - - - code: en-x-999001261000000100 - refSetIds: ["999001261000000100"] - - - code: en-x-999000671000001103 - refSetIds: ["999000671000001103"] # Request execution metrics (response-time, jvm, gc, etc.) #monitoring: diff --git a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/configuration/snowowl.yml b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/configuration/snowowl.yml index c16a847c77a..5d6f01e0590 100644 --- a/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/configuration/snowowl.yml +++ b/snomed/com.b2international.snowowl.snomed.core.rest.tests/src/configuration/snowowl.yml @@ -14,19 +14,13 @@ snomed: languages: - code: en - refSetIds: ["900000000000509007", "900000000000508004"] + refSetIds: ["900000000000509007", "900000000000508004", "999001261000000100", "999000671000001103"] - code: en-us refSetIds: ["900000000000509007"] - code: en-gb refSetIds: ["900000000000508004"] - - - code: en-x-999001261000000100 - refSetIds: ["999001261000000100"] - - - code: en-x-999000671000001103 - refSetIds: ["999000671000001103"] # Disable concrete domains, we are going to import the required concepts to an extension concreteDomainSupport: false maxReasonerCount: 1 From ad4f0a27e1a5038998c40185f3ae0ead2be1804f Mon Sep 17 00:00:00 2001 From: ivelina-yordanova <56301327+ivelina-yordanova@users.noreply.github.com> Date: Wed, 4 Mar 2020 14:34:31 +0000 Subject: [PATCH 7/7] chr-1516 - fix versioning (#10) --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 83679491d86..465340fd5e3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,7 @@ workflows: branches: ignore: /.*/ tags: - only: /bbl-.*/ + only: /^.*/ env: &env working_directory: ~/project resource_class: large